---
milestone: v2.0
audited: 2026-03-20T07:00:00Z
status: tech_debt
scores:
  requirements: 27/27
  phases: 7/7
  integration: 47/48
  flows: 5/5
gaps:
  requirements: []
  integration:
    - id: "INT-01"
      description: "Phantom 'mutation' category in _DEFAULT_ACTIVE_CATEGORIES"
      severity: "low"
      affected_requirements: ["AGNT-04", "PLUG-05"]
      detail: "_DEFAULT_ACTIVE_CATEGORIES includes 'mutation' but no built-in actions use that category. discover_categories output is correct (only shows registry categories), so agents are not misled. The phantom entry becomes valid when a plugin registers custom note types."
    - id: "INT-02"
      description: "ServiceError.recovery field never populated by any service"
      severity: "low"
      affected_requirements: ["AGNT-01"]
      detail: "ServiceError.recovery is always None. McpResponse.from_result() falls back to COMMON_ERROR_RECOVERY (37 codes covered). The field exists as unused infrastructure for future per-instance override."
    - id: "INT-03"
      description: "load_plugin_commands creates separate PluginManager without inject_configs"
      severity: "medium"
      affected_requirements: ["PLUG-03"]
      detail: "CLI command enumeration creates a PluginManager that does not call inject_configs(). Plugins in that PM receive initialize(config=None). The action-execution PM (via vault.init_event_bus) correctly calls inject_configs. Only affects plugin CLI command contributions that rely on config during command listing."
    - id: "INT-04"
      description: "PLUGIN_API_VERSION=1 but deprecation docstrings say 'plugin API v2'"
      severity: "low"
      affected_requirements: ["PLUG-01"]
      detail: "Naming inconsistency between the integer constant (1) and human-readable docstring references ('v2'). No runtime impact."
  flows: []
tech_debt:
  - phase: 01-core-hardening
    items:
      - "graph.py bridges() uses betweenness_centrality without k-approximation (materialize_metrics was fixed; bridges is a separate user-invoked query)"
  - phase: 03-mcp-surface-generation
    items:
      - "SUMMARY frontmatter missing requirements_completed for ACTN-03 (03-01-SUMMARY.md)"
  - phase: 05-plugin-formalization
    items:
      - "SUMMARY frontmatter missing requirements_completed for PLUG-01, PLUG-03, PLUG-05, PLUG-06, PLUG-07 (all plan SUMMARYs show empty arrays)"
  - phase: 06-agentic-integration-security
    items:
      - "SUMMARY frontmatter missing requirements_completed for AGNT-03, AGNT-04, SECU-01, SECU-02 (06-02 and 06-03 SUMMARYs show empty arrays)"
      - "stdlib logging.debug used instead of structlog for missing capability declarations (intentional divergence documented in test)"
  - phase: 07-plugin-agentic-wiring-fixes
    items:
      - "SUMMARY frontmatter missing requirements_completed for PLUG-03, AGNT-01, AGNT-04 (07-01-SUMMARY.md shows empty array)"
nyquist:
  compliant_phases: []
  partial_phases: ["01-core-hardening", "02-action-registry", "03-mcp-surface-generation", "04-cli-surface-generation", "05-plugin-formalization", "06-agentic-integration-security", "07-plugin-agentic-wiring-fixes"]
  missing_phases: []
  overall: "partial — all 7 phases have VALIDATION.md but none are nyquist_compliant"
---

# v2.0 Milestone Audit Report

**Milestone:** v2.0 — Production-grade extensible platform
**Audited:** 2026-03-20T07:00:00Z
**Status:** tech_debt (all requirements met, no critical blockers, accumulated items need review)
**Re-audit:** Yes — Phase 7 gap closure completed since previous audit (2026-03-20T05:30:00Z)

---

## Executive Summary

All 27 requirements are satisfied across 7 phases. All 7 phase VERIFICATION.md files report `status: passed`. The integration checker verified 5/5 E2E flows complete and found 4 non-critical integration items. The milestone goal — transforming ztlctl from a CLI tool into a production-grade extensible platform — is achieved.

**Key stats:**
- 27/27 requirements satisfied (9 HARD, 5 ACTN, 7 PLUG, 4 AGNT, 2 SECU)
- 7/7 phases verified and passed
- 5/5 E2E flows complete (plugin lifecycle, CLI execution, MCP execution, error flow, ActionRejection)
- 47/48 cross-phase connections wired (1 partial: load_plugin_commands PM)
- 4 integration items (0 critical, 1 medium, 3 low)

---

## Requirements Coverage (3-Source Cross-Reference)

### Phase 1: Core Hardening (9/9 satisfied)

