Skip to content

docs: trim agent-command-development-guide to rules-only (1750 → 347 lines) - #9

Merged
bborbe merged 1 commit into
masterfrom
feat/trim-agent-cmd-guide
Jun 2, 2026
Merged

docs: trim agent-command-development-guide to rules-only (1750 → 347 lines)#9
bborbe merged 1 commit into
masterfrom
feat/trim-agent-cmd-guide

Conversation

@bborbe

Copy link
Copy Markdown
Owner

Summary

Trims `docs/agent-command-development-guide.md` from 1750 → 347 lines (-80%). Comprehensive reference moves to maintainer's Obsidian KB; coding/docs/ keeps only the enforceable rules used by `coding:agent-auditor` + `coding:slash-command-auditor`.

Mirrors the trim shape from PR #6 (prometheus) + PR #7 (testing).

Why

User confirmed Obsidian-comprehensive / coding-compact architecture in [[Refactor coding pr-review to doc-driven rules pipeline]]. This guide was the largest unstructured doc remaining in coding/ — bootstrap pass (Phase 3) needs tractable source, 1750 lines isn't tractable.

Rules pre-canonicalized

The compact version writes 7 rules in canonical `### RULE` form ready for the bootstrap walker:

  • `agent-cmd/command-thin` (MUST) — commands ≤ 100 lines
  • `agent-cmd/no-user-prompts` (MUST) — no /tmp/ writes, no permission prompts during normal execution
  • `agent-cmd/scripts-in-claude-dir` (MUST) — scripts pre-created in ~/.claude/scripts/ or skill-local scripts/
  • `agent-cmd/command-frontmatter` (MUST) — description / allowed-tools / argument-hint contract
  • `agent-cmd/agent-frontmatter` (MUST) — name / description / tools
  • `agent-cmd/single-source-of-truth` (SHOULD)
  • `agent-cmd/gap-driven-feedback` (SHOULD)

Bootstrap (adding these to `rules/index.json` via the walker) happens in a follow-up PR — kept separate so the trim diff stays reviewable.

Dropped content

  • Extensive Why-This-Matters prose
  • Multiple duplicate examples per pattern
  • Long XML-tag taxonomy with detailed semantics
  • Trading-domain examples (`strategy-development-commander`, `backtest/strategy/`, MCP trading tools, '40 Trading/Strategy Documentation Checklist for Commander.md')
  • Real-world walk-through with named bborbe strategies
  • Setup-and-configuration deep dives

