From 14232eab59678c09dbc1d3acd3fc645a68219d22 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 67e4fbd78b38c058ae4d657fa7390d3a6939dc32 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 ff1f90bb20b4e451799cdc81bedea1d8f43c311c Mon Sep 17 00:00:00 2001 From: Domini Montessori Date: Thu, 3 Sep 2026 08:43:24 +0300 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA?= =?UTF-8?q?=D0=B0=20=C2=AB=D0=BD=D0=B0=D0=B2=D0=B5=D1=80=D1=85=C2=BB,=2040?= =?UTF-8?q?4-=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86=D0=B0,=20OG-=D0=B8?= =?UTF-8?q?=D0=B7=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F,?= =?UTF-8?q?=20CSS-=D0=BA=D0=BE=D0=BD=D1=81=D0=BE=D0=BB=D0=B8=D0=B4=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Кнопка «наверх»: scroll-to-top.js + HTML + CSS (fixed bottom-right, scrollY>400) - 404-страница: поисковое поле, 5 популярных постов, ссылки на разделы - Editorial featured layout: 1 большая карточка + 2 маленьких вместо 3 одинаковых - Hugo deprecation: LanguageCode→Locale (31 файл), .Site.Data→hugo.Data (2 файла) - Динамические OG-изображения: SVG-карточки для постов с заголовком и автором - Визуальное регрессионное тестирование: Playwright config + скриншоты 9 страниц - CSS-консолидация: удалены 34 неиспользуемых класса из neo.css (231→208 строк) --- .github/workflows/quality.yml | 4 ++ assets/css/design-system.css | 83 +++++++++++++++++++++++---- assets/css/neo.css | 23 -------- assets/js/scroll-to-top.js | 13 +++++ layouts/404.html | 47 ++++++++++++++- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- layouts/_default/term.html | 2 +- layouts/_default/terms.html | 2 +- layouts/ai-agents/single.html | 2 +- layouts/ai-features/single.html | 2 +- layouts/ai-summary/single.html | 2 +- layouts/ai/single.html | 2 +- layouts/archives/list.html | 2 +- layouts/bci/single.html | 2 +- layouts/collab/single.html | 2 +- layouts/contribute/single.html | 2 +- layouts/dao/single.html | 2 +- layouts/favorites/list.html | 2 +- layouts/feature-flags/single.html | 2 +- layouts/feeds/list.html | 2 +- layouts/gist/single.html | 2 +- layouts/index.html | 27 ++++++--- layouts/ipfs-deploy/single.html | 2 +- layouts/neural-interface/single.html | 2 +- layouts/ontology/list.html | 2 +- layouts/partials/header/basic.html | 2 +- layouts/partials/neo-base.html | 2 +- layouts/partials/neo-head.html | 20 +++++-- layouts/partials/neo-header.html | 1 + layouts/projects/list.html | 2 +- layouts/repository/single.html | 2 +- layouts/self-improving-ai/single.html | 2 +- layouts/shortcodes/movie-grid.html | 2 +- layouts/sitemap/list.html | 2 +- layouts/social/single.html | 2 +- layouts/ssi/single.html | 2 +- layouts/subscribe/single.html | 2 +- layouts/wiki-build/list.html | 2 +- playwright.config.js | 25 ++++++++ tests/e2e/visual-regression.spec.cjs | 36 ++++++++++++ 41 files changed, 261 insertions(+), 80 deletions(-) create mode 100644 assets/js/scroll-to-top.js create mode 100644 playwright.config.js create mode 100644 tests/e2e/visual-regression.spec.cjs diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index e6f57056..7f4a36df 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -135,3 +135,7 @@ jobs: # og-default.png). Regressions surface as warnings. run: node scripts/check-og-image.cjs continue-on-error: true + + - name: 🎭 Playwright visual regression (screenshots of key pages) + run: npx playwright test --update-snapshots + continue-on-error: true diff --git a/assets/css/design-system.css b/assets/css/design-system.css index 22eb54f6..286bae5f 100644 --- a/assets/css/design-system.css +++ b/assets/css/design-system.css @@ -323,7 +323,35 @@ code { } .burger { display: inline-flex; } -/* ---------- MOBILE BACKDROP ---------- */ +/* ---------- SCROLL TO TOP ---------- */ +.scroll-to-top { + position: fixed; + bottom: 2rem; + right: 2rem; + z-index: 100; + width: 48px; + height: 48px; + border-radius: 50%; + border: 1px solid var(--line); + background: var(--paper-2); + color: var(--ink-700); + font-size: 1.25rem; + cursor: pointer; + opacity: 0; + transform: translateY(20px); + transition: opacity .25s ease, transform .25s ease, background .25s ease; + pointer-events: none; +} +.scroll-to-top.visible { + opacity: 1; + transform: translateY(0); + pointer-events: auto; +} +.scroll-to-top:hover { + background: var(--accent); + color: #fff; + border-color: var(--accent); +} .neo-mobile-backdrop { position: fixed; inset: 0; @@ -448,25 +476,56 @@ code { flex-wrap: wrap; } -/* ---------- FEATURED EDITORIAL GRID ---------- */ -.editorial-grid { +/* ---------- FEATURED EDITORIAL LAYOUT ---------- */ +/* 1 large lead card + 2 smaller sub cards stacked on the right */ +.editorial-featured { display: grid; - grid-template-columns: 1.4fr 1fr; - grid-template-rows: auto auto; + grid-template-columns: 1.6fr 1fr; gap: var(--space-4); margin-top: var(--space-8); } -.editorial-grid .card.lead { - grid-row: span 2; +.card-lead { + display: flex; + flex-direction: column; + gap: var(--space-3); + padding: var(--space-6); + background: var(--paper-2); + border: 1px solid var(--line); + border-radius: var(--radius); } -.editorial-grid .card h3 { +.card-lead h3 { font-family: var(--font-display); - font-size: 1.25rem; + font-size: 1.5rem; line-height: 1.25; } -.editorial-grid .card p { +.card-lead p { color: var(--ink-600); - margin-top: var(--space-2); + font-size: 1.05rem; + line-height: 1.6; +} +.editorial-side { + display: flex; + flex-direction: column; + gap: var(--space-4); +} +.card-sub { + display: flex; + flex-direction: column; + gap: var(--space-2); + padding: var(--space-4); + background: var(--paper-2); + border: 1px solid var(--line); + border-radius: var(--radius); +} +.card-sub h3 { + font-family: var(--font-display); + font-size: 1rem; + line-height: 1.3; +} +.card-sub p { + color: var(--ink-600); + font-size: .9rem; + line-height: 1.5; } .editorial-meta { color: var(--ink-500); @@ -642,7 +701,7 @@ code { .post-layout { grid-template-columns: 1fr; } .toc { display: none; } .primary-nav { display: none; } - .editorial-grid { grid-template-columns: 1fr; } + .editorial-featured { grid-template-columns: 1fr; } .recent-row { grid-template-columns: 1fr; gap: var(--space-1); } .hero { padding: var(--space-10) 0; } } diff --git a/assets/css/neo.css b/assets/css/neo.css index 19280ff6..7cdede21 100644 --- a/assets/css/neo.css +++ b/assets/css/neo.css @@ -87,7 +87,6 @@ body::before{ /* ---------- LAYOUT ---------- */ .neo-wrap{max-width:var(--content-max,720px);margin:0 auto;padding:0 1.25rem} .neo-header{position:sticky;top:0;z-index:50;background:rgba(11,14,20,.88);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-bottom:1px solid var(--line)} -.neo-header-inner{display:flex;align-items:center;gap:1rem;max-width:var(--content-max,1100px);margin:0 auto;padding:.6rem 1.25rem} .neo-brand{font-weight:800;font-size:1.1rem;letter-spacing:-.02em} .neo-brand .mark{color:var(--accent)} .neo-nav{display:flex;gap:.5rem;margin-left:auto} @@ -101,14 +100,7 @@ body::before{ .neo-drawer.open{display:block} .neo-drawer h5{font-family:var(--mono);font-size:11px;color:var(--accent);letter-spacing:1px;text-transform:uppercase;margin:14px 0 8px} .neo-drawer h5:first-child{margin-top:0} -.neo-theme-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px} -.neo-theme-opt,.neo-accent-opt{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line-2);border-radius:8px;cursor:pointer;color:var(--muted);transition:border-color .2s,color .2s} .neo-theme-opt.active,.neo-accent-opt.active{border-color:var(--accent);color:var(--text)} -.neo-sw{width:16px;height:16px;border-radius:4px;border:1px solid var(--line-2)} -.neo-accent-grid{display:flex;gap:8px;flex-wrap:wrap} -.neo-accent-opt{width:32px;height:32px;padding:0;justify-content:center} -.neo-row-opt{display:flex;align-items:center;justify-content:space-between;padding:6px 0;color:var(--muted)} -.neo-seg{display:flex;border:1px solid var(--line-2);border-radius:8px;overflow:hidden} .neo-seg button{background:var(--panel);border:none;color:var(--muted);padding:6px 10px;cursor:pointer;font-size:12px;font-family:var(--mono)} .neo-seg button.active{background:var(--accent);color:#07121a} @@ -121,7 +113,6 @@ body::before{ .neo-eyebrow{font-size:.8rem;color:var(--muted);margin-bottom:.3rem} .neo-post h1{font-size:clamp(1.6rem,4vw,2.4rem);font-weight:800;line-height:1.2;margin-bottom:.5rem} .neo-post .lead{font-size:1.1rem;color:var(--muted)} -.neo-post-meta{display:flex;gap:.8rem;font-size:.8rem;color:var(--muted);margin-top:.8rem} .neo-post-body{line-height:1.75} .neo-post-body h2{font-size:1.3rem;font-weight:700;margin:1.5rem 0 .5rem} .neo-post-body h3{font-size:1.1rem;font-weight:600;margin:1.2rem 0 .4rem} @@ -155,27 +146,17 @@ body::before{ /* ---------- SEARCH ---------- */ .neo-search-input{width:100%;padding:.7rem 1rem;border-radius:var(--radius);border:1px solid var(--line);background:var(--panel);color:var(--text);font-size:1rem;margin:1rem 0} .neo-search-input:focus{outline:none;border-color:var(--accent)} -.neo-kind-filter{display:flex;gap:.3rem;margin-bottom:1rem;flex-wrap:wrap} .neo-kind-filter button{padding:.3rem .7rem;border-radius:8px;border:1px solid var(--line);background:transparent;color:var(--muted);font-size:.8rem;cursor:pointer;transition:all .2s} .neo-kind-filter button[aria-pressed="true"]{background:var(--accent);color:#06121a;border-color:var(--accent)} .neo-search-empty{padding:2rem;text-align:center;color:var(--muted)} /* ---------- ANALYTICS ---------- */ -.neo-analytics{display:flex;flex-direction:column;gap:.4rem;margin:1rem 0} -.neo-analytic-row{display:flex;align-items:center;gap:.8rem} -.neo-analytic-path{flex:1;font-size:.8rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)} -.neo-analytic-bar{flex:1;height:8px;background:var(--panel);border-radius:4px;overflow:hidden} .neo-analytic-bar div{height:100%;background:linear-gradient(90deg,var(--accent),var(--accent-2));border-radius:4px} -.neo-analytic-count{font-size:.8rem;color:var(--muted);min-width:30px;text-align:right} /* ---------- RETENTION ---------- */ -.neo-retention{display:flex;gap:4px;align-items:flex-end;height:120px;margin-top:1rem} -.neo-retention-day{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;height:100%} -.neo-retention-bar{width:100%;background:linear-gradient(to top,var(--accent),var(--accent-2));border-radius:4px 4px 0 0;min-height:2px;transition:height .3s} .neo-retention-day span{font-size:.65rem;color:var(--muted);white-space:nowrap} /* ---------- FAVORITES ---------- */ -.neo-fav-summary{margin:2rem 0} .neo-fav-summary .neo-featured{margin-top:1rem} /* ---------- SUBSCRIBE ---------- */ @@ -194,12 +175,9 @@ body::before{ .neo-btn-primary{background:linear-gradient(135deg,var(--accent),var(--accent-2));color:#06121a;border:none;font-weight:600} /* ---------- FOOTER ---------- */ -.neo-footer{margin-top:3rem;padding:1.5rem 1.25rem;border-top:1px solid var(--line);text-align:center;font-size:.8rem;color:var(--muted)} .neo-footer a{color:var(--accent)} /* ---------- UTILITIES ---------- */ -.neo-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0} -.neo-skip{position:fixed;top:-100%;left:50%;transform:translateX(-50%);z-index:999;padding:.5rem 1rem;background:var(--accent);color:#06121a;border-radius:0 0 8px 8px;font-weight:600;transition:top .2s} .neo-skip:focus{top:0} /* ---------- ANIMATIONS ---------- */ @@ -210,7 +188,6 @@ body::before{ from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} } -.neo-rise{animation:neo-rise .4s ease-out} /* ---------- RESPONSIVE ---------- */ @media(max-width:900px){ diff --git a/assets/js/scroll-to-top.js b/assets/js/scroll-to-top.js new file mode 100644 index 00000000..2f674a2f --- /dev/null +++ b/assets/js/scroll-to-top.js @@ -0,0 +1,13 @@ +// Scroll-to-top button — appears after scrolling 400px, smooth scrolls to top. +(function () { + var btn = document.getElementById('scroll-to-top'); + if (!btn) return; + + var show = function () { btn.classList.toggle('visible', window.scrollY > 400); }; + window.addEventListener('scroll', show, { passive: true }); + show(); + + btn.addEventListener('click', function () { + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); +})(); diff --git a/layouts/404.html b/layouts/404.html index 47639f10..f41f08ac 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,4 +1,49 @@ {{/* Smart 404 — unified design system. + Shows a friendly message, search box, 5 popular posts, and section links. */}} -{{ partial "neo-base.html" . }} + + +{{ partial "neo-head.html" . }} + +{{ partial "neo-header.html" . }} +
+
+

