KeiSeiKit-1.0/_assembler/tests/fixtures/_blocks/rule-double-audit.md
Parfii-bot e3053df706 test(assembler): add insta dev-dep and fixture-loading helpers
- Add insta + tempfile to _assembler/Cargo.toml [dev-dependencies].
- Create tests/common/mod.rs with helpers: seed_tempdir (copies
  fixtures into an isolated AGENT_ROOT), run_assemble (invokes the
  built binary via std::process::Command), and assemble_one
  (end-to-end single-manifest helper).
- Seed tests/fixtures/ with the 4 manifests covered by the golden
  snapshots (code-implementer, researcher, cost-guardian,
  patent-compliance) and the 7 blocks they reference (baseline,
  evidence-grading, memory-protocol, rule-pre-dev-gate,
  rule-test-first, rule-error-budget, rule-double-audit).

Binary-only crate (no lib target), so integration tests invoke the
assemble binary in-process instead of calling internal functions.
This exercises the full main.rs I/O + validator + assembler pipeline
end-to-end, which is exactly what the determinism claim covers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 04:15:04 +08:00

750 B

DOUBLE AUDIT PROTOCOL (mandatory when 3+ files touched)

  1. Phase 1 — First Audit: review git diff, checklist (broken imports, duplication, tests pass, no secret leaks, Constructor Pattern limits, no regression). Record findings. NEVER FIX IMMEDIATELY.
  2. Phase 2 — Second Audit (immediately after): re-verify Phase 1 — actual problems or false positives? What else was missed? Side effects of planned fixes? Variant analysis. Prioritize.
  3. Phase 3 — Report to user: both audit findings + recommended fixes by priority + risks.
  4. Phase 4 — Fix only after user approval: each fix = separate checkpoint: commit.

Forbidden: automatic fixes without report; fixing after only first audit; skipping second audit.