Skip to content

argus: add ARGUS.md, wire it into the review prompt, raise max-turns to 70#412

Open
ohalushchak-exadel wants to merge 1 commit into
mainfrom
ohalushchak-exadel/argus-md
Open

argus: add ARGUS.md, wire it into the review prompt, raise max-turns to 70#412
ohalushchak-exadel wants to merge 1 commit into
mainfrom
ohalushchak-exadel/argus-md

Conversation

@ohalushchak-exadel

Copy link
Copy Markdown
Collaborator

Summary

Adds a repo-root ARGUS.md that layers repo-specific priors on top of the base prompt at .github/ai-review/expert-adcp-reviewer.md. Deliberately scoped to invariants the base prompt does not already encode:

  • fcap seller_agent_url read/write symmetry — PR trusted-match: bump adcp pin to 3.1.3 and close identity/context spec gaps #406 landed canonicalization on the reader side (via canonicalizeSellerAgentURL in targeting/identityagent/service.go). A new fcap.Field{...} construction that skips the helper fragments cap buckets by URL spelling and silently fails cap enforcement open.
  • Router public endpoint surface + env-var contract — enumerates /registry/snapshot, /tmp/context, /tmp/identity and the TMP_* env-var prefix in cmd/router/main.go. The base prompt's MUST-FIX Add CI: build, test, lint, benchmark #6 covers the conventional-commit marker; ARGUS.md names the concrete surface it applies to.
  • Schema regen — one extra check — after regen, the version comment at line 2 of adcp/types_gen.go must match adcp/schemas/VERSION. A drift means the regen ran against a stale bundle.
  • Metrics error-label discipline — closed-set outcome labels ("timeout" | "canceled" | "error") on identity-agent and context-agent metrics, per targeting/identityagent/metrics.go and targeting/contextagent/metrics.go. Grafana-relevant.
  • Explicit sync clause — every rule is a claim about repo behavior, so a diff that invalidates one must update ARGUS.md in the same PR. Written to be obvious to both human contributors and coding agents.

Sections that would have duplicated the base prompt or AGENTS.md (general TMP-signing MUST-FIX, protocol-managed-skills read-only rule, pinhole overview, generic high-risk-paths list) are deliberately omitted. Draft caught by a Fable-5 audit pass that flagged five duplicative sections and two BLOCKING trivial-path globs — see the commit for the trim rationale.

Workflow changes

  1. Build Argus review prompt step now reads ARGUS.md if present and injects it into the prompt under a # Repo-specific context (from ARGUS.md) header before the pre-computed inputs. Missing file → no-op, existing behavior preserved.
  2. Self-modification gate regex extended to include ^ARGUS\.md$. Argus pauses on this PR (and any future PR that edits ARGUS.md), which is intentional — a review agent must not approve changes to its own priors. CODEOWNERS gates the merge.
  3. --max-turns raised from 60 to 70 to give the reviewer more room on the multi-hunk cross-file audits the current MUST-FIX list drives.

Test plan

  • YAML change is structural bash-heredoc addition inside an existing string; verified by inspection
  • Self-mod gate will fire on this PR — Argus should post the "🛑 Argus paused" comment, not a review. That is the expected behavior and validates the gate change.
  • ARGUS.md content audited by a separate Fable-5 pass against the current tree: all cited paths and behaviors verified; duplicative content pruned

🤖 Generated with Claude Code

…to 70

Adds a repo-root ARGUS.md that layers repo-specific priors on top of the
base prompt at .github/ai-review/expert-adcp-reviewer.md. Content is
scoped to invariants the base prompt does not already encode:

  - fcap seller_agent_url read/write symmetry (PR #406 landed
    canonicalization on the reader side; a new fcap.Field construction
    site that skips canonicalizeSellerAgentURL silently fails cap
    enforcement open).
  - The public router endpoint surface (/registry/snapshot, /tmp/context,
    /tmp/identity) and the TMP_* env-var contract in cmd/router/main.go.
  - The one novel check on top of the schema-regen MUST-FIX: the version
    comment at adcp/types_gen.go line 2 must match adcp/schemas/VERSION.
  - The closed-set error-outcome label discipline on identity-agent and
    context-agent metrics (targeting/identityagent/metrics.go,
    targeting/contextagent/metrics.go), which the base prompt does not
    spell out.
  - An explicit sync clause: every rule is a claim about how the repo
    behaves, so a diff that invalidates a rule must update ARGUS.md in
    the same PR. Applies equally to human contributors and coding agents.

Sections that would have duplicated the base prompt or AGENTS.md
(general TMP-signing MUST-FIX, protocol-managed skills read-only rule,
pinhole overview) are deliberately omitted so ARGUS.md carries only
non-duplicative signal.

Workflow changes:

  - "Build Argus review prompt" step now cats ARGUS.md into the prompt
    under a "# Repo-specific context (from ARGUS.md)" header when the
    file exists. Absent file is a no-op.
  - Self-modification gate regex extended to include ^ARGUS\.md$, so
    edits to this file pause Argus on the containing PR the same way
    edits to the workflow or the base prompt do — a review agent must
    not approve changes to its own priors.
  - --max-turns raised from 60 to 70 to give the reviewer more room on
    the multi-hunk cross-file audits the current MUST-FIX list drives.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@aao-ipr-bot

aao-ipr-bot Bot commented Jul 17, 2026

Copy link
Copy Markdown

🛑 Argus paused on this PR.

This PR modifies Argus's own configuration (.github/workflows/ai-review.yml, .github/ai-review/**, or ARGUS.md). Argus will not post an approving review on changes to its own gates — a human reviewer must take this PR. CODEOWNERS already requires a human approval on these paths.

Workflow run

Automated by the Argus self-modification gate.

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.

Add CI: build, test, lint, benchmark

1 participant