# NEXT_TASK_RISK_ANALYSIS.md — TASK-005 Self-Critique

> **Generated by:** Autonomous Roadmap Mode — Phase 8  
> **Date:** 2026-06-21  
> **Task analyzed:** TASK-005 — Add core perception skills (`01-perception`)  
> **Based on graph state:** 47 nodes, 93 edges

---

## What May Be Wrong

### 1. Node count assumption may already be stale

**Risk:** This analysis assumes exactly 47 nodes exist at execution time. If another agent session ran between this analysis and task execution, the node count may have changed. The `01-perception` category may no longer be at 0 nodes.

**Consequence:** Adding 6 more nodes would overshoot Phase 1 target or create duplicates.

**Mitigation:** The prompt enforces a pre-task truth check against `meta/MEMORY_STATE.md`. If count ≠ 47, execution halts.

---

### 2. `skill:image-understanding` semantic overlap with `skill:data-extraction`

**Risk:** `skill:data-extraction` (currently in `12-data`) broadly covers "extracting structured data from sources." An agent might argue that extracting content from an image is a form of data extraction, making `skill:image-understanding` a partial duplicate.

**Consequence:** Constitution P-06 violation (duplicate concepts forbidden).

**Mitigation:** The distinction is clear at the operational level — `skill:data-extraction` covers structured-format extraction (JSON, CSV, HTML), while `skill:image-understanding` covers semantic visual interpretation (scene understanding, object recognition, spatial relationships). Document this in the node's description field. If an auditor still flags overlap: extend `skill:data-extraction` with a visual-extraction edge rather than creating the new node.

---

### 3. `skill:audio-transcription` may be challenged on agentic scope

**Risk:** Constitution P-09 restricts scope to "agentic systems." A reviewer could argue that audio transcription is a peripheral capability (a preprocessing step handled by an external service) rather than a core agent skill.

**Consequence:** Node could be marked for pruning review under P-01 (centrality < 0.03).

**Mitigation:** Audio transcription is used in production voice agents (Vapi, Retell, ElevenLabs agent pipelines) and meeting-assistant agents (Otter, Fireflies). P-09 asks: "Does this skill change how an agent perceives?" Answer: yes — it determines whether the agent can act on audio input at all. Document production evidence in the node. Tag as `stability: stable`.

---

### 4. 18-edge prescription is opinionated

**Risk:** The prompt specifies exactly 18 edges with exact confidence values. An executing agent may add them literally without verifying semantic correctness of each connection. Some prescribed edges may be weak.

**Specific concern:** `skill:audio-transcription → skill:embedding-generation SUPPORTS 0.73` — this is a low-confidence, indirect relationship. Transcription produces text that can be embedded, but the connection is mediated by other steps.

**Consequence:** Low-quality edges pollute the graph and reduce recommendation engine precision.

**Mitigation:** The executing agent must validate each edge semantically, not just mechanically copy the list. Constitution P-10 requires that edges represent real relationships. The 0.73 confidence already signals uncertainty; the agent may omit edges below 0.75 if the relationship does not hold for the specific node.

---

### 5. Phase 1 completion may trigger unplanned Phase 2 work

**Risk:** When `meta/MEMORY_STATE.md` is updated to "Phase 1 DONE," a subsequent agent session may immediately begin Phase 2 tasks (which are scoped to categories like `08-planning`, `13-execution`, `14-evaluation`) without proper architect review.

**Consequence:** Constitution G-06 forbids Phase 2 tasks until Phase 1 node targets are met, but does not specify a mandatory pause for architect review at phase boundaries. An automated agent could start Phase 2 autonomously.

**Mitigation:** The `NEXT_TASK_RECOMMENDATION.md` generated after TASK-005 must explicitly flag Phase 2 as requiring architect sign-off before auto-execution. TASK-006 (document perception) is a Phase 1 follow-on, not Phase 2, so it is safe as the immediate next task.

---

## Assumptions Made

| Assumption | Basis | Confidence |
|---|---|---|
| Exactly 47 nodes exist in graph | `meta/MEMORY_STATE.md` v1.2.0 | HIGH — verified from file |
| `01-perception` has 0 nodes | `meta/MEMORY_STATE.md` v1.2.0 | HIGH — explicitly listed |
| TASK-005 status = OPEN | `meta/MEMORY_STATE.md` task registry | HIGH |
| TASK-003 status = DONE | Evidence: 10 nodes in `02-reasoning` | HIGH |
| Phase 1 target = 53 nodes | `meta/MEMORY_STATE.md`, `meta/PROJECT_CONSTITUTION.md` | HIGH |
| Goals G03/G05/G06 are blocked on 01-perception | `meta/MEMORY_STATE.md` | HIGH |
| No agent session ran between analysis and execution | Assumed recency | MEDIUM |
| The 6 prescribed nodes do not duplicate existing concepts | Based on 47-node ID list review | HIGH |

---

## Duplicate Risks

