@qball-inc/the-bulwark 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +43 -0
- package/agents/bulwark-fix-validator.md +633 -0
- package/agents/bulwark-implementer.md +391 -0
- package/agents/bulwark-issue-analyzer.md +308 -0
- package/agents/bulwark-standards-reviewer.md +221 -0
- package/agents/plan-creation-architect.md +323 -0
- package/agents/plan-creation-eng-lead.md +352 -0
- package/agents/plan-creation-po.md +300 -0
- package/agents/plan-creation-qa-critic.md +334 -0
- package/agents/product-ideation-competitive-analyzer.md +298 -0
- package/agents/product-ideation-idea-validator.md +268 -0
- package/agents/product-ideation-market-researcher.md +292 -0
- package/agents/product-ideation-pattern-documenter.md +308 -0
- package/agents/product-ideation-segment-analyzer.md +303 -0
- package/agents/product-ideation-strategist.md +259 -0
- package/agents/statusline-setup.md +97 -0
- package/hooks/hooks.json +59 -0
- package/package.json +45 -0
- package/scripts/hooks/cleanup-stale.sh +13 -0
- package/scripts/hooks/enforce-quality.sh +166 -0
- package/scripts/hooks/implementer-quality.sh +256 -0
- package/scripts/hooks/inject-protocol.sh +52 -0
- package/scripts/hooks/suggest-pipeline.sh +175 -0
- package/scripts/hooks/track-pipeline-start.sh +37 -0
- package/scripts/hooks/track-pipeline-stop.sh +52 -0
- package/scripts/init-rules.sh +35 -0
- package/scripts/init.sh +151 -0
- package/skills/anthropic-validator/SKILL.md +607 -0
- package/skills/anthropic-validator/references/agents-checklist.md +131 -0
- package/skills/anthropic-validator/references/commands-checklist.md +102 -0
- package/skills/anthropic-validator/references/hooks-checklist.md +151 -0
- package/skills/anthropic-validator/references/mcp-checklist.md +136 -0
- package/skills/anthropic-validator/references/plugins-checklist.md +148 -0
- package/skills/anthropic-validator/references/skills-checklist.md +85 -0
- package/skills/assertion-patterns/SKILL.md +296 -0
- package/skills/bug-magnet-data/SKILL.md +284 -0
- package/skills/bug-magnet-data/context/cli-args.md +91 -0
- package/skills/bug-magnet-data/context/db-query.md +104 -0
- package/skills/bug-magnet-data/context/file-contents.md +103 -0
- package/skills/bug-magnet-data/context/http-body.md +91 -0
- package/skills/bug-magnet-data/context/process-spawn.md +123 -0
- package/skills/bug-magnet-data/data/booleans/boundaries.yaml +143 -0
- package/skills/bug-magnet-data/data/collections/arrays.yaml +114 -0
- package/skills/bug-magnet-data/data/collections/objects.yaml +123 -0
- package/skills/bug-magnet-data/data/concurrency/race-conditions.yaml +118 -0
- package/skills/bug-magnet-data/data/concurrency/state-machines.yaml +115 -0
- package/skills/bug-magnet-data/data/dates/boundaries.yaml +137 -0
- package/skills/bug-magnet-data/data/dates/invalid.yaml +132 -0
- package/skills/bug-magnet-data/data/dates/timezone.yaml +118 -0
- package/skills/bug-magnet-data/data/encoding/charset.yaml +79 -0
- package/skills/bug-magnet-data/data/encoding/normalization.yaml +105 -0
- package/skills/bug-magnet-data/data/formats/email.yaml +154 -0
- package/skills/bug-magnet-data/data/formats/json.yaml +187 -0
- package/skills/bug-magnet-data/data/formats/url.yaml +165 -0
- package/skills/bug-magnet-data/data/language-specific/javascript.yaml +182 -0
- package/skills/bug-magnet-data/data/language-specific/python.yaml +174 -0
- package/skills/bug-magnet-data/data/language-specific/rust.yaml +148 -0
- package/skills/bug-magnet-data/data/numbers/boundaries.yaml +161 -0
- package/skills/bug-magnet-data/data/numbers/precision.yaml +89 -0
- package/skills/bug-magnet-data/data/numbers/special.yaml +69 -0
- package/skills/bug-magnet-data/data/strings/boundaries.yaml +109 -0
- package/skills/bug-magnet-data/data/strings/injection.yaml +208 -0
- package/skills/bug-magnet-data/data/strings/special-chars.yaml +190 -0
- package/skills/bug-magnet-data/data/strings/unicode.yaml +139 -0
- package/skills/bug-magnet-data/references/external-lists.md +115 -0
- package/skills/bulwark-brainstorm/SKILL.md +563 -0
- package/skills/bulwark-brainstorm/references/at-teammate-prompts.md +60 -0
- package/skills/bulwark-brainstorm/references/role-critical-analyst.md +78 -0
- package/skills/bulwark-brainstorm/references/role-development-lead.md +66 -0
- package/skills/bulwark-brainstorm/references/role-product-delivery-lead.md +79 -0
- package/skills/bulwark-brainstorm/references/role-product-manager.md +62 -0
- package/skills/bulwark-brainstorm/references/role-project-sme.md +59 -0
- package/skills/bulwark-brainstorm/references/role-technical-architect.md +66 -0
- package/skills/bulwark-research/SKILL.md +298 -0
- package/skills/bulwark-research/references/viewpoint-contrarian.md +63 -0
- package/skills/bulwark-research/references/viewpoint-direct-investigation.md +62 -0
- package/skills/bulwark-research/references/viewpoint-first-principles.md +65 -0
- package/skills/bulwark-research/references/viewpoint-practitioner.md +62 -0
- package/skills/bulwark-research/references/viewpoint-prior-art.md +66 -0
- package/skills/bulwark-scaffold/SKILL.md +330 -0
- package/skills/bulwark-statusline/SKILL.md +161 -0
- package/skills/bulwark-statusline/scripts/statusline.sh +144 -0
- package/skills/bulwark-verify/SKILL.md +519 -0
- package/skills/code-review/SKILL.md +428 -0
- package/skills/code-review/examples/anti-patterns/linting.ts +181 -0
- package/skills/code-review/examples/anti-patterns/security.ts +91 -0
- package/skills/code-review/examples/anti-patterns/standards.ts +195 -0
- package/skills/code-review/examples/anti-patterns/type-safety.ts +108 -0
- package/skills/code-review/examples/recommended/linting.ts +195 -0
- package/skills/code-review/examples/recommended/security.ts +154 -0
- package/skills/code-review/examples/recommended/standards.ts +231 -0
- package/skills/code-review/examples/recommended/type-safety.ts +181 -0
- package/skills/code-review/frameworks/angular.md +218 -0
- package/skills/code-review/frameworks/django.md +235 -0
- package/skills/code-review/frameworks/express.md +207 -0
- package/skills/code-review/frameworks/flask.md +298 -0
- package/skills/code-review/frameworks/generic.md +146 -0
- package/skills/code-review/frameworks/react.md +152 -0
- package/skills/code-review/frameworks/vue.md +244 -0
- package/skills/code-review/references/linting-patterns.md +221 -0
- package/skills/code-review/references/security-patterns.md +125 -0
- package/skills/code-review/references/standards-patterns.md +246 -0
- package/skills/code-review/references/type-safety-patterns.md +130 -0
- package/skills/component-patterns/SKILL.md +131 -0
- package/skills/component-patterns/references/pattern-cli-command.md +118 -0
- package/skills/component-patterns/references/pattern-database.md +166 -0
- package/skills/component-patterns/references/pattern-external-api.md +139 -0
- package/skills/component-patterns/references/pattern-file-parser.md +168 -0
- package/skills/component-patterns/references/pattern-http-server.md +162 -0
- package/skills/component-patterns/references/pattern-process-spawner.md +133 -0
- package/skills/continuous-feedback/SKILL.md +327 -0
- package/skills/continuous-feedback/references/collect-instructions.md +81 -0
- package/skills/continuous-feedback/references/specialize-code-review.md +82 -0
- package/skills/continuous-feedback/references/specialize-general.md +98 -0
- package/skills/continuous-feedback/references/specialize-test-audit.md +81 -0
- package/skills/create-skill/SKILL.md +359 -0
- package/skills/create-skill/references/agent-conventions.md +194 -0
- package/skills/create-skill/references/agent-template.md +195 -0
- package/skills/create-skill/references/content-guidance.md +291 -0
- package/skills/create-skill/references/decision-framework.md +124 -0
- package/skills/create-skill/references/template-pipeline.md +217 -0
- package/skills/create-skill/references/template-reference-heavy.md +111 -0
- package/skills/create-skill/references/template-research.md +210 -0
- package/skills/create-skill/references/template-script-driven.md +172 -0
- package/skills/create-skill/references/template-simple.md +80 -0
- package/skills/create-subagent/SKILL.md +353 -0
- package/skills/create-subagent/references/agent-conventions.md +268 -0
- package/skills/create-subagent/references/content-guidance.md +232 -0
- package/skills/create-subagent/references/decision-framework.md +134 -0
- package/skills/create-subagent/references/template-single-agent.md +192 -0
- package/skills/fix-bug/SKILL.md +241 -0
- package/skills/governance-protocol/SKILL.md +116 -0
- package/skills/init/SKILL.md +341 -0
- package/skills/issue-debugging/SKILL.md +385 -0
- package/skills/issue-debugging/references/anti-patterns.md +245 -0
- package/skills/issue-debugging/references/debug-report-schema.md +227 -0
- package/skills/mock-detection/SKILL.md +511 -0
- package/skills/mock-detection/references/false-positive-prevention.md +402 -0
- package/skills/mock-detection/references/stub-patterns.md +236 -0
- package/skills/pipeline-templates/SKILL.md +215 -0
- package/skills/pipeline-templates/references/code-change-workflow.md +277 -0
- package/skills/pipeline-templates/references/code-review.md +336 -0
- package/skills/pipeline-templates/references/fix-validation.md +421 -0
- package/skills/pipeline-templates/references/new-feature.md +335 -0
- package/skills/pipeline-templates/references/research-brainstorm.md +161 -0
- package/skills/pipeline-templates/references/research-planning.md +257 -0
- package/skills/pipeline-templates/references/test-audit.md +389 -0
- package/skills/pipeline-templates/references/test-execution-fix.md +238 -0
- package/skills/plan-creation/SKILL.md +497 -0
- package/skills/product-ideation/SKILL.md +372 -0
- package/skills/product-ideation/references/analysis-frameworks.md +161 -0
- package/skills/session-handoff/SKILL.md +139 -0
- package/skills/session-handoff/references/examples.md +223 -0
- package/skills/setup-lsp/SKILL.md +312 -0
- package/skills/setup-lsp/references/server-registry.md +85 -0
- package/skills/setup-lsp/references/troubleshooting.md +135 -0
- package/skills/subagent-output-templating/SKILL.md +415 -0
- package/skills/subagent-output-templating/references/examples.md +440 -0
- package/skills/subagent-prompting/SKILL.md +364 -0
- package/skills/subagent-prompting/references/examples.md +342 -0
- package/skills/test-audit/SKILL.md +531 -0
- package/skills/test-audit/references/known-limitations.md +41 -0
- package/skills/test-audit/references/priority-classification.md +30 -0
- package/skills/test-audit/references/prompts/deep-mode-detection.md +83 -0
- package/skills/test-audit/references/prompts/synthesis.md +57 -0
- package/skills/test-audit/references/rewrite-instructions.md +46 -0
- package/skills/test-audit/references/schemas/audit-output.yaml +100 -0
- package/skills/test-audit/references/schemas/diagnostic-output.yaml +49 -0
- package/skills/test-audit/scripts/data-flow-analyzer.ts +509 -0
- package/skills/test-audit/scripts/integration-mock-detector.ts +462 -0
- package/skills/test-audit/scripts/package.json +20 -0
- package/skills/test-audit/scripts/skip-detector.ts +211 -0
- package/skills/test-audit/scripts/verification-counter.ts +295 -0
- package/skills/test-classification/SKILL.md +310 -0
- package/skills/test-fixture-creation/SKILL.md +295 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Synthesis Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template for Stage 3 (Synthesis). Unified for both Deep and Scale modes.
|
|
4
|
+
|
|
5
|
+
## GOAL
|
|
6
|
+
|
|
7
|
+
Synthesize classification and violation findings into prioritized audit report with test effectiveness metrics and REWRITE_REQUIRED directive.
|
|
8
|
+
|
|
9
|
+
## CONSTRAINTS
|
|
10
|
+
|
|
11
|
+
- Do NOT modify any files
|
|
12
|
+
- Use AST verification_lines as ground truth (not heuristic estimates)
|
|
13
|
+
- Calculate test effectiveness per file: `(verification_lines - affected_lines) / verification_lines`
|
|
14
|
+
- When multiple violations affect the same file, compute affected_lines as the UNION of all
|
|
15
|
+
violation_scope ranges (merge overlapping/identical ranges), NOT the sum of individual
|
|
16
|
+
affected_lines values. Example: two violations both scoped to [228, 269] = 42 affected
|
|
17
|
+
lines total, not 84.
|
|
18
|
+
- Include T4 violations from AST skip-detect markers (these are deterministic — no LLM re-evaluation needed)
|
|
19
|
+
- Apply two-gate REWRITE_REQUIRED logic exactly as specified
|
|
20
|
+
- Priority by impact: P0 (false confidence), P1 (incomplete), P2 (pattern)
|
|
21
|
+
- Provide directional rewrite guidance (orchestrator figures out specifics)
|
|
22
|
+
- Complete within 20 tool calls
|
|
23
|
+
|
|
24
|
+
## CONTEXT
|
|
25
|
+
|
|
26
|
+
**Mode:** {deep or scale}
|
|
27
|
+
|
|
28
|
+
**Classification output:** `{classification_yaml_path}` (Scale mode only; Deep mode: "N/A — detection self-classified")
|
|
29
|
+
|
|
30
|
+
**Detection output:** `{detection_yaml_path}`
|
|
31
|
+
|
|
32
|
+
**AST skip-detect output:** `{skip_detect_json or "no markers found"}`
|
|
33
|
+
Include T4 violations from skip markers in the audit report. Each skip/only/todo marker is a T4 violation:
|
|
34
|
+
- `.skip` / `xdescribe` / `xit` → severity: medium, "Test disabled"
|
|
35
|
+
- `.only` / `fdescribe` / `fit` → severity: high, "Focus marker — other tests not running in CI"
|
|
36
|
+
- `.todo` → severity: low, "Test placeholder — not implemented"
|
|
37
|
+
|
|
38
|
+
**AST verify-count output:** `{verify_count_json}`
|
|
39
|
+
Use `metrics.test_logic_lines` as the authoritative `verification_lines` for effectiveness calculation.
|
|
40
|
+
|
|
41
|
+
**Two-gate REWRITE_REQUIRED logic:**
|
|
42
|
+
- Gate 1: Any P0 violation → REWRITE_REQUIRED regardless of percentage
|
|
43
|
+
- Gate 2: P1 violations + any file <95% effectiveness → REWRITE_REQUIRED
|
|
44
|
+
- Advisory: P1 >=95% or P2 only → recommendations only
|
|
45
|
+
|
|
46
|
+
**Priority classification:**
|
|
47
|
+
- P0: False confidence (T1, T3+) - test passes but provides no assurance
|
|
48
|
+
- P1: Incomplete verification (T2, T3) - runs real code but doesn't fully verify
|
|
49
|
+
- P2: Pattern issues (T4 skip/only/todo) - style, organization, disabled tests
|
|
50
|
+
|
|
51
|
+
## OUTPUT
|
|
52
|
+
|
|
53
|
+
Write audit report to: `logs/test-audit-{YYYYMMDD-HHMMSS}.yaml`
|
|
54
|
+
|
|
55
|
+
Write diagnostics to: `logs/diagnostics/test-audit-{YYYYMMDD-HHMMSS}.yaml`
|
|
56
|
+
|
|
57
|
+
Use the schema in `references/schemas/audit-output.yaml`.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Rewrite Instructions
|
|
2
|
+
|
|
3
|
+
When `REWRITE_REQUIRED == true`, follow this procedure for each file in `files_to_rewrite` (ordered by priority, then effectiveness):
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
FOR each file in files_to_rewrite:
|
|
7
|
+
1. Read the file
|
|
8
|
+
2. Load `assertion-patterns` skill (P2.1) for T1-T4 transformation patterns
|
|
9
|
+
3. Identify component type from code analysis
|
|
10
|
+
4. Load `component-patterns` skill (P2.2) for verification templates
|
|
11
|
+
5. Load `bug-magnet-data` context file matching component type:
|
|
12
|
+
- CLI: context/cli-args.md
|
|
13
|
+
- HTTP Server: context/http-body.md
|
|
14
|
+
- File Parser: context/file-contents.md
|
|
15
|
+
- Database: context/db-query.md
|
|
16
|
+
- Process Spawner: context/process-spawn.md
|
|
17
|
+
6. Load T0 + T1 edge cases from bug-magnet-data/data/ for the component:
|
|
18
|
+
- T0 (Always): strings/boundaries, numbers/boundaries, booleans/boundaries
|
|
19
|
+
- T1 (Common): strings/injection (if input handling), strings/unicode
|
|
20
|
+
7. Select applicable patterns for the violation type:
|
|
21
|
+
- T1 fix: Apply "Function call" or "Process spawn" patterns from P2.1
|
|
22
|
+
- T2 fix: Apply "Add result assertion" pattern from P2.1
|
|
23
|
+
- T3 fix: Apply "HTTP Server" or appropriate boundary pattern from P2.2
|
|
24
|
+
- T3+ fix: Apply chain patterns from P2.1
|
|
25
|
+
8. Generate verification script as intermediate artifact:
|
|
26
|
+
- Location: tmp/verification/{test-name}-verify.{ext}
|
|
27
|
+
- Purpose: Validate rewrite works before modifying test
|
|
28
|
+
- REQUIRED: Include edge cases from bug-magnet-data in verification
|
|
29
|
+
9. Rewrite test file using structured patterns
|
|
30
|
+
10. Run verification script to confirm fix
|
|
31
|
+
11. Run original test to verify it now passes
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
If `REWRITE_REQUIRED == false`: Display recommendations without auto-rewrite.
|
|
35
|
+
|
|
36
|
+
## Bug-Magnet-Data Integration (REQUIRED)
|
|
37
|
+
|
|
38
|
+
When generating verification scripts (step 8), you MUST include edge cases from bug-magnet-data:
|
|
39
|
+
|
|
40
|
+
1. **Read the context file** for the detected component type (step 5)
|
|
41
|
+
2. **Load applicable data files** based on context file's "Applicable Categories" section
|
|
42
|
+
3. **Include at minimum**:
|
|
43
|
+
- Empty string / zero / null boundary values (T0)
|
|
44
|
+
- Length extremes for any string inputs (T0)
|
|
45
|
+
- Injection patterns if component handles external input (T1)
|
|
46
|
+
4. **Mark destructive patterns** (`safe_for_automation: false`) as manual-only in script comments
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Audit Output Schema
|
|
2
|
+
# Used by the synthesis sub-agent (Stage 3) to structure the final audit report.
|
|
3
|
+
|
|
4
|
+
metadata:
|
|
5
|
+
skill: test-audit
|
|
6
|
+
timestamp: "{ISO-8601}"
|
|
7
|
+
mode: deep | scale
|
|
8
|
+
threshold: 5
|
|
9
|
+
sources:
|
|
10
|
+
classification: logs/test-classification-{YYYYMMDD-HHMMSS}.yaml | "N/A (deep mode)"
|
|
11
|
+
detection: logs/mock-detection-{YYYYMMDD-HHMMSS}.yaml
|
|
12
|
+
ast_verify_count: /tmp/claude/ast-verify-count.json
|
|
13
|
+
ast_skip_detect: /tmp/claude/ast-skip-detect.json
|
|
14
|
+
ast_data_flow: /tmp/claude/ast-data-flow.json
|
|
15
|
+
model: sonnet
|
|
16
|
+
|
|
17
|
+
audit:
|
|
18
|
+
overview:
|
|
19
|
+
total_files: 25
|
|
20
|
+
files_analyzed: 5
|
|
21
|
+
total_verification_lines: 1250
|
|
22
|
+
total_affected_lines: 154
|
|
23
|
+
overall_effectiveness: 88%
|
|
24
|
+
|
|
25
|
+
file_analysis:
|
|
26
|
+
- file: tests/proxy.test.ts
|
|
27
|
+
verification_lines: 95
|
|
28
|
+
affected_lines: 80
|
|
29
|
+
test_effectiveness: 16%
|
|
30
|
+
priority: P0
|
|
31
|
+
violations: [T1]
|
|
32
|
+
impact: "False confidence - spawn mock hides startup failures"
|
|
33
|
+
rewrite_direction: |
|
|
34
|
+
Use real child_process.spawn(). Verify with port check.
|
|
35
|
+
Test should actually start proxy and verify it's listening.
|
|
36
|
+
|
|
37
|
+
- file: tests/workflow.integration.ts
|
|
38
|
+
verification_lines: 50
|
|
39
|
+
affected_lines: 36
|
|
40
|
+
test_effectiveness: 28%
|
|
41
|
+
priority: P0
|
|
42
|
+
violations: [T3+]
|
|
43
|
+
impact: "False confidence - broken integration chain"
|
|
44
|
+
rewrite_direction: |
|
|
45
|
+
Chain real function outputs. Remove mock data injection.
|
|
46
|
+
Replace mockOrderData with: const order = await createOrder(input);
|
|
47
|
+
|
|
48
|
+
- file: tests/api.integration.ts
|
|
49
|
+
verification_lines: 55
|
|
50
|
+
affected_lines: 37
|
|
51
|
+
test_effectiveness: 33%
|
|
52
|
+
priority: P1
|
|
53
|
+
violations: [T3]
|
|
54
|
+
impact: "Incomplete verification - mocked HTTP"
|
|
55
|
+
rewrite_direction: |
|
|
56
|
+
Use MSW or test server instead of jest.mock('node-fetch').
|
|
57
|
+
Test should verify actual HTTP request/response cycle.
|
|
58
|
+
|
|
59
|
+
- file: tests/config.test.ts
|
|
60
|
+
verification_lines: 40
|
|
61
|
+
affected_lines: 1
|
|
62
|
+
test_effectiveness: 98%
|
|
63
|
+
priority: P1
|
|
64
|
+
violations: [T2]
|
|
65
|
+
impact: "Incomplete verification - call-only assertion"
|
|
66
|
+
rewrite_direction: |
|
|
67
|
+
Add result assertion after toHaveBeenCalled().
|
|
68
|
+
Verify the actual saved value matches expected.
|
|
69
|
+
|
|
70
|
+
recommendations:
|
|
71
|
+
- "Establish test harness for proxy testing"
|
|
72
|
+
- "Create shared fixtures for integration tests"
|
|
73
|
+
- "Consider test utilities for common verification patterns"
|
|
74
|
+
|
|
75
|
+
directive:
|
|
76
|
+
REWRITE_REQUIRED: true
|
|
77
|
+
gate_triggered: "Gate 1: Impact (P0 violations exist)"
|
|
78
|
+
files_to_rewrite:
|
|
79
|
+
- path: tests/proxy.test.ts
|
|
80
|
+
priority: P0
|
|
81
|
+
test_effectiveness: 16%
|
|
82
|
+
- path: tests/workflow.integration.ts
|
|
83
|
+
priority: P0
|
|
84
|
+
test_effectiveness: 28%
|
|
85
|
+
- path: tests/api.integration.ts
|
|
86
|
+
priority: P1
|
|
87
|
+
test_effectiveness: 33%
|
|
88
|
+
files_advisory:
|
|
89
|
+
- path: tests/config.test.ts
|
|
90
|
+
priority: P1
|
|
91
|
+
test_effectiveness: 98%
|
|
92
|
+
reason: "Above 95% threshold - advisory only"
|
|
93
|
+
threshold: 95%
|
|
94
|
+
rationale: "Gate 1 triggered: 2 P0 violations (false confidence). Gate 2 would also trigger: 1 P1 file below threshold."
|
|
95
|
+
|
|
96
|
+
summary: |
|
|
97
|
+
Audit complete: 5 files analyzed, 4 with violations.
|
|
98
|
+
REWRITE_REQUIRED: true (Gate 1 - P0 violations)
|
|
99
|
+
Priority rewrites: proxy.test.ts (P0, 16%), workflow.integration.ts (P0, 28%), api.integration.ts (P1, 33%)
|
|
100
|
+
Advisory: config.test.ts (P1, 98% - above threshold)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Diagnostic Output Schema
|
|
2
|
+
# Written by the synthesis sub-agent to logs/diagnostics/test-audit-{YYYYMMDD-HHMMSS}.yaml
|
|
3
|
+
|
|
4
|
+
diagnostic:
|
|
5
|
+
skill: test-audit
|
|
6
|
+
timestamp: "{ISO-8601}"
|
|
7
|
+
model: sonnet
|
|
8
|
+
|
|
9
|
+
mode_selection:
|
|
10
|
+
mode: deep | scale
|
|
11
|
+
file_count: 5
|
|
12
|
+
threshold: 5
|
|
13
|
+
threshold_source: default | override
|
|
14
|
+
safety_cap_triggered: false
|
|
15
|
+
|
|
16
|
+
stage_0_ast:
|
|
17
|
+
verify_count: success | failed
|
|
18
|
+
skip_detect: success | failed
|
|
19
|
+
ast_analyze: success | failed
|
|
20
|
+
graceful_degradation: false
|
|
21
|
+
degradation_details: ""
|
|
22
|
+
|
|
23
|
+
execution:
|
|
24
|
+
stages_completed: 3
|
|
25
|
+
stages_skipped: ["classification"] # Deep mode skips classification
|
|
26
|
+
total_tool_calls: 12
|
|
27
|
+
classification_source: logs/test-classification-{ts}.yaml | "N/A (deep mode)"
|
|
28
|
+
detection_source: logs/mock-detection-{ts}.yaml
|
|
29
|
+
|
|
30
|
+
gate_evaluation:
|
|
31
|
+
gate_1_check: true
|
|
32
|
+
gate_1_result: "triggered (2 P0 violations)"
|
|
33
|
+
gate_2_check: false
|
|
34
|
+
gate_2_result: "not evaluated (Gate 1 triggered)"
|
|
35
|
+
|
|
36
|
+
decisions:
|
|
37
|
+
- file: tests/proxy.test.ts
|
|
38
|
+
decision: rewrite_required
|
|
39
|
+
reason: "P0 violation (T1) - false confidence"
|
|
40
|
+
effectiveness: 16%
|
|
41
|
+
verification_lines_source: ast # ast or heuristic
|
|
42
|
+
|
|
43
|
+
- file: tests/config.test.ts
|
|
44
|
+
decision: advisory_only
|
|
45
|
+
reason: "P1 violation but 98% effectiveness >= 95% threshold"
|
|
46
|
+
effectiveness: 98%
|
|
47
|
+
verification_lines_source: ast
|
|
48
|
+
|
|
49
|
+
errors: []
|