Files
16gagent/audit-report.md
T
2026-06-06 10:40:48 +08:00

164 lines
16 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Audit Report — 2026-06-06 00:47:24 +08:00
> Generated by `scripts/audit-all.mjs`
## Global Summary
| Metric | Value |
|--------|-------|
| Total Checks | 91 |
| ✅ PASS | 78 |
| ⚠️ WARN | 13 |
| ❌ FAIL | 0 |
| **Verdict** | **⚠️ WARN** |
**Verdict: WARN**
## Execution Protocol (AGENTS.md) — ⚠️ WARN
| ID | Name | Status | Evidence | Suggestion |
|----|------|--------|----------|------------|
| AG-001 | AGENTS.md exists | ✅ PASS | AGENTS.md found (3179 bytes) | |
| AG-0 | §0 Complexity Classification defined | ✅ PASS | Found "### 0. Complexity Classification" with Simple/Complex criteria | |
| AG-0b | §0 Uncertainty fallback ("if uncertain → treat as Complex") | ✅ PASS | Uncertainty fallback rule found | |
| AG-1 | §1 Task Tree Construction defined | ✅ PASS | Found "### 1. Task Tree Construction" with Task Tree definition | |
| AG-1f | §1f Task Tree Quality Gate (7 checks) | ✅ PASS | Found Task Tree Quality Gate with 7 verification items | |
| AG-2 | §2 Planning Protocol defined | ✅ PASS | Found "### 2. Planning Protocol" with Goal/Subtasks/Risks/Verify | |
| AG-3 | §3 Pre-flight Check defined | ✅ PASS | Found "### 3. Pre-flight Check" with Dependency Scan / Learning Context / Domain Checklists | |
| AG-3a | §3a Dependency Scan defined | ✅ PASS | Found §3a Dependency Scan | |
| AG-3b | §3b Learning Context Injector (3 searches) | ✅ PASS | Found §3b Learning Context Injector with 3 mandatory searches | |
| AG-3c | §3c Domain Checklists with ⚠️ Hard Rules | ✅ PASS | Found §3c Domain Checklist Injection with SQL/JS/Next.js/Backend/Generator/Release checklists | |
| AG-3c-hard | §3c Hard Rules count: 1 (target: ≥5) | ⚠️ WARN | Found 1 ⚠️ HARD RULE markers | Promote recurring patterns to Hard Rules. Target ≥5. |
| AG-4 | §4 Failure Replanning Protocol defined | ✅ PASS | Found "### 4. Failure Replanning Protocol" with local/structural replan logic | |
| AG-5 | §5 Verification Protocol defined | ✅ PASS | Found "### 5. Verification Protocol" with Build/Tests/Lint/Regression/Manual checks | |
| AG-5b | §5 Pre-flight Compliance / Quality Gate | ✅ PASS | Found "Pre-flight Compliance Check" with 5 mandatory gates | |
| AG-6 | §6 Governance Compliance defined | ✅ PASS | Found "### 6. Governance Compliance" with State Machine / Heartbeat / Quality Gate | |
| AG-7 | §7 Auto-Capture Trigger defined | ✅ PASS | Found "### 7. Auto-Capture Trigger" with T1-T7 trigger conditions | |
| AG-LL | Learning Loop (🔄) defined | ✅ PASS | Found "## Learning Loop 🔄" with Loop Architecture / Promotion Rules / Reflection Quality Gate / Storage Locations | |
| AG-LL-promo | Promotion Rules (1→2→3→4→5 appearances) | ✅ PASS | Found Promotion Rules chart with 1st=Reflection through 5th=Hard Rule | |
| AG-CB | Agent Package Context Budget defined | ✅ PASS | Found "## Agent Package Context Budget ⚠️ HARD RULE" with size→token map | |
| AG-CB-noxl | XL Package explicitly forbidden | ✅ PASS | Found "XL \| ❌ FORBIDDEN" in Context Budget table | |
| AG-CB-precheck | Input Size Pre-check (Context Budget Declaration) | ✅ PASS | Found "Input Size Pre-check" with Context Budget Declaration template | |
| AG-XR-gov | Cross-references to GOVERNANCE.md: 2 (target: ≥3) | ⚠️ WARN | Found 2 references to GOVERNANCE.md | Add cross-references from AGENTS.md to GOVERNANCE.md in §6 |
| AG-XR-port | Cross-references to PORTFOLIO.md: 1 (target: ≥1) | ⚠️ WARN | Found 1 references to PORTFOLIO.md | Add cross-reference to PORTFOLIO.md in §6e Reference section |
| AG-IR | Injected Risks mechanism defined | ✅ PASS | Found "### Injected Risks" / "### Per-Task Injected Risks" | |
| **Layer Summary** | **21 PASS / 3 WARN / 0 FAIL** | **⚠️ WARN** | | |
## Execution Governance (GOVERNANCE.md) — ⚠️ WARN
| ID | Name | Status | Evidence | Suggestion |
|----|------|--------|----------|------------|
| GV-001 | GOVERNANCE.md exists | ✅ PASS | GOVERNANCE.md found (9830 bytes) | |
| GV-1 | §1 State Machine defined | ✅ PASS | Found "§1 State Machine" section | |
| GV-1a | §1a 8 states defined (found 8) | ✅ PASS | All 8 states present: NOT_STARTED, IN_PROGRESS, BLOCKED, WAITING_DEPENDENCY, READY_FOR_REVIEW, VERIFIED, FAILED, ARCHIVE | |
| GV-1b | §1b State transition diagram (mermaid) | ✅ PASS | Found mermaid stateDiagram-v2 with all legal transitions | |
| GV-1c | §1c Transition table (From/To/Condition) | ✅ PASS | Found Transition Table with From/To/Condition columns | |
| GV-1d | §1d Prohibited transitions defined | ✅ PASS | Found "Prohibited Transitions" with ❌ markers for illegal jumps | |
| GV-2 | §2 Heartbeat Rule defined | ✅ PASS | Found "§2 Heartbeat Rule" section | |
| GV-2a | §2a Heartbeat JSON format defined (ts/status/completed/remaining/next_action) | ✅ PASS | Heartbeat JSON format found with ts, status, completed, remaining, next_action fields | |
| GV-2b | §2b Stale thresholds defined (Small=30m, Medium=2h, Large=8h) | ✅ PASS | Found stale thresholds: Small=30min/30分钟, Medium=2h/2小时, Large=8h/8小时 | |
| GV-2c | progress.log.template exists | ✅ PASS | Found scripts/templates/progress.log.template | |
| GV-3 | §3 Blocker Management defined | ✅ PASS | Found "§3 Blocker Management" section | |
| GV-3a | §3a Blocker schema (blocker/root_cause/owner/mitigation/dependency/created_at) | ✅ PASS | Blocker schema found in GOVERNANCE.md or protocol-reference/templates.md | |
| GV-3b | §3b Blocker escalation defined | ✅ PASS | Found Blocker Escalation mechanism with escalated: YES/NO | |
| GV-3c | blocker.md.template exists | ✅ PASS | Found scripts/templates/blocker.md.template | |
| GV-4 | §4 Replanning Trigger defined | ✅ PASS | Found "§4 Replanning Trigger" with R1-R8 conditions | |
| GV-4a | §4a Replan triggers: 8 (target: ≥8) | ⚠️ WARN | Found 8 replan trigger conditions (R1-R? ) | Ensure all 8 replan triggers (R1-R8) are defined |
| GV-4b | §4b Replan log entry format defined | ✅ PASS | Found Replan log entry format with trigger/cause/before/after/impact | |
| GV-5 | §5 Scope Explosion Detector defined | ✅ PASS | Found "§5 Scope Explosion Detector" with S1-S4 detection rules | |
| GV-6 | §6 Execution Audit defined | ✅ PASS | Found "§6 Execution Audit" section | |
| GV-6a | execution-audit.md.template exists | ✅ PASS | Found scripts/templates/execution-audit.md.template | |
| GV-7 | §7 Project Health Score defined | ✅ PASS | Found "§7 Project Health Score" with 5 dimensions (Delivery/Quality/Parallelism/Dependency/Learning) | |
| GV-7a | §7a All 5 Health Score dimensions defined (Delivery/Quality/Parallelism/Dependency/Learning) | ✅ PASS | All 5 dimensions found with formulas | |
| GV-7b | §7b Weighted final formula defined | ✅ PASS | Found weighted formula: Health Score = Delivery×0.30 + Quality×0.25 + Parallelism×0.15 + Dependency×0.15 + Learning×0.15 | |
| GV-7c | §7c Health Score rating defined (EXCELLENT/GOOD/ACCEPTABLE/AT RISK/CRITICAL) | ✅ PASS | Found 5-level rating in GOVERNANCE.md or protocol-reference/metrics.md | |
| GV-8 | §8 Auto-Stop Rule defined | ✅ PASS | Found "§8 Auto-Stop Rule" with A1-A3 conditions and RECOVERY MODE | |
| GV-8a | §8a RECOVERY MODE defined | ✅ PASS | Found RECOVERY MODE with recovery steps and user approval requirement | |
| GV-9 | §9 Governance Quality Gate defined | ✅ PASS | Found "§9 Governance Quality Gate" with 8-item checklist | |
| GV-10 | §10 Governance State Initialization defined | ✅ PASS | Found "§10 Governance State Initialization" with project start/handoff/override | |
| GV-11 | §11 Integration Summary defined | ✅ PASS | Found "§11 Integration Summary" with raw diagram and lifecycle | |
| GV-11b | §11 Integration Summary includes Portfolio ref | ✅ PASS | Found §11 Integration Summary (with governance→portfolio data flow) | |
| GV-RA-progress | Progress logs found: 1 | ⚠️ WARN | Found 1 progress.log file(s): progress.log | |
| GV-RA-blocker | Blocker files found: 0 | ⚠️ WARN | No blocker.md files found | (no active blockers — good) |
| GV-RA-audit | Execution audits found: 0 | ⚠️ WARN | No execution-audit.md found (expected after first project execution) | Run first project and generate execution-audit.md |
| GV-HS | Project Health Score calculated | ⚠️ WARN | No active project data available for health score calculation. Formula is defined in GOVERNANCE.md §7. | Health Score will be calculated during/after project execution |
| **Layer Summary** | **29 PASS / 5 WARN / 0 FAIL** | **⚠️ WARN** | | |
## Portfolio Management (PORTFOLIO.md) — ⚠️ WARN
| ID | Name | Status | Evidence | Suggestion |
|----|------|--------|----------|------------|
| PF-001 | PORTFOLIO.md exists | ✅ PASS | PORTFOLIO.md found (12321 bytes) | |
| PF-1 | §1 Portfolio Registry defined | ✅ PASS | Found "§1 Portfolio Registry" with schema and field definitions | |
| PF-1a | §1a Registry schema: all 9 fields (ID/Name/Status/Priority/Health/Agents/Progress/Updated/ROI) | ✅ PASS | Registry schema found with all 9 fields | |
| PF-1b | portfolio.md.template exists | ✅ PASS | Found scripts/templates/portfolio.md.template | |
| PF-1c | Actual portfolio.md in workspace root | ⚠️ WARN | Found portfolio.md (12321 bytes) | |
| PF-2 | §2 Project States defined | ✅ PASS | Found "§2 Project States" with 7 portfolio states and transition rules | |
| PF-2a | §2a 7 portfolio states defined (found 7) | ✅ PASS | All 7 states present: PLANNING, ACTIVE, BLOCKED, RECOVERY, PAUSED, COMPLETED, ARCHIVED | |
| PF-2b | §2b Portfolio state transition diagram (mermaid) | ✅ PASS | Found mermaid stateDiagram-v2 for portfolio states | |
| PF-2c | §2c Prohibited portfolio transitions defined | ✅ PASS | Found Prohibited Transitions with ❌ markers | |
| PF-3 | §3 Priority System defined (P0/P1/P2/P3) | ✅ PASS | Found "§3 Priority System" with P0(P1(P2(P3 levels) | |
| PF-3a | §3a All priority levels: P0/P1/P2/P3 | ✅ PASS | P0=true, P1=true, P2=true, P3=true | |
| PF-3b | §3b Priority collision resolution defined | ✅ PASS | Found Priority Collision Resolution: ROI sort → dependency sort → user decision | |
| PF-4 | §4 Resource Allocation defined | ✅ PASS | Found "§4 Resource Allocation" with Agent Inventory / Utilization Score / Rebalancing | |
| PF-4a | §4a Agent inventory: all 5 metrics (Total/Busy/Idle/Blocked/Recovery) | ✅ PASS | Total=true, Busy=true, Idle=true, Blocked=true, Recovery=true | |
| PF-4b | §4b Agent Utilization formula defined | ✅ PASS | Found Utilization = Busy_Agents / Total_Agents with 4-level rating | |
| PF-5 | §5 Project Health Aggregation defined | ✅ PASS | Found "§5 Project Health Aggregation" with 5 dimensions and weights | |
| PF-6 | §6 Portfolio Health Score defined | ✅ PASS | Found "§6 Portfolio Health Score" with weighted average formula | |
| PF-6a | §6a Weighted portfolio formula defined | ✅ PASS | Found weighted portfolio formula (Project_Health × Agent_Count / Σ Agent_Count) | |
| PF-7 | §7 Learning Reuse Detector defined | ✅ PASS | Found "§7 Learning Reuse Detector" with detection criteria and action plan | |
| PF-7a | §7a Duplicate Work criteria defined | ✅ PASS | Found Duplicate Work criteria (30% overlap, same Pattern Class, same deps, same domain) | |
| PF-8 | §8 Portfolio Audit defined | ✅ PASS | Found "§8 Portfolio Audit" with daily generation and audit schema | |
| PF-8a | portfolio-audit.md.template exists | ✅ PASS | Found scripts/templates/portfolio-audit.md.template | |
| PF-9 | §9 Project Kill Rule defined | ✅ PASS | Found "§9 Project Kill Rule" with K1-K4 conditions and graceful shutdown | |
| PF-10 | §10 Project Pause Rule defined | ✅ PASS | Found "§10 Project Pause Rule" with P1-P3 conditions and resume decision | |
| PF-11 | §11 Project Promotion Rule defined | ✅ PASS | Found "§11 Project Promotion Rule" with F1(Health>90), F2(Progress>80%), F3(Risk<20) | |
| PF-12 | §12 Executive Dashboard defined | ✅ PASS | Found "§12 Executive Dashboard" with Portfolio Health / Top Projects / Risks / Opportunities / Utilization / Learning Re | |
| PF-12a | dashboard.md.template exists | ✅ PASS | Found scripts/templates/dashboard.md.template | |
| PF-13 | §13 Portfolio Quality Gate defined | ✅ PASS | Found "§13 Portfolio Quality Gate" with 8-item checklist | |
| PF-14 | §14 Integration Summary defined | ✅ PASS | Found "§14 Integration Summary" with data flow and lifecycle | |
| PF-XR-gov | Cross-references to GOVERNANCE.md: 13 (target: ≥5) | ⚠️ WARN | Found 13 references to GOVERNANCE.md | PORTFOLIO.md should reference GOVERNANCE.md for project-level health/blockers |
| PF-XR-ag | Cross-references to AGENTS.md: 6 (target: ≥2) | ⚠️ WARN | Found 6 references to AGENTS.md | PORTFOLIO.md should reference AGENTS.md for execution protocol |
| PF-DW-scan | Potential duplicate work scan: 5 project directories found | ⚠️ WARN | Found 5 project directories. Manual review recommended for duplicate patterns: cases, claw-os-v2, docs, fullstack, netwo | Check for duplicate code across project directories |
| PF-HS | Portfolio Health Score calculated | ⚠️ WARN | No active project data available for portfolio health calculation. Formula is defined in PORTFOLIO.md §6. | Portfolio Health will be calculated after at least one project has a Health Score |
| **Layer Summary** | **28 PASS / 5 WARN / 0 FAIL** | **⚠️ WARN** | | |
## ⚠️ Warnings (improvement recommended)
- **[AG-3c-hard]** §3c Hard Rules count: 1 (target: ≥5) — Found 1 ⚠️ HARD RULE markers
- *Suggestion:* Promote recurring patterns to Hard Rules. Target ≥5.
- **[AG-XR-gov]** Cross-references to GOVERNANCE.md: 2 (target: ≥3) — Found 2 references to GOVERNANCE.md
- *Suggestion:* Add cross-references from AGENTS.md to GOVERNANCE.md in §6
- **[AG-XR-port]** Cross-references to PORTFOLIO.md: 1 (target: ≥1) — Found 1 references to PORTFOLIO.md
- *Suggestion:* Add cross-reference to PORTFOLIO.md in §6e Reference section
- **[GV-4a]** §4a Replan triggers: 8 (target: ≥8) — Found 8 replan trigger conditions (R1-R? )
- *Suggestion:* Ensure all 8 replan triggers (R1-R8) are defined
- **[GV-RA-progress]** Progress logs found: 1 — Found 1 progress.log file(s): progress.log
- **[GV-RA-blocker]** Blocker files found: 0 — No blocker.md files found
- *Suggestion:* (no active blockers — good)
- **[GV-RA-audit]** Execution audits found: 0 — No execution-audit.md found (expected after first project execution)
- *Suggestion:* Run first project and generate execution-audit.md
- **[GV-HS]** Project Health Score calculated — No active project data available for health score calculation. Formula is defined in GOVERNANCE.md §7.
- *Suggestion:* Health Score will be calculated during/after project execution
- **[PF-1c]** Actual portfolio.md in workspace root — Found portfolio.md (12321 bytes)
- **[PF-XR-gov]** Cross-references to GOVERNANCE.md: 13 (target: ≥5) — Found 13 references to GOVERNANCE.md
- *Suggestion:* PORTFOLIO.md should reference GOVERNANCE.md for project-level health/blockers
- **[PF-XR-ag]** Cross-references to AGENTS.md: 6 (target: ≥2) — Found 6 references to AGENTS.md
- *Suggestion:* PORTFOLIO.md should reference AGENTS.md for execution protocol
- **[PF-DW-scan]** Potential duplicate work scan: 5 project directories found — Found 5 project directories. Manual review recommended for duplicate patterns: cases, claw-os-v2, docs, fullstack, network-tool
- *Suggestion:* Check for duplicate code across project directories
- **[PF-HS]** Portfolio Health Score calculated — No active project data available for portfolio health calculation. Formula is defined in PORTFOLIO.md §6.
- *Suggestion:* Portfolio Health will be calculated after at least one project has a Health Score
## Coverage
| Layer | Sections | Checks |
|-------|----------|--------|
| AGENTS.md | §0-§7, Learning Loop, Context Budget | 24 |
| GOVERNANCE.md | §1-§12 | 34 |
| PORTFOLIO.md | §1-§14 | 33 |
| **Total** | **3 layers** | **91** |
---
*Audit complete. 2026-06-06 00:47:24 +08:00*