Skip to content

feat(pipeline): mirror dispatcher into code-review.md + migrate 10 more agents#28

Merged
bborbe merged 1 commit into
masterfrom
feat/pipeline-finish
Jun 2, 2026
Merged

feat(pipeline): mirror dispatcher into code-review.md + migrate 10 more agents#28
bborbe merged 1 commit into
masterfrom
feat/pipeline-finish

Conversation

@bborbe

@bborbe bborbe commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

Completes the dispatcher refactor follow-ups noted in PR #27.

What's in this PR

commands/code-review.md — Step 4 now mirrors commands/pr-review.md's dispatcher shape (PR #27): 4a ast-grep-runner mechanical funnel; 4b per-Owner concurrent adjudication; 4c context-specific convention reads; 4d citation validation. Conditional / full-mode agents that don't yet have RULE blocks (license, readme-quality, shellcheck, context7, go-version-manager, go-tooling) continue on the legacy direct-invoke path until their conventions land as canonical rules.

10 per-language agents migrated to the dispatcher contract:

  • `go-quality-assistant`
  • `go-architecture-assistant`
  • `go-factory-pattern-assistant`
  • `go-http-handler-assistant`
  • `go-metrics-assistant`
  • `go-security-specialist` (preserves toolchain fallback for findings outside the rule-base scope — gosec / trivy / osv-scanner still run)
  • `go-test-quality-assistant`
  • `godoc-assistant`
  • `python-architecture-assistant`
  • `python-quality-assistant`

Each gets: "When invoked by the dispatcher" section + Source of truth pointer to `rules/index.json` + citation discipline note (every emitted `rule_id` MUST exist in `rules/index.json`).

