From 2728ff18de0f1853a82b870e77f2e9936c3db793 Mon Sep 17 00:00:00 2001 From: Domini Montessori Date: Wed, 2 Sep 2026 13:00:01 +0300 Subject: [PATCH 1/3] =?UTF-8?q?feat(beads):=20M2+M3=20executable=20DAG=20?= =?UTF-8?q?=E2=80=94=20single=20runtime=20(M2=20kernel=20+=20M3=20orchestr?= =?UTF-8?q?ation)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit M2 kernel (single-agent): Git Adapter, Command Runner/Policy, Worker Runtime, Failure/Retry, GitHub/PR/CI, Loop, Human Gates M3 capability layer: Registry, Architect/Researcher/Planner, Implementer, Tester/Security/Quality/Perf/A11y, Reviewer/Release, Bus/Events/Supervisor/Budget/Scope DAG: 14+25 nodes with deps, priority, risk, artifacts, acceptanceCriteria, verification TDD commands. Ready for direct agent execution. --- .beads/beads.json | 3122 ++++----------------------------------------- 1 file changed, 278 insertions(+), 2844 deletions(-) diff --git a/.beads/beads.json b/.beads/beads.json index 09bd3aac..5bb55f0a 100644 --- a/.beads/beads.json +++ b/.beads/beads.json @@ -2,7 +2,7 @@ "schema": "beads.state-graph/v1", "project": "dominicusin.github.io", "initiative": "repo-gist-ingestion", - "updated": "2026-09-03", + "updated": "2026-09-02", "nodes": [ { "id": "T1", @@ -2438,3178 +2438,612 @@ "npx hardhat test" ], "initiative": "autonomous-factory-m3" - }, - { - "id": "M4-001", - "kind": "task", - "title": "M4.1 Persistent Memory — memory.cjs core", - "status": "pending", - "deps": [ - "M3-025" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/memory/memory.cjs", - "agent/memory/memory.test.cjs" - ], - "acceptance_criteria": [ - "memory.cjs load/save/get/set/list with JSONL persistence", - "no data loss on restart", - "contract validates MemoryEntry {id,task,run_id,payload,timestamp}" - ], - "verification": [ - "node --test agent/memory/memory.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-002", - "kind": "task", - "title": "M4.2 Episodic Memory — episodic.cjs", - "status": "pending", - "deps": [ - "M4-001" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/memory/episodic.cjs", - "agent/memory/episodic.test.cjs" - ], - "acceptance_criteria": [ - "episodic append/query by run_id+task_id", - "retention window enforced", - "evidence ↔ episode correlation" - ], - "verification": [ - "node --test agent/memory/episodic.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-003", - "kind": "task", - "title": "M4.3 Semantic Memory — semantic.cjs", - "status": "pending", - "deps": [ - "M4-001" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/memory/semantic.cjs", - "agent/memory/semantic.test.cjs" - ], - "acceptance_criteria": [ - "semantic index facts by capability/policy failure", - "query by tags returns ranked facts", - "no mutable global state" - ], - "verification": [ - "node --test agent/memory/semantic.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-004", - "kind": "task", - "title": "M4.4 Procedural Memory — procedural.cjs", - "status": "pending", - "deps": [ - "M4-001" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/memory/procedural.cjs", - "agent/memory/procedural.test.cjs" - ], - "acceptance_criteria": [ - "procedural stores workflow templates Task→Stages", - "template reuse produces identical ExecutionPlan", - "versioned templates" - ], - "verification": [ - "node --test agent/memory/procedural.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-005", - "kind": "task", - "title": "M4.5 Decision Log — decisions.cjs", - "status": "pending", - "deps": [ - "M4-002", - "M4-003" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/memory/decisions.cjs", - "agent/memory/decisions.test.cjs" - ], - "acceptance_criteria": [ - "decisions.cjs records Decision {task,options,chosen,rationale,evidence}", - "decision replay deterministic", - "unknown≠false preserved" - ], - "verification": [ - "node --test agent/memory/decisions.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-006", - "kind": "task", - "title": "M4.6 Failure Memory + Memory Facade — failures.cjs", - "status": "pending", - "deps": [ - "M4-004", - "M4-005" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/memory/failures.cjs", - "agent/memory/failures.test.cjs", - "agent/memory/index.cjs" - ], - "acceptance_criteria": [ - "failures.cjs indexes failure signature→diagnosis→healing", - "memory facade exports getMemory/queryMemory", - "no shared mutable LLM memory" - ], - "verification": [ - "node --test agent/memory/failures.test.cjs", - "node --test agent/memory/memory.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-007", - "kind": "task", - "title": "M4.7 Repository Graph — repository-graph.cjs", - "status": "pending", - "deps": [ - "M3-025" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/intelligence/repository-graph.cjs", - "agent/intelligence/repository-graph.test.cjs" - ], - "acceptance_criteria": [ - "graph nodes = files/modules, edges = import/require", - "incremental update on diff", - "JSON serializable snapshot" - ], - "verification": [ - "node --test agent/intelligence/repository-graph.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-008", - "kind": "task", - "title": "M4.8 Dependency Graph — dependency-graph.cjs", - "status": "pending", - "deps": [ - "M4-007" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/intelligence/dependency-graph.cjs", - "agent/intelligence/dependency-graph.test.cjs" - ], - "acceptance_criteria": [ - "dependency-graph builds DAG of package/file deps", - "cycle detection reports culprit edge", - "transitive closure correct" - ], - "verification": [ - "node --test agent/intelligence/dependency-graph.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-009", - "kind": "task", - "title": "M4.9 Ownership Map — ownership.cjs", - "status": "pending", - "deps": [ - "M4-007" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/intelligence/ownership.cjs", - "agent/intelligence/ownership.test.cjs" - ], - "acceptance_criteria": [ - "ownership maps file→team/capability via CODEOWNERS+git history", - "fallback to most frequent committer", - "confidence metadata" - ], - "verification": [ - "node --test agent/intelligence/ownership.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-010", - "kind": "task", - "title": "M4.10 Change Impact Analyzer — change-impact.cjs", - "status": "pending", - "deps": [ - "M4-008", - "M4-009" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/intelligence/change-impact.cjs", - "agent/intelligence/change-impact.test.cjs" - ], - "acceptance_criteria": [ - "change-impact given diff returns affectedFiles+affectedTasks+blastRadius", - "uses dependency-graph+ownership", - "ranked impact with evidence" - ], - "verification": [ - "node --test agent/intelligence/change-impact.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-011", - "kind": "task", - "title": "M4.11 Hotspots Detector — hotspots.cjs", - "status": "pending", - "deps": [ - "M4-008" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/intelligence/hotspots.cjs", - "agent/intelligence/hotspots.test.cjs" - ], - "acceptance_criteria": [ - "hotspots by churn+complexity+failure history", - "top-10 hotspots ranked", - "integrates with semantic memory" - ], - "verification": [ - "node --test agent/intelligence/hotspots.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-012", - "kind": "task", - "title": "M4.12 Repository Intelligence Facade", - "status": "pending", - "deps": [ - "M4-010", - "M4-011" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/intelligence/index.cjs", - "agent/intelligence/intelligence.test.cjs" - ], - "acceptance_criteria": [ - "facade getIntelligence(diff) returns {graph,impact,hotspots,ownership}", - "cached per commit SHA", - "no filesystem mutation" - ], - "verification": [ - "node --test agent/intelligence/intelligence.test.cjs", - "node --test agent/intelligence/repository-graph.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-013", - "kind": "task", - "title": "M4.13 Adaptive Planner Core — planner.cjs", - "status": "pending", - "deps": [ - "M4-006", - "M4-012" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/planner/planner.cjs", - "agent/planner/planner.test.cjs" - ], - "acceptance_criteria": [ - "planner consumes Memory+Intelligence+Beads → TaskPlan {tasks,deps,risk,acceptance,verification}", - "planner never writes production code", - "deps form acyclic graph" - ], - "verification": [ - "node --test agent/planner/planner.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-014", - "kind": "task", - "title": "M4.14 Task Decomposition — decomposition.cjs", - "status": "pending", - "deps": [ - "M4-013" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/planner/decomposition.cjs", - "agent/planner/decomposition.test.cjs" - ], - "acceptance_criteria": [ - "decomposition splits task into ≤5 subtasks with scope+files", - "each subtask has isolated verification", - "no out-of-scope file leaks" - ], - "verification": [ - "node --test agent/planner/decomposition.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-015", - "kind": "task", - "title": "M4.15 Prioritizer — prioritizer.cjs", - "status": "pending", - "deps": [ - "M4-013" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/planner/prioritizer.cjs", - "agent/planner/prioritizer.test.cjs" - ], - "acceptance_criteria": [ - "prioritizer ranks tasks by P0> P1> P2 and risk+impact", - "stable sort on tie-breaker id", - "respects Budget maxWorkers" - ], - "verification": [ - "node --test agent/planner/prioritizer.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-016", - "kind": "task", - "title": "M4.16 Dependency Resolver — dependency-resolver.cjs", - "status": "pending", - "deps": [ - "M4-014" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/planner/dependency-resolver.cjs", - "agent/planner/dependency-resolver.test.cjs" - ], - "acceptance_criteria": [ - "resolves TaskPlan deps to topological order", - "detects cycle → error with cycle path", - "outputs ExecutionPlan stages with parallel flags" - ], - "verification": [ - "node --test agent/planner/dependency-resolver.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-017", - "kind": "task", - "title": "M4.17 Replanner — replanner.cjs", - "status": "pending", - "deps": [ - "M4-015", - "M4-016" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/planner/replanner.cjs", - "agent/planner/replanner.test.cjs" - ], - "acceptance_criteria": [ - "replanner on failure/impact change produces new TaskPlan delta", - "preserves done tasks, re-queues affected only", - "emits EvidenceEnvelope replanned" - ], - "verification": [ - "node --test agent/planner/replanner.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-018", - "kind": "task", - "title": "M4.18 Planner ↔ Evidence Bus Integration", - "status": "pending", - "deps": [ - "M4-017" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/planner/evidence-integration.cjs", - "agent/planner/evidence-integration.test.cjs" - ], - "acceptance_criteria": [ - "planner subscribes to EvidenceBus, publishes TaskPlan envelopes", - "order preserved per run_id", - "typed envelopes only" - ], - "verification": [ - "node --test agent/planner/evidence-integration.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-019", - "kind": "task", - "title": "M4.19 Adaptive Planner Verification", - "status": "pending", - "deps": [ - "M4-018" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/planner/planner.test.cjs", - "agent/planner/decomposition.test.cjs", - "agent/planner/dependency-resolver.test.cjs" - ], - "acceptance_criteria": [ - "planner E2E: sample epic → TaskPlan validated", - "all verification TDD green", - "no shared mutable state" - ], - "verification": [ - "node --test agent/planner/planner.test.cjs", - "node --test agent/planner/decomposition.test.cjs", - "node --test agent/planner/dependency-resolver.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-020", - "kind": "task", - "title": "M4.20 Backlog Discovery — discovery.cjs", - "status": "pending", - "deps": [ - "M4-019" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/backlog/discovery.cjs", - "agent/backlog/discovery.test.cjs" - ], - "acceptance_criteria": [ - "discovers tasks from Beads+git diff+intelligence hotspots", - "deduplicates against existing backlog", - "emits BacklogEntry[]" - ], - "verification": [ - "node --test agent/backlog/discovery.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-021", - "kind": "task", - "title": "M4.21 Backlog Prioritization — prioritization.cjs", - "status": "pending", - "deps": [ - "M4-020" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/backlog/prioritization.cjs", - "agent/backlog/prioritization.test.cjs" - ], - "acceptance_criteria": [ - "prioritization ranks by planner priority+impact+age", - "P1 before P2, R2 escalated", - "stable ranking" - ], - "verification": [ - "node --test agent/backlog/prioritization.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-022", - "kind": "task", - "title": "M4.22 Backlog Deduplication — deduplication.cjs", - "status": "pending", - "deps": [ - "M4-020" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/backlog/deduplication.cjs", - "agent/backlog/deduplication.test.cjs" - ], - "acceptance_criteria": [ - "deduplication by title+files Jaccard >0.8→merge", - "preserves oldest id as canonical", - "no data loss" - ], - "verification": [ - "node --test agent/backlog/deduplication.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-023", - "kind": "task", - "title": "M4.23 Backlog Decomposition — decomposition.cjs", - "status": "pending", - "deps": [ - "M4-021", - "M4-022" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/backlog/decomposition-backlog.cjs", - "agent/backlog/decomposition-backlog.test.cjs" - ], - "acceptance_criteria": [ - "splits oversized backlog item (>1000 diff lines) into ≤5", - "preserves deps acyclic", - "each child inherits parent priority" - ], - "verification": [ - "node --test agent/backlog/decomposition-backlog.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-024", - "kind": "task", - "title": "M4.24 Stale Task Detector — stale-task-detector.cjs", - "status": "pending", - "deps": [ - "M4-023" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/backlog/stale-task-detector.cjs", - "agent/backlog/stale-task-detector.test.cjs" - ], - "acceptance_criteria": [ - "detects stale >14d no activity or orphaned worktree", - "marks STALE→evidence, never auto-deletes", - "supervisor can clean after evidence" - ], - "verification": [ - "node --test agent/backlog/stale-task-detector.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-025", - "kind": "task", - "title": "M4.25 Backlog Manager Facade", - "status": "pending", - "deps": [ - "M4-024" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/backlog/index.cjs", - "agent/backlog/backlog.test.cjs" - ], - "acceptance_criteria": [ - "facade getBacklog() returns ranked, deduped, decomposed, stale-flagged list", - "integrates with planner prioritizer", - "typed Beads entries" - ], - "verification": [ - "node --test agent/backlog/backlog.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-026", - "kind": "task", - "title": "M4.26 Outcome Tracker — outcome.cjs", - "status": "pending", - "deps": [ - "M4-019" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/learning/outcome.cjs", - "agent/learning/outcome.test.cjs" - ], - "acceptance_criteria": [ - "outcome records Task {run_id,result,evidence,diagnosis,retries}", - "outcome query by task_id returns history", - "append-only log" - ], - "verification": [ - "node --test agent/learning/outcome.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-027", - "kind": "task", - "title": "M4.27 Metrics Collector — metrics.cjs", - "status": "pending", - "deps": [ - "M4-026" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/learning/metrics.cjs", - "agent/learning/metrics.test.cjs" - ], - "acceptance_criteria": [ - "collects pass/fail rate, MTTR, retries, coverage delta", - "aggregates per capability/worker", - "emits MetricsEnvelope" - ], - "verification": [ - "node --test agent/learning/metrics.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-028", - "kind": "task", - "title": "M4.28 Pattern Miner — pattern-miner.cjs", - "status": "pending", - "deps": [ - "M4-027" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/learning/pattern-miner.cjs", - "agent/learning/pattern-miner.test.cjs" - ], - "acceptance_criteria": [ - "mines failure signatures → pattern {signature,freq,suggestedFix}", - "freq threshold ≥3", - "pattern confidence metadata" - ], - "verification": [ - "node --test agent/learning/pattern-miner.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-029", - "kind": "task", - "title": "M4.29 Worker Performance — worker-performance.cjs", - "status": "pending", - "deps": [ - "M4-028" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/learning/worker-performance.cjs", - "agent/learning/worker-performance.test.cjs" - ], - "acceptance_criteria": [ - "ranks workers by success rate per capability", - "exposes getBestWorker(capability)", - "no mutable global" - ], - "verification": [ - "node --test agent/learning/worker-performance.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-030", - "kind": "task", - "title": "M4.30 Failure Patterns — failure-patterns.cjs", - "status": "pending", - "deps": [ - "M4-028" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/learning/failure-patterns.cjs", - "agent/learning/failure-patterns.test.cjs" - ], - "acceptance_criteria": [ - "failure-patterns maps category→patterns with fix hints", - "integrates with memory/failures.cjs", - "query returns top-3 patterns" - ], - "verification": [ - "node --test agent/learning/failure-patterns.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-031", - "kind": "task", - "title": "M4.31 Learning Aggregator", - "status": "pending", - "deps": [ - "M4-029", - "M4-030" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/learning/index.cjs", - "agent/learning/learning.test.cjs" - ], - "acceptance_criteria": [ - "aggregator getLearningSnapshot() returns {metrics,patterns,workerRank}", - "cached per run_id", - "typed envelope" - ], - "verification": [ - "node --test agent/learning/learning.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-032", - "kind": "task", - "title": "M4.32 Learning Feedback Loop Integration", - "status": "pending", - "deps": [ - "M4-031" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/learning/feedback.cjs", - "agent/learning/feedback.test.cjs" - ], - "acceptance_criteria": [ - "feedback loop pushes LearningSnapshot to planner+memory", - " replanner consumes patterns for next TaskPlan", - "evidence bus integration" - ], - "verification": [ - "node --test agent/learning/feedback.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-033", - "kind": "task", - "title": "M4.33 Invariant Checker — invariant-checker.cjs", - "status": "pending", - "deps": [ - "M4-025", - "M4-032" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/verification/invariant-checker.cjs", - "agent/verification/invariant-checker.test.cjs" - ], - "acceptance_criteria": [ - "checks invariants: 1 worktree=1 writer, no main commit, no policy bypass", - "violation → SCOPE_VIOLATION with evidence", - "runs pre-commit" - ], - "verification": [ - "node --test agent/verification/invariant-checker.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-034", - "kind": "task", - "title": "M4.34 Regression Detector — regression-detector.cjs", - "status": "pending", - "deps": [ - "M4-033" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/verification/regression-detector.cjs", - "agent/verification/regression-detector.test.cjs" - ], - "acceptance_criteria": [ - "detects perf/a11y/test regression vs baseline", - "threshold: bundle >10%, a11y violations >0", - "reports with evidence" - ], - "verification": [ - "node --test agent/verification/regression-detector.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-035", - "kind": "task", - "title": "M4.35 Policy Verifier — policy-verifier.cjs", - "status": "pending", - "deps": [ - "M4-033" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/verification/policy-verifier.cjs", - "agent/verification/policy-verifier.test.cjs" - ], - "acceptance_criteria": [ - "verifies diff against Policy 2.0 allowlist/denylist", - "R3/R4 blocking enforced", - "denied → POLICY_DENIED evidence" - ], - "verification": [ - "node --test agent/verification/policy-verifier.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-036", - "kind": "task", - "title": "M4.36 Evidence Verifier — evidence-verifier.cjs", - "status": "pending", - "deps": [ - "M4-033" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/verification/evidence-verifier.cjs", - "agent/verification/evidence-verifier.test.cjs" - ], - "acceptance_criteria": [ - "evidence ↔ commit correspondence checked", - "missing evidence → request_changes", - "typed envelope validation" - ], - "verification": [ - "node --test agent/verification/evidence-verifier.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-037", - "kind": "task", - "title": "M4.37 Factory Health — factory-health.cjs", - "status": "pending", - "deps": [ - "M4-034", - "M4-035", - "M4-036" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/verification/factory-health.cjs", - "agent/verification/factory-health.test.cjs" - ], - "acceptance_criteria": [ - "factory-health aggregates invariant+regression+policy+evidence → HEALTHY/DEGRADED/FAILED", - "health history persisted", - "dashboard consumable" - ], - "verification": [ - "node --test agent/verification/factory-health.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-038", - "kind": "task", - "title": "M4.38 Verification Orchestrator", - "status": "pending", - "deps": [ - "M4-037" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/verification/orchestrator.cjs", - "agent/verification/orchestrator.test.cjs" - ], - "acceptance_criteria": [ - "orchestrates all verifiers in parallel after IMPLEMENT", - "read-only parallel safe", - "collects VerificationReport" - ], - "verification": [ - "node --test agent/verification/orchestrator.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-039", - "kind": "task", - "title": "M4.39 Factory Verification Gate", - "status": "pending", - "deps": [ - "M4-038" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/verification/gate.cjs", - "agent/verification/gate.test.cjs" - ], - "acceptance_criteria": [ - "gate: all verifiers PASS → READY_FOR_REVIEW else REQUEST_CHANGES/ESCALATE", - "max 2 review cycles → ESCALATE", - "human gate preserved" - ], - "verification": [ - "node --test agent/verification/gate.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-040", - "kind": "task", - "title": "M4.40 Observability Events — events.cjs", - "status": "pending", - "deps": [ - "M4-019" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/observability/events.cjs", - "agent/observability/events.test.cjs" - ], - "acceptance_criteria": [ - "events emitter typed FactoryEvent {run_id,task_id,event,payload,timestamp}", - "preserves order per run_id", - "integration with evidence-bus" - ], - "verification": [ - "node --test agent/observability/events.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-041", - "kind": "task", - "title": "M4.41 Observability Metrics", - "status": "pending", - "deps": [ - "M4-040" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/observability/metrics.cjs", - "agent/observability/metrics.test.cjs" - ], - "acceptance_criteria": [ - "metrics probes: queue depth, worker utilization, MTTR, success rate", - "scrape endpoint compatible", - "no secret leakage" - ], - "verification": [ - "node --test agent/observability/metrics.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-042", - "kind": "task", - "title": "M4.42 Observability Traces — traces.cjs", - "status": "pending", - "deps": [ - "M4-040" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/observability/traces.cjs", - "agent/observability/traces.test.cjs" - ], - "acceptance_criteria": [ - "traces capture span per worker execution", - "traceId = run_id, spans ordered", - "export OTel compatible" - ], - "verification": [ - "node --test agent/observability/traces.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-043", - "kind": "task", - "title": "M4.43 Dashboard — dashboard.cjs", - "status": "pending", - "deps": [ - "M4-041", - "M4-042" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/observability/dashboard.cjs", - "agent/observability/dashboard.test.cjs" - ], - "acceptance_criteria": [ - "dashboard aggregates events+metrics+traces → summary JSON", - "serves at /data/factory-dashboard.json", - "no PII" - ], - "verification": [ - "node --test agent/observability/dashboard.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-044", - "kind": "task", - "title": "M4.44 Reports — reports.cjs", - "status": "pending", - "deps": [ - "M4-043" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/observability/reports.cjs", - "agent/observability/reports.test.cjs" - ], - "acceptance_criteria": [ - "reports daily/weekly with trends", - "report includes factory-health + learning metrics", - "markdown+JSON output" - ], - "verification": [ - "node --test agent/observability/reports.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-045", - "kind": "task", - "title": "M4.45 Observability Integration", - "status": "pending", - "deps": [ - "M4-044" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/observability/index.cjs", - "agent/observability/observability.test.cjs" - ], - "acceptance_criteria": [ - "integration wires observability into supervisor+verification", - "all verifiers emit observability events", - "single import facade" - ], - "verification": [ - "node --test agent/observability/observability.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-046", - "kind": "task", - "title": "M4.46 Observability Verification", - "status": "pending", - "deps": [ - "M4-045" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/observability/observability.test.cjs" - ], - "acceptance_criteria": [ - "observability E2E: event→metrics→trace→dashboard→report pipeline PASS", - "0 missing events on demo run", - "lint/test green" - ], - "verification": [ - "node --test agent/observability/observability.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-047", - "kind": "task", - "title": "M4.47 Factory Supervisor Core — supervisor.cjs", - "status": "pending", - "deps": [ - "M4-019" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/supervisor/factory-supervisor.cjs", - "agent/supervisor/factory-supervisor.test.cjs" - ], - "acceptance_criteria": [ - "supervisor enforces timeout/budget/policy/orphan guard extended", - "WORKER_TIMEOUT → terminate → evidence → retry/escalate", - "factory scope" - ], - "verification": [ - "node --test agent/supervisor/factory-supervisor.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-048", - "kind": "task", - "title": "M4.48 Task Scheduler Integration", - "status": "pending", - "deps": [ - "M4-047" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/supervisor/scheduler-integration.cjs", - "agent/supervisor/scheduler-integration.test.cjs" - ], - "acceptance_criteria": [ - "scheduler-integration merges planner stages with supervisor budget", - "parallel flags respected", - "1 worktree=1 writer invariant" - ], - "verification": [ - "node --test agent/supervisor/scheduler-integration.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-049", - "kind": "task", - "title": "M4.49 Resource Guard", - "status": "pending", - "deps": [ - "M4-047" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/supervisor/resource-guard.cjs", - "agent/supervisor/resource-guard.test.cjs" - ], - "acceptance_criteria": [ - "guards memory/time/parallel count", - "exceed → ESCALATE with evidence", - "uses M3 Budget correctly" - ], - "verification": [ - "node --test agent/supervisor/resource-guard.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-050", - "kind": "task", - "title": "M4.50 Policy Enforcement Hook", - "status": "pending", - "deps": [ - "M4-048", - "M4-049" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/supervisor/policy-hook.cjs", - "agent/supervisor/policy-hook.test.cjs" - ], - "acceptance_criteria": [ - "hook checks Policy 2.0 before every worker exec", - "R4 never autonomous → HUMAN", - "denied → POLICY_DENIED" - ], - "verification": [ - "node --test agent/supervisor/policy-hook.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-051", - "kind": "task", - "title": "M4.51 Escalation Handler", - "status": "pending", - "deps": [ - "M4-050" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/supervisor/escalation.cjs", - "agent/supervisor/escalation.test.cjs" - ], - "acceptance_criteria": [ - "escalation routes to human with evidence bundle", - "retry budget shared", - "3rd repeat same error → ESCALATED" - ], - "verification": [ - "node --test agent/supervisor/escalation.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-052", - "kind": "task", - "title": "M4.52 Orphan Cleaner", - "status": "pending", - "deps": [ - "M4-051" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/supervisor/orphan-cleaner.cjs", - "agent/supervisor/orphan-cleaner.test.cjs" - ], - "acceptance_criteria": [ - "orphan cleaner removes stale worktrees after evidence", - "never deletes active worktree", - "dry-run + confirm" - ], - "verification": [ - "node --test agent/supervisor/orphan-cleaner.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-053", - "kind": "task", - "title": "M4.53 Budget Sync with M3 Budget", - "status": "pending", - "deps": [ - "M4-052" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/supervisor/budget-sync.cjs", - "agent/supervisor/budget-sync.test.cjs" - ], - "acceptance_criteria": [ - "syncs Budget {maxTimeMs,maxRetries,maxWorkers,maxCommands,maxChangedFiles,maxDiffLines}", - "factory extends M3 budget", - "enforcement tested" - ], - "verification": [ - "node --test agent/supervisor/budget-sync.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-054", - "kind": "task", - "title": "M4.54 Supervisor ↔ Evidence Bus Wiring", - "status": "pending", - "deps": [ - "M4-053" - ], - "priority": "P1", - "risk": "R1", - "artifacts": [ - "agent/supervisor/evidence-wiring.cjs", - "agent/supervisor/evidence-wiring.test.cjs" - ], - "acceptance_criteria": [ - "supervisor emits SupervisorEvent envelopes to evidence bus", - "order preserved per run_id", - "typed envelopes" - ], - "verification": [ - "node --test agent/supervisor/evidence-wiring.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-055", - "kind": "task", - "title": "M4.55 Supervisor Verification", - "status": "pending", - "deps": [ - "M4-054" - ], - "priority": "P1", - "risk": "R2", - "artifacts": [ - "agent/supervisor/factory-supervisor.test.cjs" - ], - "acceptance_criteria": [ - "supervisor E2E: timeout→terminate→retry→escalate PASS", - "orphan cleanup verified", - "human gate present" - ], - "verification": [ - "node --test agent/supervisor/factory-supervisor.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-056", - "kind": "task", - "title": "M4.56 Policy Store 2.0 — policy.cjs v2", - "status": "pending", - "deps": [ - "M4-039", - "M4-046", - "M4-055" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/policy/policy-v2.cjs", - "agent/policy/policy-v2.test.cjs" - ], - "acceptance_criteria": [ - "policy store v2 supports DSL + versioned rules", - "migration from v1 without loss", - "validated schema" - ], - "verification": [ - "node --test agent/policy/policy-v2.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-057", - "kind": "task", - "title": "M4.57 Scope Rules 2.0", - "status": "pending", - "deps": [ - "M4-056" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/policy/scope-v2.cjs", - "agent/policy/scope-v2.test.cjs" - ], - "acceptance_criteria": [ - "scope rules glob + capability matrix", - "out-of-scope → SCOPE_VIOLATION", - "adapter check on diff before commit" - ], - "verification": [ - "node --test agent/policy/scope-v2.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-058", - "kind": "task", - "title": "M4.58 Risk Gates 2.0", - "status": "pending", - "deps": [ - "M4-056" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/policy/gates-v2.cjs", - "agent/policy/gates-v2.test.cjs" - ], - "acceptance_criteria": [ - "R1 CI PASS→REVIEW, R2 needs AUTO REVIEW, R3 SECURITY, R4 BLOCKED→HUMAN ONLY", - "never auto-merge R3/R4", - "gating tested per risk" - ], - "verification": [ - "node --test agent/policy/gates-v2.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-059", - "kind": "task", - "title": "M4.59 Allowlist/Denylist 2.0", - "status": "pending", - "deps": [ - "M4-057", - "M4-058" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/policy/allowlist-v2.cjs", - "agent/policy/allowlist-v2.test.cjs" - ], - "acceptance_criteria": [ - "allowlist git,node,npm,hugo,gh; deny rm -rf /,sudo,ssh,docker,credential access", - "policy→allow?execute:BLOCK", - "worker without policy cannot exec shell" - ], - "verification": [ - "node --test agent/policy/allowlist-v2.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-060", - "kind": "task", - "title": "M4.60 Policy DSL + Validation", - "status": "pending", - "deps": [ - "M4-059" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/policy/dsl.cjs", - "agent/policy/dsl.test.cjs" - ], - "acceptance_criteria": [ - "DSL parses policy.yaml → typed Policy", - "invalid DSL → validation error with line:col", - "no exec on invalid policy" - ], - "verification": [ - "node --test agent/policy/dsl.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-061", - "kind": "task", - "title": "M4.61 Policy ↔ Supervisor Integration", - "status": "pending", - "deps": [ - "M4-060", - "M4-055" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/policy/supervisor-integration.cjs", - "agent/policy/supervisor-integration.test.cjs" - ], - "acceptance_criteria": [ - "policy integrated into supervisor hook", - "supervisor consults policy before every stage", - "evidence on deny" - ], - "verification": [ - "node --test agent/policy/supervisor-integration.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-062", - "kind": "task", - "title": "M4.62 Policy 2.0 Verification", - "status": "pending", - "deps": [ - "M4-061" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/policy/policy-v2.test.cjs", - "agent/policy/gates-v2.test.cjs" - ], - "acceptance_criteria": [ - "policy E2E: R4 task cannot reach autonomous release → HUMAN", - "allowlist enforced on fixture", - "lint/test green" - ], - "verification": [ - "node --test agent/policy/policy-v2.test.cjs", - "node --test agent/policy/gates-v2.test.cjs", - "node --test agent/policy/allowlist-v2.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-063", - "kind": "task", - "title": "M4.63 Healing Planner", - "status": "pending", - "deps": [ - "M4-062" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/healing/planner.cjs", - "agent/healing/planner.test.cjs" - ], - "acceptance_criteria": [ - "healing planner selects fix strategy from Diagnosis+Learning patterns", - "strategy ranked by past success", - "never modifies policy" - ], - "verification": [ - "node --test agent/healing/planner.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-064", - "kind": "task", - "title": "M4.64 Auto-Retry with Learning", - "status": "pending", - "deps": [ - "M4-063", - "M4-032" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/healing/retry-learning.cjs", - "agent/healing/retry-learning.test.cjs" - ], - "acceptance_criteria": [ - "auto-retry uses learning snapshot for fix selection", - "attempt1 fix, attempt2 alternative, attempt3 escalate", - "retry creates new WorkerContext" - ], - "verification": [ - "node --test agent/healing/retry-learning.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-065", - "kind": "task", - "title": "M4.65 Diagnosis → Healing Bridge", - "status": "pending", - "deps": [ - "M4-064" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/healing/diagnosis-bridge.cjs", - "agent/healing/diagnosis-bridge.test.cjs" - ], - "acceptance_criteria": [ - "bridge converts Diagnosis→HealingAction {strategy,evidence,confidence}", - "confidence is metadata not proof", - "typed envelope" - ], - "verification": [ - "node --test agent/healing/diagnosis-bridge.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-066", - "kind": "task", - "title": "M4.66 Healing Verification", - "status": "pending", - "deps": [ - "M4-065" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/healing/verification.cjs", - "agent/healing/verification.test.cjs" - ], - "acceptance_criteria": [ - "healing verification runs tests after fix", - "PASS→continue, FAIL→next strategy", - "coverage threshold checked" - ], - "verification": [ - "node --test agent/healing/verification.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-067", - "kind": "task", - "title": "M4.67 Quarantine & Rollback", - "status": "pending", - "deps": [ - "M4-066" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/healing/quarantine.cjs", - "agent/healing/quarantine.test.cjs" - ], - "acceptance_criteria": [ - "quarantine isolates failing worktree", - "rollback to base on 3rd failure", - "evidence preserved" - ], - "verification": [ - "node --test agent/healing/quarantine.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-068", - "kind": "task", - "title": "M4.68 Healing Metrics Feedback", - "status": "pending", - "deps": [ - "M4-067" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/healing/metrics-feedback.cjs", - "agent/healing/metrics-feedback.test.cjs" - ], - "acceptance_criteria": [ - "healing metrics fed to learning/metrics.cjs", - "updates pattern-miner freq", - "closed loop verified" - ], - "verification": [ - "node --test agent/healing/metrics-feedback.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-069", - "kind": "task", - "title": "M4.69 Self-Healing Orchestration", - "status": "pending", - "deps": [ - "M4-068" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/healing/orchestrator.cjs", - "agent/healing/orchestrator.test.cjs" - ], - "acceptance_criteria": [ - "orchestrator ties planner→retry→verify→quarantine→feedback", - "max 3 attempts then ESCALATED", - "shares retry budget with review loop" - ], - "verification": [ - "node --test agent/healing/orchestrator.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-070", - "kind": "task", - "title": "M4.70 Self-Healing Verification", - "status": "pending", - "deps": [ - "M4-069" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "agent/healing/healing.test.cjs" - ], - "acceptance_criteria": [ - "self-healing E2E: induced TEST_FAILURE→diagnose→fix→PASS, 3x same→ESCALATED", - "quarantine verified", - "learning updated" - ], - "verification": [ - "node --test agent/healing/healing.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-071", - "kind": "task", - "title": "M4.71 Factory Assembly — autonomous-factory.cjs", - "status": "pending", - "deps": [ - "M4-070", - "M4-039" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "agent/factory/autonomous-factory.cjs", - "agent/factory/autonomous-factory.test.cjs" - ], - "acceptance_criteria": [ - "factory assembles Memory+Intelligence+Planner+Backlog+Learning+Supervisor+Verification+Policy+Healing", - "single factory facade", - "factory health wired" - ], - "verification": [ - "node --test agent/factory/autonomous-factory.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-072", - "kind": "task", - "title": "M4.72 Factory E2E Happy Path", - "status": "pending", - "deps": [ - "M4-071" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "tests/e2e/m4-happy-path.test.cjs" - ], - "acceptance_criteria": [ - "Beads READY R1 task → Factory → Worker → commit → PR → CI → READY_FOR_REVIEW", - "all evidence envelopes collected", - "human gate present" - ], - "verification": [ - "node --test tests/e2e/m4-happy-path.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-073", - "kind": "task", - "title": "M4.73 Factory E2E Failure Recovery", - "status": "pending", - "deps": [ - "M4-071" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "tests/e2e/m4-failure-recovery.test.cjs" - ], - "acceptance_criteria": [ - "injected TEST FAILURE → Tester→Diagnosis→Healing→PASS", - "3x same error→ESCALATED", - "learning snapshot updated" - ], - "verification": [ - "node --test tests/e2e/m4-failure-recovery.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-074", - "kind": "task", - "title": "M4.74 Factory E2E Policy Deny", - "status": "pending", - "deps": [ - "M4-071" - ], - "priority": "P2", - "risk": "R2", - "artifacts": [ - "tests/e2e/m4-policy-deny.test.cjs" - ], - "acceptance_criteria": [ - "R4 task cannot reach autonomous release → HUMAN", - "policy denylist enforced", - "test 'R4 cannot reach autonomous release' passes" - ], - "verification": [ - "node --test tests/e2e/m4-policy-deny.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-075", - "kind": "task", - "title": "M4.75 Factory E2E Budget/Timeout", - "status": "pending", - "deps": [ - "M4-071" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "tests/e2e/m4-budget.test.cjs" - ], - "acceptance_criteria": [ - "exceed Budget maxTimeMs→WORKER_TIMEOUT→retry/escalate", - "orphaned worktree cleaned", - "budget ESCALATE verified" - ], - "verification": [ - "node --test tests/e2e/m4-budget.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-076", - "kind": "task", - "title": "M4.76 Factory Load / Concurrency", - "status": "pending", - "deps": [ - "M4-072", - "M4-073", - "M4-074", - "M4-075" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "tests/e2e/m4-concurrency.test.cjs" - ], - "acceptance_criteria": [ - "3 tasks parallel: read workers concurrent, writers serialized", - "no race on single worktree", - "parallel health GREEN" - ], - "verification": [ - "node --test tests/e2e/m4-concurrency.test.cjs", - "npm run lint", - "npm test" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-077", - "kind": "task", - "title": "M4.77 Factory Verification Manifest", - "status": "pending", - "deps": [ - "M4-076" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "docs/M4_VERIFICATION.md", - "scripts/verify-m4.cjs" - ], - "acceptance_criteria": [ - "manifest written with run_id, commits, PR, checks, evidence", - "Beads updated to DONE for demo task", - "no auto-merge/deploy occurred" - ], - "verification": [ - "node scripts/verify-m4.cjs", - "npm run lint", - "npm test", - "npm run build" - ], - "initiative": "autonomous-factory-m4" - }, - { - "id": "M4-078", - "kind": "task", - "title": "M4.78 M4 Final Verification — Full Autonomous Factory Gate", - "status": "pending", - "deps": [ - "M4-077", - "M4-070", - "M4-062" - ], - "priority": "P2", - "risk": "R1", - "artifacts": [ - "docs/M4_VERIFICATION.md", - "scripts/verify-m4.cjs", - ".beads/beads.json" - ], - "acceptance_criteria": [ - "state machine PENDING→READY→…→HUMAN_GATE→DONE validated", - "all workers produce typed evidence, no shared mutable LLM memory", - "R3/R4 never auto-merge; factory health HEALTHY" - ], - "verification": [ - "node scripts/verify-m4.cjs", - "npm run lint", - "npm test", - "npm run build", - "npx hardhat test" - ], - "initiative": "autonomous-factory-m4" - } - ], - "edges": [ - { - "from": "T2", - "to": "T3", - "type": "enables" - }, - { - "from": "T2", - "to": "T4", - "type": "feeds" - }, - { - "from": "T4", - "to": "T5", - "type": "enables" - }, - { - "from": "T2", - "to": "T6", - "type": "enables" - }, - { - "from": "T3", - "to": "T7", - "type": "enables" - }, - { - "from": "T7", - "to": "T8", - "type": "blocks" - }, - { - "from": "T8", - "to": "T9", - "type": "blocks" - }, - { - "from": "T9", - "to": "T10", - "type": "blocks" - }, - { - "from": "T11", - "to": "T12", - "type": "enables" - }, - { - "from": "T11", - "to": "T13", - "type": "feeds" - }, - { - "from": "T12", - "to": "T13", - "type": "enables" - }, - { - "from": "T13", - "to": "T14", - "type": "blocks" - }, - { - "from": "T15", - "to": "T16", - "type": "enables" - }, - { - "from": "T15", - "to": "T17", - "type": "feeds" - }, - { - "from": "T16", - "to": "T17", - "type": "enables" - }, - { - "from": "T17", - "to": "T18", - "type": "blocks" - }, - { - "from": "T19", - "to": "T20", - "type": "enables" - }, - { - "from": "T19", - "to": "T21", - "type": "feeds" - }, - { - "from": "T20", - "to": "T21", - "type": "enables" - }, - { - "from": "T21", - "to": "T22", - "type": "blocks" - }, - { - "from": "T23", - "to": "T24", - "type": "enables" - }, - { - "from": "T23", - "to": "T25", - "type": "feeds" - }, - { - "from": "T24", - "to": "T25", - "type": "enables" - }, - { - "from": "T25", - "to": "T26", - "type": "blocks" - }, - { - "from": "T24", - "to": "T27", - "type": "enables" - }, - { - "from": "T27", - "to": "T28", - "type": "blocks" - }, - { - "from": "T29", - "to": "T30", - "type": "enables" - }, - { - "from": "T30", - "to": "T31", - "type": "enables" - }, - { - "from": "T31", - "to": "T32", - "type": "blocks" - }, - { - "from": "T33", - "to": "T34", - "type": "enables" - }, - { - "from": "T34", - "to": "T35", - "type": "enables" - }, - { - "from": "T35", - "to": "T36", - "type": "blocks" - }, - { - "from": "T37", - "to": "T38", - "type": "enables" - }, - { - "from": "T38", - "to": "T39", - "type": "enables" - }, - { - "from": "T39", - "to": "T40", - "type": "blocks" - }, - { - "from": "T41", - "to": "T42", - "type": "enables" - }, - { - "from": "T41", - "to": "T43", - "type": "enables" - }, - { - "from": "T42", - "to": "T44", - "type": "enables" - }, - { - "from": "T43", - "to": "T44", - "type": "enables" - }, - { - "from": "T45", - "to": "T46", - "type": "enables" - }, - { - "from": "T46", - "to": "T47", - "type": "enables" - }, - { - "from": "T47", - "to": "T48", - "type": "blocks" - }, - { - "from": "T49", - "to": "T50", - "type": "enables" - }, - { - "from": "T50", - "to": "T51", - "type": "enables" - }, - { - "from": "T51", - "to": "T52", - "type": "blocks" - }, - { - "from": "T53", - "to": "T54", - "type": "enables" - }, - { - "from": "T54", - "to": "T55", - "type": "enables" - }, - { - "from": "T55", - "to": "T56", - "type": "blocks" - }, - { - "from": "T57", - "to": "T58", - "type": "enables" - }, - { - "from": "T29", - "to": "T30", - "type": "blocks" - }, - { - "from": "T101", - "to": "T102", - "type": "next" - }, - { - "from": "T102", - "to": "T103", - "type": "next" - }, - { - "from": "T103", - "to": "T104", - "type": "next" - }, - { - "from": "T104", - "to": "T105", - "type": "next" - }, - { - "from": "T105", - "to": "T106", - "type": "next" - }, - { - "from": "T106", - "to": "T107", - "type": "next" - }, - { - "from": "T107", - "to": "T108", - "type": "next" - }, - { - "from": "T108", - "to": "T109", - "type": "next" - }, - { - "from": "T109", - "to": "T110", - "type": "next" - }, - { - "from": "T110", - "to": "T111", - "type": "next" - }, - { - "from": "T111", - "to": "T112", - "type": "next" - }, - { - "from": "M2-002", - "to": "M2-003", - "type": "enables" - }, - { - "from": "M2-001", - "to": "M2-004", - "type": "enables" - }, - { - "from": "M2-002", - "to": "M2-004", - "type": "enables" - }, - { - "from": "M2-005", - "to": "M2-006", - "type": "enables" - }, - { - "from": "M2-005", - "to": "M2-007", - "type": "enables" - }, - { - "from": "M2-006", - "to": "M2-007", - "type": "enables" - }, - { - "from": "M2-001", - "to": "M2-008", - "type": "enables" - }, - { - "from": "M2-008", - "to": "M2-009", - "type": "enables" - }, - { - "from": "M2-008", - "to": "M2-010", - "type": "enables" - }, - { - "from": "M2-004", - "to": "M2-011", - "type": "enables" - }, - { - "from": "M2-007", - "to": "M2-011", - "type": "enables" - }, - { - "from": "M2-009", - "to": "M2-011", - "type": "enables" - }, - { - "from": "M2-010", - "to": "M2-011", - "type": "enables" - }, - { - "from": "M2-012", - "to": "M2-011", - "type": "enables" - }, - { - "from": "M2-011", - "to": "M2-013", - "type": "enables" - }, - { - "from": "M2-012", - "to": "M2-013", - "type": "enables" - }, - { - "from": "M2-013", - "to": "M2-014", - "type": "enables" - }, - { - "from": "M2-014", - "to": "M3-001", - "type": "enables" - }, - { - "from": "M3-001", - "to": "M3-002", - "type": "enables" - }, - { - "from": "M3-001", - "to": "M3-003", - "type": "enables" - }, - { - "from": "M3-001", - "to": "M3-004", - "type": "enables" - }, - { - "from": "M3-003", - "to": "M3-005", - "type": "enables" - }, - { - "from": "M3-004", - "to": "M3-005", - "type": "enables" - }, - { - "from": "M3-005", - "to": "M3-006", - "type": "enables" - }, - { - "from": "M3-002", - "to": "M3-006", - "type": "enables" - }, - { - "from": "M3-006", - "to": "M3-007", - "type": "enables" - }, - { - "from": "M3-006", - "to": "M3-008", - "type": "enables" - }, - { - "from": "M3-006", - "to": "M3-009", - "type": "enables" - }, - { - "from": "M3-006", - "to": "M3-010", - "type": "enables" - }, - { - "from": "M3-006", - "to": "M3-011", - "type": "enables" - }, - { - "from": "M3-007", - "to": "M3-012", - "type": "enables" - }, - { - "from": "M3-008", - "to": "M3-012", - "type": "enables" - }, - { - "from": "M3-009", - "to": "M3-012", - "type": "enables" - }, - { - "from": "M3-012", - "to": "M3-013", - "type": "enables" - }, - { - "from": "M3-001", - "to": "M3-014", - "type": "enables" - }, - { - "from": "M3-014", - "to": "M3-015", - "type": "enables" - }, - { - "from": "M3-015", - "to": "M3-016", - "type": "enables" - }, - { - "from": "M3-002", - "to": "M3-016", - "type": "enables" - }, - { - "from": "M3-001", - "to": "M3-017", - "type": "enables" - }, - { - "from": "M3-017", - "to": "M3-018", - "type": "enables" - }, - { - "from": "M3-006", - "to": "M3-018", - "type": "enables" - }, + } + ], + "edges": [ { - "from": "M3-002", - "to": "M3-019", + "from": "T2", + "to": "T3", "type": "enables" }, { - "from": "M3-017", - "to": "M3-019", - "type": "enables" + "from": "T2", + "to": "T4", + "type": "feeds" }, { - "from": "M3-014", - "to": "M3-019", + "from": "T4", + "to": "T5", "type": "enables" }, { - "from": "M3-019", - "to": "M3-020", + "from": "T2", + "to": "T6", "type": "enables" }, { - "from": "M3-007", - "to": "M3-020", + "from": "T3", + "to": "T7", "type": "enables" }, { - "from": "M3-008", - "to": "M3-020", - "type": "enables" + "from": "T7", + "to": "T8", + "type": "blocks" }, { - "from": "M3-009", - "to": "M3-020", - "type": "enables" + "from": "T8", + "to": "T9", + "type": "blocks" }, { - "from": "M3-012", - "to": "M3-021", - "type": "enables" + "from": "T9", + "to": "T10", + "type": "blocks" }, { - "from": "M3-006", - "to": "M3-021", + "from": "T11", + "to": "T12", "type": "enables" }, { - "from": "M3-019", - "to": "M3-022", - "type": "enables" + "from": "T11", + "to": "T13", + "type": "feeds" }, { - "from": "M3-020", - "to": "M3-022", + "from": "T12", + "to": "T13", "type": "enables" }, { - "from": "M3-021", - "to": "M3-022", - "type": "enables" + "from": "T13", + "to": "T14", + "type": "blocks" }, { - "from": "M3-022", - "to": "M3-023", + "from": "T15", + "to": "T16", "type": "enables" }, { - "from": "M3-022", - "to": "M3-024", - "type": "enables" + "from": "T15", + "to": "T17", + "type": "feeds" }, { - "from": "M3-008", - "to": "M3-024", + "from": "T16", + "to": "T17", "type": "enables" }, { - "from": "M3-018", - "to": "M3-024", - "type": "enables" + "from": "T17", + "to": "T18", + "type": "blocks" }, { - "from": "M3-022", - "to": "M3-025", + "from": "T19", + "to": "T20", "type": "enables" }, - { - "from": "M3-023", - "to": "M3-025", - "type": "enables" + { + "from": "T19", + "to": "T21", + "type": "feeds" }, { - "from": "M3-024", - "to": "M3-025", + "from": "T20", + "to": "T21", "type": "enables" }, { - "from": "M3-025", - "to": "M4-001", - "type": "enables" + "from": "T21", + "to": "T22", + "type": "blocks" }, { - "from": "M4-001", - "to": "M4-002", + "from": "T23", + "to": "T24", "type": "enables" }, { - "from": "M4-001", - "to": "M4-003", - "type": "enables" + "from": "T23", + "to": "T25", + "type": "feeds" }, { - "from": "M4-001", - "to": "M4-004", + "from": "T24", + "to": "T25", "type": "enables" }, { - "from": "M4-002", - "to": "M4-005", - "type": "enables" + "from": "T25", + "to": "T26", + "type": "blocks" }, { - "from": "M4-003", - "to": "M4-005", + "from": "T24", + "to": "T27", "type": "enables" }, { - "from": "M4-004", - "to": "M4-006", - "type": "enables" + "from": "T27", + "to": "T28", + "type": "blocks" }, { - "from": "M4-005", - "to": "M4-006", + "from": "T29", + "to": "T30", "type": "enables" }, { - "from": "M3-025", - "to": "M4-007", + "from": "T30", + "to": "T31", "type": "enables" }, { - "from": "M4-007", - "to": "M4-008", - "type": "enables" + "from": "T31", + "to": "T32", + "type": "blocks" }, { - "from": "M4-007", - "to": "M4-009", + "from": "T33", + "to": "T34", "type": "enables" }, { - "from": "M4-008", - "to": "M4-010", + "from": "T34", + "to": "T35", "type": "enables" }, { - "from": "M4-009", - "to": "M4-010", - "type": "enables" + "from": "T35", + "to": "T36", + "type": "blocks" }, { - "from": "M4-008", - "to": "M4-011", + "from": "T37", + "to": "T38", "type": "enables" }, { - "from": "M4-010", - "to": "M4-012", + "from": "T38", + "to": "T39", "type": "enables" }, { - "from": "M4-011", - "to": "M4-012", - "type": "enables" + "from": "T39", + "to": "T40", + "type": "blocks" }, { - "from": "M4-006", - "to": "M4-013", + "from": "T41", + "to": "T42", "type": "enables" }, { - "from": "M4-012", - "to": "M4-013", + "from": "T41", + "to": "T43", "type": "enables" }, { - "from": "M4-013", - "to": "M4-014", + "from": "T42", + "to": "T44", "type": "enables" }, { - "from": "M4-013", - "to": "M4-015", + "from": "T43", + "to": "T44", "type": "enables" }, { - "from": "M4-014", - "to": "M4-016", + "from": "T45", + "to": "T46", "type": "enables" }, { - "from": "M4-015", - "to": "M4-017", + "from": "T46", + "to": "T47", "type": "enables" }, { - "from": "M4-016", - "to": "M4-017", - "type": "enables" + "from": "T47", + "to": "T48", + "type": "blocks" }, { - "from": "M4-017", - "to": "M4-018", + "from": "T49", + "to": "T50", "type": "enables" }, { - "from": "M4-018", - "to": "M4-019", + "from": "T50", + "to": "T51", "type": "enables" }, { - "from": "M4-019", - "to": "M4-020", - "type": "enables" + "from": "T51", + "to": "T52", + "type": "blocks" }, { - "from": "M4-020", - "to": "M4-021", + "from": "T53", + "to": "T54", "type": "enables" }, { - "from": "M4-020", - "to": "M4-022", + "from": "T54", + "to": "T55", "type": "enables" }, { - "from": "M4-021", - "to": "M4-023", - "type": "enables" + "from": "T55", + "to": "T56", + "type": "blocks" }, { - "from": "M4-022", - "to": "M4-023", + "from": "T57", + "to": "T58", "type": "enables" }, { - "from": "M4-023", - "to": "M4-024", - "type": "enables" + "from": "T29", + "to": "T30", + "type": "blocks" }, { - "from": "M4-024", - "to": "M4-025", - "type": "enables" + "from": "T101", + "to": "T102", + "type": "next" }, { - "from": "M4-019", - "to": "M4-026", - "type": "enables" + "from": "T102", + "to": "T103", + "type": "next" }, { - "from": "M4-026", - "to": "M4-027", - "type": "enables" + "from": "T103", + "to": "T104", + "type": "next" }, { - "from": "M4-027", - "to": "M4-028", - "type": "enables" + "from": "T104", + "to": "T105", + "type": "next" }, { - "from": "M4-028", - "to": "M4-029", - "type": "enables" + "from": "T105", + "to": "T106", + "type": "next" }, { - "from": "M4-028", - "to": "M4-030", - "type": "enables" + "from": "T106", + "to": "T107", + "type": "next" }, { - "from": "M4-029", - "to": "M4-031", - "type": "enables" + "from": "T107", + "to": "T108", + "type": "next" }, { - "from": "M4-030", - "to": "M4-031", - "type": "enables" + "from": "T108", + "to": "T109", + "type": "next" }, { - "from": "M4-031", - "to": "M4-032", - "type": "enables" + "from": "T109", + "to": "T110", + "type": "next" }, { - "from": "M4-025", - "to": "M4-033", - "type": "enables" + "from": "T110", + "to": "T111", + "type": "next" }, { - "from": "M4-032", - "to": "M4-033", - "type": "enables" + "from": "T111", + "to": "T112", + "type": "next" }, { - "from": "M4-033", - "to": "M4-034", + "from": "M2-002", + "to": "M2-003", "type": "enables" }, { - "from": "M4-033", - "to": "M4-035", + "from": "M2-001", + "to": "M2-004", "type": "enables" }, { - "from": "M4-033", - "to": "M4-036", + "from": "M2-002", + "to": "M2-004", "type": "enables" }, { - "from": "M4-034", - "to": "M4-037", + "from": "M2-005", + "to": "M2-006", "type": "enables" }, { - "from": "M4-035", - "to": "M4-037", + "from": "M2-005", + "to": "M2-007", "type": "enables" }, { - "from": "M4-036", - "to": "M4-037", + "from": "M2-006", + "to": "M2-007", "type": "enables" }, { - "from": "M4-037", - "to": "M4-038", + "from": "M2-001", + "to": "M2-008", "type": "enables" }, { - "from": "M4-038", - "to": "M4-039", + "from": "M2-008", + "to": "M2-009", "type": "enables" }, { - "from": "M4-019", - "to": "M4-040", + "from": "M2-008", + "to": "M2-010", "type": "enables" }, { - "from": "M4-040", - "to": "M4-041", + "from": "M2-004", + "to": "M2-011", "type": "enables" }, { - "from": "M4-040", - "to": "M4-042", + "from": "M2-007", + "to": "M2-011", "type": "enables" }, { - "from": "M4-041", - "to": "M4-043", + "from": "M2-009", + "to": "M2-011", "type": "enables" }, { - "from": "M4-042", - "to": "M4-043", + "from": "M2-010", + "to": "M2-011", "type": "enables" }, { - "from": "M4-043", - "to": "M4-044", + "from": "M2-012", + "to": "M2-011", "type": "enables" }, { - "from": "M4-044", - "to": "M4-045", + "from": "M2-011", + "to": "M2-013", "type": "enables" }, { - "from": "M4-045", - "to": "M4-046", + "from": "M2-012", + "to": "M2-013", "type": "enables" }, { - "from": "M4-019", - "to": "M4-047", + "from": "M2-013", + "to": "M2-014", "type": "enables" }, { - "from": "M4-047", - "to": "M4-048", + "from": "M2-014", + "to": "M3-001", "type": "enables" }, { - "from": "M4-047", - "to": "M4-049", + "from": "M3-001", + "to": "M3-002", "type": "enables" }, { - "from": "M4-048", - "to": "M4-050", + "from": "M3-001", + "to": "M3-003", "type": "enables" }, { - "from": "M4-049", - "to": "M4-050", + "from": "M3-001", + "to": "M3-004", "type": "enables" }, { - "from": "M4-050", - "to": "M4-051", + "from": "M3-003", + "to": "M3-005", "type": "enables" }, { - "from": "M4-051", - "to": "M4-052", + "from": "M3-004", + "to": "M3-005", "type": "enables" }, { - "from": "M4-052", - "to": "M4-053", + "from": "M3-005", + "to": "M3-006", "type": "enables" }, { - "from": "M4-053", - "to": "M4-054", + "from": "M3-002", + "to": "M3-006", "type": "enables" }, { - "from": "M4-054", - "to": "M4-055", + "from": "M3-006", + "to": "M3-007", "type": "enables" }, { - "from": "M4-039", - "to": "M4-056", + "from": "M3-006", + "to": "M3-008", "type": "enables" }, { - "from": "M4-046", - "to": "M4-056", + "from": "M3-006", + "to": "M3-009", "type": "enables" }, { - "from": "M4-055", - "to": "M4-056", + "from": "M3-006", + "to": "M3-010", "type": "enables" }, { - "from": "M4-056", - "to": "M4-057", + "from": "M3-006", + "to": "M3-011", "type": "enables" }, { - "from": "M4-056", - "to": "M4-058", + "from": "M3-007", + "to": "M3-012", "type": "enables" }, { - "from": "M4-057", - "to": "M4-059", + "from": "M3-008", + "to": "M3-012", "type": "enables" }, { - "from": "M4-058", - "to": "M4-059", + "from": "M3-009", + "to": "M3-012", "type": "enables" }, { - "from": "M4-059", - "to": "M4-060", + "from": "M3-012", + "to": "M3-013", "type": "enables" }, { - "from": "M4-060", - "to": "M4-061", + "from": "M3-001", + "to": "M3-014", "type": "enables" }, { - "from": "M4-055", - "to": "M4-061", + "from": "M3-014", + "to": "M3-015", "type": "enables" }, { - "from": "M4-061", - "to": "M4-062", + "from": "M3-015", + "to": "M3-016", "type": "enables" }, { - "from": "M4-062", - "to": "M4-063", + "from": "M3-002", + "to": "M3-016", "type": "enables" }, { - "from": "M4-063", - "to": "M4-064", + "from": "M3-001", + "to": "M3-017", "type": "enables" }, { - "from": "M4-032", - "to": "M4-064", + "from": "M3-017", + "to": "M3-018", "type": "enables" }, { - "from": "M4-064", - "to": "M4-065", + "from": "M3-006", + "to": "M3-018", "type": "enables" }, { - "from": "M4-065", - "to": "M4-066", + "from": "M3-002", + "to": "M3-019", "type": "enables" }, { - "from": "M4-066", - "to": "M4-067", + "from": "M3-017", + "to": "M3-019", "type": "enables" }, { - "from": "M4-067", - "to": "M4-068", + "from": "M3-014", + "to": "M3-019", "type": "enables" }, { - "from": "M4-068", - "to": "M4-069", + "from": "M3-019", + "to": "M3-020", "type": "enables" }, { - "from": "M4-069", - "to": "M4-070", + "from": "M3-007", + "to": "M3-020", "type": "enables" }, { - "from": "M4-070", - "to": "M4-071", + "from": "M3-008", + "to": "M3-020", "type": "enables" }, { - "from": "M4-039", - "to": "M4-071", + "from": "M3-009", + "to": "M3-020", "type": "enables" }, { - "from": "M4-071", - "to": "M4-072", + "from": "M3-012", + "to": "M3-021", "type": "enables" }, { - "from": "M4-071", - "to": "M4-073", + "from": "M3-006", + "to": "M3-021", "type": "enables" }, { - "from": "M4-071", - "to": "M4-074", + "from": "M3-019", + "to": "M3-022", "type": "enables" }, { - "from": "M4-071", - "to": "M4-075", + "from": "M3-020", + "to": "M3-022", "type": "enables" }, { - "from": "M4-072", - "to": "M4-076", + "from": "M3-021", + "to": "M3-022", "type": "enables" }, { - "from": "M4-073", - "to": "M4-076", + "from": "M3-022", + "to": "M3-023", "type": "enables" }, { - "from": "M4-074", - "to": "M4-076", + "from": "M3-022", + "to": "M3-024", "type": "enables" }, { - "from": "M4-075", - "to": "M4-076", + "from": "M3-008", + "to": "M3-024", "type": "enables" }, { - "from": "M4-076", - "to": "M4-077", + "from": "M3-018", + "to": "M3-024", "type": "enables" }, { - "from": "M4-077", - "to": "M4-078", + "from": "M3-022", + "to": "M3-025", "type": "enables" }, { - "from": "M4-070", - "to": "M4-078", + "from": "M3-023", + "to": "M3-025", "type": "enables" }, { - "from": "M4-062", - "to": "M4-078", + "from": "M3-024", + "to": "M3-025", "type": "enables" } ] From 17457923c19d4d05c64ab8221a419da7005f5176 Mon Sep 17 00:00:00 2001 From: Domini Montessori Date: Thu, 3 Sep 2026 00:53:47 +0300 Subject: [PATCH 2/3] =?UTF-8?q?feat(beads):=20M4=20Adaptive=20Factory=20DA?= =?UTF-8?q?G=20=E2=80=94=20self-managed=20loop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit M4 extends M1-M3 runtime into closed-loop factory: Memory (001-006), Intelligence (007-012), Planner (013-019), Backlog (020-025), Learning (026-032), Verification (033-039), Observability (040-046), Supervisor (047-055), Policy 2.0 (056-062), Self-Healing (063-070), Factory E2E (071-078). 78 nodes, pending, P1/P2 R1/R2, TDD verification. --- .beads/beads.json | 3114 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 2840 insertions(+), 274 deletions(-) diff --git a/.beads/beads.json b/.beads/beads.json index 5bb55f0a..09bd3aac 100644 --- a/.beads/beads.json +++ b/.beads/beads.json @@ -2,7 +2,7 @@ "schema": "beads.state-graph/v1", "project": "dominicusin.github.io", "initiative": "repo-gist-ingestion", - "updated": "2026-09-02", + "updated": "2026-09-03", "nodes": [ { "id": "T1", @@ -2438,612 +2438,3178 @@ "npx hardhat test" ], "initiative": "autonomous-factory-m3" + }, + { + "id": "M4-001", + "kind": "task", + "title": "M4.1 Persistent Memory — memory.cjs core", + "status": "pending", + "deps": [ + "M3-025" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/memory/memory.cjs", + "agent/memory/memory.test.cjs" + ], + "acceptance_criteria": [ + "memory.cjs load/save/get/set/list with JSONL persistence", + "no data loss on restart", + "contract validates MemoryEntry {id,task,run_id,payload,timestamp}" + ], + "verification": [ + "node --test agent/memory/memory.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-002", + "kind": "task", + "title": "M4.2 Episodic Memory — episodic.cjs", + "status": "pending", + "deps": [ + "M4-001" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/memory/episodic.cjs", + "agent/memory/episodic.test.cjs" + ], + "acceptance_criteria": [ + "episodic append/query by run_id+task_id", + "retention window enforced", + "evidence ↔ episode correlation" + ], + "verification": [ + "node --test agent/memory/episodic.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-003", + "kind": "task", + "title": "M4.3 Semantic Memory — semantic.cjs", + "status": "pending", + "deps": [ + "M4-001" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/memory/semantic.cjs", + "agent/memory/semantic.test.cjs" + ], + "acceptance_criteria": [ + "semantic index facts by capability/policy failure", + "query by tags returns ranked facts", + "no mutable global state" + ], + "verification": [ + "node --test agent/memory/semantic.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-004", + "kind": "task", + "title": "M4.4 Procedural Memory — procedural.cjs", + "status": "pending", + "deps": [ + "M4-001" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/memory/procedural.cjs", + "agent/memory/procedural.test.cjs" + ], + "acceptance_criteria": [ + "procedural stores workflow templates Task→Stages", + "template reuse produces identical ExecutionPlan", + "versioned templates" + ], + "verification": [ + "node --test agent/memory/procedural.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-005", + "kind": "task", + "title": "M4.5 Decision Log — decisions.cjs", + "status": "pending", + "deps": [ + "M4-002", + "M4-003" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/memory/decisions.cjs", + "agent/memory/decisions.test.cjs" + ], + "acceptance_criteria": [ + "decisions.cjs records Decision {task,options,chosen,rationale,evidence}", + "decision replay deterministic", + "unknown≠false preserved" + ], + "verification": [ + "node --test agent/memory/decisions.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-006", + "kind": "task", + "title": "M4.6 Failure Memory + Memory Facade — failures.cjs", + "status": "pending", + "deps": [ + "M4-004", + "M4-005" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/memory/failures.cjs", + "agent/memory/failures.test.cjs", + "agent/memory/index.cjs" + ], + "acceptance_criteria": [ + "failures.cjs indexes failure signature→diagnosis→healing", + "memory facade exports getMemory/queryMemory", + "no shared mutable LLM memory" + ], + "verification": [ + "node --test agent/memory/failures.test.cjs", + "node --test agent/memory/memory.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-007", + "kind": "task", + "title": "M4.7 Repository Graph — repository-graph.cjs", + "status": "pending", + "deps": [ + "M3-025" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/intelligence/repository-graph.cjs", + "agent/intelligence/repository-graph.test.cjs" + ], + "acceptance_criteria": [ + "graph nodes = files/modules, edges = import/require", + "incremental update on diff", + "JSON serializable snapshot" + ], + "verification": [ + "node --test agent/intelligence/repository-graph.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-008", + "kind": "task", + "title": "M4.8 Dependency Graph — dependency-graph.cjs", + "status": "pending", + "deps": [ + "M4-007" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/intelligence/dependency-graph.cjs", + "agent/intelligence/dependency-graph.test.cjs" + ], + "acceptance_criteria": [ + "dependency-graph builds DAG of package/file deps", + "cycle detection reports culprit edge", + "transitive closure correct" + ], + "verification": [ + "node --test agent/intelligence/dependency-graph.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-009", + "kind": "task", + "title": "M4.9 Ownership Map — ownership.cjs", + "status": "pending", + "deps": [ + "M4-007" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/intelligence/ownership.cjs", + "agent/intelligence/ownership.test.cjs" + ], + "acceptance_criteria": [ + "ownership maps file→team/capability via CODEOWNERS+git history", + "fallback to most frequent committer", + "confidence metadata" + ], + "verification": [ + "node --test agent/intelligence/ownership.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-010", + "kind": "task", + "title": "M4.10 Change Impact Analyzer — change-impact.cjs", + "status": "pending", + "deps": [ + "M4-008", + "M4-009" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/intelligence/change-impact.cjs", + "agent/intelligence/change-impact.test.cjs" + ], + "acceptance_criteria": [ + "change-impact given diff returns affectedFiles+affectedTasks+blastRadius", + "uses dependency-graph+ownership", + "ranked impact with evidence" + ], + "verification": [ + "node --test agent/intelligence/change-impact.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-011", + "kind": "task", + "title": "M4.11 Hotspots Detector — hotspots.cjs", + "status": "pending", + "deps": [ + "M4-008" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/intelligence/hotspots.cjs", + "agent/intelligence/hotspots.test.cjs" + ], + "acceptance_criteria": [ + "hotspots by churn+complexity+failure history", + "top-10 hotspots ranked", + "integrates with semantic memory" + ], + "verification": [ + "node --test agent/intelligence/hotspots.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-012", + "kind": "task", + "title": "M4.12 Repository Intelligence Facade", + "status": "pending", + "deps": [ + "M4-010", + "M4-011" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/intelligence/index.cjs", + "agent/intelligence/intelligence.test.cjs" + ], + "acceptance_criteria": [ + "facade getIntelligence(diff) returns {graph,impact,hotspots,ownership}", + "cached per commit SHA", + "no filesystem mutation" + ], + "verification": [ + "node --test agent/intelligence/intelligence.test.cjs", + "node --test agent/intelligence/repository-graph.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-013", + "kind": "task", + "title": "M4.13 Adaptive Planner Core — planner.cjs", + "status": "pending", + "deps": [ + "M4-006", + "M4-012" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/planner/planner.cjs", + "agent/planner/planner.test.cjs" + ], + "acceptance_criteria": [ + "planner consumes Memory+Intelligence+Beads → TaskPlan {tasks,deps,risk,acceptance,verification}", + "planner never writes production code", + "deps form acyclic graph" + ], + "verification": [ + "node --test agent/planner/planner.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-014", + "kind": "task", + "title": "M4.14 Task Decomposition — decomposition.cjs", + "status": "pending", + "deps": [ + "M4-013" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/planner/decomposition.cjs", + "agent/planner/decomposition.test.cjs" + ], + "acceptance_criteria": [ + "decomposition splits task into ≤5 subtasks with scope+files", + "each subtask has isolated verification", + "no out-of-scope file leaks" + ], + "verification": [ + "node --test agent/planner/decomposition.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-015", + "kind": "task", + "title": "M4.15 Prioritizer — prioritizer.cjs", + "status": "pending", + "deps": [ + "M4-013" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/planner/prioritizer.cjs", + "agent/planner/prioritizer.test.cjs" + ], + "acceptance_criteria": [ + "prioritizer ranks tasks by P0> P1> P2 and risk+impact", + "stable sort on tie-breaker id", + "respects Budget maxWorkers" + ], + "verification": [ + "node --test agent/planner/prioritizer.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-016", + "kind": "task", + "title": "M4.16 Dependency Resolver — dependency-resolver.cjs", + "status": "pending", + "deps": [ + "M4-014" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/planner/dependency-resolver.cjs", + "agent/planner/dependency-resolver.test.cjs" + ], + "acceptance_criteria": [ + "resolves TaskPlan deps to topological order", + "detects cycle → error with cycle path", + "outputs ExecutionPlan stages with parallel flags" + ], + "verification": [ + "node --test agent/planner/dependency-resolver.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-017", + "kind": "task", + "title": "M4.17 Replanner — replanner.cjs", + "status": "pending", + "deps": [ + "M4-015", + "M4-016" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/planner/replanner.cjs", + "agent/planner/replanner.test.cjs" + ], + "acceptance_criteria": [ + "replanner on failure/impact change produces new TaskPlan delta", + "preserves done tasks, re-queues affected only", + "emits EvidenceEnvelope replanned" + ], + "verification": [ + "node --test agent/planner/replanner.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-018", + "kind": "task", + "title": "M4.18 Planner ↔ Evidence Bus Integration", + "status": "pending", + "deps": [ + "M4-017" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/planner/evidence-integration.cjs", + "agent/planner/evidence-integration.test.cjs" + ], + "acceptance_criteria": [ + "planner subscribes to EvidenceBus, publishes TaskPlan envelopes", + "order preserved per run_id", + "typed envelopes only" + ], + "verification": [ + "node --test agent/planner/evidence-integration.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-019", + "kind": "task", + "title": "M4.19 Adaptive Planner Verification", + "status": "pending", + "deps": [ + "M4-018" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/planner/planner.test.cjs", + "agent/planner/decomposition.test.cjs", + "agent/planner/dependency-resolver.test.cjs" + ], + "acceptance_criteria": [ + "planner E2E: sample epic → TaskPlan validated", + "all verification TDD green", + "no shared mutable state" + ], + "verification": [ + "node --test agent/planner/planner.test.cjs", + "node --test agent/planner/decomposition.test.cjs", + "node --test agent/planner/dependency-resolver.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-020", + "kind": "task", + "title": "M4.20 Backlog Discovery — discovery.cjs", + "status": "pending", + "deps": [ + "M4-019" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/backlog/discovery.cjs", + "agent/backlog/discovery.test.cjs" + ], + "acceptance_criteria": [ + "discovers tasks from Beads+git diff+intelligence hotspots", + "deduplicates against existing backlog", + "emits BacklogEntry[]" + ], + "verification": [ + "node --test agent/backlog/discovery.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-021", + "kind": "task", + "title": "M4.21 Backlog Prioritization — prioritization.cjs", + "status": "pending", + "deps": [ + "M4-020" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/backlog/prioritization.cjs", + "agent/backlog/prioritization.test.cjs" + ], + "acceptance_criteria": [ + "prioritization ranks by planner priority+impact+age", + "P1 before P2, R2 escalated", + "stable ranking" + ], + "verification": [ + "node --test agent/backlog/prioritization.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-022", + "kind": "task", + "title": "M4.22 Backlog Deduplication — deduplication.cjs", + "status": "pending", + "deps": [ + "M4-020" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/backlog/deduplication.cjs", + "agent/backlog/deduplication.test.cjs" + ], + "acceptance_criteria": [ + "deduplication by title+files Jaccard >0.8→merge", + "preserves oldest id as canonical", + "no data loss" + ], + "verification": [ + "node --test agent/backlog/deduplication.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-023", + "kind": "task", + "title": "M4.23 Backlog Decomposition — decomposition.cjs", + "status": "pending", + "deps": [ + "M4-021", + "M4-022" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/backlog/decomposition-backlog.cjs", + "agent/backlog/decomposition-backlog.test.cjs" + ], + "acceptance_criteria": [ + "splits oversized backlog item (>1000 diff lines) into ≤5", + "preserves deps acyclic", + "each child inherits parent priority" + ], + "verification": [ + "node --test agent/backlog/decomposition-backlog.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-024", + "kind": "task", + "title": "M4.24 Stale Task Detector — stale-task-detector.cjs", + "status": "pending", + "deps": [ + "M4-023" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/backlog/stale-task-detector.cjs", + "agent/backlog/stale-task-detector.test.cjs" + ], + "acceptance_criteria": [ + "detects stale >14d no activity or orphaned worktree", + "marks STALE→evidence, never auto-deletes", + "supervisor can clean after evidence" + ], + "verification": [ + "node --test agent/backlog/stale-task-detector.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-025", + "kind": "task", + "title": "M4.25 Backlog Manager Facade", + "status": "pending", + "deps": [ + "M4-024" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/backlog/index.cjs", + "agent/backlog/backlog.test.cjs" + ], + "acceptance_criteria": [ + "facade getBacklog() returns ranked, deduped, decomposed, stale-flagged list", + "integrates with planner prioritizer", + "typed Beads entries" + ], + "verification": [ + "node --test agent/backlog/backlog.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-026", + "kind": "task", + "title": "M4.26 Outcome Tracker — outcome.cjs", + "status": "pending", + "deps": [ + "M4-019" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/learning/outcome.cjs", + "agent/learning/outcome.test.cjs" + ], + "acceptance_criteria": [ + "outcome records Task {run_id,result,evidence,diagnosis,retries}", + "outcome query by task_id returns history", + "append-only log" + ], + "verification": [ + "node --test agent/learning/outcome.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-027", + "kind": "task", + "title": "M4.27 Metrics Collector — metrics.cjs", + "status": "pending", + "deps": [ + "M4-026" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/learning/metrics.cjs", + "agent/learning/metrics.test.cjs" + ], + "acceptance_criteria": [ + "collects pass/fail rate, MTTR, retries, coverage delta", + "aggregates per capability/worker", + "emits MetricsEnvelope" + ], + "verification": [ + "node --test agent/learning/metrics.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-028", + "kind": "task", + "title": "M4.28 Pattern Miner — pattern-miner.cjs", + "status": "pending", + "deps": [ + "M4-027" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/learning/pattern-miner.cjs", + "agent/learning/pattern-miner.test.cjs" + ], + "acceptance_criteria": [ + "mines failure signatures → pattern {signature,freq,suggestedFix}", + "freq threshold ≥3", + "pattern confidence metadata" + ], + "verification": [ + "node --test agent/learning/pattern-miner.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-029", + "kind": "task", + "title": "M4.29 Worker Performance — worker-performance.cjs", + "status": "pending", + "deps": [ + "M4-028" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/learning/worker-performance.cjs", + "agent/learning/worker-performance.test.cjs" + ], + "acceptance_criteria": [ + "ranks workers by success rate per capability", + "exposes getBestWorker(capability)", + "no mutable global" + ], + "verification": [ + "node --test agent/learning/worker-performance.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-030", + "kind": "task", + "title": "M4.30 Failure Patterns — failure-patterns.cjs", + "status": "pending", + "deps": [ + "M4-028" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/learning/failure-patterns.cjs", + "agent/learning/failure-patterns.test.cjs" + ], + "acceptance_criteria": [ + "failure-patterns maps category→patterns with fix hints", + "integrates with memory/failures.cjs", + "query returns top-3 patterns" + ], + "verification": [ + "node --test agent/learning/failure-patterns.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-031", + "kind": "task", + "title": "M4.31 Learning Aggregator", + "status": "pending", + "deps": [ + "M4-029", + "M4-030" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/learning/index.cjs", + "agent/learning/learning.test.cjs" + ], + "acceptance_criteria": [ + "aggregator getLearningSnapshot() returns {metrics,patterns,workerRank}", + "cached per run_id", + "typed envelope" + ], + "verification": [ + "node --test agent/learning/learning.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-032", + "kind": "task", + "title": "M4.32 Learning Feedback Loop Integration", + "status": "pending", + "deps": [ + "M4-031" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/learning/feedback.cjs", + "agent/learning/feedback.test.cjs" + ], + "acceptance_criteria": [ + "feedback loop pushes LearningSnapshot to planner+memory", + " replanner consumes patterns for next TaskPlan", + "evidence bus integration" + ], + "verification": [ + "node --test agent/learning/feedback.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-033", + "kind": "task", + "title": "M4.33 Invariant Checker — invariant-checker.cjs", + "status": "pending", + "deps": [ + "M4-025", + "M4-032" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/verification/invariant-checker.cjs", + "agent/verification/invariant-checker.test.cjs" + ], + "acceptance_criteria": [ + "checks invariants: 1 worktree=1 writer, no main commit, no policy bypass", + "violation → SCOPE_VIOLATION with evidence", + "runs pre-commit" + ], + "verification": [ + "node --test agent/verification/invariant-checker.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-034", + "kind": "task", + "title": "M4.34 Regression Detector — regression-detector.cjs", + "status": "pending", + "deps": [ + "M4-033" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/verification/regression-detector.cjs", + "agent/verification/regression-detector.test.cjs" + ], + "acceptance_criteria": [ + "detects perf/a11y/test regression vs baseline", + "threshold: bundle >10%, a11y violations >0", + "reports with evidence" + ], + "verification": [ + "node --test agent/verification/regression-detector.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-035", + "kind": "task", + "title": "M4.35 Policy Verifier — policy-verifier.cjs", + "status": "pending", + "deps": [ + "M4-033" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/verification/policy-verifier.cjs", + "agent/verification/policy-verifier.test.cjs" + ], + "acceptance_criteria": [ + "verifies diff against Policy 2.0 allowlist/denylist", + "R3/R4 blocking enforced", + "denied → POLICY_DENIED evidence" + ], + "verification": [ + "node --test agent/verification/policy-verifier.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-036", + "kind": "task", + "title": "M4.36 Evidence Verifier — evidence-verifier.cjs", + "status": "pending", + "deps": [ + "M4-033" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/verification/evidence-verifier.cjs", + "agent/verification/evidence-verifier.test.cjs" + ], + "acceptance_criteria": [ + "evidence ↔ commit correspondence checked", + "missing evidence → request_changes", + "typed envelope validation" + ], + "verification": [ + "node --test agent/verification/evidence-verifier.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-037", + "kind": "task", + "title": "M4.37 Factory Health — factory-health.cjs", + "status": "pending", + "deps": [ + "M4-034", + "M4-035", + "M4-036" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/verification/factory-health.cjs", + "agent/verification/factory-health.test.cjs" + ], + "acceptance_criteria": [ + "factory-health aggregates invariant+regression+policy+evidence → HEALTHY/DEGRADED/FAILED", + "health history persisted", + "dashboard consumable" + ], + "verification": [ + "node --test agent/verification/factory-health.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-038", + "kind": "task", + "title": "M4.38 Verification Orchestrator", + "status": "pending", + "deps": [ + "M4-037" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/verification/orchestrator.cjs", + "agent/verification/orchestrator.test.cjs" + ], + "acceptance_criteria": [ + "orchestrates all verifiers in parallel after IMPLEMENT", + "read-only parallel safe", + "collects VerificationReport" + ], + "verification": [ + "node --test agent/verification/orchestrator.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-039", + "kind": "task", + "title": "M4.39 Factory Verification Gate", + "status": "pending", + "deps": [ + "M4-038" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/verification/gate.cjs", + "agent/verification/gate.test.cjs" + ], + "acceptance_criteria": [ + "gate: all verifiers PASS → READY_FOR_REVIEW else REQUEST_CHANGES/ESCALATE", + "max 2 review cycles → ESCALATE", + "human gate preserved" + ], + "verification": [ + "node --test agent/verification/gate.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-040", + "kind": "task", + "title": "M4.40 Observability Events — events.cjs", + "status": "pending", + "deps": [ + "M4-019" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/observability/events.cjs", + "agent/observability/events.test.cjs" + ], + "acceptance_criteria": [ + "events emitter typed FactoryEvent {run_id,task_id,event,payload,timestamp}", + "preserves order per run_id", + "integration with evidence-bus" + ], + "verification": [ + "node --test agent/observability/events.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-041", + "kind": "task", + "title": "M4.41 Observability Metrics", + "status": "pending", + "deps": [ + "M4-040" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/observability/metrics.cjs", + "agent/observability/metrics.test.cjs" + ], + "acceptance_criteria": [ + "metrics probes: queue depth, worker utilization, MTTR, success rate", + "scrape endpoint compatible", + "no secret leakage" + ], + "verification": [ + "node --test agent/observability/metrics.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-042", + "kind": "task", + "title": "M4.42 Observability Traces — traces.cjs", + "status": "pending", + "deps": [ + "M4-040" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/observability/traces.cjs", + "agent/observability/traces.test.cjs" + ], + "acceptance_criteria": [ + "traces capture span per worker execution", + "traceId = run_id, spans ordered", + "export OTel compatible" + ], + "verification": [ + "node --test agent/observability/traces.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-043", + "kind": "task", + "title": "M4.43 Dashboard — dashboard.cjs", + "status": "pending", + "deps": [ + "M4-041", + "M4-042" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/observability/dashboard.cjs", + "agent/observability/dashboard.test.cjs" + ], + "acceptance_criteria": [ + "dashboard aggregates events+metrics+traces → summary JSON", + "serves at /data/factory-dashboard.json", + "no PII" + ], + "verification": [ + "node --test agent/observability/dashboard.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-044", + "kind": "task", + "title": "M4.44 Reports — reports.cjs", + "status": "pending", + "deps": [ + "M4-043" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/observability/reports.cjs", + "agent/observability/reports.test.cjs" + ], + "acceptance_criteria": [ + "reports daily/weekly with trends", + "report includes factory-health + learning metrics", + "markdown+JSON output" + ], + "verification": [ + "node --test agent/observability/reports.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-045", + "kind": "task", + "title": "M4.45 Observability Integration", + "status": "pending", + "deps": [ + "M4-044" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/observability/index.cjs", + "agent/observability/observability.test.cjs" + ], + "acceptance_criteria": [ + "integration wires observability into supervisor+verification", + "all verifiers emit observability events", + "single import facade" + ], + "verification": [ + "node --test agent/observability/observability.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-046", + "kind": "task", + "title": "M4.46 Observability Verification", + "status": "pending", + "deps": [ + "M4-045" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/observability/observability.test.cjs" + ], + "acceptance_criteria": [ + "observability E2E: event→metrics→trace→dashboard→report pipeline PASS", + "0 missing events on demo run", + "lint/test green" + ], + "verification": [ + "node --test agent/observability/observability.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-047", + "kind": "task", + "title": "M4.47 Factory Supervisor Core — supervisor.cjs", + "status": "pending", + "deps": [ + "M4-019" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/supervisor/factory-supervisor.cjs", + "agent/supervisor/factory-supervisor.test.cjs" + ], + "acceptance_criteria": [ + "supervisor enforces timeout/budget/policy/orphan guard extended", + "WORKER_TIMEOUT → terminate → evidence → retry/escalate", + "factory scope" + ], + "verification": [ + "node --test agent/supervisor/factory-supervisor.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-048", + "kind": "task", + "title": "M4.48 Task Scheduler Integration", + "status": "pending", + "deps": [ + "M4-047" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/supervisor/scheduler-integration.cjs", + "agent/supervisor/scheduler-integration.test.cjs" + ], + "acceptance_criteria": [ + "scheduler-integration merges planner stages with supervisor budget", + "parallel flags respected", + "1 worktree=1 writer invariant" + ], + "verification": [ + "node --test agent/supervisor/scheduler-integration.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-049", + "kind": "task", + "title": "M4.49 Resource Guard", + "status": "pending", + "deps": [ + "M4-047" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/supervisor/resource-guard.cjs", + "agent/supervisor/resource-guard.test.cjs" + ], + "acceptance_criteria": [ + "guards memory/time/parallel count", + "exceed → ESCALATE with evidence", + "uses M3 Budget correctly" + ], + "verification": [ + "node --test agent/supervisor/resource-guard.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-050", + "kind": "task", + "title": "M4.50 Policy Enforcement Hook", + "status": "pending", + "deps": [ + "M4-048", + "M4-049" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/supervisor/policy-hook.cjs", + "agent/supervisor/policy-hook.test.cjs" + ], + "acceptance_criteria": [ + "hook checks Policy 2.0 before every worker exec", + "R4 never autonomous → HUMAN", + "denied → POLICY_DENIED" + ], + "verification": [ + "node --test agent/supervisor/policy-hook.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-051", + "kind": "task", + "title": "M4.51 Escalation Handler", + "status": "pending", + "deps": [ + "M4-050" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/supervisor/escalation.cjs", + "agent/supervisor/escalation.test.cjs" + ], + "acceptance_criteria": [ + "escalation routes to human with evidence bundle", + "retry budget shared", + "3rd repeat same error → ESCALATED" + ], + "verification": [ + "node --test agent/supervisor/escalation.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-052", + "kind": "task", + "title": "M4.52 Orphan Cleaner", + "status": "pending", + "deps": [ + "M4-051" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/supervisor/orphan-cleaner.cjs", + "agent/supervisor/orphan-cleaner.test.cjs" + ], + "acceptance_criteria": [ + "orphan cleaner removes stale worktrees after evidence", + "never deletes active worktree", + "dry-run + confirm" + ], + "verification": [ + "node --test agent/supervisor/orphan-cleaner.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-053", + "kind": "task", + "title": "M4.53 Budget Sync with M3 Budget", + "status": "pending", + "deps": [ + "M4-052" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/supervisor/budget-sync.cjs", + "agent/supervisor/budget-sync.test.cjs" + ], + "acceptance_criteria": [ + "syncs Budget {maxTimeMs,maxRetries,maxWorkers,maxCommands,maxChangedFiles,maxDiffLines}", + "factory extends M3 budget", + "enforcement tested" + ], + "verification": [ + "node --test agent/supervisor/budget-sync.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-054", + "kind": "task", + "title": "M4.54 Supervisor ↔ Evidence Bus Wiring", + "status": "pending", + "deps": [ + "M4-053" + ], + "priority": "P1", + "risk": "R1", + "artifacts": [ + "agent/supervisor/evidence-wiring.cjs", + "agent/supervisor/evidence-wiring.test.cjs" + ], + "acceptance_criteria": [ + "supervisor emits SupervisorEvent envelopes to evidence bus", + "order preserved per run_id", + "typed envelopes" + ], + "verification": [ + "node --test agent/supervisor/evidence-wiring.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-055", + "kind": "task", + "title": "M4.55 Supervisor Verification", + "status": "pending", + "deps": [ + "M4-054" + ], + "priority": "P1", + "risk": "R2", + "artifacts": [ + "agent/supervisor/factory-supervisor.test.cjs" + ], + "acceptance_criteria": [ + "supervisor E2E: timeout→terminate→retry→escalate PASS", + "orphan cleanup verified", + "human gate present" + ], + "verification": [ + "node --test agent/supervisor/factory-supervisor.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-056", + "kind": "task", + "title": "M4.56 Policy Store 2.0 — policy.cjs v2", + "status": "pending", + "deps": [ + "M4-039", + "M4-046", + "M4-055" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/policy/policy-v2.cjs", + "agent/policy/policy-v2.test.cjs" + ], + "acceptance_criteria": [ + "policy store v2 supports DSL + versioned rules", + "migration from v1 without loss", + "validated schema" + ], + "verification": [ + "node --test agent/policy/policy-v2.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-057", + "kind": "task", + "title": "M4.57 Scope Rules 2.0", + "status": "pending", + "deps": [ + "M4-056" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/policy/scope-v2.cjs", + "agent/policy/scope-v2.test.cjs" + ], + "acceptance_criteria": [ + "scope rules glob + capability matrix", + "out-of-scope → SCOPE_VIOLATION", + "adapter check on diff before commit" + ], + "verification": [ + "node --test agent/policy/scope-v2.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-058", + "kind": "task", + "title": "M4.58 Risk Gates 2.0", + "status": "pending", + "deps": [ + "M4-056" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/policy/gates-v2.cjs", + "agent/policy/gates-v2.test.cjs" + ], + "acceptance_criteria": [ + "R1 CI PASS→REVIEW, R2 needs AUTO REVIEW, R3 SECURITY, R4 BLOCKED→HUMAN ONLY", + "never auto-merge R3/R4", + "gating tested per risk" + ], + "verification": [ + "node --test agent/policy/gates-v2.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-059", + "kind": "task", + "title": "M4.59 Allowlist/Denylist 2.0", + "status": "pending", + "deps": [ + "M4-057", + "M4-058" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/policy/allowlist-v2.cjs", + "agent/policy/allowlist-v2.test.cjs" + ], + "acceptance_criteria": [ + "allowlist git,node,npm,hugo,gh; deny rm -rf /,sudo,ssh,docker,credential access", + "policy→allow?execute:BLOCK", + "worker without policy cannot exec shell" + ], + "verification": [ + "node --test agent/policy/allowlist-v2.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-060", + "kind": "task", + "title": "M4.60 Policy DSL + Validation", + "status": "pending", + "deps": [ + "M4-059" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/policy/dsl.cjs", + "agent/policy/dsl.test.cjs" + ], + "acceptance_criteria": [ + "DSL parses policy.yaml → typed Policy", + "invalid DSL → validation error with line:col", + "no exec on invalid policy" + ], + "verification": [ + "node --test agent/policy/dsl.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-061", + "kind": "task", + "title": "M4.61 Policy ↔ Supervisor Integration", + "status": "pending", + "deps": [ + "M4-060", + "M4-055" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/policy/supervisor-integration.cjs", + "agent/policy/supervisor-integration.test.cjs" + ], + "acceptance_criteria": [ + "policy integrated into supervisor hook", + "supervisor consults policy before every stage", + "evidence on deny" + ], + "verification": [ + "node --test agent/policy/supervisor-integration.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-062", + "kind": "task", + "title": "M4.62 Policy 2.0 Verification", + "status": "pending", + "deps": [ + "M4-061" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/policy/policy-v2.test.cjs", + "agent/policy/gates-v2.test.cjs" + ], + "acceptance_criteria": [ + "policy E2E: R4 task cannot reach autonomous release → HUMAN", + "allowlist enforced on fixture", + "lint/test green" + ], + "verification": [ + "node --test agent/policy/policy-v2.test.cjs", + "node --test agent/policy/gates-v2.test.cjs", + "node --test agent/policy/allowlist-v2.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-063", + "kind": "task", + "title": "M4.63 Healing Planner", + "status": "pending", + "deps": [ + "M4-062" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/healing/planner.cjs", + "agent/healing/planner.test.cjs" + ], + "acceptance_criteria": [ + "healing planner selects fix strategy from Diagnosis+Learning patterns", + "strategy ranked by past success", + "never modifies policy" + ], + "verification": [ + "node --test agent/healing/planner.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-064", + "kind": "task", + "title": "M4.64 Auto-Retry with Learning", + "status": "pending", + "deps": [ + "M4-063", + "M4-032" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/healing/retry-learning.cjs", + "agent/healing/retry-learning.test.cjs" + ], + "acceptance_criteria": [ + "auto-retry uses learning snapshot for fix selection", + "attempt1 fix, attempt2 alternative, attempt3 escalate", + "retry creates new WorkerContext" + ], + "verification": [ + "node --test agent/healing/retry-learning.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-065", + "kind": "task", + "title": "M4.65 Diagnosis → Healing Bridge", + "status": "pending", + "deps": [ + "M4-064" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/healing/diagnosis-bridge.cjs", + "agent/healing/diagnosis-bridge.test.cjs" + ], + "acceptance_criteria": [ + "bridge converts Diagnosis→HealingAction {strategy,evidence,confidence}", + "confidence is metadata not proof", + "typed envelope" + ], + "verification": [ + "node --test agent/healing/diagnosis-bridge.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-066", + "kind": "task", + "title": "M4.66 Healing Verification", + "status": "pending", + "deps": [ + "M4-065" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/healing/verification.cjs", + "agent/healing/verification.test.cjs" + ], + "acceptance_criteria": [ + "healing verification runs tests after fix", + "PASS→continue, FAIL→next strategy", + "coverage threshold checked" + ], + "verification": [ + "node --test agent/healing/verification.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-067", + "kind": "task", + "title": "M4.67 Quarantine & Rollback", + "status": "pending", + "deps": [ + "M4-066" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/healing/quarantine.cjs", + "agent/healing/quarantine.test.cjs" + ], + "acceptance_criteria": [ + "quarantine isolates failing worktree", + "rollback to base on 3rd failure", + "evidence preserved" + ], + "verification": [ + "node --test agent/healing/quarantine.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-068", + "kind": "task", + "title": "M4.68 Healing Metrics Feedback", + "status": "pending", + "deps": [ + "M4-067" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/healing/metrics-feedback.cjs", + "agent/healing/metrics-feedback.test.cjs" + ], + "acceptance_criteria": [ + "healing metrics fed to learning/metrics.cjs", + "updates pattern-miner freq", + "closed loop verified" + ], + "verification": [ + "node --test agent/healing/metrics-feedback.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-069", + "kind": "task", + "title": "M4.69 Self-Healing Orchestration", + "status": "pending", + "deps": [ + "M4-068" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/healing/orchestrator.cjs", + "agent/healing/orchestrator.test.cjs" + ], + "acceptance_criteria": [ + "orchestrator ties planner→retry→verify→quarantine→feedback", + "max 3 attempts then ESCALATED", + "shares retry budget with review loop" + ], + "verification": [ + "node --test agent/healing/orchestrator.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-070", + "kind": "task", + "title": "M4.70 Self-Healing Verification", + "status": "pending", + "deps": [ + "M4-069" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "agent/healing/healing.test.cjs" + ], + "acceptance_criteria": [ + "self-healing E2E: induced TEST_FAILURE→diagnose→fix→PASS, 3x same→ESCALATED", + "quarantine verified", + "learning updated" + ], + "verification": [ + "node --test agent/healing/healing.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-071", + "kind": "task", + "title": "M4.71 Factory Assembly — autonomous-factory.cjs", + "status": "pending", + "deps": [ + "M4-070", + "M4-039" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "agent/factory/autonomous-factory.cjs", + "agent/factory/autonomous-factory.test.cjs" + ], + "acceptance_criteria": [ + "factory assembles Memory+Intelligence+Planner+Backlog+Learning+Supervisor+Verification+Policy+Healing", + "single factory facade", + "factory health wired" + ], + "verification": [ + "node --test agent/factory/autonomous-factory.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-072", + "kind": "task", + "title": "M4.72 Factory E2E Happy Path", + "status": "pending", + "deps": [ + "M4-071" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "tests/e2e/m4-happy-path.test.cjs" + ], + "acceptance_criteria": [ + "Beads READY R1 task → Factory → Worker → commit → PR → CI → READY_FOR_REVIEW", + "all evidence envelopes collected", + "human gate present" + ], + "verification": [ + "node --test tests/e2e/m4-happy-path.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-073", + "kind": "task", + "title": "M4.73 Factory E2E Failure Recovery", + "status": "pending", + "deps": [ + "M4-071" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "tests/e2e/m4-failure-recovery.test.cjs" + ], + "acceptance_criteria": [ + "injected TEST FAILURE → Tester→Diagnosis→Healing→PASS", + "3x same error→ESCALATED", + "learning snapshot updated" + ], + "verification": [ + "node --test tests/e2e/m4-failure-recovery.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-074", + "kind": "task", + "title": "M4.74 Factory E2E Policy Deny", + "status": "pending", + "deps": [ + "M4-071" + ], + "priority": "P2", + "risk": "R2", + "artifacts": [ + "tests/e2e/m4-policy-deny.test.cjs" + ], + "acceptance_criteria": [ + "R4 task cannot reach autonomous release → HUMAN", + "policy denylist enforced", + "test 'R4 cannot reach autonomous release' passes" + ], + "verification": [ + "node --test tests/e2e/m4-policy-deny.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-075", + "kind": "task", + "title": "M4.75 Factory E2E Budget/Timeout", + "status": "pending", + "deps": [ + "M4-071" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "tests/e2e/m4-budget.test.cjs" + ], + "acceptance_criteria": [ + "exceed Budget maxTimeMs→WORKER_TIMEOUT→retry/escalate", + "orphaned worktree cleaned", + "budget ESCALATE verified" + ], + "verification": [ + "node --test tests/e2e/m4-budget.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-076", + "kind": "task", + "title": "M4.76 Factory Load / Concurrency", + "status": "pending", + "deps": [ + "M4-072", + "M4-073", + "M4-074", + "M4-075" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "tests/e2e/m4-concurrency.test.cjs" + ], + "acceptance_criteria": [ + "3 tasks parallel: read workers concurrent, writers serialized", + "no race on single worktree", + "parallel health GREEN" + ], + "verification": [ + "node --test tests/e2e/m4-concurrency.test.cjs", + "npm run lint", + "npm test" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-077", + "kind": "task", + "title": "M4.77 Factory Verification Manifest", + "status": "pending", + "deps": [ + "M4-076" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "docs/M4_VERIFICATION.md", + "scripts/verify-m4.cjs" + ], + "acceptance_criteria": [ + "manifest written with run_id, commits, PR, checks, evidence", + "Beads updated to DONE for demo task", + "no auto-merge/deploy occurred" + ], + "verification": [ + "node scripts/verify-m4.cjs", + "npm run lint", + "npm test", + "npm run build" + ], + "initiative": "autonomous-factory-m4" + }, + { + "id": "M4-078", + "kind": "task", + "title": "M4.78 M4 Final Verification — Full Autonomous Factory Gate", + "status": "pending", + "deps": [ + "M4-077", + "M4-070", + "M4-062" + ], + "priority": "P2", + "risk": "R1", + "artifacts": [ + "docs/M4_VERIFICATION.md", + "scripts/verify-m4.cjs", + ".beads/beads.json" + ], + "acceptance_criteria": [ + "state machine PENDING→READY→…→HUMAN_GATE→DONE validated", + "all workers produce typed evidence, no shared mutable LLM memory", + "R3/R4 never auto-merge; factory health HEALTHY" + ], + "verification": [ + "node scripts/verify-m4.cjs", + "npm run lint", + "npm test", + "npm run build", + "npx hardhat test" + ], + "initiative": "autonomous-factory-m4" } ], "edges": [ { - "from": "T2", - "to": "T3", + "from": "T2", + "to": "T3", + "type": "enables" + }, + { + "from": "T2", + "to": "T4", + "type": "feeds" + }, + { + "from": "T4", + "to": "T5", + "type": "enables" + }, + { + "from": "T2", + "to": "T6", + "type": "enables" + }, + { + "from": "T3", + "to": "T7", + "type": "enables" + }, + { + "from": "T7", + "to": "T8", + "type": "blocks" + }, + { + "from": "T8", + "to": "T9", + "type": "blocks" + }, + { + "from": "T9", + "to": "T10", + "type": "blocks" + }, + { + "from": "T11", + "to": "T12", + "type": "enables" + }, + { + "from": "T11", + "to": "T13", + "type": "feeds" + }, + { + "from": "T12", + "to": "T13", + "type": "enables" + }, + { + "from": "T13", + "to": "T14", + "type": "blocks" + }, + { + "from": "T15", + "to": "T16", + "type": "enables" + }, + { + "from": "T15", + "to": "T17", + "type": "feeds" + }, + { + "from": "T16", + "to": "T17", + "type": "enables" + }, + { + "from": "T17", + "to": "T18", + "type": "blocks" + }, + { + "from": "T19", + "to": "T20", + "type": "enables" + }, + { + "from": "T19", + "to": "T21", + "type": "feeds" + }, + { + "from": "T20", + "to": "T21", + "type": "enables" + }, + { + "from": "T21", + "to": "T22", + "type": "blocks" + }, + { + "from": "T23", + "to": "T24", + "type": "enables" + }, + { + "from": "T23", + "to": "T25", + "type": "feeds" + }, + { + "from": "T24", + "to": "T25", + "type": "enables" + }, + { + "from": "T25", + "to": "T26", + "type": "blocks" + }, + { + "from": "T24", + "to": "T27", + "type": "enables" + }, + { + "from": "T27", + "to": "T28", + "type": "blocks" + }, + { + "from": "T29", + "to": "T30", + "type": "enables" + }, + { + "from": "T30", + "to": "T31", + "type": "enables" + }, + { + "from": "T31", + "to": "T32", + "type": "blocks" + }, + { + "from": "T33", + "to": "T34", + "type": "enables" + }, + { + "from": "T34", + "to": "T35", + "type": "enables" + }, + { + "from": "T35", + "to": "T36", + "type": "blocks" + }, + { + "from": "T37", + "to": "T38", + "type": "enables" + }, + { + "from": "T38", + "to": "T39", + "type": "enables" + }, + { + "from": "T39", + "to": "T40", + "type": "blocks" + }, + { + "from": "T41", + "to": "T42", + "type": "enables" + }, + { + "from": "T41", + "to": "T43", + "type": "enables" + }, + { + "from": "T42", + "to": "T44", + "type": "enables" + }, + { + "from": "T43", + "to": "T44", + "type": "enables" + }, + { + "from": "T45", + "to": "T46", + "type": "enables" + }, + { + "from": "T46", + "to": "T47", + "type": "enables" + }, + { + "from": "T47", + "to": "T48", + "type": "blocks" + }, + { + "from": "T49", + "to": "T50", + "type": "enables" + }, + { + "from": "T50", + "to": "T51", + "type": "enables" + }, + { + "from": "T51", + "to": "T52", + "type": "blocks" + }, + { + "from": "T53", + "to": "T54", + "type": "enables" + }, + { + "from": "T54", + "to": "T55", + "type": "enables" + }, + { + "from": "T55", + "to": "T56", + "type": "blocks" + }, + { + "from": "T57", + "to": "T58", + "type": "enables" + }, + { + "from": "T29", + "to": "T30", + "type": "blocks" + }, + { + "from": "T101", + "to": "T102", + "type": "next" + }, + { + "from": "T102", + "to": "T103", + "type": "next" + }, + { + "from": "T103", + "to": "T104", + "type": "next" + }, + { + "from": "T104", + "to": "T105", + "type": "next" + }, + { + "from": "T105", + "to": "T106", + "type": "next" + }, + { + "from": "T106", + "to": "T107", + "type": "next" + }, + { + "from": "T107", + "to": "T108", + "type": "next" + }, + { + "from": "T108", + "to": "T109", + "type": "next" + }, + { + "from": "T109", + "to": "T110", + "type": "next" + }, + { + "from": "T110", + "to": "T111", + "type": "next" + }, + { + "from": "T111", + "to": "T112", + "type": "next" + }, + { + "from": "M2-002", + "to": "M2-003", + "type": "enables" + }, + { + "from": "M2-001", + "to": "M2-004", + "type": "enables" + }, + { + "from": "M2-002", + "to": "M2-004", + "type": "enables" + }, + { + "from": "M2-005", + "to": "M2-006", + "type": "enables" + }, + { + "from": "M2-005", + "to": "M2-007", + "type": "enables" + }, + { + "from": "M2-006", + "to": "M2-007", + "type": "enables" + }, + { + "from": "M2-001", + "to": "M2-008", + "type": "enables" + }, + { + "from": "M2-008", + "to": "M2-009", "type": "enables" }, { - "from": "T2", - "to": "T4", - "type": "feeds" + "from": "M2-008", + "to": "M2-010", + "type": "enables" }, { - "from": "T4", - "to": "T5", + "from": "M2-004", + "to": "M2-011", "type": "enables" }, { - "from": "T2", - "to": "T6", + "from": "M2-007", + "to": "M2-011", "type": "enables" }, { - "from": "T3", - "to": "T7", + "from": "M2-009", + "to": "M2-011", "type": "enables" }, { - "from": "T7", - "to": "T8", - "type": "blocks" + "from": "M2-010", + "to": "M2-011", + "type": "enables" }, { - "from": "T8", - "to": "T9", - "type": "blocks" + "from": "M2-012", + "to": "M2-011", + "type": "enables" }, { - "from": "T9", - "to": "T10", - "type": "blocks" + "from": "M2-011", + "to": "M2-013", + "type": "enables" }, { - "from": "T11", - "to": "T12", + "from": "M2-012", + "to": "M2-013", "type": "enables" }, { - "from": "T11", - "to": "T13", - "type": "feeds" + "from": "M2-013", + "to": "M2-014", + "type": "enables" }, { - "from": "T12", - "to": "T13", + "from": "M2-014", + "to": "M3-001", "type": "enables" }, { - "from": "T13", - "to": "T14", - "type": "blocks" + "from": "M3-001", + "to": "M3-002", + "type": "enables" }, { - "from": "T15", - "to": "T16", + "from": "M3-001", + "to": "M3-003", "type": "enables" }, { - "from": "T15", - "to": "T17", - "type": "feeds" + "from": "M3-001", + "to": "M3-004", + "type": "enables" }, { - "from": "T16", - "to": "T17", + "from": "M3-003", + "to": "M3-005", "type": "enables" }, { - "from": "T17", - "to": "T18", - "type": "blocks" + "from": "M3-004", + "to": "M3-005", + "type": "enables" }, { - "from": "T19", - "to": "T20", + "from": "M3-005", + "to": "M3-006", "type": "enables" }, { - "from": "T19", - "to": "T21", - "type": "feeds" + "from": "M3-002", + "to": "M3-006", + "type": "enables" + }, + { + "from": "M3-006", + "to": "M3-007", + "type": "enables" + }, + { + "from": "M3-006", + "to": "M3-008", + "type": "enables" + }, + { + "from": "M3-006", + "to": "M3-009", + "type": "enables" + }, + { + "from": "M3-006", + "to": "M3-010", + "type": "enables" + }, + { + "from": "M3-006", + "to": "M3-011", + "type": "enables" + }, + { + "from": "M3-007", + "to": "M3-012", + "type": "enables" + }, + { + "from": "M3-008", + "to": "M3-012", + "type": "enables" + }, + { + "from": "M3-009", + "to": "M3-012", + "type": "enables" + }, + { + "from": "M3-012", + "to": "M3-013", + "type": "enables" + }, + { + "from": "M3-001", + "to": "M3-014", + "type": "enables" + }, + { + "from": "M3-014", + "to": "M3-015", + "type": "enables" + }, + { + "from": "M3-015", + "to": "M3-016", + "type": "enables" + }, + { + "from": "M3-002", + "to": "M3-016", + "type": "enables" + }, + { + "from": "M3-001", + "to": "M3-017", + "type": "enables" + }, + { + "from": "M3-017", + "to": "M3-018", + "type": "enables" + }, + { + "from": "M3-006", + "to": "M3-018", + "type": "enables" + }, + { + "from": "M3-002", + "to": "M3-019", + "type": "enables" + }, + { + "from": "M3-017", + "to": "M3-019", + "type": "enables" + }, + { + "from": "M3-014", + "to": "M3-019", + "type": "enables" + }, + { + "from": "M3-019", + "to": "M3-020", + "type": "enables" + }, + { + "from": "M3-007", + "to": "M3-020", + "type": "enables" + }, + { + "from": "M3-008", + "to": "M3-020", + "type": "enables" + }, + { + "from": "M3-009", + "to": "M3-020", + "type": "enables" + }, + { + "from": "M3-012", + "to": "M3-021", + "type": "enables" + }, + { + "from": "M3-006", + "to": "M3-021", + "type": "enables" + }, + { + "from": "M3-019", + "to": "M3-022", + "type": "enables" + }, + { + "from": "M3-020", + "to": "M3-022", + "type": "enables" + }, + { + "from": "M3-021", + "to": "M3-022", + "type": "enables" + }, + { + "from": "M3-022", + "to": "M3-023", + "type": "enables" + }, + { + "from": "M3-022", + "to": "M3-024", + "type": "enables" + }, + { + "from": "M3-008", + "to": "M3-024", + "type": "enables" + }, + { + "from": "M3-018", + "to": "M3-024", + "type": "enables" + }, + { + "from": "M3-022", + "to": "M3-025", + "type": "enables" + }, + { + "from": "M3-023", + "to": "M3-025", + "type": "enables" }, { - "from": "T20", - "to": "T21", + "from": "M3-024", + "to": "M3-025", "type": "enables" }, { - "from": "T21", - "to": "T22", - "type": "blocks" + "from": "M3-025", + "to": "M4-001", + "type": "enables" }, { - "from": "T23", - "to": "T24", + "from": "M4-001", + "to": "M4-002", "type": "enables" }, { - "from": "T23", - "to": "T25", - "type": "feeds" + "from": "M4-001", + "to": "M4-003", + "type": "enables" }, { - "from": "T24", - "to": "T25", + "from": "M4-001", + "to": "M4-004", "type": "enables" }, { - "from": "T25", - "to": "T26", - "type": "blocks" + "from": "M4-002", + "to": "M4-005", + "type": "enables" }, { - "from": "T24", - "to": "T27", + "from": "M4-003", + "to": "M4-005", "type": "enables" }, { - "from": "T27", - "to": "T28", - "type": "blocks" + "from": "M4-004", + "to": "M4-006", + "type": "enables" }, { - "from": "T29", - "to": "T30", + "from": "M4-005", + "to": "M4-006", "type": "enables" }, { - "from": "T30", - "to": "T31", + "from": "M3-025", + "to": "M4-007", "type": "enables" }, { - "from": "T31", - "to": "T32", - "type": "blocks" + "from": "M4-007", + "to": "M4-008", + "type": "enables" }, { - "from": "T33", - "to": "T34", + "from": "M4-007", + "to": "M4-009", "type": "enables" }, { - "from": "T34", - "to": "T35", + "from": "M4-008", + "to": "M4-010", "type": "enables" }, { - "from": "T35", - "to": "T36", - "type": "blocks" + "from": "M4-009", + "to": "M4-010", + "type": "enables" }, { - "from": "T37", - "to": "T38", + "from": "M4-008", + "to": "M4-011", "type": "enables" }, { - "from": "T38", - "to": "T39", + "from": "M4-010", + "to": "M4-012", "type": "enables" }, { - "from": "T39", - "to": "T40", - "type": "blocks" + "from": "M4-011", + "to": "M4-012", + "type": "enables" }, { - "from": "T41", - "to": "T42", + "from": "M4-006", + "to": "M4-013", "type": "enables" }, { - "from": "T41", - "to": "T43", + "from": "M4-012", + "to": "M4-013", "type": "enables" }, { - "from": "T42", - "to": "T44", + "from": "M4-013", + "to": "M4-014", "type": "enables" }, { - "from": "T43", - "to": "T44", + "from": "M4-013", + "to": "M4-015", "type": "enables" }, { - "from": "T45", - "to": "T46", + "from": "M4-014", + "to": "M4-016", "type": "enables" }, { - "from": "T46", - "to": "T47", + "from": "M4-015", + "to": "M4-017", "type": "enables" }, { - "from": "T47", - "to": "T48", - "type": "blocks" + "from": "M4-016", + "to": "M4-017", + "type": "enables" }, { - "from": "T49", - "to": "T50", + "from": "M4-017", + "to": "M4-018", "type": "enables" }, { - "from": "T50", - "to": "T51", + "from": "M4-018", + "to": "M4-019", "type": "enables" }, { - "from": "T51", - "to": "T52", - "type": "blocks" + "from": "M4-019", + "to": "M4-020", + "type": "enables" }, { - "from": "T53", - "to": "T54", + "from": "M4-020", + "to": "M4-021", "type": "enables" }, { - "from": "T54", - "to": "T55", + "from": "M4-020", + "to": "M4-022", "type": "enables" }, { - "from": "T55", - "to": "T56", - "type": "blocks" + "from": "M4-021", + "to": "M4-023", + "type": "enables" }, { - "from": "T57", - "to": "T58", + "from": "M4-022", + "to": "M4-023", "type": "enables" }, { - "from": "T29", - "to": "T30", - "type": "blocks" + "from": "M4-023", + "to": "M4-024", + "type": "enables" }, { - "from": "T101", - "to": "T102", - "type": "next" + "from": "M4-024", + "to": "M4-025", + "type": "enables" }, { - "from": "T102", - "to": "T103", - "type": "next" + "from": "M4-019", + "to": "M4-026", + "type": "enables" }, { - "from": "T103", - "to": "T104", - "type": "next" + "from": "M4-026", + "to": "M4-027", + "type": "enables" }, { - "from": "T104", - "to": "T105", - "type": "next" + "from": "M4-027", + "to": "M4-028", + "type": "enables" }, { - "from": "T105", - "to": "T106", - "type": "next" + "from": "M4-028", + "to": "M4-029", + "type": "enables" }, { - "from": "T106", - "to": "T107", - "type": "next" + "from": "M4-028", + "to": "M4-030", + "type": "enables" }, { - "from": "T107", - "to": "T108", - "type": "next" + "from": "M4-029", + "to": "M4-031", + "type": "enables" }, { - "from": "T108", - "to": "T109", - "type": "next" + "from": "M4-030", + "to": "M4-031", + "type": "enables" }, { - "from": "T109", - "to": "T110", - "type": "next" + "from": "M4-031", + "to": "M4-032", + "type": "enables" }, { - "from": "T110", - "to": "T111", - "type": "next" + "from": "M4-025", + "to": "M4-033", + "type": "enables" }, { - "from": "T111", - "to": "T112", - "type": "next" + "from": "M4-032", + "to": "M4-033", + "type": "enables" }, { - "from": "M2-002", - "to": "M2-003", + "from": "M4-033", + "to": "M4-034", "type": "enables" }, { - "from": "M2-001", - "to": "M2-004", + "from": "M4-033", + "to": "M4-035", "type": "enables" }, { - "from": "M2-002", - "to": "M2-004", + "from": "M4-033", + "to": "M4-036", "type": "enables" }, { - "from": "M2-005", - "to": "M2-006", + "from": "M4-034", + "to": "M4-037", "type": "enables" }, { - "from": "M2-005", - "to": "M2-007", + "from": "M4-035", + "to": "M4-037", "type": "enables" }, { - "from": "M2-006", - "to": "M2-007", + "from": "M4-036", + "to": "M4-037", "type": "enables" }, { - "from": "M2-001", - "to": "M2-008", + "from": "M4-037", + "to": "M4-038", "type": "enables" }, { - "from": "M2-008", - "to": "M2-009", + "from": "M4-038", + "to": "M4-039", "type": "enables" }, { - "from": "M2-008", - "to": "M2-010", + "from": "M4-019", + "to": "M4-040", "type": "enables" }, { - "from": "M2-004", - "to": "M2-011", + "from": "M4-040", + "to": "M4-041", "type": "enables" }, { - "from": "M2-007", - "to": "M2-011", + "from": "M4-040", + "to": "M4-042", "type": "enables" }, { - "from": "M2-009", - "to": "M2-011", + "from": "M4-041", + "to": "M4-043", "type": "enables" }, { - "from": "M2-010", - "to": "M2-011", + "from": "M4-042", + "to": "M4-043", "type": "enables" }, { - "from": "M2-012", - "to": "M2-011", + "from": "M4-043", + "to": "M4-044", "type": "enables" }, { - "from": "M2-011", - "to": "M2-013", + "from": "M4-044", + "to": "M4-045", "type": "enables" }, { - "from": "M2-012", - "to": "M2-013", + "from": "M4-045", + "to": "M4-046", "type": "enables" }, { - "from": "M2-013", - "to": "M2-014", + "from": "M4-019", + "to": "M4-047", "type": "enables" }, { - "from": "M2-014", - "to": "M3-001", + "from": "M4-047", + "to": "M4-048", "type": "enables" }, { - "from": "M3-001", - "to": "M3-002", + "from": "M4-047", + "to": "M4-049", "type": "enables" }, { - "from": "M3-001", - "to": "M3-003", + "from": "M4-048", + "to": "M4-050", "type": "enables" }, { - "from": "M3-001", - "to": "M3-004", + "from": "M4-049", + "to": "M4-050", "type": "enables" }, { - "from": "M3-003", - "to": "M3-005", + "from": "M4-050", + "to": "M4-051", "type": "enables" }, { - "from": "M3-004", - "to": "M3-005", + "from": "M4-051", + "to": "M4-052", "type": "enables" }, { - "from": "M3-005", - "to": "M3-006", + "from": "M4-052", + "to": "M4-053", "type": "enables" }, { - "from": "M3-002", - "to": "M3-006", + "from": "M4-053", + "to": "M4-054", "type": "enables" }, { - "from": "M3-006", - "to": "M3-007", + "from": "M4-054", + "to": "M4-055", "type": "enables" }, { - "from": "M3-006", - "to": "M3-008", + "from": "M4-039", + "to": "M4-056", "type": "enables" }, { - "from": "M3-006", - "to": "M3-009", + "from": "M4-046", + "to": "M4-056", "type": "enables" }, { - "from": "M3-006", - "to": "M3-010", + "from": "M4-055", + "to": "M4-056", "type": "enables" }, { - "from": "M3-006", - "to": "M3-011", + "from": "M4-056", + "to": "M4-057", "type": "enables" }, { - "from": "M3-007", - "to": "M3-012", + "from": "M4-056", + "to": "M4-058", "type": "enables" }, { - "from": "M3-008", - "to": "M3-012", + "from": "M4-057", + "to": "M4-059", "type": "enables" }, { - "from": "M3-009", - "to": "M3-012", + "from": "M4-058", + "to": "M4-059", "type": "enables" }, { - "from": "M3-012", - "to": "M3-013", + "from": "M4-059", + "to": "M4-060", "type": "enables" }, { - "from": "M3-001", - "to": "M3-014", + "from": "M4-060", + "to": "M4-061", "type": "enables" }, { - "from": "M3-014", - "to": "M3-015", + "from": "M4-055", + "to": "M4-061", "type": "enables" }, { - "from": "M3-015", - "to": "M3-016", + "from": "M4-061", + "to": "M4-062", "type": "enables" }, { - "from": "M3-002", - "to": "M3-016", + "from": "M4-062", + "to": "M4-063", "type": "enables" }, { - "from": "M3-001", - "to": "M3-017", + "from": "M4-063", + "to": "M4-064", "type": "enables" }, { - "from": "M3-017", - "to": "M3-018", + "from": "M4-032", + "to": "M4-064", "type": "enables" }, { - "from": "M3-006", - "to": "M3-018", + "from": "M4-064", + "to": "M4-065", "type": "enables" }, { - "from": "M3-002", - "to": "M3-019", + "from": "M4-065", + "to": "M4-066", "type": "enables" }, { - "from": "M3-017", - "to": "M3-019", + "from": "M4-066", + "to": "M4-067", "type": "enables" }, { - "from": "M3-014", - "to": "M3-019", + "from": "M4-067", + "to": "M4-068", "type": "enables" }, { - "from": "M3-019", - "to": "M3-020", + "from": "M4-068", + "to": "M4-069", "type": "enables" }, { - "from": "M3-007", - "to": "M3-020", + "from": "M4-069", + "to": "M4-070", "type": "enables" }, { - "from": "M3-008", - "to": "M3-020", + "from": "M4-070", + "to": "M4-071", "type": "enables" }, { - "from": "M3-009", - "to": "M3-020", + "from": "M4-039", + "to": "M4-071", "type": "enables" }, { - "from": "M3-012", - "to": "M3-021", + "from": "M4-071", + "to": "M4-072", "type": "enables" }, { - "from": "M3-006", - "to": "M3-021", + "from": "M4-071", + "to": "M4-073", "type": "enables" }, { - "from": "M3-019", - "to": "M3-022", + "from": "M4-071", + "to": "M4-074", "type": "enables" }, { - "from": "M3-020", - "to": "M3-022", + "from": "M4-071", + "to": "M4-075", "type": "enables" }, { - "from": "M3-021", - "to": "M3-022", + "from": "M4-072", + "to": "M4-076", "type": "enables" }, { - "from": "M3-022", - "to": "M3-023", + "from": "M4-073", + "to": "M4-076", "type": "enables" }, { - "from": "M3-022", - "to": "M3-024", + "from": "M4-074", + "to": "M4-076", "type": "enables" }, { - "from": "M3-008", - "to": "M3-024", + "from": "M4-075", + "to": "M4-076", "type": "enables" }, { - "from": "M3-018", - "to": "M3-024", + "from": "M4-076", + "to": "M4-077", "type": "enables" }, { - "from": "M3-022", - "to": "M3-025", + "from": "M4-077", + "to": "M4-078", "type": "enables" }, { - "from": "M3-023", - "to": "M3-025", + "from": "M4-070", + "to": "M4-078", "type": "enables" }, { - "from": "M3-024", - "to": "M3-025", + "from": "M4-062", + "to": "M4-078", "type": "enables" } ] From 103e13960a03fd55b110f992a51a46c285a453dc Mon Sep 17 00:00:00 2001 From: Domini Montessori Date: Thu, 3 Sep 2026 07:55:40 +0300 Subject: [PATCH 3/3] =?UTF-8?q?refactor(menu):=20=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=D1=8E=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B0=D0=BD=D0=BE=20=D0=BD=D0=B0=D0=B2=D0=B8=D0=B3?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=BE=D0=BD=D0=BD=D0=BE=D0=B5=20=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Десктоп: 6 пунктов навигации + поиск + переключатель темы - Мобильное: slide-in side panel слева (translateX), не fullscreen - Убран аккордеон — простые группы ссылок «Основное» и «Дополнительно» - Backdrop с закрытием по клику, opacity-анимация - JS: toggleMobileNav() с синхронизацией nav/backdrop/aria-expanded - CSS: единый .mobile-panel в design-system.css, убраны конфликты neo-mobile-nav - z-index: 90 (меню), 80 (backdrop), 50 (header) — header всегда поверх --- assets/css/design-system.css | 43 +++++++--- assets/css/neo.css | 141 ------------------------------- assets/js/custom.js | 14 +-- layouts/partials/neo-header.html | 12 +-- 4 files changed, 41 insertions(+), 169 deletions(-) diff --git a/assets/css/design-system.css b/assets/css/design-system.css index 2282c183..22eb54f6 100644 --- a/assets/css/design-system.css +++ b/assets/css/design-system.css @@ -323,24 +323,45 @@ code { } .burger { display: inline-flex; } -/* ---------- MOBILE PANEL ---------- */ -.mobile-panel { +/* ---------- MOBILE BACKDROP ---------- */ +.neo-mobile-backdrop { position: fixed; inset: 0; - z-index: 140; - background: rgba(15,23,42,.55); - backdrop-filter: blur(6px); - -webkit-backdrop-filter: blur(6px); + z-index: 80; + background: rgba(0,0,0,.45); + backdrop-filter: blur(2px); + -webkit-backdrop-filter: blur(2px); + opacity: 0; + pointer-events: none; + transition: opacity .25s ease; +} +.neo-mobile-backdrop.open { + opacity: 1; + pointer-events: auto; +} +/* Slide-in side panel: slides from left, below the sticky header. */ +.mobile-panel { + position: fixed; + top: 0; + left: 0; + bottom: 0; + z-index: 90; + width: min(320px, 80vw); + background: var(--paper-2); + border-right: 1px solid var(--line); + transform: translateX(-100%); + transition: transform .25s ease; + overflow-y: auto; } .mobile-panel[hidden] { display: none; } +.mobile-panel.open { + transform: translateX(0); +} .mobile-panel-inner { + display: flex; + flex-direction: column; height: 100%; - width: min(100%, 320px); - margin-left: auto; - background: var(--paper-2); - border-left: 1px solid var(--line); padding: var(--space-6); - overflow-y: auto; } .mobile-panel-head { display: flex; diff --git a/assets/css/neo.css b/assets/css/neo.css index 920496d1..19280ff6 100644 --- a/assets/css/neo.css +++ b/assets/css/neo.css @@ -216,147 +216,6 @@ body::before{ @media(max-width:900px){ .neo-menu{display:none} .neo-burger{display:flex} - /* Mobile menu: slide-in side panel (NOT fullscreen) so page content stays - visible and tappable behind the nav overlay. z-index sits below the - sticky header (z-50) so the header row is never covered. */ - .neo-mobile-nav{ - display:none; - flex-direction:column; - gap:.5rem; - padding:5.5rem 1.25rem 2rem; - background:var(--panel); - border-right:1px solid var(--line); - border-radius:0; - position:fixed; - top:0; - left:0; - bottom:0; - z-index:100; - max-width:calc(100vw - 1rem); - width:min(320px,80vw); - max-height:none; - overflow-y:auto; - opacity:0; - transform:translateX(-100%); - transition:transform .25s ease,opacity .25s ease; - } - .neo-mobile-nav.open{ - display:flex; - opacity:1; - transform:translateX(0); - } - .neo-mobile-backdrop{ - display:none; - position:fixed; - inset:0; - z-index:95; - background:rgba(0,0,0,.45); - backdrop-filter:blur(2px); - -webkit-backdrop-filter:blur(2px); - } - .neo-mobile-backdrop.open{ - display:block; - } - [data-theme="light"] .neo-mobile-nav.open{ - background:rgba(246,248,251,.88); - } - [data-theme="solar"] .neo-mobile-nav.open{ - background:rgba(28,25,23,.88); - } - [data-theme="mono"] .neo-mobile-nav.open{ - background:rgba(10,10,10,.88); - } - [data-theme="dracula"] .neo-mobile-nav.open{ - background:rgba(40,42,54,.88); - } - .neo-mobile-head{ - width:100%; - max-width:460px; - display: flex; - align-items: center; - justify-content: space-between; - gap: 1rem; - margin-bottom: .5rem; - } - .neo-mobile-title { - font-family: var(--mono); - font-size: 11px; - color: var(--accent); - letter-spacing: 1px; - text-transform: uppercase; - } - .neo-mobile-close { - margin-left: auto; - } - .neo-tree { - width: 100%; - max-width: 460px; - border: 1px solid var(--line); - border-radius: 12px; - background: color-mix(in srgb, var(--panel) 92%, transparent); - backdrop-filter: blur(6px); - overflow: hidden; - } - .neo-tree + .neo-tree { - margin-top: .6rem; - } - .neo-tree summary { - list-style: none; - display: flex; - align-items: center; - justify-content: space-between; - gap: 1rem; - padding: .7rem .9rem; - cursor: pointer; - font-weight: 600; - color: var(--text); - user-select: none; - } - .neo-tree summary::-webkit-details-marker { - display: none; - } - .neo-tree summary::after { - content: "+"; - font-family: var(--mono); - font-size: 13px; - color: var(--muted); - transition: transform .15s ease; - } - .neo-tree[open] > summary::after { - content: "−"; - } - .neo-tree-body { - display: flex; - flex-direction: column; - gap: .2rem; - padding: .4rem .9rem .8rem; - border-top: 1px solid var(--line); - } - .neo-tree-body a { - font-size: .95rem; - padding: .45rem .5rem; - border-radius: 10px; - color: var(--muted); - text-align: left; - background: transparent; - border: 1px solid transparent; - } - .neo-tree-body a:hover { - border-color: var(--accent); - color: var(--accent); - } - .neo-mobile-footer { - width: 100%; - max-width: 460px; - margin-top: .8rem; - display: flex; - flex-wrap: wrap; - gap: .5rem; - justify-content: center; - } - .neo-mobile-footer .neo-theme-opt { - flex: 1 1 140px; - } } @media(min-width:901px){ .neo-burger{display:none} diff --git a/assets/js/custom.js b/assets/js/custom.js index 7726f870..aca9e514 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -87,11 +87,11 @@ mnav.classList.toggle('open', isopen); if (mBackdrop) mBackdrop.classList.toggle('open', isopen); if (burger) burger.setAttribute('aria-expanded', String(isopen)); - if (mnav) { mnav.hidden = !isopen; } + mnav.hidden = !isopen; return isopen; } if (burger && mnav) { - mnav.hidden = false; + mnav.hidden = true; burger.addEventListener('click', function (e) { e.stopPropagation(); toggleMobileNav(); @@ -103,17 +103,9 @@ mBackdrop.addEventListener('click', function () { toggleMobileNav(false); }); } mnav.addEventListener('click', function (e) { - if (e.target.tagName === 'A' || e.target.tagName === 'BUTTON') { - if (!e.target.closest('#neo-mobile-close')) toggleMobileNav(false); - } - }); - document.addEventListener('click', function (e) { - if (!mnav.contains(e.target) && e.target !== burger && !mBackdrop?.contains(e.target)) { - toggleMobileNav(false); - } + if (e.target.tagName === 'A') toggleMobileNav(false); }); } - // expose for palette favorites shortcut window.__toggleMobileNav = toggleMobileNav; // Reduced-motion quick toggle (header ✦ button) diff --git a/layouts/partials/neo-header.html b/layouts/partials/neo-header.html index bb06a7cc..298a9056 100644 --- a/layouts/partials/neo-header.html +++ b/layouts/partials/neo-header.html @@ -1,8 +1,7 @@ {{/* - Neo header — presentation layer. The primary navigation is auto-generated - from the site's categories taxonomy (raw data -> categories -> common menu), - so adding a category needs no menu edit. A settings drawer (theme/appearance/ - accessibility/search) is wired by custom.js. EN is disabled, so no RU/EN. + Neo header — presentation layer. + Desktop: 6 primary links + search + theme toggle. + Mobile: slide-in side panel with grouped links, no accordion. */}}