| REQ-ID | VERIFICATION | SUMMARY | REQUIREMENTS | Final Status |
|--------|-------------|---------|-------------|-------------|
| HARD-01 | passed | 01-02-SUMMARY | [x] | **satisfied** |
| HARD-02 | passed | 01-01-SUMMARY | [x] | **satisfied** |
| HARD-03 | passed | 01-05-SUMMARY | [x] | **satisfied** |
| HARD-04 | passed | 01-05-SUMMARY | [x] | **satisfied** |
| HARD-05 | passed | 01-04-SUMMARY | [x] | **satisfied** |
| HARD-06 | passed | 01-03-SUMMARY | [x] | **satisfied** |
| HARD-07 | passed | 01-02-SUMMARY | [x] | **satisfied** |
| HARD-08 | passed | 01-05-SUMMARY | [x] | **satisfied** |
| HARD-09 | passed | 01-01-SUMMARY | [x] | **satisfied** |

### Phase 2: Action Registry (2/2 satisfied)

| REQ-ID | VERIFICATION | SUMMARY | REQUIREMENTS | Final Status |
|--------|-------------|---------|-------------|-------------|
| ACTN-01 | passed | 02-01-SUMMARY | [x] | **satisfied** |
| ACTN-02 | passed | 02-01, 02-03-SUMMARY | [x] | **satisfied** |

### Phase 3: MCP Surface Generation (3/3 satisfied)

| REQ-ID | VERIFICATION | SUMMARY | REQUIREMENTS | Final Status |
|--------|-------------|---------|-------------|-------------|
| ACTN-03 | passed | *missing* | [x] | **satisfied** |
| AGNT-02 | passed | 03-02-SUMMARY | [x] | **satisfied** |
| PLUG-04 | passed | 03-02-SUMMARY | [x] | **satisfied** |

### Phase 4: CLI Surface Generation (2/2 satisfied)

| REQ-ID | VERIFICATION | SUMMARY | REQUIREMENTS | Final Status |
|--------|-------------|---------|-------------|-------------|
| ACTN-04 | passed | 04-01, 04-02-SUMMARY | [x] | **satisfied** |
| ACTN-05 | passed | 04-01, 04-02-SUMMARY | [x] | **satisfied** |

### Phase 5: Plugin Formalization (6/6 satisfied)

| REQ-ID | VERIFICATION | SUMMARY | REQUIREMENTS | Final Status |
|--------|-------------|---------|-------------|-------------|
| PLUG-01 | passed | *missing* | [x] | **satisfied** |
| PLUG-02 | passed (also Phase 7) | 07-02, 07-03-SUMMARY | [x] | **satisfied** |
| PLUG-03 | passed (also Phase 7) | *missing* | [x] | **satisfied** |
| PLUG-05 | passed | *missing* | [x] | **satisfied** |
| PLUG-06 | passed | *missing* | [x] | **satisfied** |
| PLUG-07 | passed | *missing* | [x] | **satisfied** |

### Phase 6: Agentic Integration & Security (5/5 satisfied)

| REQ-ID | VERIFICATION | SUMMARY | REQUIREMENTS | Final Status |
|--------|-------------|---------|-------------|-------------|
| AGNT-01 | passed (also Phase 7) | 06-01-SUMMARY | [x] | **satisfied** |
| AGNT-03 | passed | *missing* | [x] | **satisfied** |
| AGNT-04 | passed (also Phase 7) | *missing* | [x] | **satisfied** |
| SECU-01 | passed | *missing* | [x] | **satisfied** |
| SECU-02 | passed | *missing* | [x] | **satisfied** |

### Phase 7: Plugin & Agentic Wiring Fixes (4/4 satisfied — gap closure)

| REQ-ID | VERIFICATION | SUMMARY | REQUIREMENTS | Final Status |
|--------|-------------|---------|-------------|-------------|
| PLUG-02 | passed | 07-02, 07-03-SUMMARY | [x] | **satisfied** |
| PLUG-03 | passed | *missing* | [x] | **satisfied** |
| AGNT-01 | passed | *missing* | [x] | **satisfied** |
| AGNT-04 | passed | *missing* | [x] | **satisfied** |

### SUMMARY Frontmatter Gap Note

10 of 27 requirements are marked *missing* from SUMMARY frontmatter `requirements_completed` fields. This is a bookkeeping omission — the VERIFICATION.md files provide definitive code-level evidence for all 27. No orphaned requirements detected.

---

## Phase Verification Summary

