Skip to content

docs(vault): single-source agent spec in AGENTS.md; document template dev workflow - #49

Merged
galimba merged 1 commit into
mainfrom
docs/context-engineering-pass
Jul 10, 2026
Merged

docs(vault): single-source agent spec in AGENTS.md; document template dev workflow#49
galimba merged 1 commit into
mainfrom
docs/context-engineering-pass

Conversation

@galimba

@galimba galimba commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary

Context-engineering pass: one canonical agent spec, zero duplication, and the template-development workflow finally written down.

  • AGENTS.md is now the single canonical specification (~220 lines). Its rules digest numbering matches the canonical HR-/SR- IDs exactly (the old CLAUDE.md digest misnumbered SR-005/007/008 and listed a rule that exists in no rule file — the drift class behind 78e1e67 and 081e274). Absorbs the operational details agents actually need per-session: SR-005 log entry format, source-* naming, index-update vs destructive index-rebuild, confidence calibration, rate-limit override protocol.
  • CLAUDE.md → 21-line adapter that imports @AGENTS.md. The vault version string now lives only in AGENTS.md, so releases have one less file to bump (init.sh's version-reset sed no-ops harmlessly on the adapter).
  • CODEX.md → 28-line adapter; drops the boundaries block that was duplicated "for convenience."
  • CONTRIBUTING.md gains a Template Development Workflow section: protected-path pre-commit behavior and the human --no-verify convention, test-suite invocation, a runnable definition-of-done, and the maintainer release checklist. Placed inside the span init.sh deletes when scaffolding an instance, so instances never see it (verified by simulating the sed).
  • init.sh: stale template_version="0.4.0" stamp and v0.4.0 CHANGELOG seed line → 0.6.0.
  • lib-manage.sh: doctor's unresolved-placeholder check now targets AGENTS.md (which carries the Identity placeholders) instead of the now-placeholder-free thin CLAUDE.md, where it would always pass.
  • docs/skills.md: names the exact literal-substring hardening traps that block skill commits; README.md: links the previously orphaned getting-started guide, platform table marks AGENTS.md canonical.

Verification

  • Script tests: 11/11 pass
  • shellcheck on all .vault scripts: clean
  • markdownlint-cli2 on all tracked markdown: 0 errors
  • vault-tools.sh doctor: exit 0 (placeholder warning now correctly fires against AGENTS.md on the pristine template, warning-level as before)
  • init.sh sed anchors in CONTRIBUTING.md preserved; AGENTS.md retains the exact **Vault Version**: pattern init.sh resets

Notes for review

  • Touches HR-011/012/013-protected paths — committed by the maintainer with --no-verify per the (now documented) convention.
  • Will conflict with the upcoming orphan-tags PR in CHANGELOG [Unreleased] — keep both entries.

🤖 Generated with Claude Code

… dev workflow

Context-engineering pass. CLAUDE.md/AGENTS.md/CODEX.md carried three
divergent copies of the spec and drifted repeatedly (78e1e67, 081e274:
CLAUDE.md's soft-rule digest misnumbered canonical SR IDs and listed a
rule that does not exist in soft-rules.md).

- AGENTS.md: now the canonical spec. Absorbs the only content CLAUDE.md
  had that it lacked (rate-limit override paragraph, SR-005 log entry
  format, source-page naming, index-update vs index-rebuild guidance,
  confidence calibration). Digest numbering now matches canonical
  HR/SR IDs exactly.
- CLAUDE.md: thin Claude Code adapter (298 -> 21 lines) that imports
  @AGENTS.md. Version string and identity now live only in AGENTS.md
  (init.sh's version-reset sed no-ops harmlessly on CLAUDE.md).
  Initialization checklist relocated to README/getting-started, which
  already covered it.
- CODEX.md: drops the boundaries block that was "reproduced for
  convenience" (85 -> 28 lines); pure pointer + commit-trailer override.
- CONTRIBUTING.md: new Template Development Workflow section (placed
  inside the span init.sh deletes for instances, so it self-removes):
  protected-path pre-commit behavior and the human --no-verify
  convention, test-suite invocation, runnable definition-of-done,
  maintainer release checklist. Linter commands updated to the
  CI-verified forms.
- docs/skills.md: names the exact skill-hardening substring traps
  instead of alluding to them.
- README.md: link docs/getting-started.md (was orphaned).
- init.sh: fix stale template_version="0.4.0" stamp and v0.4.0
  CHANGELOG seed line -> 0.6.0 (both flagged by the new release
  checklist as per-release touch points).
- lib-manage.sh: doctor's unresolved-placeholder check now targets
  AGENTS.md (which carries the Identity placeholders) instead of the
  now-placeholder-free thin CLAUDE.md, where it would always pass.
- CHANGELOG.md: [Unreleased] entry for all of the above.

Verified: markdownlint 0 errors, doctor exit 0, 11/11 script tests,
shellcheck clean, typos clean. init.sh sed anchors in CONTRIBUTING.md
("## Two Types of Contributions" / "## How to Report Bugs") preserved;
AGENTS.md retains the exact "**Vault Version**:" pattern init.sh resets.

Touches HR-012/HR-013-protected files: human commit with --no-verify
required (agents must not use it).

Co-Authored-By: Claude <noreply@anthropic.com>
@galimba
galimba merged commit fb92e65 into main Jul 10, 2026
7 checks passed
@galimba
galimba deleted the docs/context-engineering-pass branch July 10, 2026 22:20
galimba added a commit that referenced this pull request Jul 10, 2026
Resolves the expected CHANGELOG [Unreleased] conflict with the
context-engineering pass (#49) by keeping both entries.

Committed with --no-verify because the merge brings #49's protected-path
files (CLAUDE.md, AGENTS.md, CODEX.md, .vault/scripts/) into the staged
diff and the pre-commit hook is not merge-aware; no protected file was
edited in this resolution — only CHANGELOG.md.

Co-Authored-By: Claude <noreply@anthropic.com>
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