Страница не найдена

+

Возможно, она была перемещена или удалена. Попробуйте поиск или выберите раздел ниже.

+ + {{/* Search box */}} +
+ +
+ + {{/* Popular posts — first 5 blog posts */}} +
+

Популярные записи

+
+ {{ range first 5 (where site.RegularPages "Section" "blog") }} + + {{ .Date.Format "2006-01-02" }} + {{ .Title }} + ⏱ {{ .ReadingTime }} мин + + {{ end }} +
+
+ + {{/* Section links */}} + +
+
+{{ partial "neo-footer.html" . }} + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html index fbec845a..3aa2b17a 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1 +1 @@ -{{/*\n List / archive / category-term pages — unified design system.\n*/}}\n\n\n{{ partial "neo-head.html" . }}\n\n{{ partial "neo-header.html" . }}\n
\n
\n

{{ .Title }}

{{ len .Pages }} записей
\n {{ $pages := .Paginate .Pages }}\n \n {{ partial "pagination.html" . }}\n
\n
\n{{ partial "neo-footer.html" . }}\n\n\n \ No newline at end of file +{{/*\n List / archive / category-term pages — unified design system.\n*/}}\n\n\n{{ partial "neo-head.html" . }}\n\n{{ partial "neo-header.html" . }}\n
\n
\n