| Phase | Status | Score | Gaps | Tech Debt Items |
|-------|--------|-------|------|-----------------|
| 01 Core Hardening | passed | 21/21 | 0 | 1 (bridges betweenness) |
| 02 Action Registry | passed | 11/11 | 0 | 0 |
| 03 MCP Surface Generation | passed | 9/9 | 0 | 1 (SUMMARY frontmatter) |
| 04 CLI Surface Generation | passed | 12/12 | 0 | 0 |
| 05 Plugin Formalization | passed | 10/10 | 0 | 1 (SUMMARY frontmatter) |
| 06 Agentic Integration & Security | passed | 9/9 | 0 | 2 (SUMMARY frontmatter, logging divergence) |
| 07 Plugin & Agentic Wiring Fixes | passed | 9/9 | 0 | 1 (SUMMARY frontmatter) |

---

## Cross-Phase Integration

### Integration Findings

| ID | Description | Severity | Requirements |
|----|------------|----------|-------------|
| INT-01 | Phantom `mutation` category in `_DEFAULT_ACTIVE_CATEGORIES` — no built-in actions use it; becomes valid when plugins register custom note types | Low | AGNT-04, PLUG-05 |
| INT-02 | `ServiceError.recovery` field never populated by services — COMMON_ERROR_RECOVERY fallback covers all 37 codes | Low | AGNT-01 |
| INT-03 | `load_plugin_commands` creates separate PluginManager without `inject_configs` — only affects plugin CLI command listing, not action execution | Medium | PLUG-03 |
| INT-04 | PLUGIN_API_VERSION=1 but deprecation docstrings reference "plugin API v2" — naming inconsistency only | Low | PLUG-01 |

### E2E Flows

| Flow | Status | Path |
|------|--------|------|
| Plugin Lifecycle | COMPLETE | entry_point → version check → config inject → capabilities → note types → auto-actions → CLI/MCP |
| CLI Execution | COMPLETE | Click command → ActionDefinition handler → pre_action → service → post_action → emit |
| MCP Execution | COMPLETE | MCP tool → handler → controller → service → McpResponse.from_result() with recovery + detail |
| Error Flow | COMPLETE | ServiceError → McpError with recovery (via COMMON_ERROR_RECOVERY fallback) + detail forwarding |
| ActionRejection | COMPLETE | pre_action → ActionRejection → ServiceResult(ACTION_REJECTED) → McpError |

---

## Nyquist Compliance

| Phase | VALIDATION.md | Compliant | Action |
|-------|---------------|-----------|--------|
| 01-core-hardening | exists | false/partial | `/gsd:validate-phase 1` |
| 02-action-registry | exists | false/partial | `/gsd:validate-phase 2` |
| 03-mcp-surface-generation | exists | false/partial | `/gsd:validate-phase 3` |
| 04-cli-surface-generation | exists | false/partial | `/gsd:validate-phase 4` |
| 05-plugin-formalization | exists | false/partial | `/gsd:validate-phase 5` |
| 06-agentic-integration-security | exists | false/partial | `/gsd:validate-phase 6` |
| 07-plugin-agentic-wiring-fixes | exists | false/partial | `/gsd:validate-phase 7` |

All 7 phases have VALIDATION.md files but none have achieved `nyquist_compliant: true`. Run `/gsd:validate-phase {N}` for each phase to fill validation gaps.

---

## Tech Debt Summary

### By Phase

**Phase 01: Core Hardening**
- `graph.py bridges()` uses `betweenness_centrality` without k-approximation (only `materialize_metrics` was optimized)

**Phase 03: MCP Surface Generation**
- SUMMARY frontmatter omits `requirements_completed` for ACTN-03

**Phase 05: Plugin Formalization**
- SUMMARY frontmatter omits `requirements_completed` for PLUG-01, PLUG-03, PLUG-05, PLUG-06, PLUG-07

**Phase 06: Agentic Integration & Security**
- SUMMARY frontmatter omits `requirements_completed` for AGNT-03, AGNT-04, SECU-01, SECU-02
- `_validate_capabilities` uses stdlib `logging.debug` instead of structlog (intentional divergence)

**Phase 07: Plugin & Agentic Wiring Fixes**
- SUMMARY frontmatter omits `requirements_completed` for PLUG-03, AGNT-01, AGNT-04

### Cross-Phase

- INT-01: Phantom `mutation` category (cosmetic, self-resolving when plugins load)
- INT-02: `ServiceError.recovery` unused field (COMMON_ERROR_RECOVERY covers all codes)
- INT-03: `load_plugin_commands` PM missing config injection (medium, edge case only)
- INT-04: API version naming inconsistency in docstrings

### Total: 10 items across 4 phases + 4 cross-phase items

---

_Audited: 2026-03-20T07:00:00Z_
_Auditor: Claude (gsd-audit-milestone)_