| Proposed Node | Potential Duplicate | Verdict |
|---|---|---|
| `skill:ocr` | None in 47-node list | SAFE |
| `skill:screen-parsing` | `skill:web-scraping` (different domain: pixel vs HTTP) | SAFE — document distinction |
| `skill:image-understanding` | `skill:data-extraction` (partial overlap) | LOW RISK — distinct by scope; document explicitly |
| `skill:document-parsing` | `skill:data-extraction` (overlap in structured extraction) | LOW RISK — document-parsing is format-specific (PDF/DOCX/HTML structural extraction); data-extraction is schema-driven |
| `skill:audio-transcription` | None in 47-node list | SAFE |
| `skill:multimodal-input` | `skill:prompt-engineering` (overlap in prompt design for multimodal) | MINIMAL — multimodal-input is about perception; prompt-engineering is about instruction design; complement, not duplicate |

---

## Graph Risks

| Risk | Probability | Impact | Mitigation |
|---|---|---|---|
| Edge/node ratio drops below 1.978 | LOW | MEDIUM — P-01 violation | 18 edges added → ratio = 2.094; buffer exists |
| REQUIRES/LEARN_BEFORE cycle introduced | LOW | HIGH — breaks traversal | All prescribed edges go new→existing (one direction only) |
| Node with 0 goal connectivity (orphan) | LOW | MEDIUM — P-05 violation | Every new node connects to existing hubs with goal paths |
| Schema version not updated | LOW | LOW | Add schema update check to self-review |
| statistics block not updated | MEDIUM | MEDIUM — CI failure | Self-review Q1 forces node count check |

---

## Roadmap Risks

| Risk | Probability | Impact |
|---|---|---|
| Phase 1 completion triggers unmonitored Phase 2 start | MEDIUM | HIGH — scope drift |
| TASK-006 starts before `01-perception` base is validated | LOW | MEDIUM — builds on unverified base |
| TASK-002 (context engineering) runs concurrently in another session | MEDIUM | HIGH — merge conflict in SKILLS_GRAPH.json |
| TASK-004 (causal reasoning) incorrectly prioritized over TASK-005 | LOW | LOW — recommendation file guards this |

---

## Governance Risks

| Risk | Probability | Impact | Mitigation |
|---|---|---|---|
| DECISION_LOG.md entry not appended (deleted/replaced) | LOW | HIGH — G-03 violation (immutable log) | Self-review Q4 explicitly checks append-only |
| MEMORY_STATE.md not updated | LOW | HIGH — G-04 violation | Self-review Q5 explicitly checks |
| Multiple files in non-atomic commit | LOW | MEDIUM — G-02 violation | Commit format section specifies all files in one commit |
| TASK_005_REPORT.md missing | LOW | MEDIUM — G-05 future verification fails | Self-review Q7 explicitly checks |
| Constitution not re-validated after changes | MEDIUM | MEDIUM | Constitution validation section is mandatory in prompt |

---

## Future Collision Risks

### TASK-006 collision
TASK-006 (document/data perception) adds nodes that interact with the same `01-perception` category. If TASK-005 and TASK-006 are executed in parallel or in rapid succession without a MEMORY_STATE sync, edge conflicts may arise.

**Mitigation:** TASK-006 is listed as BLOCKED until TASK-005 DONE. The prompt enforces this via roadmap validation.

### TASK-002 collision
TASK-002 (context engineering) may add a `skill:context-window-management` or similar node that semantically overlaps with `skill:context-management` (already existing) or `skill:multimodal-input` (proposed in TASK-005). A concurrent TASK-002 session could create a duplicate node in a different category.

**Mitigation:** TASK-002 must read MEMORY_STATE.md after TASK-005 completes to get the updated 53-node registry before adding any nodes.

### Phase 2 premature start
Phase 2 targets categories `08-planning`, `13-execution`, `14-evaluation`. If the NEXT_TASK_PROMPT.md generated after TASK-005 fails to mark these as requiring architect review, an agent could begin Phase 2 autonomously.

**Mitigation:** Add explicit `PHASE_2_REQUIRES_ARCHITECT_APPROVAL: true` flag to the next NEXT_TASK_RECOMMENDATION.md.

### Security workflow drift
The security fixes applied in the preceding session (workflow permissions hardening, WORKFLOW_SECURITY_AUDIT.md) are unrelated to graph work. However, if a future agent replaces `.github/workflows/*.yml` files during a CI debugging session, the `permissions: contents: read` blocks may be accidentally removed.

**Mitigation:** Document in `meta/WORKFLOW_SECURITY_AUDIT.md` (already created) that permission blocks are mandatory and CodeQL-governed. Any CI change must preserve them.

---

## Risk Summary Matrix

| Risk | Severity | Probability | Owner |
|---|---|---|---|
| Node count stale at execution | HIGH | MEDIUM | Pre-task truth check |
| image-understanding / data-extraction overlap | MEDIUM | LOW | Node description |
| audio-transcription scope challenge | LOW | LOW | Production evidence |
| Edge quality (mechanical copy without validation) | MEDIUM | MEDIUM | Agent self-review |
| Phase 2 premature start | HIGH | MEDIUM | Next recommendation file |
| TASK-002 concurrent collision | HIGH | MEDIUM | Sequential execution enforcement |
| DECISION_LOG not append-only | HIGH | LOW | Self-review Q4 |

---

*NEXT_TASK_RISK_ANALYSIS v1.3.0 — 2026-06-21 — Autonomous Roadmap Mode Phase 8*
