fix(agents): relocate provenance sources.md outside agents/ dir #64

Merged
Defame1297 merged 2 commits from fix/63-relocate-agent-sources-provenance into main 2026-07-05 09:15:21 +00:00
Collaborator

Summary

claude plugin validate --strict auto-discovers every .md file directly under a plugin's agents/ directory and treats it as an agent definition requiring frontmatter. The plugin-scope provenance file (agents/sources.md, per ADR-0005) is not an agent and has no frontmatter by design, so it always fails --strict. This first broke plugins/git/agents/sources.md and was stopgapped with fake agent frontmatter in 0239b00.

Tested both options from #63 empirically on a scratch copy of the git plugin:

  • Excluding via an explicit agents manifest array — does not work. The validator still scans and fails on any unlisted .md in agents/, regardless of what's declared in plugin.json.
  • Relocating the file out of agents/ — works cleanly.

This PR relocates the provenance file to <plugin-root>/sources.md:

  • Adds ADR-0010, partially superseding ADR-0005's agents/sources.md claim (rest of ADR-0005 is unaffected).
  • Fixes real path-construction logic in new-agent.sh (SOURCES_DIR) and validate-provenance.sh (sources_md_path), not just doc references.
  • Updates agent-author/agent-audit SKILL.md, README.md, both provider templates, and bats fixtures.
  • Moves plugins/git/agents/sources.md → plugins/git/sources.md, reverting the 0239b00 frontmatter workaround.
  • Patch-bumps both git (1.3.1→1.3.2) and kyberforge (1.2.0→1.2.1) manifests.

Fixes #63.

Test plan

  • claude plugin validate --strict plugins/git passes
  • claude plugin validate --strict plugins/kyberforge passes
  • bats suites for validate-provenance.bats (16), new-agent.bats (22), validate.bats (12) — 50/50 pass
  • Pre-push hooks (test suite, plugin manifest checks, plugin validation, marketplace validation) pass

🤖 Generated with Claude Code

## Summary `claude plugin validate --strict` auto-discovers every `.md` file directly under a plugin's `agents/` directory and treats it as an agent definition requiring frontmatter. The plugin-scope provenance file (`agents/sources.md`, per ADR-0005) is not an agent and has no frontmatter by design, so it always fails `--strict`. This first broke `plugins/git/agents/sources.md` and was stopgapped with fake agent frontmatter in `0239b00`. Tested both options from #63 empirically on a scratch copy of the git plugin: - **Excluding via an explicit `agents` manifest array** — does not work. The validator still scans and fails on any unlisted `.md` in `agents/`, regardless of what's declared in `plugin.json`. - **Relocating the file out of `agents/`** — works cleanly. This PR relocates the provenance file to `<plugin-root>/sources.md`: - Adds ADR-0010, partially superseding ADR-0005's `agents/sources.md` claim (rest of ADR-0005 is unaffected). - Fixes real path-construction logic in `new-agent.sh` (`SOURCES_DIR`) and `validate-provenance.sh` (`sources_md_path`), not just doc references. - Updates `agent-author`/`agent-audit` SKILL.md, README.md, both provider templates, and bats fixtures. - Moves `plugins/git/agents/sources.md` → `plugins/git/sources.md`, reverting the `0239b00` frontmatter workaround. - Patch-bumps both `git` (1.3.1→1.3.2) and `kyberforge` (1.2.0→1.2.1) manifests. Fixes #63. ## Test plan - [x] `claude plugin validate --strict plugins/git` passes - [x] `claude plugin validate --strict plugins/kyberforge` passes - [x] `bats` suites for `validate-provenance.bats` (16), `new-agent.bats` (22), `validate.bats` (12) — 50/50 pass - [x] Pre-push hooks (test suite, plugin manifest checks, plugin validation, marketplace validation) pass 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Claude added 1 commit 2026-07-05 09:02:19 +00:00
`claude plugin validate --strict` auto-discovers every .md under a
plugin's agents/ directory as an agent requiring frontmatter, so the
provenance file there always needs fake agent frontmatter to pass
validation. Confirmed empirically that an explicit `agents` manifest
array can't suppress this discovery. Move the file to <plugin-root>/
sources.md instead, and update agent-author/agent-audit accordingly.

Adds ADR-0010, partially superseding ADR-0005's `agents/sources.md`
convention. Fixes #63.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Defame1297 added 1 commit 2026-07-05 09:11:16 +00:00
Independent skill-audit clean-check surfaced that the dimension-mapping
list and manual-fallback checklist both skipped the counterpart-missing
case, which validate.sh already treats as a hard FAIL.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Defame1297 requested review from Defame1297 2026-07-05 09:12:30 +00:00
Defame1297 approved these changes 2026-07-05 09:14:43 +00:00
Defame1297 merged commit acc0ae00bf into main 2026-07-05 09:15:21 +00:00
Defame1297 deleted branch fix/63-relocate-agent-sources-provenance 2026-07-05 09:15:21 +00:00
Sign in to join this conversation.