Total agents on dispatcher contract: 13 (3 from PR #27 + 10 here). The remaining 18 agents are utility / auditor / file-existence-check agents that don't enforce `rules/index.json` owners — they don't need dispatcher contract migration.

Legacy mode preserved on every migrated agent — they tolerate both shapes during rollout.

Test plan

  • `make precommit` clean (links + JSON + check-index + check-coverage)
  • `check-coverage: OK (124 rules, 15 mechanical YAMLs, no drift)`
  • Migrated agents still readable as standalone (Source-of-truth + dispatcher invocation note added without removing existing role/constraints/process content)

…re agents

Completes the dispatcher refactor follow-ups.

commands/code-review.md — Step 4 now mirrors commands/pr-review.md's
dispatcher shape (PR #27): 4a ast-grep-runner mechanical funnel; 4b
per-Owner concurrent adjudication; 4c context-specific convention
reads; 4d citation validation via scripts/validate-citations.sh.
Conditional/full-mode agents that don't yet have RULE blocks
(license, readme-quality, shellcheck, context7, go-version-manager,
go-tooling) continue on the legacy direct-invoke path until their
conventions land as canonical rules.

10 per-language agents migrated to the dispatcher contract — added
'When invoked by the dispatcher' section + Source of truth pointer
to rules/index.json + citation discipline note:

- go-quality-assistant
- go-architecture-assistant
- go-factory-pattern-assistant
- go-http-handler-assistant
- go-metrics-assistant
- go-security-specialist (preserves toolchain fallback for findings
  outside the rule-base scope)
- go-test-quality-assistant
- godoc-assistant
- python-architecture-assistant
- python-quality-assistant

Total agents on dispatcher contract: 13 (3 from PR #27 + 10 here).
Remaining 18 agents are utility / auditor / file-existence-check
agents that don't enforce rules/index.json owners — they don't
need dispatcher contract migration.

Legacy mode preserved on every migrated agent — agents tolerate
both shapes during the rollout (dispatcher invocation + direct
slash-command-style invocation).

make precommit clean (links + JSON + check-index + check-coverage).

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot 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.

{
  "verdict": "approve",
  "summary": "PR #28 migrates 10 agents to the dispatcher contract and mirrors the dispatcher pipeline from pr-review.md into code-review.md. The diff is clean — only markdown files changed (agent definitions + one command). No Go/Python source code was modified, so no mechanical rule findings or security concerns apply. The dispatcher shape is consistent with pr-review.md Step 4; citation discipline language is added to all migrated agents; legacy mode is preserved where needed. One minor doc-path discrepancy in Step 4c (uses ~/Documents/workspaces/coding/docs/ instead of the /home/node/.claude/plugins/... path documented in pr-review.md for YOLO containers), but this only affects manual convention loading and does not affect the mechanical pipeline.",
  "comments": [
    {
      "file": "commands/code-review.md",
      "line": 113,
      "severity": "minor",
      "message": "Step 4c context-specific conventions table references path ~/Documents/workspaces/coding/docs/ which does not match the YOLO-container mount path /home/node/.claude/plugins/marketplaces/coding/docs/ documented in pr-review.md Step 4c. This only affects manual doc loading when diff touches .env, k8s, or teamvault files — not the mechanical pipeline. Consider aligning the path reference."
    }
  ],
  "concerns_addressed": [
    "correctness: dispatcher shape change in Step 4 — verified complete mirror of pr-review.md with 4a/4b/4c/4d structure plus conditional/full-mode agents",
    "correctness: go-security-specialist.md migrated with toolchain fallback preserved — citation discipline added for rule-base findings, toolchain findings exempt",
    "correctness: all 10 agents now have 'When invoked by the dispatcher' section — citation discipline enforced (rule_id must exist in rules/index.json)",
    "correctness: legacy mode preserved in go-factory-pattern-assistant, go-http-handler-assistant, go-security-specialist, go-test-quality-assistant, godoc-assistant — both shapes work without conflict",
    "tests: code-review.md no longer contains inline test-agent list — dispatcher handles agent selection; coverage adequacy validated by existing rule-base",
    "security: go-security-specialist migrated with toolchain fallback — security toolchain (gosec/trivy/osv-scanner) runs outside rule-base scope",
    "correctness: godoc-assistant migrated — exported-item documentation review still owned by godoc-assistant under dispatcher contract",
    "correctness: python-architecture-assistant migrated — Python-specific concerns still addressed under dispatcher contract"
  ]
}

@bborbe bborbe merged commit 04cb22c into master Jun 2, 2026
1 check passed
@bborbe bborbe deleted the feat/pipeline-finish branch June 2, 2026 20:19
bborbe added a commit that referenced this pull request Jun 2, 2026
…lag.Func

Bot raised 3 MAJOR + 4 MINOR. Two MAJOR + all 4 MINOR are real
scope-alignment issues; the third MAJOR is a hallucination (PR #29
does not touch commands/code-review.md).

REAL FIXES:

1. cobra-not-stdlib-flag: applies_when text scoped to 'CLI binary's
   main.go / pkg/cli/...' but the YAML matches any non-test Go file.
   The YAML scope is the correct one — the failure mode this rule
   prevents (transitive flag.init() pollution) is broader than CLI
   binaries; a library calling flag.String() in init() pollutes
   every binary that imports it. Broadened applies_when text to
   match the YAML scope.

2. no-raw-go-func: pkg/cli/** exemption added in the prior commit
   wasn't documented in applies_when. Added the rationale to both
   the doc's applies_when text AND a comment block in the YAML
   itself, so the reader sees the exemption justification at both
   levels. The exemption is intentional: the canonical
   pkg/cli/Execute() pattern uses 'go func() { <-sigCh; cancel() }()'
   for signal-listener wiring; without the exemption every CLI's
   bootstrap fires a false positive.

3. flag.Func added to the cobra YAML pattern list. Go 1.16+ API for
   registering a custom-value-setter flag; was missing from the
   original primitive enumeration.

NOT FIXED (bot hallucination):

- 'commands/code-review.md was significantly simplified [removing
  the dispatcher pipeline]' is wrong. PR #29's diff does not touch
  commands/code-review.md at all. Bot is comparing against a stale
  base or confusing this PR with a different one. PR #28 (already
  merged) ADDED the dispatcher to code-review.md; PR #29 only
  touches rules/go/*.yml + docs/go-{cli,concurrency}-*.md +
  rules/index.json (the walker output).

make precommit clean; check-coverage: OK (124 rules, 17 mechanical
YAMLs).
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