@voybio/ace-swarm 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -0
- package/LICENSE +186 -0
- package/README.md +229 -0
- package/assets/.agents/ACE/ACE-Init/AGENTS.md +210 -0
- package/assets/.agents/ACE/ACE-Init/instructions.md +118 -0
- package/assets/.agents/ACE/ACE_coders/AGENTS.md +154 -0
- package/assets/.agents/ACE/ACE_coders/INSTRUCTIONS.md +216 -0
- package/assets/.agents/ACE/AGENT_REGISTRY.md +70 -0
- package/assets/.agents/ACE/AGENT_REGISTRY_7.md +9 -0
- package/assets/.agents/ACE/DIRECTIVE_KERNEL.md +234 -0
- package/assets/.agents/ACE/UI/AGENTS.md +115 -0
- package/assets/.agents/ACE/UI/instructions.md +178 -0
- package/assets/.agents/ACE/VOS/ACE_VOS_MISSING_INFO_MATRIX.md +42 -0
- package/assets/.agents/ACE/VOS/AGENTS.md +72 -0
- package/assets/.agents/ACE/VOS/instructions.md +211 -0
- package/assets/.agents/ACE/agent-astgrep/AGENTS.md +123 -0
- package/assets/.agents/ACE/agent-astgrep/instructions.md +91 -0
- package/assets/.agents/ACE/agent-builder/AGENTS.md +172 -0
- package/assets/.agents/ACE/agent-builder/instructions.md +137 -0
- package/assets/.agents/ACE/agent-docs/AGENTS.md +159 -0
- package/assets/.agents/ACE/agent-docs/instructions.md +133 -0
- package/assets/.agents/ACE/agent-eval/AGENTS.md +46 -0
- package/assets/.agents/ACE/agent-eval/instructions.md +56 -0
- package/assets/.agents/ACE/agent-memory/AGENTS.md +49 -0
- package/assets/.agents/ACE/agent-memory/instructions.md +50 -0
- package/assets/.agents/ACE/agent-observability/AGENTS.md +46 -0
- package/assets/.agents/ACE/agent-observability/instructions.md +50 -0
- package/assets/.agents/ACE/agent-ops/AGENTS.md +201 -0
- package/assets/.agents/ACE/agent-ops/instructions.md +136 -0
- package/assets/.agents/ACE/agent-qa/AGENTS.md +189 -0
- package/assets/.agents/ACE/agent-qa/instructions.md +121 -0
- package/assets/.agents/ACE/agent-release/AGENTS.md +48 -0
- package/assets/.agents/ACE/agent-release/instructions.md +49 -0
- package/assets/.agents/ACE/agent-research/AGENTS.md +160 -0
- package/assets/.agents/ACE/agent-research/instructions.md +118 -0
- package/assets/.agents/ACE/agent-security/AGENTS.md +48 -0
- package/assets/.agents/ACE/agent-security/instructions.md +50 -0
- package/assets/.agents/ACE/agent-skeptic/AGENTS.md +178 -0
- package/assets/.agents/ACE/agent-skeptic/instructions.md +196 -0
- package/assets/.agents/ACE/agent-spec/AGENTS.md +169 -0
- package/assets/.agents/ACE/agent-spec/instructions.md +116 -0
- package/assets/.agents/ACE/orchestrator/AGENTS.md +365 -0
- package/assets/.agents/ACE/orchestrator/instructions.md +231 -0
- package/assets/.agents/skills/ace-orchestrator/SKILL.md +63 -0
- package/assets/.agents/skills/ace-orchestrator/references/engineering-bootstrap-playbook.md +360 -0
- package/assets/.agents/skills/astgrep-index/SKILL.md +58 -0
- package/assets/.agents/skills/codemunch/SKILL.md +65 -0
- package/assets/.agents/skills/codemunch/references/ast-driven-protocol.md +543 -0
- package/assets/.agents/skills/codesnipe/SKILL.md +64 -0
- package/assets/.agents/skills/codesnipe/references/dual-codebase-playbook.md +671 -0
- package/assets/.agents/skills/eval-harness/SKILL.md +203 -0
- package/assets/.agents/skills/handoff-lint/SKILL.md +164 -0
- package/assets/.agents/skills/incident-commander/SKILL.md +174 -0
- package/assets/.agents/skills/landing-review-watcher/SKILL.md +68 -0
- package/assets/.agents/skills/memory-curator/SKILL.md +179 -0
- package/assets/.agents/skills/problem-triage/SKILL.md +57 -0
- package/assets/.agents/skills/problem-triage/agents/openai.yaml +3 -0
- package/assets/.agents/skills/release-sentry/SKILL.md +189 -0
- package/assets/.agents/skills/risk-quant/SKILL.md +190 -0
- package/assets/.agents/skills/schema-forge/SKILL.md +174 -0
- package/assets/.agents/skills/skill-auditor/SKILL.md +52 -0
- package/assets/.agents/skills/state-auditor/SKILL.md +182 -0
- package/assets/.github/hooks/ace-copilot.json +68 -0
- package/assets/agent-state/ACE_WORKFLOW.md +131 -0
- package/assets/agent-state/ARTIFACT_MANIFEST.json +5 -0
- package/assets/agent-state/AST_GREP_COMMANDS.md +121 -0
- package/assets/agent-state/AST_GREP_INDEX.json +13 -0
- package/assets/agent-state/AST_GREP_INDEX.md +15 -0
- package/assets/agent-state/DECISIONS.md +7 -0
- package/assets/agent-state/EVIDENCE_LOG.md +7 -0
- package/assets/agent-state/HANDOFF.json +24 -0
- package/assets/agent-state/INTERFACE_REGISTRY.md +75 -0
- package/assets/agent-state/MODULES/gates/gate-autonomy.json +7 -0
- package/assets/agent-state/MODULES/gates/gate-completeness.json +7 -0
- package/assets/agent-state/MODULES/gates/gate-correctness.json +7 -0
- package/assets/agent-state/MODULES/gates/gate-evaluation.json +7 -0
- package/assets/agent-state/MODULES/gates/gate-operability.json +7 -0
- package/assets/agent-state/MODULES/gates/gate-security.json +7 -0
- package/assets/agent-state/MODULES/gates/gate-typescript-public-surface.json +7 -0
- package/assets/agent-state/MODULES/registry.json +41 -0
- package/assets/agent-state/MODULES/roles/capability-astgrep.json +49 -0
- package/assets/agent-state/MODULES/roles/capability-build.json +39 -0
- package/assets/agent-state/MODULES/roles/capability-docs.json +38 -0
- package/assets/agent-state/MODULES/roles/capability-eval.json +20 -0
- package/assets/agent-state/MODULES/roles/capability-memory.json +20 -0
- package/assets/agent-state/MODULES/roles/capability-observability.json +20 -0
- package/assets/agent-state/MODULES/roles/capability-ops.json +45 -0
- package/assets/agent-state/MODULES/roles/capability-qa.json +40 -0
- package/assets/agent-state/MODULES/roles/capability-release.json +21 -0
- package/assets/agent-state/MODULES/roles/capability-research.json +44 -0
- package/assets/agent-state/MODULES/roles/capability-security.json +21 -0
- package/assets/agent-state/MODULES/roles/capability-skeptic.json +48 -0
- package/assets/agent-state/MODULES/roles/capability-spec.json +42 -0
- package/assets/agent-state/MODULES/schemas/ACE_RUNTIME_PROFILE.schema.json +289 -0
- package/assets/agent-state/MODULES/schemas/ARTIFACT_MANIFEST.schema.json +185 -0
- package/assets/agent-state/MODULES/schemas/HANDOFF.agent-state.schema.json +124 -0
- package/assets/agent-state/MODULES/schemas/HANDOFF.schema.json +55 -0
- package/assets/agent-state/MODULES/schemas/RUNTIME_EXECUTOR_SESSION_REGISTRY.schema.json +290 -0
- package/assets/agent-state/MODULES/schemas/RUNTIME_TOOL_SPEC_REGISTRY.schema.json +144 -0
- package/assets/agent-state/MODULES/schemas/STATUS_EVENT.schema.json +84 -0
- package/assets/agent-state/MODULES/schemas/SWARM_HANDOFF.schema.json +138 -0
- package/assets/agent-state/MODULES/schemas/TRACKER_SNAPSHOT.schema.json +134 -0
- package/assets/agent-state/MODULES/schemas/VERICIFY_BRIDGE_SNAPSHOT.schema.json +157 -0
- package/assets/agent-state/MODULES/schemas/VERICIFY_PROCESS_POST_LOG.schema.json +93 -0
- package/assets/agent-state/MODULES/schemas/WORKSPACE_SESSION_REGISTRY.schema.json +133 -0
- package/assets/agent-state/PROVENANCE_LOG.md +28 -0
- package/assets/agent-state/QUALITY_GATES.md +15 -0
- package/assets/agent-state/RISKS.md +8 -0
- package/assets/agent-state/SCOPE.md +20 -0
- package/assets/agent-state/SKILL_CATALOG.md +48 -0
- package/assets/agent-state/STATUS.md +8 -0
- package/assets/agent-state/STATUS_EVENTS.ndjson +1 -0
- package/assets/agent-state/TASK.md +18 -0
- package/assets/agent-state/TEAL_CONFIG.md +117 -0
- package/assets/agent-state/handoff-registry.json +5 -0
- package/assets/agent-state/index-fingerprints.json +7 -0
- package/assets/agent-state/index.json +32 -0
- package/assets/agent-state/run-ledger.json +5 -0
- package/assets/agent-state/runtime-executor-sessions.json +5 -0
- package/assets/agent-state/runtime-tool-specs.json +5 -0
- package/assets/agent-state/runtime-workspaces.json +5 -0
- package/assets/agent-state/todo-state.json +7 -0
- package/assets/agent-state/tracker-snapshot.json +7 -0
- package/assets/agent-state/vericify/ace-bridge.json +60 -0
- package/assets/agent-state/vericify/process-posts.json +5 -0
- package/assets/instructions/ACE.instructions.md +187 -0
- package/assets/instructions/ACE_Coder.instructions.md +146 -0
- package/assets/instructions/ACE_UI.instructions.md +178 -0
- package/assets/instructions/ACE_VOS.instructions.md +211 -0
- package/assets/scripts/ace-hook-dispatch.mjs +538 -0
- package/assets/scripts/bootstrap-workspace.sh +27 -0
- package/assets/scripts/copilot-hook-dispatch.mjs +3 -0
- package/assets/scripts/eval-harness.sh +68 -0
- package/assets/scripts/render-mcp-configs.sh +396 -0
- package/assets/tasks/README.md +48 -0
- package/assets/tasks/SWARM_HANDOFF.example.json +53 -0
- package/assets/tasks/SWARM_HANDOFF.example_ui_to_coders.json +55 -0
- package/assets/tasks/SWARM_HANDOFF.example_vos_to_ui.json +55 -0
- package/assets/tasks/SWARM_HANDOFF.template.json +52 -0
- package/assets/tasks/cli_work_split.md +22 -0
- package/assets/tasks/lessons.md +17 -0
- package/assets/tasks/role_tasks.md +206 -0
- package/assets/tasks/todo.md +23 -0
- package/dist/ace-autonomy.d.ts +137 -0
- package/dist/ace-autonomy.js +472 -0
- package/dist/ace-context.d.ts +29 -0
- package/dist/ace-context.js +240 -0
- package/dist/ace-internal-tools.d.ts +8 -0
- package/dist/ace-internal-tools.js +76 -0
- package/dist/ace-server-instructions.d.ts +12 -0
- package/dist/ace-server-instructions.js +324 -0
- package/dist/agent-runtime/role-adapters.d.ts +29 -0
- package/dist/agent-runtime/role-adapters.js +573 -0
- package/dist/astgrep-index.d.ts +24 -0
- package/dist/astgrep-index.js +476 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.js +591 -0
- package/dist/git-ops.d.ts +53 -0
- package/dist/git-ops.js +238 -0
- package/dist/handoff-registry.d.ts +71 -0
- package/dist/handoff-registry.js +422 -0
- package/dist/helpers.d.ts +126 -0
- package/dist/helpers.js +1687 -0
- package/dist/index-store.d.ts +51 -0
- package/dist/index-store.js +328 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/internal-tool-runtime.d.ts +21 -0
- package/dist/internal-tool-runtime.js +136 -0
- package/dist/job-scheduler.d.ts +175 -0
- package/dist/job-scheduler.js +1217 -0
- package/dist/kanban.d.ts +27 -0
- package/dist/kanban.js +339 -0
- package/dist/local-model-runtime.d.ts +40 -0
- package/dist/local-model-runtime.js +174 -0
- package/dist/model-bridge.d.ts +54 -0
- package/dist/model-bridge.js +587 -0
- package/dist/orchestrator-supervisor.d.ts +100 -0
- package/dist/orchestrator-supervisor.js +399 -0
- package/dist/problem-triage.d.ts +23 -0
- package/dist/problem-triage.js +448 -0
- package/dist/prompts.d.ts +7 -0
- package/dist/prompts.js +628 -0
- package/dist/public-surface.d.ts +30 -0
- package/dist/public-surface.js +316 -0
- package/dist/resources.d.ts +7 -0
- package/dist/resources.js +545 -0
- package/dist/run-ledger.d.ts +36 -0
- package/dist/run-ledger.js +257 -0
- package/dist/runtime-command.d.ts +18 -0
- package/dist/runtime-command.js +76 -0
- package/dist/runtime-executor.d.ts +104 -0
- package/dist/runtime-executor.js +985 -0
- package/dist/runtime-profile.d.ts +116 -0
- package/dist/runtime-profile.js +532 -0
- package/dist/runtime-tool-specs.d.ts +68 -0
- package/dist/runtime-tool-specs.js +527 -0
- package/dist/safe-edit.d.ts +52 -0
- package/dist/safe-edit.js +255 -0
- package/dist/schemas.d.ts +44 -0
- package/dist/schemas.js +830 -0
- package/dist/semantic-cache.d.ts +147 -0
- package/dist/semantic-cache.js +552 -0
- package/dist/semantic-hash.d.ts +83 -0
- package/dist/semantic-hash.js +346 -0
- package/dist/server.d.ts +10 -0
- package/dist/server.js +46 -0
- package/dist/shared.d.ts +136 -0
- package/dist/shared.js +269 -0
- package/dist/skill-auditor.d.ts +26 -0
- package/dist/skill-auditor.js +184 -0
- package/dist/skill-catalog.d.ts +60 -0
- package/dist/skill-catalog.js +305 -0
- package/dist/status-events.d.ts +40 -0
- package/dist/status-events.js +269 -0
- package/dist/store/ace-packed-store.d.ts +69 -0
- package/dist/store/ace-packed-store.js +434 -0
- package/dist/store/bootstrap-store.d.ts +46 -0
- package/dist/store/bootstrap-store.js +242 -0
- package/dist/store/catalog-builder.d.ts +21 -0
- package/dist/store/catalog-builder.js +68 -0
- package/dist/store/importer.d.ts +19 -0
- package/dist/store/importer.js +157 -0
- package/dist/store/knowledge-bake.d.ts +59 -0
- package/dist/store/knowledge-bake.js +339 -0
- package/dist/store/materializers/hook-context-materializer.d.ts +25 -0
- package/dist/store/materializers/hook-context-materializer.js +100 -0
- package/dist/store/materializers/host-file-materializer.d.ts +37 -0
- package/dist/store/materializers/host-file-materializer.js +271 -0
- package/dist/store/materializers/todo-syncer.d.ts +30 -0
- package/dist/store/materializers/todo-syncer.js +140 -0
- package/dist/store/materializers/vericify-projector.d.ts +38 -0
- package/dist/store/materializers/vericify-projector.js +239 -0
- package/dist/store/repositories/discovery-repository.d.ts +24 -0
- package/dist/store/repositories/discovery-repository.js +58 -0
- package/dist/store/repositories/handoff-repository.d.ts +31 -0
- package/dist/store/repositories/handoff-repository.js +67 -0
- package/dist/store/repositories/ledger-repository.d.ts +26 -0
- package/dist/store/repositories/ledger-repository.js +49 -0
- package/dist/store/repositories/runtime-kv-repository.d.ts +16 -0
- package/dist/store/repositories/runtime-kv-repository.js +36 -0
- package/dist/store/repositories/scheduler-repository.d.ts +50 -0
- package/dist/store/repositories/scheduler-repository.js +123 -0
- package/dist/store/repositories/session-repository.d.ts +33 -0
- package/dist/store/repositories/session-repository.js +82 -0
- package/dist/store/repositories/todo-repository.d.ts +31 -0
- package/dist/store/repositories/todo-repository.js +77 -0
- package/dist/store/repositories/tracker-repository.d.ts +25 -0
- package/dist/store/repositories/tracker-repository.js +43 -0
- package/dist/store/repositories/vericify-repository.d.ts +32 -0
- package/dist/store/repositories/vericify-repository.js +58 -0
- package/dist/store/skills-install.d.ts +28 -0
- package/dist/store/skills-install.js +86 -0
- package/dist/store/state-reader.d.ts +49 -0
- package/dist/store/state-reader.js +111 -0
- package/dist/store/store-artifacts.d.ts +12 -0
- package/dist/store/store-artifacts.js +138 -0
- package/dist/store/store-snapshot.d.ts +19 -0
- package/dist/store/store-snapshot.js +140 -0
- package/dist/store/topology-bake.d.ts +15 -0
- package/dist/store/topology-bake.js +215 -0
- package/dist/store/types.d.ts +155 -0
- package/dist/store/types.js +35 -0
- package/dist/store/workspace-snapshot.d.ts +26 -0
- package/dist/store/workspace-snapshot.js +107 -0
- package/dist/store/write-queue.d.ts +7 -0
- package/dist/store/write-queue.js +26 -0
- package/dist/todo-state.d.ts +41 -0
- package/dist/todo-state.js +399 -0
- package/dist/tools-agent.d.ts +7 -0
- package/dist/tools-agent.js +1542 -0
- package/dist/tools-discovery.d.ts +6 -0
- package/dist/tools-discovery.js +178 -0
- package/dist/tools-drift.d.ts +13 -0
- package/dist/tools-drift.js +357 -0
- package/dist/tools-files.d.ts +6 -0
- package/dist/tools-files.js +679 -0
- package/dist/tools-framework.d.ts +7 -0
- package/dist/tools-framework.js +1414 -0
- package/dist/tools-git.d.ts +6 -0
- package/dist/tools-git.js +183 -0
- package/dist/tools-handoff.d.ts +32 -0
- package/dist/tools-handoff.js +489 -0
- package/dist/tools-lifecycle.d.ts +6 -0
- package/dist/tools-lifecycle.js +205 -0
- package/dist/tools-memory.d.ts +6 -0
- package/dist/tools-memory.js +260 -0
- package/dist/tools-scheduler.d.ts +6 -0
- package/dist/tools-scheduler.js +228 -0
- package/dist/tools-skills.d.ts +3 -0
- package/dist/tools-skills.js +104 -0
- package/dist/tools-todo.d.ts +6 -0
- package/dist/tools-todo.js +154 -0
- package/dist/tools.d.ts +9 -0
- package/dist/tools.js +33 -0
- package/dist/tracker-adapters.d.ts +74 -0
- package/dist/tracker-adapters.js +776 -0
- package/dist/tracker-sync.d.ts +10 -0
- package/dist/tracker-sync.js +84 -0
- package/dist/tui/agent-runner.d.ts +137 -0
- package/dist/tui/agent-runner.js +466 -0
- package/dist/tui/agent-worker.d.ts +10 -0
- package/dist/tui/agent-worker.js +347 -0
- package/dist/tui/chat.d.ts +84 -0
- package/dist/tui/chat.js +368 -0
- package/dist/tui/commands.d.ts +57 -0
- package/dist/tui/commands.js +432 -0
- package/dist/tui/dashboard.d.ts +24 -0
- package/dist/tui/dashboard.js +110 -0
- package/dist/tui/index.d.ts +114 -0
- package/dist/tui/index.js +1059 -0
- package/dist/tui/input.d.ts +49 -0
- package/dist/tui/input.js +336 -0
- package/dist/tui/layout.d.ts +116 -0
- package/dist/tui/layout.js +367 -0
- package/dist/tui/ollama.d.ts +116 -0
- package/dist/tui/ollama.js +192 -0
- package/dist/tui/openai-compatible.d.ts +63 -0
- package/dist/tui/openai-compatible.js +370 -0
- package/dist/tui/provider-discovery.d.ts +59 -0
- package/dist/tui/provider-discovery.js +530 -0
- package/dist/tui/renderer.d.ts +166 -0
- package/dist/tui/renderer.js +304 -0
- package/dist/tui/tabs.d.ts +70 -0
- package/dist/tui/tabs.js +208 -0
- package/dist/tui/telemetry.d.ts +56 -0
- package/dist/tui/telemetry.js +106 -0
- package/dist/vericify-bridge.d.ts +146 -0
- package/dist/vericify-bridge.js +571 -0
- package/dist/vericify-context.d.ts +10 -0
- package/dist/vericify-context.js +72 -0
- package/dist/workspace-manager.d.ts +107 -0
- package/dist/workspace-manager.js +636 -0
- package/package.json +83 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-curator
|
|
3
|
+
description:
|
|
4
|
+
Reconcile evidence, decisions, and risks into durable memory artifacts. Use when agent-state is noisy, contradictory, stale, or needs compression before handoff.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Memory Curator
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Keep long-running autonomy state compact, accurate, and evidence-linked so agents reason from truth, not stale noise.
|
|
12
|
+
Memory without curation is hoarding. Memory with curation is institutional knowledge.
|
|
13
|
+
|
|
14
|
+
## Canonical Use Cases
|
|
15
|
+
|
|
16
|
+
1. `EVIDENCE_LOG.md` and related state files are growing noisy and handoff context needs compression without losing provenance.
|
|
17
|
+
2. Contradictory decisions, risks, or evidence claims must be reconciled before another routing or release pass.
|
|
18
|
+
3. A long-running workspace needs a durable memory index so later agents do not repeat old analysis.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## MICE Boundaries
|
|
23
|
+
|
|
24
|
+
| Rule | Enforcement |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Modular** | Summarizes and indexes; does NOT delete source logs or make scope decisions. |
|
|
27
|
+
| **Interoperable** | Memory index entries follow canonical format below. |
|
|
28
|
+
| **Customizable** | Staleness thresholds adapt to sprint cadence in `TEAL_CONFIG.md`. |
|
|
29
|
+
| **Extensible** | New memory categories added via index schema, not prose. |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## MICE/TEAL Alignment
|
|
34
|
+
|
|
35
|
+
- Modular memory maintenance with no contract mutation.
|
|
36
|
+
- Preserves TEAL orchestration context by keeping dependency decisions evidence-linked.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Trigger Conditions
|
|
41
|
+
|
|
42
|
+
Use when:
|
|
43
|
+
|
|
44
|
+
- `EVIDENCE_LOG.md` exceeds 200 entries or 50KB
|
|
45
|
+
- contradictory assumptions appear across state files
|
|
46
|
+
- repeated cycles re-state same claims without new evidence
|
|
47
|
+
- pre-handoff context compression needed
|
|
48
|
+
- post-incident knowledge consolidation
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Inputs
|
|
53
|
+
|
|
54
|
+
- `agent-state/EVIDENCE_LOG.md`
|
|
55
|
+
- `agent-state/DECISIONS.md`
|
|
56
|
+
- `agent-state/RISKS.md`
|
|
57
|
+
- `agent-state/HANDOFF_HISTORY/*.json`
|
|
58
|
+
- `agent-state/STATUS_EVENTS.ndjson`
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Socratic Questions (Pre-Curation)
|
|
63
|
+
|
|
64
|
+
- Which entries are still decision-relevant for the current objective?
|
|
65
|
+
- Which assumptions were invalidated by later evidence?
|
|
66
|
+
- Which repeated entries add no new information beyond the first occurrence?
|
|
67
|
+
- Which decisions have been superseded but not marked as such?
|
|
68
|
+
- Are there contradictions between `DECISIONS.md` and `EVIDENCE_LOG.md`?
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## Curation Rules
|
|
73
|
+
|
|
74
|
+
| Rule | Enforcement |
|
|
75
|
+
|---|---|
|
|
76
|
+
| **Append-Only Source** | NEVER delete or modify entries in `EVIDENCE_LOG.md`. Index only. |
|
|
77
|
+
| **Provenance Preservation** | Every summary retains link to original entry timestamp. |
|
|
78
|
+
| **Contradiction Flagging** | Contradictory claims get explicit `CONTRADICTION` marker with both refs. |
|
|
79
|
+
| **Staleness Marking** | Entries older than 2 sprint windows with no downstream reference are marked `STALE`. |
|
|
80
|
+
| **Deduplication** | Repeated claims with identical evidence are collapsed to single index entry with count. |
|
|
81
|
+
| **Decision Lineage** | Superseded decisions linked to their replacement with reason. |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Memory Index Entry Schema
|
|
86
|
+
|
|
87
|
+
```markdown
|
|
88
|
+
### MEM-<NNN>: <summary title>
|
|
89
|
+
- **Category:** <decision | evidence | risk | assumption | contradiction>
|
|
90
|
+
- **Status:** <active | stale | superseded | invalidated>
|
|
91
|
+
- **Original Refs:** <EVIDENCE_LOG.md#ts:ISO8601>, <DECISIONS.md#section>
|
|
92
|
+
- **Summary:** <1-2 sentence distillation>
|
|
93
|
+
- **Superseded By:** <MEM-NNN or N/A>
|
|
94
|
+
- **Contradiction With:** <MEM-NNN or N/A>
|
|
95
|
+
- **Last Relevant:** <ISO8601 of last downstream reference>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Workflow — Mapped to Clarity Protocol
|
|
101
|
+
|
|
102
|
+
### `[STATE_ANALYSIS]`
|
|
103
|
+
1. Measure current state file sizes and entry counts.
|
|
104
|
+
2. Identify compression opportunity (entries without downstream references).
|
|
105
|
+
3. Scan for contradictions across `DECISIONS.md`, `RISKS.md`, `EVIDENCE_LOG.md`.
|
|
106
|
+
|
|
107
|
+
### `[STRATEGY_SELECTOR]`
|
|
108
|
+
4. Choose curation scope:
|
|
109
|
+
- Full curation: all source files, all time windows.
|
|
110
|
+
- Delta curation: only entries since last `MEMORY_INDEX.md` update.
|
|
111
|
+
- Contradiction-only: scan for and flag contradictions without full indexing.
|
|
112
|
+
5. Plan processing order: contradictions first, then dedup, then staleness.
|
|
113
|
+
|
|
114
|
+
### `[EXECUTION_LOG]`
|
|
115
|
+
6. Cluster entries by objective and time window.
|
|
116
|
+
7. Detect and flag contradictions with dual-reference markers.
|
|
117
|
+
8. Deduplicate repeated statements with no new references.
|
|
118
|
+
9. Mark entries older than staleness threshold with no downstream ref as `STALE`.
|
|
119
|
+
10. Link superseded decisions to their replacements.
|
|
120
|
+
11. Preserve provenance links for all retained summaries.
|
|
121
|
+
|
|
122
|
+
### `[ARTIFACT_UPDATE]`
|
|
123
|
+
12. Write `agent-state/MEMORY_INDEX.md` with all indexed entries.
|
|
124
|
+
13. Write `agent-state/MEMORY_RECONCILIATION.md`:
|
|
125
|
+
|
|
126
|
+
```markdown
|
|
127
|
+
# Memory Reconciliation Report
|
|
128
|
+
Generated: <ISO8601>
|
|
129
|
+
|
|
130
|
+
## Statistics
|
|
131
|
+
| Metric | Value |
|
|
132
|
+
|---|---|
|
|
133
|
+
| Total source entries scanned | <n> |
|
|
134
|
+
| Active entries indexed | <n> |
|
|
135
|
+
| Stale entries marked | <n> |
|
|
136
|
+
| Contradictions flagged | <n> |
|
|
137
|
+
| Duplicates collapsed | <n> |
|
|
138
|
+
| Superseded decisions | <n> |
|
|
139
|
+
|
|
140
|
+
## Contradictions Found
|
|
141
|
+
- MEM-<NNN> vs MEM-<NNN>: <description>
|
|
142
|
+
|
|
143
|
+
## Recommended Actions
|
|
144
|
+
- <action with owner and evidence ref>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
14. Append curation evidence to `EVIDENCE_LOG.md`.
|
|
148
|
+
|
|
149
|
+
### `[VERIFICATION]`
|
|
150
|
+
15. No source log entries were deleted or modified.
|
|
151
|
+
16. Every index entry has provenance link to original.
|
|
152
|
+
17. All contradictions have dual-reference markers.
|
|
153
|
+
18. Reconciliation report statistics are mathematically consistent.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Output Contract
|
|
158
|
+
|
|
159
|
+
- `agent-state/MEMORY_INDEX.md` (compact, categorized, contradiction-aware)
|
|
160
|
+
- `agent-state/MEMORY_RECONCILIATION.md` (statistics, contradictions, recommended actions)
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Anti-Patterns
|
|
165
|
+
|
|
166
|
+
| Anti-Pattern | Correct Behavior |
|
|
167
|
+
|---|---|
|
|
168
|
+
| Deleting old evidence entries | Mark as STALE in index; source is append-only |
|
|
169
|
+
| Summarizing without provenance link | Every summary must link to original timestamp |
|
|
170
|
+
| Ignoring contradictions | Flag explicitly with both refs; do not silently pick one |
|
|
171
|
+
| Curating during active incident | Wait for incident closure; active state is volatile |
|
|
172
|
+
| Marking everything as active | Apply staleness threshold ruthlessly |
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Failure Policy
|
|
177
|
+
|
|
178
|
+
Do not remove or rewrite source logs; only summarize with pointers. `EVIDENCE_LOG.md` remains append-only.
|
|
179
|
+
If contradictions cannot be resolved from available evidence, emit `FIX_REQUIRED` routed to the owning agent for clarification.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: problem-triage
|
|
3
|
+
description:
|
|
4
|
+
Classify a new request as one of: existing skill fits, existing skill needs patching, new skill warranted, missing tool or permission, or one-off task. Use when the user asks whether something should become a skill, how to route a skill-system request, or what the right next building block is.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Problem Triage
|
|
8
|
+
|
|
9
|
+
Use this skill before creating or patching ACE skills. Its job is to stop duplicate or premature skill creation by turning a vague request into a concrete route decision.
|
|
10
|
+
|
|
11
|
+
## Canonical Use Cases
|
|
12
|
+
|
|
13
|
+
1. A user asks whether a repeated workflow deserves a new skill.
|
|
14
|
+
2. A request overlaps an existing skill, but the current skill may need metadata, structure, or validation fixes.
|
|
15
|
+
3. The real blocker is missing tooling, permissions, or runtime setup rather than the absence of a skill.
|
|
16
|
+
|
|
17
|
+
## Inputs
|
|
18
|
+
|
|
19
|
+
- The raw user request or workflow description.
|
|
20
|
+
- The current skill catalog, including discoverable workspace and package-default skills.
|
|
21
|
+
- Any visible blockers such as missing MCP servers, approvals, credentials, or network access.
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
1. Read the request for reusable-workflow signals, patch signals, and blocker signals.
|
|
26
|
+
2. Compare the request against existing skill names, descriptions, and headings.
|
|
27
|
+
3. Classify the request into exactly one route:
|
|
28
|
+
- existing skill fits
|
|
29
|
+
- existing skill needs patching
|
|
30
|
+
- new skill warranted
|
|
31
|
+
- missing tool or permission
|
|
32
|
+
- one-off task
|
|
33
|
+
4. Write `agent-state/PROBLEM_TRIAGE.md` with confidence, rationale, top matches, and next steps.
|
|
34
|
+
|
|
35
|
+
## Outputs
|
|
36
|
+
|
|
37
|
+
- `agent-state/PROBLEM_TRIAGE.md`
|
|
38
|
+
- A route decision with confidence, rationale, and top skill matches
|
|
39
|
+
- Suggested next steps for the next ACE module or skill-building pass
|
|
40
|
+
|
|
41
|
+
## Validation
|
|
42
|
+
|
|
43
|
+
- Run the `problem_triage` MCP tool with a known request and verify that it writes `agent-state/PROBLEM_TRIAGE.md`.
|
|
44
|
+
- Verify that requests mentioning client overlays or portability do not require `agents/openai.yaml` to classify correctly.
|
|
45
|
+
- Check that repeated-workflow requests route to either `existing skill needs patching` or `new skill warranted`, never silently to one-off when reusable signals are strong.
|
|
46
|
+
|
|
47
|
+
## Compatibility
|
|
48
|
+
|
|
49
|
+
- `SKILL.md` is the canonical portable source of truth.
|
|
50
|
+
- Any files under `agents/` are optional client overlays only and must not redefine the core route semantics.
|
|
51
|
+
- The skill should remain understandable and executable in Claude, Cursor, Codex, Antigravity, and similar environments even when no adapter file exists.
|
|
52
|
+
|
|
53
|
+
## Failure Policy
|
|
54
|
+
|
|
55
|
+
- If catalog evidence is weak or ambiguous, lower confidence and surface the ambiguity explicitly.
|
|
56
|
+
- If a tool, permission, or credential blocker is present, route to `missing tool or permission` instead of recommending skill creation.
|
|
57
|
+
- Do not create a new skill when an existing skill can be patched to cover the request.
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-sentry
|
|
3
|
+
description:
|
|
4
|
+
Promotion gatekeeper skill ensuring release readiness, rollback viability, and provenance completeness.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Release Sentry
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Make release decisions explicit, reversible, and evidence-backed.
|
|
12
|
+
No artifact moves toward users without a deterministic gate pass.
|
|
13
|
+
|
|
14
|
+
## Canonical Use Cases
|
|
15
|
+
|
|
16
|
+
1. A verified build is being considered for release-candidate or production promotion.
|
|
17
|
+
2. The team needs a hold/approve decision with rollback readiness and provenance evidence explicitly documented.
|
|
18
|
+
3. Releases are resuming after an incident and someone must verify gate completeness before land or production movement.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## MICE Boundaries
|
|
23
|
+
|
|
24
|
+
| Rule | Enforcement |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Modular** | Gates promotion decisions; does NOT build, test, or deploy artifacts. |
|
|
27
|
+
| **Interoperable** | Decision payloads conform to `RELEASE_DECISION.schema.json` if present. |
|
|
28
|
+
| **Customizable** | Gate checklist adapts to `TEAL_CONFIG.md` pipeline stage. |
|
|
29
|
+
| **Extensible** | New gate checks are added as checklist rows, not ad-hoc prose. |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## MICE/TEAL Alignment
|
|
34
|
+
|
|
35
|
+
- Modular promotion gate independent from build implementation details.
|
|
36
|
+
- TEAL-aware release checks ensure all upstream dependencies and sidecar gates are satisfied.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Trigger Conditions
|
|
41
|
+
|
|
42
|
+
Use when:
|
|
43
|
+
|
|
44
|
+
- moving from verified artifacts to release candidate
|
|
45
|
+
- approving production promotion
|
|
46
|
+
- evaluating rollback readiness
|
|
47
|
+
- any handoff contains `release_candidate: true`
|
|
48
|
+
- post-incident re-verification before resuming releases
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Inputs
|
|
53
|
+
|
|
54
|
+
- `agent-state/EVAL_REPORT.md`
|
|
55
|
+
- `agent-state/VERIFICATION_REPORT.md`
|
|
56
|
+
- `agent-state/ARTIFACT_MANIFEST.json`
|
|
57
|
+
- `agent-state/PROVENANCE_LOG.md`
|
|
58
|
+
- `agent-state/RISKS.md` (current risk scorecard)
|
|
59
|
+
- `agent-state/QUALITY_GATES.md`
|
|
60
|
+
- security/observability summaries (if present)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Release Gate Checklist
|
|
65
|
+
|
|
66
|
+
Every promotion decision requires ALL rows to pass:
|
|
67
|
+
|
|
68
|
+
| # | Gate | Pass Criteria | Fail Action |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| 1 | **Quality Gates** | All gates in `QUALITY_GATES.md` status = `PASSED` | Block; route to `agent-qa` |
|
|
71
|
+
| 2 | **Verification Report** | `VERIFICATION_REPORT.md` exists, current, no open failures | Block; route to `agent-qa` |
|
|
72
|
+
| 3 | **Eval Regression** | `EVAL_REPORT.md` shows no regression vs. baseline | Block; route to `agent-qa` |
|
|
73
|
+
| 4 | **Provenance Chain** | Every artifact in manifest has provenance entry with checksum | Block; route to `agent-builder` |
|
|
74
|
+
| 5 | **Risk Scorecard** | No CRITICAL/HIGH risks with status = `open` | Block; route to `risk-quant` |
|
|
75
|
+
| 6 | **Spec Alignment** | Artifacts satisfy `SPEC_CONTRACT.json` requirements | Block; route to `agent-spec` |
|
|
76
|
+
| 7 | **Rollback Runbook** | `ROLLBACK_RUNBOOK.md` exists and references specific revert steps | Block; create runbook |
|
|
77
|
+
| 8 | **Documentation** | Release notes / changelog entry exists | Block; route to `agent-docs` |
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Promotion Decision Matrix
|
|
82
|
+
|
|
83
|
+
| All Gates Pass | Risk Posture | Decision | Action |
|
|
84
|
+
|---|---|---|---|
|
|
85
|
+
| YES | No HIGH/CRITICAL open | `APPROVE` | Emit `RELEASE_APPROVED` event; update `STATUS.md` |
|
|
86
|
+
| YES | MEDIUM risks accepted | `APPROVE_WITH_RISK` | Emit event with accepted risk references |
|
|
87
|
+
| NO | Any gate failed | `HOLD` | Emit `GATE_FAILED`; route to failing gate owner |
|
|
88
|
+
| N/A | Active incident | `ROLLBACK` | Trigger rollback runbook; emit `RELEASE_ROLLED_BACK` |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Rollback Readiness Checklist
|
|
93
|
+
|
|
94
|
+
| # | Check | Requirement |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| 1 | Revert mechanism | Specific command/process documented in `ROLLBACK_RUNBOOK.md` |
|
|
97
|
+
| 2 | Data migration | Backward-compatible or rollback migration exists |
|
|
98
|
+
| 3 | Dependency lock | All dependency versions pinned and restorable |
|
|
99
|
+
| 4 | Verification | Post-rollback verification steps defined |
|
|
100
|
+
| 5 | Communication | Stakeholder notification plan documented |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Workflow — Mapped to Clarity Protocol
|
|
105
|
+
|
|
106
|
+
### `[STATE_ANALYSIS]`
|
|
107
|
+
1. Read all input artifacts. Determine which gates have evidence and which are missing.
|
|
108
|
+
2. Check `STATUS.md` for current pipeline phase and active role.
|
|
109
|
+
|
|
110
|
+
### `[STRATEGY_SELECTOR]`
|
|
111
|
+
3. Walk the Release Gate Checklist top-to-bottom.
|
|
112
|
+
4. For each gate, determine: pass / fail / missing-evidence.
|
|
113
|
+
5. If any gate fails, plan routing to the responsible owner.
|
|
114
|
+
|
|
115
|
+
### `[EXECUTION_LOG]`
|
|
116
|
+
6. Execute each gate check against actual artifacts.
|
|
117
|
+
7. Validate provenance checksums against manifest.
|
|
118
|
+
8. Verify rollback runbook completeness.
|
|
119
|
+
9. Check risk scorecard for open HIGH/CRITICAL entries.
|
|
120
|
+
|
|
121
|
+
### `[ARTIFACT_UPDATE]`
|
|
122
|
+
10. Write `agent-state/RELEASE_DECISION.md`:
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
# Release Decision
|
|
126
|
+
Generated: <ISO8601>
|
|
127
|
+
Decision: <APPROVE | APPROVE_WITH_RISK | HOLD | ROLLBACK>
|
|
128
|
+
Reason: <one sentence>
|
|
129
|
+
|
|
130
|
+
## Gate Results
|
|
131
|
+
| Gate | Status | Evidence |
|
|
132
|
+
|---|---|---|
|
|
133
|
+
| Quality Gates | PASS/FAIL | <ref> |
|
|
134
|
+
| Verification | PASS/FAIL | <ref> |
|
|
135
|
+
| ... | ... | ... |
|
|
136
|
+
|
|
137
|
+
## Accepted Risks (if APPROVE_WITH_RISK)
|
|
138
|
+
- RISK-<NNN>: <title> — accepted because <reason>
|
|
139
|
+
|
|
140
|
+
## Required Actions (if HOLD)
|
|
141
|
+
- <gate> → <owner> — <what must happen>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
11. Verify or create `agent-state/ROLLBACK_RUNBOOK.md`.
|
|
145
|
+
12. Append evidence anchor to `EVIDENCE_LOG.md`.
|
|
146
|
+
|
|
147
|
+
### `[VERIFICATION]`
|
|
148
|
+
13. Decision is one of exactly 4 values: `APPROVE`, `APPROVE_WITH_RISK`, `HOLD`, `ROLLBACK`.
|
|
149
|
+
14. Every gate has explicit pass/fail with evidence reference.
|
|
150
|
+
15. HOLD decisions include owner routing for every failed gate.
|
|
151
|
+
16. Rollback runbook exists and has all 5 checklist items.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Output Contract
|
|
156
|
+
|
|
157
|
+
- `agent-state/RELEASE_DECISION.md`
|
|
158
|
+
- `agent-state/ROLLBACK_RUNBOOK.md` (created or verified)
|
|
159
|
+
- event emission: `RELEASE_APPROVED` or `GATE_FAILED` or `RELEASE_ROLLED_BACK`
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Anti-Patterns
|
|
164
|
+
|
|
165
|
+
| Anti-Pattern | Correct Behavior |
|
|
166
|
+
|---|---|
|
|
167
|
+
| "LGTM, ship it" | Walk every gate row; document pass/fail |
|
|
168
|
+
| Approving with open CRITICAL risk | HOLD until risk is mitigated or accepted with evidence |
|
|
169
|
+
| Rollback plan = "revert the commit" | Runbook must cover data, deps, verification, communication |
|
|
170
|
+
| Skipping provenance check | Every artifact needs checksum + builder provenance |
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Wrong-Stuff Protocol
|
|
175
|
+
|
|
176
|
+
| Finding | Classification | Route To |
|
|
177
|
+
|---|---|---|
|
|
178
|
+
| Verification report missing/stale | `verification_gap` | `agent-qa` |
|
|
179
|
+
| Provenance chain broken | `implementation_bug` | `agent-builder` |
|
|
180
|
+
| Spec not satisfied | `spec_violation` | `agent-spec` |
|
|
181
|
+
| Docs missing | `documentation_drift` | `agent-docs` |
|
|
182
|
+
| Risk scorecard has open CRITICAL | `unresolved_risk` | `risk-quant` then owner |
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Failure Policy
|
|
187
|
+
|
|
188
|
+
Block promotion when any required gate is missing, stale, or unresolved.
|
|
189
|
+
No "soft approvals" — every promotion decision is documented with gate evidence and is reversible via the rollback runbook.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: risk-quant
|
|
3
|
+
description:
|
|
4
|
+
Score and prioritize execution risks with owners, mitigations, and verification conditions. Use when new blockers appear, release risk must be assessed, or handoffs reference unscored risk.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Risk Quant
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
Convert vague risks into measurable, owner-linked mitigation plans that can gate execution.
|
|
12
|
+
Risk without quantification is anxiety. Risk with quantification is engineering.
|
|
13
|
+
|
|
14
|
+
## Canonical Use Cases
|
|
15
|
+
|
|
16
|
+
1. A new blocker, architecture change, or dependency cascade appears and needs immediate scoring plus ownership.
|
|
17
|
+
2. A release or handoff decision references risk, but the risk is still qualitative or incomplete.
|
|
18
|
+
3. A mitigation plan exists and someone needs to verify whether it actually lowers gate-blocking risk.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## MICE Boundaries
|
|
23
|
+
|
|
24
|
+
| Rule | Enforcement |
|
|
25
|
+
|---|---|
|
|
26
|
+
| **Modular** | Scores risks; does NOT implement mitigations or change scope. |
|
|
27
|
+
| **Interoperable** | Risk entries follow the canonical Risk Entry Schema below. |
|
|
28
|
+
| **Customizable** | Reads `TEAL_CONFIG.md` for pipeline stage and criticality weights. |
|
|
29
|
+
| **Extensible** | New risk categories added via schema extension, not ad-hoc fields. |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## MICE/TEAL Alignment
|
|
34
|
+
|
|
35
|
+
- Modular risk scoring layer used by skeptic/ops/qa without coupling to implementation details.
|
|
36
|
+
- TEAL-aware prioritization uses pipeline stage and dependency criticality.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Trigger Conditions
|
|
41
|
+
|
|
42
|
+
Use when:
|
|
43
|
+
|
|
44
|
+
- architecture or scope changes
|
|
45
|
+
- blocker cascades emerge
|
|
46
|
+
- release readiness is being assessed
|
|
47
|
+
- any gate decision references unquantified risk
|
|
48
|
+
- handoff payload contains `risks_unscored: true`
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Inputs
|
|
53
|
+
|
|
54
|
+
- `agent-state/RISKS.md`
|
|
55
|
+
- `agent-state/DECISIONS.md`
|
|
56
|
+
- `agent-state/STATUS.md`
|
|
57
|
+
- current handoff payloads
|
|
58
|
+
- `agent-state/EVIDENCE_LOG.md` (for historical risk resolution evidence)
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Probability-Impact Scoring Matrix
|
|
63
|
+
|
|
64
|
+
### Probability Scale
|
|
65
|
+
|
|
66
|
+
| Score | Label | Definition |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| 1 | Rare | < 10% chance in current sprint window |
|
|
69
|
+
| 2 | Unlikely | 10–30% chance |
|
|
70
|
+
| 3 | Possible | 30–60% chance |
|
|
71
|
+
| 4 | Likely | 60–85% chance |
|
|
72
|
+
| 5 | Near-Certain | > 85% chance or already manifesting |
|
|
73
|
+
|
|
74
|
+
### Impact Scale
|
|
75
|
+
|
|
76
|
+
| Score | Label | Definition |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| 1 | Negligible | No schedule/scope effect; cosmetic only |
|
|
79
|
+
| 2 | Minor | < 1 day delay or single-module rework |
|
|
80
|
+
| 3 | Moderate | 1–3 day delay or multi-module rework |
|
|
81
|
+
| 4 | Significant | Sprint-level delay or architecture change required |
|
|
82
|
+
| 5 | Critical | Objective failure, thesis invalidation, or data loss |
|
|
83
|
+
|
|
84
|
+
### Priority Tier Computation
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
priority_score = probability x impact
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
| Score Range | Tier | Mitigation SLA | Gate Effect |
|
|
91
|
+
|---|---|---|---|
|
|
92
|
+
| 1–4 | `LOW` | Address within current sprint | Informational only |
|
|
93
|
+
| 5–9 | `MEDIUM` | Mitigation plan required before next handoff | Warning flag |
|
|
94
|
+
| 10–15 | `HIGH` | Owner + mitigation + verification required NOW | Blocks downstream |
|
|
95
|
+
| 16–25 | `CRITICAL` | Immediate circuit breaker; escalate to ops | Hard gate block |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Canonical Risk Entry Schema
|
|
100
|
+
|
|
101
|
+
Every risk in `RISKS.md` must contain these fields:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
### RISK-<NNN>: <title>
|
|
105
|
+
- **Cause:** <what produces this risk>
|
|
106
|
+
- **Effect:** <what happens if it manifests>
|
|
107
|
+
- **Detection Signal:** <how we know it is manifesting>
|
|
108
|
+
- **Probability:** <1-5> (<label>)
|
|
109
|
+
- **Impact:** <1-5> (<label>)
|
|
110
|
+
- **Priority:** <score> / <tier>
|
|
111
|
+
- **Owner:** <agent-role>
|
|
112
|
+
- **Mitigation:** <specific action, not "be careful">
|
|
113
|
+
- **Verification Condition:** <falsifiable test that mitigation worked>
|
|
114
|
+
- **Status:** <open | mitigating | mitigated | accepted | closed>
|
|
115
|
+
- **Evidence Ref:** <EVIDENCE_LOG.md#ts:ISO8601>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Workflow — Mapped to Clarity Protocol
|
|
121
|
+
|
|
122
|
+
### `[STATE_ANALYSIS]`
|
|
123
|
+
1. Read `RISKS.md` — identify entries missing scores, owners, or mitigations.
|
|
124
|
+
2. Read `DECISIONS.md` — surface any scope changes that create new risk.
|
|
125
|
+
3. Read `STATUS.md` — determine current pipeline stage for criticality weights.
|
|
126
|
+
|
|
127
|
+
### `[STRATEGY_SELECTOR]`
|
|
128
|
+
4. For each risk entry, determine scoring approach:
|
|
129
|
+
- Previously scored but stale → re-score with updated evidence.
|
|
130
|
+
- Unscored → full scoring pass.
|
|
131
|
+
- Scored and current → skip (no busywork).
|
|
132
|
+
5. Plan scoring order: CRITICAL-suspected first, LOW-suspected last.
|
|
133
|
+
|
|
134
|
+
### `[EXECUTION_LOG]`
|
|
135
|
+
6. Normalize each risk entry to canonical schema (cause, effect, detection signal).
|
|
136
|
+
7. Assign `probability` and `impact` scores using scales above.
|
|
137
|
+
8. Compute priority tier and mitigation SLA.
|
|
138
|
+
9. For HIGH/CRITICAL: require owner, specific mitigation, and falsifiable verification condition. If missing, emit `FIX_REQUIRED`.
|
|
139
|
+
10. For CRITICAL: check if circuit breaker should be triggered. If yes, emit event to ops.
|
|
140
|
+
|
|
141
|
+
### `[ARTIFACT_UPDATE]`
|
|
142
|
+
11. Write updated `agent-state/RISKS.md` with scored entries.
|
|
143
|
+
12. Generate `agent-state/RISK_SCORECARD.md` with summary table, top risks, gate implications, and mitigation quality audit.
|
|
144
|
+
13. Append evidence anchor to `EVIDENCE_LOG.md`.
|
|
145
|
+
|
|
146
|
+
### `[VERIFICATION]`
|
|
147
|
+
14. Every HIGH/CRITICAL risk has owner + mitigation + verification condition.
|
|
148
|
+
15. No risk entry uses vague mitigation ("be careful", "monitor", "TBD").
|
|
149
|
+
16. Priority scores are mathematically consistent with scales.
|
|
150
|
+
17. Scorecard gate implications match actual gate state.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Output Contract
|
|
155
|
+
|
|
156
|
+
- updated `agent-state/RISKS.md` (all entries in canonical schema)
|
|
157
|
+
- `agent-state/RISK_SCORECARD.md` (summary, top risks, gate implications, mitigation quality)
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Anti-Patterns
|
|
162
|
+
|
|
163
|
+
| Anti-Pattern | Correct Behavior |
|
|
164
|
+
|---|---|
|
|
165
|
+
| "Risk: things might break" | Specify cause, effect, detection signal |
|
|
166
|
+
| Mitigation = "be careful" | Mitigation = specific action with verification condition |
|
|
167
|
+
| All risks scored LOW | Re-examine; if nothing is risky, you are not looking hard enough |
|
|
168
|
+
| Risk without owner | Every HIGH/CRITICAL risk has exactly one owner role |
|
|
169
|
+
| Scoring without evidence | Probability must reference evidence, not gut feeling |
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Wrong-Stuff Protocol
|
|
174
|
+
|
|
175
|
+
When scoring reveals issues:
|
|
176
|
+
|
|
177
|
+
| Finding | Classification | Route To |
|
|
178
|
+
|---|---|---|
|
|
179
|
+
| Risk stems from unclear spec | `spec_violation` | `agent-spec` |
|
|
180
|
+
| Risk stems from implementation gap | `implementation_bug` | `agent-builder` |
|
|
181
|
+
| Risk stems from unvalidated assumption | `invalid_source` | `agent-research` |
|
|
182
|
+
| Risk documentation is stale | `documentation_drift` | `agent-docs` |
|
|
183
|
+
| Risk triggers circuit breaker | `blocker_storm` | `agent-ops` |
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## Failure Policy
|
|
188
|
+
|
|
189
|
+
Block completion when any critical/high risk lacks owner, mitigation, or verification condition.
|
|
190
|
+
Emit `GATE_FAILED` with `failure_type: unquantified_risk` when risk entries resist scoring due to insufficient information — route to `agent-research` for evidence gathering.
|