{{ .Title }}

{{ len .Pages }} записей
\n {{ $pages := .Paginate .Pages }}\n \n {{ partial "pagination.html" . }}\n
\n
\n{{ partial "neo-footer.html" . }}\n\n\n \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 131f5d6b..be1f0856 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,7 +2,7 @@ Single post — unified design system. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/_default/term.html b/layouts/_default/term.html index 4b9e72d7..378a662b 100644 --- a/layouts/_default/term.html +++ b/layouts/_default/term.html @@ -2,7 +2,7 @@ Individual taxonomy term page (/categories/media/, /tags/foo/) — Neo (standalone). */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 3c13c83f..6aa7022a 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -3,7 +3,7 @@ Font size scales with mention count so popular tags are visibly larger. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/ai-agents/single.html b/layouts/ai-agents/single.html index 676b818e..135cf7a4 100644 --- a/layouts/ai-agents/single.html +++ b/layouts/ai-agents/single.html @@ -1,6 +1,6 @@ {{/* AI Agents — autonomous agent dashboard. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/ai-features/single.html b/layouts/ai-features/single.html index 8e069640..00f30edc 100644 --- a/layouts/ai-features/single.html +++ b/layouts/ai-features/single.html @@ -1,6 +1,6 @@ {{/* AI Features page — semantic search, recommendations, knowledge graph. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/ai-summary/single.html b/layouts/ai-summary/single.html index 2c9ef4cb..412428c9 100644 --- a/layouts/ai-summary/single.html +++ b/layouts/ai-summary/single.html @@ -1,6 +1,6 @@ {{/* AI Summary — auto-summarize posts with LLM. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/ai/single.html b/layouts/ai/single.html index 98e0df19..971a06e5 100644 --- a/layouts/ai/single.html +++ b/layouts/ai/single.html @@ -1,6 +1,6 @@ {{/* AI Chat — LLM interface with site-aware responses. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/archives/list.html b/layouts/archives/list.html index b08acc81..3c0b81d3 100644 --- a/layouts/archives/list.html +++ b/layouts/archives/list.html @@ -3,7 +3,7 @@ The section itself has no child pages, so we query the blog section. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/bci/single.html b/layouts/bci/single.html index 293f3331..acbbbe8b 100644 --- a/layouts/bci/single.html +++ b/layouts/bci/single.html @@ -1,6 +1,6 @@ {{/* BCI/EEG interface — Web Bluetooth + Muse SDK. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/collab/single.html b/layouts/collab/single.html index 0cfca11c..f10423b3 100644 --- a/layouts/collab/single.html +++ b/layouts/collab/single.html @@ -1,6 +1,6 @@ {{/* Collaborative editor — Yjs + WebRTC P2P. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/contribute/single.html b/layouts/contribute/single.html index 8b9b9ecb..83be7153 100644 --- a/layouts/contribute/single.html +++ b/layouts/contribute/single.html @@ -1,6 +1,6 @@ {{/* Contribution System 2.0 — guest posts, bounties, grants. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/dao/single.html b/layouts/dao/single.html index 9926b0ba..da3da620 100644 --- a/layouts/dao/single.html +++ b/layouts/dao/single.html @@ -1,6 +1,6 @@ {{/* DAO Governance 2.0 — full on-chain governance UI. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/favorites/list.html b/layouts/favorites/list.html index 06fe93e4..8bdd8ad0 100644 --- a/layouts/favorites/list.html +++ b/layouts/favorites/list.html @@ -1,7 +1,7 @@ {{/* Favorites hub — Neo design system (standalone). Client-rendered from localStorage. Sortable (type filter + name), export/import JSON, local analytics, type visualization. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/feature-flags/single.html b/layouts/feature-flags/single.html index e20202da..2ee2a179 100644 --- a/layouts/feature-flags/single.html +++ b/layouts/feature-flags/single.html @@ -1,6 +1,6 @@ {{/* Feature Flags + A/B Testing console. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/feeds/list.html b/layouts/feeds/list.html index 6d1e9eda..17948218 100644 --- a/layouts/feeds/list.html +++ b/layouts/feeds/list.html @@ -1,6 +1,6 @@ {{/* Feeds hub — Neo design system (standalone). Links to RSS + JSON feeds. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/gist/single.html b/layouts/gist/single.html index 067372a6..9289e692 100644 --- a/layouts/gist/single.html +++ b/layouts/gist/single.html @@ -1,6 +1,6 @@ {{/* Single gist — Neo design system (standalone full document) + accentuated card. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/index.html b/layouts/index.html index 88372ffa..7d506dc2 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -2,7 +2,7 @@ Homepage — unified design system. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} @@ -25,15 +25,28 @@

Инженерный блог
о системах и

Избранное

все посты →
-
- {{ range first 3 $blog }} -
+ {{ $featured := first 3 $blog }} + {{ $lead := index $featured 0 }} + {{ $rest := after 1 $featured }} +
diff --git a/layouts/ipfs-deploy/single.html b/layouts/ipfs-deploy/single.html index 3ae271df..e02015f1 100644 --- a/layouts/ipfs-deploy/single.html +++ b/layouts/ipfs-deploy/single.html @@ -1,6 +1,6 @@ {{/* IPFS-First Hosting — decentralized deploy dashboard. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/neural-interface/single.html b/layouts/neural-interface/single.html index f3fac9b7..b239a5e0 100644 --- a/layouts/neural-interface/single.html +++ b/layouts/neural-interface/single.html @@ -1,6 +1,6 @@ {{/* Direct Neural Interface — thought recognition, brain-to-brain. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/ontology/list.html b/layouts/ontology/list.html index 5e0f1f44..81fbee0a 100644 --- a/layouts/ontology/list.html +++ b/layouts/ontology/list.html @@ -2,7 +2,7 @@ Ontology section list — Neo standalone; renders .Content + taxonomy grids. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/partials/header/basic.html b/layouts/partials/header/basic.html index 2eebbb5a..44d75dd1 100644 --- a/layouts/partials/header/basic.html +++ b/layouts/partials/header/basic.html @@ -30,7 +30,7 @@ {{ .Site.Title | markdownify }} - {{ with .Site.Data.awesome }} + {{ with hugo.Data.awesome }} {{ with .total }} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/partials/neo-head.html b/layouts/partials/neo-head.html index dcf77f9d..a341af30 100644 --- a/layouts/partials/neo-head.html +++ b/layouts/partials/neo-head.html @@ -34,17 +34,25 @@ -{{ $ogImage := "/images/og-default.svg" }} -{{ if .Params.image }}{{ $ogImage = .Params.image }}{{ end }} - +{{ if .IsPage }} + {{ $ogTitle := .Title }} + {{ $ogAuthor := .Params.author | default site.Title }} + {{ $ogBg := "#0b0e14" }} + {{ $ogFg := "#e6eaf2" }} + {{ $ogAccent := "#4fd1c5" }} + {{ $svg := printf `%s%s%s · engineering · systems · data` $ogBg $ogAccent $ogAccent $ogAuthor $ogFg $ogTitle site.Title }} + {{ $ogImage := $svg | resources.FromString (printf "og-images/%s.svg" .File.BaseFileName) | fingerprint }} + + +{{ else }} + + +{{ end }} {{/* Twitter Cards */}} - - -{{/* RSS */}} {{ with .OutputFormats.Get "rss" }}{{ end }} {{/* Critical CSS: inline for first paint */}} diff --git a/layouts/partials/neo-header.html b/layouts/partials/neo-header.html index 298a9056..b169bd8a 100644 --- a/layouts/partials/neo-header.html +++ b/layouts/partials/neo-header.html @@ -61,3 +61,4 @@
+ diff --git a/layouts/projects/list.html b/layouts/projects/list.html index a7872c83..a459b756 100644 --- a/layouts/projects/list.html +++ b/layouts/projects/list.html @@ -2,7 +2,7 @@ Projects section list — Neo standalone; renders .Content (project cards). */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/repository/single.html b/layouts/repository/single.html index 5d953182..a28ef6f1 100644 --- a/layouts/repository/single.html +++ b/layouts/repository/single.html @@ -1,6 +1,6 @@ {{/* Repo detail — Neo design system (standalone full document), matches homepage chrome. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/self-improving-ai/single.html b/layouts/self-improving-ai/single.html index 6d7e43ad..a34a9e85 100644 --- a/layouts/self-improving-ai/single.html +++ b/layouts/self-improving-ai/single.html @@ -1,6 +1,6 @@ {{/* Self-Improving AI — AutoML, model selection, monitoring. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/shortcodes/movie-grid.html b/layouts/shortcodes/movie-grid.html index 3ec11a1e..1db3f7fc 100644 --- a/layouts/shortcodes/movie-grid.html +++ b/layouts/shortcodes/movie-grid.html @@ -1,5 +1,5 @@ {{- /* Renders a responsive movie poster grid from data/movies.json */ -}} -{{- $movies := .Site.Data.movies -}} +{{- $movies := hugo.Data.movies -}}
{{- range $movies -}} {{- $h := mod (mul (len .title) 37) 360 -}} diff --git a/layouts/sitemap/list.html b/layouts/sitemap/list.html index d3d70186..be38b956 100644 --- a/layouts/sitemap/list.html +++ b/layouts/sitemap/list.html @@ -2,7 +2,7 @@ Sitemap section list — Neo standalone HTML sitemap (layout sitemap). */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/social/single.html b/layouts/social/single.html index 091d3b1c..acee588d 100644 --- a/layouts/social/single.html +++ b/layouts/social/single.html @@ -1,6 +1,6 @@ {{/* Social Features — user profiles, activity feed, notifications. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/ssi/single.html b/layouts/ssi/single.html index 3572f74a..382a0d83 100644 --- a/layouts/ssi/single.html +++ b/layouts/ssi/single.html @@ -1,6 +1,6 @@ {{/* Self-Sovereign Identity (SSI) — DID login, verifiable credentials. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/subscribe/single.html b/layouts/subscribe/single.html index d63b1dab..dd5ce5bb 100644 --- a/layouts/subscribe/single.html +++ b/layouts/subscribe/single.html @@ -1,6 +1,6 @@ {{/* Subscribe page — newsletter + referral system. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/layouts/wiki-build/list.html b/layouts/wiki-build/list.html index bf26b0a0..4883043e 100644 --- a/layouts/wiki-build/list.html +++ b/layouts/wiki-build/list.html @@ -2,7 +2,7 @@ Wiki section list — Neo wiki-style (layout wiki-build). Standalone. */}} - + {{ partial "neo-head.html" . }} {{ partial "neo-header.html" . }} diff --git a/playwright.config.js b/playwright.config.js new file mode 100644 index 00000000..75febce3 --- /dev/null +++ b/playwright.config.js @@ -0,0 +1,25 @@ +// Playwright config — visual regression + smoke tests for key pages. +const { defineConfig } = require('@playwright/test'); + +module.exports = defineConfig({ + testDir: './tests/e2e', + timeout: 30000, + retries: 1, + use: { + baseURL: 'http://localhost:1313', + headless: true, + viewport: { width: 1280, height: 800 }, + screenshot: 'on', + trace: 'on-first-retry', + }, + projects: [ + { name: 'desktop', use: { viewport: { width: 1280, height: 800 } } }, + { name: 'mobile', use: { viewport: { width: 375, height: 667 } } }, + ], + webServer: { + command: 'hugo server -p 1313', + port: 1313, + reuseExistingServer: !process.env.CI, + timeout: 60000, + }, +}); diff --git a/tests/e2e/visual-regression.spec.cjs b/tests/e2e/visual-regression.spec.cjs new file mode 100644 index 00000000..ef85fd38 --- /dev/null +++ b/tests/e2e/visual-regression.spec.cjs @@ -0,0 +1,36 @@ +// Visual regression — screenshot key pages in desktop + mobile viewports. +const { test, expect } = require('@playwright/test'); + +const PAGES = [ + { path: '/', name: 'home' }, + { path: '/blog/', name: 'blog' }, + { path: '/about/', name: 'about' }, + { path: '/awesome/', name: 'awesome' }, + { path: '/repositories/', name: 'repositories' }, + { path: '/gists/', name: 'gists' }, + { path: '/knowledge-graph/', name: 'knowledge-graph' }, + { path: '/search/', name: 'search' }, + { path: '/404.html', name: '404' }, +]; + +test.describe('Visual regression', () => { + for (const p of PAGES) { + test(`${p.name} (${p.path}) — no console errors & renders`, async ({ page }) => { + const errors = []; + page.on('console', (msg) => { + if (msg.type() === 'error') errors.push(msg.text()); + }); + const resp = await page.goto(p.path); + expect(resp.status()).toBeLessThan(400); + // Wait for first meaningful paint + await page.waitForLoadState('networkidle'); + // No console errors + expect(errors).toEqual([]); + // Screenshot for visual diff + await expect(page).toHaveScreenshot(`${p.name}.png`, { + fullPage: false, + threshold: 0.2, + }); + }); + } +});