Lessons from PR #6 + #8 applied pre-push

  • `grep -nEi "personal/|/users/bborbe|~/Documents/Obsidian"` → clean
  • Trading-term grep (`candle|epic|broker|signalstore`) → clean
  • No internal contradictions (rule examples don't violate sibling rules)
  • Auditor lookups still resolve — file lives at same path, all references in agents/agent-auditor.md + agents/slash-command-auditor.md continue to work

Test plan

  • `make precommit` clean
  • No personal paths
  • No trading-domain terms
  • Comprehensive reference exists at `Personal/50 Knowledge Base/Agent and Command Development Reference.md`
  • Compact doc carries 7 rule-block-ready sections
  • Bot review (run github-pr-watch)

Same playbook as PR #6 (prometheus) and PR #7 (testing):
coding/docs/ holds the enforceable rules-only version that
coding:agent-auditor + coding:slash-command-auditor consume;
comprehensive reference moves to the maintainer's Obsidian KB.
Trimmed 1750 → 347 lines (-80%). Original had:
- Extensive prose rationale (Why This Matters expansions)
- Multiple duplicate examples per pattern
- Long XML-tag taxonomy with detailed semantics
- Trading-domain examples (strategy-development-commander,
backtest/strategy/, MCP trading tools, '40 Trading/Strategy
Documentation Checklist for Commander.md')
- Real-world walk-through with named bborbe strategies
- Setup-and-configuration deep dives
Compact version keeps the enforceable conventions as canonical
`### RULE` blocks (Phase 3 ready):
- agent-cmd/command-thin (MUST) — commands stay <= 100 lines
- agent-cmd/no-user-prompts (MUST) — no /tmp/ writes, no permission
prompts during normal execution
- agent-cmd/scripts-in-claude-dir (MUST) — scripts pre-created in
~/.claude/scripts/ or skill-local scripts/
- agent-cmd/command-frontmatter (MUST) — description, allowed-tools,
argument-hint contract
- agent-cmd/agent-frontmatter (MUST) — name, description, tools
- agent-cmd/single-source-of-truth (SHOULD) — pin to one canonical
data source, drive drift to gaps
- agent-cmd/gap-driven-feedback (SHOULD) — agent complains with
pointers; feedback loop improves data each run
Plus: the Process, Architecture Principles, File Organization,
Naming Conventions, XML Tag Patterns table, and a Quality Checklist
referencing the rule ids.
Generic examples throughout — no trading-specific terms; no personal
vault paths (auditors keep working, all references stay inside the
plugin package).

@ben-s-pull-request-reviewerben-s-pull-request-reviewerBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my review, here are my findings:

PR Review Summary:

Files Changed:docs/agent-command-development-guide.md (1750 → 347 lines, ~80% trim)

Verification Results:

ConcernStatus
7 canonical RULE blocks complete and self-contained✅ Verified present
Cross-references from agents still resolveagent-auditor.md and slash-command-auditor.md reference docs/agent-command-development-guide.md correctly
No personal/Obsidian paths remain✅ Only generic template ~/Documents/workspaces/<plugin>/ in file org section
No trading-domain terms✅ grep-clean for candle|epic|broker|signalstore|trading

RULE blocks verified:

  1. agent-cmd/command-thin (MUST)
  2. agent-cmd/no-user-prompts (MUST)
  3. agent-cmd/scripts-in-claude-dir (MUST)
  4. agent-cmd/single-source-of-truth (SHOULD)
  5. agent-cmd/gap-driven-feedback (SHOULD)
  6. agent-cmd/command-frontmatter (MUST)
  7. agent-cmd/agent-frontmatter (MUST)

{
"verdict": "approve",
"summary": "Documentation trim removing verbose prose while preserving all 7 enforceable RULE blocks. No personal paths, trading-domain terms, or cross-reference breakages detected. The trimmed guide maintains all required frontmatter, naming conventions, and quality checklist items.",
"comments": [],
"concerns_addressed": [
"correctness: 7 canonical RULE blocks verified complete and self-contained",
"correctness: Cross-references from agents/agent-auditor.md and agents/slash-command-auditor.md still resolve to docs/agent-command-development-guide.md",
"correctness: Personal/Obsidian paths grep-clean — only generic template path ~/Documents/workspaces/<plugin>/ remains in file organization section",
"tests: Trading domain terms (candle|epic|broker|signalstore|trading) grep-clean confirmed — no residual trading-specific content"
]
}

@bborbe
bborbe merged commit b262c88 into masterJun 2, 2026
1 check passed
@bborbe
bborbe deleted the feat/trim-agent-cmd-guide branch June 2, 2026 09:03
bborbe added a commit that referenced this pull request Jun 2, 2026
Restructures the 8 MUST sections in docs/go-testing-guide.md into
canonical `### RULE` blocks. Same template as PRs #2-5, #8.
Rules added (all judgment for this PR; mechanical ast-grep follow-ups
tracked separately):
- go-testing/no-stdlib-table-tests (MUST)
Ginkgo-suite packages must use DescribeTable/Entry, not for/t.Run.
- go-testing/no-testing-t-direct (MUST)
No bare testing.T in Ginkgo-suite packages — use Describe/It.
- go-testing/no-bare-error-call (MUST)
Wrap error-returning calls in Gomega matchers (Succeed/HaveOccurred/
MatchError) — errcheck enforces this in precommit.
- go-testing/suite-test-file-required (MUST)
Every test-containing package needs *_suite_test.go or Ginkgo silently
discovers no specs.
- go-testing/main-test-with-compiles (MUST)
Every binary needs main_test.go with a Compiles It-block backed by
gexec.Build.
- go-testing/suite-timeout-required (MUST)
suiteConfig.Timeout must be set so hung tests fail fast.
- go-testing/counterfeiter-mocks-required (MUST)
No hand-written mocks — they drift silently.
- go-testing/libtime-injection-required (MUST)
Cross-references go-time/no-time-now-direct; test-quality scope.
rules/index.json: 27 → 42 entries
This also picks up 7 agent-cmd/* entries from PR #9 (#9 merged the
doc but didn't include the walker output regen — caught locally via
make build-index). Net new in this PR: 8 go-testing rules.
Pre-emptive checks (lessons from PRs #6, #8): no personal vault paths,
no trading-domain terms, no internal contradictions (rule examples
don't violate sibling rules).
bborbe added a commit that referenced this pull request Jun 2, 2026
PR #9 trimmed a doc that contained pre-canonicalized rule blocks but
shipped without running 'make build-index'. The 7 new agent-cmd/*
entries were silently absent from rules/index.json until PR #10 picked
them up retroactively. The lesson: walker-output drift is silent at
review time; rules/index.json passes JSON validation regardless.
Fix: add 'check-index' to the precommit chain. The target regenerates
the walker output to a tmp file, diffs against the committed index,
and fails with the diff + a 'run make build-index and commit' message
if they differ.
Behavior verified:
- Clean state (master HEAD c07b809): precommit passes
- Synthetic drift (extra line appended to rules/index.json): precommit
fails with diff output and non-zero exit code
This closes the gap that turned a one-PR change (PR #9) into a two-PR
walker-regen catch-up (PR #10). Future trim/bootstrap PRs that touch
rule blocks will fail precommit locally if the walker output isn't
also committed.
Sign up for freeto 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

@bborbe