Skip to content

Add provenance tracking and source repo mode#15

Merged
HartBrook merged 1 commit intomainfrom
feature/provenance
Jan 21, 2026
Merged

Add provenance tracking and source repo mode#15
HartBrook merged 1 commit intomainfrom
feature/provenance

Conversation

@HartBrook
Copy link
Copy Markdown
Owner

Summary

  • Provenance tracking: Merged CLAUDE.md now includes <!-- staghorn:source:LAYER --> comments marking content origin, enabling tooling to understand which layer contributed each section
  • Source repo detection: .staghorn/source.yaml marks team/community repos for special handling
  • Source repo mode: When inside a source repo, commands (edit, info, optimize, eval) operate on local files instead of cache for seamless development workflow
  • Provenance-aware optimization: stag optimize --apply now works with merged configs, splitting content back to source layers
  • Flatter language structure: Language sections are now top-level H2 headers instead of nested

Test plan

  • Run go test ./... to verify all tests pass
  • Test stag team init creates .staghorn/source.yaml
  • Test stag sync produces provenance markers in output
  • Test stag optimize --apply splits merged content by provenance
  • Test source repo mode: stag edit team works inside a source repo

@HartBrook HartBrook merged commit 0b8fd38 into main Jan 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant