Skip to content

feat(framework): Phase v1 PR 6 — audit-prompt and audit-review skills updated#108

Merged
montfort merged 1 commit intomainfrom
feat/audit-prompt-and-review-skills-v1
May 5, 2026
Merged

feat(framework): Phase v1 PR 6 — audit-prompt and audit-review skills updated#108
montfort merged 1 commit intomainfrom
feat/audit-prompt-and-review-skills-v1

Conversation

@montfort
Copy link
Copy Markdown
Contributor

@montfort montfort commented May 5, 2026

Summary

Sixth of 8 PRs implementing the integrated v1 audit-skills iteration. Updates the two existing v0 skills to align with the v1 flow: `devtrail-audit-prompt` simplifies to a thin orchestration shell (no inline prompt surfacing); `devtrail-audit-review` evolves substantially from "validate + merge YAML" to "consolidated analysis generator" producing a six-section `review.md`.

devtrail-audit-prompt (simplified)

devtrail-audit-review (substantial rewrite, ~253 lines)

Replaces v0 "validate + merge YAML" with a consolidated analysis generator. The skill:

  1. Verifies report set under `.devtrail/audits//`.
  2. Reads N reports, builds master finding list.
  3. Verifies each finding against actual code via Explore agents in parallel (up to 3 at a time). The calibrator role moves from a paste-based prompt to in-conversation work with filesystem access.
  4. Classifies findings (`VALID` / `PARTIALLY VALID` / `MISATTRIBUTED` / `FALSE POSITIVE` / `DUPLICATE`) and recalibrates severity against active configuration (anti-inflation, anti-deflation).
  5. Identifies findings the auditors missed.
  6. Writes `review.md` with six sections: Executive summary, Scope definition, Per-auditor evaluation, Remediation plan P0-P4, Discarded findings, Auditor ratings (1-10 across four weighted criteria).
  7. Runs `devtrail charter audit --merge-reports` to emit/merge the `external_audit` YAML.
  8. Branch B handling: when telemetry doesn't exist yet, writes `external-audit-pending.yaml`.

Both skills credit the lift from Sentinel's pre-DevTrail `audit/SKILL.md` and `audit-review/SKILL.md` (issue #102).

Tests

`audit_skill_test.rs` parity assertions updated for both skills:

  • audit-prompt: asserts `/devtrail-audit-execute`, `/devtrail-audit-review`, `.devtrail/audits/`, `audit-prompt.md`, `--prepare`, "ALL audits ... complete" wait warning, "different model families".
  • audit-review: asserts `--merge-reports`, `review.md`, six-section structure, five-verdict vocabulary, four-criterion rating names, `external-audit-pending.yaml`.

V0 markers (`Run AUDITOR PRIMARY PROMPT`, `--calibrate`, `--finalize`) removed from assertions.

Test plan

  • `cargo test --test audit_skill_test` → 12/12 green
  • `cargo test` (full suite) → all suites green, no regressions
  • No version bump (lands with PRs 7-8 in integrated v1 release)

Phase v1 progress

PR Status
1 R10 resolver fix merged (#103)
2 `git_range` default merged (#104)
3 Unified `audit-prompt.md` template merged (#105)
4 CLI subcommand refactor merged (#106)
5 `devtrail-audit-execute` skill merged (#107)
6 `audit-prompt` and `audit-review` skills updated this PR
7 Adopter docs (3 langs) pending
8 Bump release pending

🤖 Generated with Claude Code

… updated

Updates the two existing v0 skills to align with the v1 unified flow.
audit-prompt is simplified to a thin orchestration shell (no more
inline prompt surfacing); audit-review evolves substantially from
"validate + merge YAML" to "consolidated analysis generator" producing
a six-section review.md document.

devtrail-audit-prompt (rewritten body, simplified to ~85 lines per
platform):

  - No longer surfaces prompts inline. The v1 flow writes the prompt
    to .devtrail/audits/<id>/audit-prompt.md and the auditor-side CLIs
    read it from disk via /devtrail-audit-execute (PR 5). Operators
    never copy/paste prompts.
  - Calls `devtrail charter audit <id> --prepare` (the v1 subcommand
    introduced in PR 4).
  - Next-steps guidance directs the operator to open N auditor-side
    CLIs and invoke /devtrail-audit-execute in each, then return to
    the main agent and run /devtrail-audit-review only when ALL
    audits commissioned have completed.

devtrail-audit-review (substantial rewrite, ~253 lines per platform):

  - Replaces the v0 "validate + merge YAML" behavior with a
    consolidated analysis generator. The skill now:
      1. Verifies report set under .devtrail/audits/<id>/.
      2. Reads N reports, builds master finding list.
      3. Verifies each finding against actual code via Explore agents
         in parallel (up to 3 at a time) — the calibrator role moves
         from a paste-based prompt template to in-conversation work
         with filesystem access. This is what makes the consolidated
         review substantive rather than mechanical.
      4. Classifies findings by verdict (VALID / PARTIALLY VALID /
         MISATTRIBUTED / FALSE POSITIVE / DUPLICATE) and recalibrates
         severity against the active configuration (anti-inflation,
         anti-deflation per the audit prompt's Paso 5 discipline).
      5. Identifies findings the auditors missed.
      6. Writes review.md with six sections: Executive summary,
         Scope definition, Per-auditor evaluation, Remediation plan
         P0-P4, Discarded findings, Auditor ratings 1-10 across
         four weighted criteria.
      7. Runs `devtrail charter audit --merge-reports` to validate
         all reports against the schema and emit/merge the
         external_audit YAML block.
      8. Branch B handling: when telemetry doesn't exist yet, writes
         external-audit-pending.yaml for the operator to paste at
         charter close time.

Per-platform variants:

  - dist/.claude/skills/<name>/SKILL.md (allowed-tools)
  - dist/.gemini/skills/<name>/SKILL.md (no allowed-tools)
  - dist/.agent/workflows/<name>.md (description-only frontmatter)

Both skills credit the lift from Sentinel's pre-DevTrail
audit/SKILL.md and audit-review/SKILL.md (issue #102).

Tests (cli/tests/audit_skill_test.rs): updated assertions for the
parity test on each skill, removing v0-specific markers and adding
v1 ones:

  - audit-prompt parity now asserts: /devtrail-audit-execute,
    /devtrail-audit-review, .devtrail/audits/, audit-prompt.md,
    --prepare, "ALL audits ... complete" wait warning, "different
    model families" recommendation. v0 markers ("Run AUDITOR PRIMARY
    PROMPT", "DO NOT use the same family for both") removed.
  - audit-review parity now asserts: --merge-reports, review.md,
    Executive summary, Remediation plan, Auditor ratings, the five
    verdicts (VALID/PARTIALLY VALID/MISATTRIBUTED/FALSE POSITIVE/
    DUPLICATE), the four criterion names (Scope precision,
    Technical depth, Bug detection, False positive rate), and
    external-audit-pending.yaml. v0 markers (--calibrate,
    --finalize) removed.

Test plan:
  - cargo test --test audit_skill_test → 12/12 green.
  - cargo test (full suite) → all suites green, no regressions.
  - No version bump (lands together with PRs 7-8 in the integrated
    v1 release per Propuesta v0.2 §5).

Co-Authored-By: Claude Opus 4.7 (1M context) <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