@latysh-development/monolith 0.0.0-stage → 0.1.0-alpha.1
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/LICENSE +21 -0
- package/README.md +179 -2
- package/dist/brief/cli.d.ts +30 -0
- package/dist/brief/cli.d.ts.map +1 -0
- package/dist/brief/cli.js +85 -0
- package/dist/brief/collect.d.ts +17 -0
- package/dist/brief/collect.d.ts.map +1 -0
- package/dist/brief/collect.js +342 -0
- package/dist/brief/config.d.ts +40 -0
- package/dist/brief/config.d.ts.map +1 -0
- package/dist/brief/config.js +85 -0
- package/dist/brief/constants.d.ts +12 -0
- package/dist/brief/constants.d.ts.map +1 -0
- package/dist/brief/constants.js +11 -0
- package/dist/brief/docs.d.ts +53 -0
- package/dist/brief/docs.d.ts.map +1 -0
- package/dist/brief/docs.js +229 -0
- package/dist/brief/freshness.d.ts +104 -0
- package/dist/brief/freshness.d.ts.map +1 -0
- package/dist/brief/freshness.js +263 -0
- package/dist/brief/git-signals.d.ts +17 -0
- package/dist/brief/git-signals.d.ts.map +1 -0
- package/dist/brief/git-signals.js +101 -0
- package/dist/brief/index.d.ts +11 -0
- package/dist/brief/index.d.ts.map +1 -0
- package/dist/brief/index.js +5 -0
- package/dist/brief/reconcile.d.ts +75 -0
- package/dist/brief/reconcile.d.ts.map +1 -0
- package/dist/brief/reconcile.js +259 -0
- package/dist/brief/render.d.ts +67 -0
- package/dist/brief/render.d.ts.map +1 -0
- package/dist/brief/render.js +458 -0
- package/dist/brief/sanitize.d.ts +38 -0
- package/dist/brief/sanitize.d.ts.map +1 -0
- package/dist/brief/sanitize.js +48 -0
- package/dist/brief/selectors.d.ts +36 -0
- package/dist/brief/selectors.d.ts.map +1 -0
- package/dist/brief/selectors.js +75 -0
- package/dist/brief/story.d.ts +18 -0
- package/dist/brief/story.d.ts.map +1 -0
- package/dist/brief/story.js +59 -0
- package/dist/brief/types.d.ts +126 -0
- package/dist/brief/types.d.ts.map +1 -0
- package/dist/brief/types.js +11 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +199 -0
- package/dist/cli/init-args.d.ts +16 -0
- package/dist/cli/init-args.d.ts.map +1 -0
- package/dist/cli/init-args.js +24 -0
- package/dist/cli/ui-args.d.ts +23 -0
- package/dist/cli/ui-args.d.ts.map +1 -0
- package/dist/cli/ui-args.js +66 -0
- package/dist/cli/ui.d.ts +40 -0
- package/dist/cli/ui.d.ts.map +1 -0
- package/dist/cli/ui.js +180 -0
- package/dist/coordinatorium/checkpoint.d.ts +44 -0
- package/dist/coordinatorium/checkpoint.d.ts.map +1 -0
- package/dist/coordinatorium/checkpoint.js +124 -0
- package/dist/coordinatorium/cli.d.ts +39 -0
- package/dist/coordinatorium/cli.d.ts.map +1 -0
- package/dist/coordinatorium/cli.js +203 -0
- package/dist/coordinatorium/errors.d.ts +112 -0
- package/dist/coordinatorium/errors.d.ts.map +1 -0
- package/dist/coordinatorium/errors.js +145 -0
- package/dist/coordinatorium/index.d.ts +11 -0
- package/dist/coordinatorium/index.d.ts.map +1 -0
- package/dist/coordinatorium/index.js +5 -0
- package/dist/coordinatorium/lock.d.ts +187 -0
- package/dist/coordinatorium/lock.d.ts.map +1 -0
- package/dist/coordinatorium/lock.js +659 -0
- package/dist/coordinatorium/mission.d.ts +32 -0
- package/dist/coordinatorium/mission.d.ts.map +1 -0
- package/dist/coordinatorium/mission.js +87 -0
- package/dist/coordinatorium/state-keeper.d.ts +115 -0
- package/dist/coordinatorium/state-keeper.d.ts.map +1 -0
- package/dist/coordinatorium/state-keeper.js +396 -0
- package/dist/coordinatorium/types.d.ts +69 -0
- package/dist/coordinatorium/types.d.ts.map +1 -0
- package/dist/coordinatorium/types.js +27 -0
- package/dist/discovery/compose.d.ts +28 -0
- package/dist/discovery/compose.d.ts.map +1 -0
- package/dist/discovery/compose.js +159 -0
- package/dist/discovery/contracts.d.ts +211 -0
- package/dist/discovery/contracts.d.ts.map +1 -0
- package/dist/discovery/contracts.js +555 -0
- package/dist/discovery/docs.d.ts +278 -0
- package/dist/discovery/docs.d.ts.map +1 -0
- package/dist/discovery/docs.js +1182 -0
- package/dist/discovery/facts.d.ts +49 -0
- package/dist/discovery/facts.d.ts.map +1 -0
- package/dist/discovery/facts.js +541 -0
- package/dist/discovery/index.d.ts +8 -0
- package/dist/discovery/index.d.ts.map +1 -0
- package/dist/discovery/index.js +9 -0
- package/dist/discovery/orchestrate.d.ts +35 -0
- package/dist/discovery/orchestrate.d.ts.map +1 -0
- package/dist/discovery/orchestrate.js +32 -0
- package/dist/discovery/render.d.ts +36 -0
- package/dist/discovery/render.d.ts.map +1 -0
- package/dist/discovery/render.js +278 -0
- package/dist/discovery/traverse.d.ts +197 -0
- package/dist/discovery/traverse.d.ts.map +1 -0
- package/dist/discovery/traverse.js +510 -0
- package/dist/durable/assess.d.ts +105 -0
- package/dist/durable/assess.d.ts.map +1 -0
- package/dist/durable/assess.js +239 -0
- package/dist/durable/canonical.d.ts +25 -0
- package/dist/durable/canonical.d.ts.map +1 -0
- package/dist/durable/canonical.js +78 -0
- package/dist/durable/cli.d.ts +37 -0
- package/dist/durable/cli.d.ts.map +1 -0
- package/dist/durable/cli.js +141 -0
- package/dist/durable/errors.d.ts +192 -0
- package/dist/durable/errors.d.ts.map +1 -0
- package/dist/durable/errors.js +323 -0
- package/dist/durable/fs-store.d.ts +254 -0
- package/dist/durable/fs-store.d.ts.map +1 -0
- package/dist/durable/fs-store.js +1493 -0
- package/dist/durable/index.d.ts +20 -0
- package/dist/durable/index.d.ts.map +1 -0
- package/dist/durable/index.js +13 -0
- package/dist/durable/log.d.ts +33 -0
- package/dist/durable/log.d.ts.map +1 -0
- package/dist/durable/log.js +157 -0
- package/dist/durable/memory-store.d.ts +51 -0
- package/dist/durable/memory-store.d.ts.map +1 -0
- package/dist/durable/memory-store.js +302 -0
- package/dist/durable/projection.d.ts +35 -0
- package/dist/durable/projection.d.ts.map +1 -0
- package/dist/durable/projection.js +328 -0
- package/dist/durable/prune-check.d.ts +34 -0
- package/dist/durable/prune-check.d.ts.map +1 -0
- package/dist/durable/prune-check.js +72 -0
- package/dist/durable/register.d.ts +100 -0
- package/dist/durable/register.d.ts.map +1 -0
- package/dist/durable/register.js +532 -0
- package/dist/durable/retention.d.ts +49 -0
- package/dist/durable/retention.d.ts.map +1 -0
- package/dist/durable/retention.js +59 -0
- package/dist/durable/runtime.d.ts +499 -0
- package/dist/durable/runtime.d.ts.map +1 -0
- package/dist/durable/runtime.js +1288 -0
- package/dist/durable/seams.d.ts +44 -0
- package/dist/durable/seams.d.ts.map +1 -0
- package/dist/durable/seams.js +21 -0
- package/dist/durable/testing.d.ts +11 -0
- package/dist/durable/testing.d.ts.map +1 -0
- package/dist/durable/testing.js +25 -0
- package/dist/durable/types.d.ts +442 -0
- package/dist/durable/types.d.ts.map +1 -0
- package/dist/durable/types.js +75 -0
- package/dist/graph/builder.d.ts +11 -0
- package/dist/graph/builder.d.ts.map +1 -0
- package/dist/graph/builder.js +153 -0
- package/dist/graph/identity.d.ts +37 -0
- package/dist/graph/identity.d.ts.map +1 -0
- package/dist/graph/identity.js +46 -0
- package/dist/graph/index.d.ts +7 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +3 -0
- package/dist/graph/resolver.d.ts +41 -0
- package/dist/graph/resolver.d.ts.map +1 -0
- package/dist/graph/resolver.js +36 -0
- package/dist/graph/types.d.ts +42 -0
- package/dist/graph/types.d.ts.map +1 -0
- package/dist/graph/types.js +1 -0
- package/dist/http/index.d.ts +5 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +2 -0
- package/dist/http/server.d.ts +76 -0
- package/dist/http/server.d.ts.map +1 -0
- package/dist/http/server.js +195 -0
- package/dist/http/ui-assets.d.ts +22 -0
- package/dist/http/ui-assets.d.ts.map +1 -0
- package/dist/http/ui-assets.js +100 -0
- package/dist/ideas/cli.d.ts +33 -0
- package/dist/ideas/cli.d.ts.map +1 -0
- package/dist/ideas/cli.js +158 -0
- package/dist/ideas/format.d.ts +38 -0
- package/dist/ideas/format.d.ts.map +1 -0
- package/dist/ideas/format.js +194 -0
- package/dist/ideas/index.d.ts +6 -0
- package/dist/ideas/index.d.ts.map +1 -0
- package/dist/ideas/index.js +3 -0
- package/dist/ideas/store.d.ts +55 -0
- package/dist/ideas/store.d.ts.map +1 -0
- package/dist/ideas/store.js +262 -0
- package/dist/ideas/types.d.ts +54 -0
- package/dist/ideas/types.d.ts.map +1 -0
- package/dist/ideas/types.js +26 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/init/index.d.ts +12 -0
- package/dist/init/index.d.ts.map +1 -0
- package/dist/init/index.js +90 -0
- package/dist/init/prompts.d.ts +3 -0
- package/dist/init/prompts.d.ts.map +1 -0
- package/dist/init/prompts.js +47 -0
- package/dist/init/scaffold.d.ts +29 -0
- package/dist/init/scaffold.d.ts.map +1 -0
- package/dist/init/scaffold.js +208 -0
- package/dist/init/types.d.ts +14 -0
- package/dist/init/types.d.ts.map +1 -0
- package/dist/init/types.js +1 -0
- package/dist/managed/index.d.ts +73 -0
- package/dist/managed/index.d.ts.map +1 -0
- package/dist/managed/index.js +222 -0
- package/dist/readmodel/dashboard.d.ts +40 -0
- package/dist/readmodel/dashboard.d.ts.map +1 -0
- package/dist/readmodel/dashboard.js +236 -0
- package/dist/readmodel/index.d.ts +3 -0
- package/dist/readmodel/index.d.ts.map +1 -0
- package/dist/readmodel/index.js +1 -0
- package/dist/readmodel/types.d.ts +104 -0
- package/dist/readmodel/types.d.ts.map +1 -0
- package/dist/readmodel/types.js +15 -0
- package/dist/root/index.d.ts +186 -0
- package/dist/root/index.d.ts.map +1 -0
- package/dist/root/index.js +430 -0
- package/dist/root/safe-write.d.ts +268 -0
- package/dist/root/safe-write.d.ts.map +1 -0
- package/dist/root/safe-write.js +966 -0
- package/dist/root/write-artifacts.d.ts +20 -0
- package/dist/root/write-artifacts.d.ts.map +1 -0
- package/dist/root/write-artifacts.js +42 -0
- package/dist/scriptorium/compile.d.ts +4 -0
- package/dist/scriptorium/compile.d.ts.map +1 -0
- package/dist/scriptorium/compile.js +185 -0
- package/dist/scriptorium/frontmatter.d.ts +13 -0
- package/dist/scriptorium/frontmatter.d.ts.map +1 -0
- package/dist/scriptorium/frontmatter.js +90 -0
- package/dist/scriptorium/index.d.ts +3 -0
- package/dist/scriptorium/index.d.ts.map +1 -0
- package/dist/scriptorium/index.js +1 -0
- package/dist/scriptorium/markdown.d.ts +31 -0
- package/dist/scriptorium/markdown.d.ts.map +1 -0
- package/dist/scriptorium/markdown.js +88 -0
- package/dist/scriptorium/types.d.ts +78 -0
- package/dist/scriptorium/types.d.ts.map +1 -0
- package/dist/scriptorium/types.js +1 -0
- package/dist/types/enforcement.d.ts +11 -0
- package/dist/types/enforcement.d.ts.map +1 -0
- package/dist/types/enforcement.js +1 -0
- package/dist/types/integrity.d.ts +33 -0
- package/dist/types/integrity.d.ts.map +1 -0
- package/dist/types/integrity.js +1 -0
- package/dist/types/project-definition.d.ts +30 -0
- package/dist/types/project-definition.d.ts.map +1 -0
- package/dist/types/project-definition.js +1 -0
- package/dist/ui/assets/cosmic-glass-bg-Dwx47zPu.webp +0 -0
- package/dist/ui/assets/index-C4NhMaq7.js +28 -0
- package/dist/ui/assets/index-DMZ7ZvZY.css +1 -0
- package/dist/ui/index.html +13 -0
- package/dist/update/cli.d.ts +8 -0
- package/dist/update/cli.d.ts.map +1 -0
- package/dist/update/cli.js +115 -0
- package/dist/update/index.d.ts +78 -0
- package/dist/update/index.d.ts.map +1 -0
- package/dist/update/index.js +285 -0
- package/dist/validate/index.d.ts +6 -0
- package/dist/validate/index.d.ts.map +1 -0
- package/dist/validate/index.js +214 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +1 -0
- package/package.json +67 -4
- package/templates/.gitkeep +0 -0
- package/templates/default-instance/instruction/.cursorrules +59 -0
- package/templates/default-instance/instruction/.windsurfrules +59 -0
- package/templates/default-instance/instruction/CLAUDE.md +57 -0
- package/templates/default-instance/managed/agent.md +20 -0
- package/templates/default-instance/managed/bootstrap.md +7 -0
- package/templates/default-instance/managed/index-idea.md +5 -0
- package/templates/default-instance/managed/routing-idea.md +14 -0
- package/templates/default-instance/monolith/AGENT.md +1 -0
- package/templates/default-instance/monolith/context/boot/HANDOFF.md +49 -0
- package/templates/default-instance/monolith/context/boot/WORK_SESSION.md +30 -0
- package/templates/default-instance/monolith/context/execution/current-state.md +30 -0
- package/templates/default-instance/monolith/context/maps/dependency-map.md +38 -0
- package/templates/default-instance/monolith/context/maps/project-map.md +85 -0
- package/templates/default-instance/monolith/context/maps/roadmap-index.md +41 -0
- package/templates/default-instance/monolith/context/maps/routing-map.md +151 -0
- package/templates/default-instance/monolith/context/maps/semantic-map.md +75 -0
- package/templates/default-instance/monolith/context/models/model-registry.md +37 -0
- package/templates/default-instance/monolith/context/models/privacy-classification.md +35 -0
- package/templates/default-instance/monolith/context/templates/plan-template.md +56 -0
- package/templates/default-instance/monolith/governance/README.md +29 -0
- package/templates/default-instance/monolith/governance/RULE_SCHEMA.md +58 -0
- package/templates/default-instance/monolith/learning/INDEX.md +48 -0
- package/templates/default-instance/monolith/learning/injection-map.md +49 -0
- package/templates/default-instance/monolith/learning/taxonomy.md +30 -0
- package/templates/default-instance/monolith/memory/errors/README.md +26 -0
- package/templates/default-instance/monolith/memory/errors/SCHEMA.md +47 -0
- package/templates/default-instance/monolith/memory/errors/TAXONOMY.md +27 -0
- package/templates/default-instance/monolith/memory/long-term/architecture-principles.md +31 -0
- package/templates/default-instance/monolith/memory/long-term/decisions.md +36 -0
- package/templates/default-instance/monolith/memory/long-term/execution-history.md +20 -0
- package/templates/default-instance/monolith/memory/long-term/tech-debt.md +25 -0
- package/templates/default-instance/monolith/memory/working/active.md +41 -0
- package/templates/default-instance/monolith/memory/working/governance-result.md +0 -0
- package/templates/default-instance/monolith/memory/working/integrity-result.md +0 -0
- package/templates/default-instance/monolith/memory/working/story-index.md +28 -0
- package/templates/default-instance/monolith/protocols/boot/boot-sequence.md +59 -0
- package/templates/default-instance/monolith/protocols/cognition/cognitive-modes.md +90 -0
- package/templates/default-instance/monolith/protocols/cognition/dry-run.md +56 -0
- package/templates/default-instance/monolith/protocols/cognition/execution-trace-format.md +52 -0
- package/templates/default-instance/monolith/protocols/cognition/semantic-planning.md +51 -0
- package/templates/default-instance/monolith/protocols/execution/hybrid-execution.md +37 -0
- package/templates/default-instance/monolith/protocols/execution/local-llm-governance.md +42 -0
- package/templates/default-instance/monolith/protocols/governance/command-policy.md +51 -0
- package/templates/default-instance/monolith/protocols/governance/core-invariants.md +40 -0
- package/templates/default-instance/monolith/protocols/governance/memory-governance.md +54 -0
- package/templates/default-instance/monolith/protocols/governance/metadata-schema.md +62 -0
- package/templates/default-instance/monolith/protocols/governance/skills.md +53 -0
- package/templates/default-instance/monolith/protocols/governance/work-session.md +46 -0
- package/templates/default-instance/monolith/skills/INDEX.md +32 -0
- package/templates/default-instance/monolith/skills/current-status/SKILL.md +47 -0
- package/templates/default-instance/monolith/skills/finalize-story/SKILL.md +86 -0
- package/templates/default-instance/monolith/skills/global-status/SKILL.md +56 -0
- package/templates/default-instance/monolith/skills/idea-capture/SKILL.md +157 -0
- package/templates/default-instance/monolith/skills/self-improvement/SKILL.md +77 -0
- package/templates/default-instance/monolith/state.json +11 -0
- package/templates/default-instance/monolith/tests/INDEX.md +57 -0
- package/templates/default-instance/monolith/tests/scenarios/architecture-review.md +32 -0
- package/templates/default-instance/monolith/tests/scenarios/debug-failure.md +32 -0
- package/templates/default-instance/monolith/tests/scenarios/dry-run-activation.md +33 -0
- package/templates/default-instance/monolith/tests/scenarios/execution-trace-verification.md +31 -0
- package/templates/default-instance/monolith/tests/scenarios/finalize-story.md +35 -0
- package/templates/default-instance/monolith/tests/scenarios/implement-feature.md +36 -0
- package/templates/default-instance/monolith/tests/scenarios/local-llm-delegation.md +31 -0
- package/templates/default-instance/monolith/tests/scenarios/planning-request.md +32 -0
- package/templates/default-instance/monolith/tests/scenarios/sensitive-context-task.md +30 -0
- package/templates/default-instance/monolith/tests/scenarios/validator-verification.md +33 -0
- package/templates/default-instance/monolith/tests/validation/expected-behavior.md +70 -0
- package/templates/default-instance/monolith/tests/validators/INDEX.md +17 -0
- package/templates/default-instance/monolith/tests/validators/delegation-semantics.md +22 -0
- package/templates/default-instance/monolith/tests/validators/mode-consistency.md +25 -0
- package/templates/default-instance/monolith/tests/validators/privacy-routing.md +23 -0
- package/templates/default-instance/monolith/tests/validators/protocol-references.md +27 -0
- package/templates/default-instance/monolith/tests/validators/routing-integrity.md +30 -0
- package/templates/default-instance/projectroot/AGENTS.md +111 -0
- package/templates/default-instance/projectroot/monolith.config.json +32 -0
- package/templates/default-instance/projectroot/project.definition.mjs.template +41 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-boot-sequence
|
|
4
|
+
category: governance
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
applies_to:
|
|
8
|
+
- all
|
|
9
|
+
topology_role: node
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# AI Assistant Boot Sequence
|
|
13
|
+
|
|
14
|
+
Required context recovery order for any AI assistant entering this repository.
|
|
15
|
+
|
|
16
|
+
Follow this sequence STRICTLY.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# Fast Recovery Mode (Preferred)
|
|
21
|
+
|
|
22
|
+
For quick session recovery, read in order:
|
|
23
|
+
|
|
24
|
+
1. `AGENTS.md`
|
|
25
|
+
2. `{{MONOLITH_ROOT}}/context/maps/project-map.md`
|
|
26
|
+
3. `{{MONOLITH_ROOT}}/context/maps/routing-map.md` — classify task type
|
|
27
|
+
4. `{{MONOLITH_ROOT}}/memory/working/active.md`
|
|
28
|
+
5. `{{MONOLITH_ROOT}}/context/maps/roadmap-index.md`
|
|
29
|
+
6. `{{MONOLITH_ROOT}}/protocols/governance/memory-governance.md`
|
|
30
|
+
7. Relevant skill from `{{MONOLITH_ROOT}}/skills/` (resolved via routing-map Table 2)
|
|
31
|
+
8. `{{MONOLITH_ROOT}}/learning/injection-map.md` — load relevant lesson categories
|
|
32
|
+
9. `{{MONOLITH_ROOT}}/protocols/cognition/cognitive-modes.md` — apply behavioral constraints
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
# Full Recovery Mode
|
|
37
|
+
|
|
38
|
+
When context is lost or session is starting cold:
|
|
39
|
+
|
|
40
|
+
1. Read AGENTS.md
|
|
41
|
+
2. Read `{{MONOLITH_ROOT}}/context/maps/project-map.md`
|
|
42
|
+
3. Read `{{MONOLITH_ROOT}}/context/maps/routing-map.md`
|
|
43
|
+
4. Read `{{MONOLITH_ROOT}}/memory/working/active.md`
|
|
44
|
+
5. Read `{{MONOLITH_ROOT}}/context/maps/roadmap-index.md`
|
|
45
|
+
6. Read `{{MONOLITH_ROOT}}/context/boot/HANDOFF.md` — session transfer
|
|
46
|
+
7. Read `{{MONOLITH_ROOT}}/context/execution/current-state.md`
|
|
47
|
+
8. Read `{{MONOLITH_ROOT}}/protocols/governance/memory-governance.md`
|
|
48
|
+
9. Read `{{MONOLITH_ROOT}}/protocols/governance/core-invariants.md`
|
|
49
|
+
10. Load skill from `{{MONOLITH_ROOT}}/skills/` per routing-map
|
|
50
|
+
11. Load learning lessons per `{{MONOLITH_ROOT}}/learning/injection-map.md`
|
|
51
|
+
12. Apply `{{MONOLITH_ROOT}}/protocols/cognition/cognitive-modes.md`
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
# Rules
|
|
56
|
+
|
|
57
|
+
- Do NOT start any task before completing the boot sequence.
|
|
58
|
+
- Do NOT skip steps 3, 4, 8, 9 under any circumstances.
|
|
59
|
+
- One story at a time. Verify active.md before accepting new work.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-cognitive-modes
|
|
4
|
+
category: governance
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
applies_to:
|
|
8
|
+
- all
|
|
9
|
+
topology_role: node
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Cognitive Modes Protocol
|
|
13
|
+
|
|
14
|
+
7 named modes that govern AI behavioral posture.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Core Principle
|
|
19
|
+
|
|
20
|
+
Every task begins with a declared cognitive mode. The mode defines what is allowed, what is forbidden, and what mutations are permitted.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
### exploration
|
|
25
|
+
|
|
26
|
+
**Activation triggers:** exploration-request, status-check, global-overview, ambiguous task
|
|
27
|
+
|
|
28
|
+
**Allowed:** read files, ask clarifying questions, summarize, map relationships
|
|
29
|
+
**Forbidden:** write code, modify files, create new files, make decisions
|
|
30
|
+
**Mutations:** none
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### planning
|
|
35
|
+
|
|
36
|
+
**Activation triggers:** planning-request, architecture-review when no code change yet
|
|
37
|
+
|
|
38
|
+
**Allowed:** read files, create plan documents in context/templates/, propose approaches
|
|
39
|
+
**Forbidden:** implement without user approval, modify source code
|
|
40
|
+
**Mutations:** context/templates/ only
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### implementation
|
|
45
|
+
|
|
46
|
+
**Activation triggers:** implementation-task, new-feature, documentation-update
|
|
47
|
+
|
|
48
|
+
**Allowed:** read and write source files, create tests, update memory
|
|
49
|
+
**Forbidden:** autonomous capability expansion, hidden state, silent semantic degradation
|
|
50
|
+
**Mutations:** source files, tests, memory/working/
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
### debugging
|
|
55
|
+
|
|
56
|
+
**Activation triggers:** bug-investigation
|
|
57
|
+
|
|
58
|
+
**Allowed:** read all files, add diagnostic logging, propose and apply fixes
|
|
59
|
+
**Forbidden:** refactor unrelated code while debugging, change architecture without user approval
|
|
60
|
+
**Mutations:** source files (targeted fixes only)
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### review
|
|
65
|
+
|
|
66
|
+
**Activation triggers:** code-review, architecture-review
|
|
67
|
+
|
|
68
|
+
**Allowed:** read all files, write review comments, propose changes
|
|
69
|
+
**Forbidden:** apply changes without user approval
|
|
70
|
+
**Mutations:** none (propose only)
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
### finalization
|
|
75
|
+
|
|
76
|
+
**Activation triggers:** finalize-story, story-transition
|
|
77
|
+
|
|
78
|
+
**Allowed:** verify integrity, update memory, write capsule, update execution-history
|
|
79
|
+
**Forbidden:** add new features, modify source code logic
|
|
80
|
+
**Mutations:** memory/ only (working and long-term)
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### reflection
|
|
85
|
+
|
|
86
|
+
**Activation triggers:** self-improvement, learning-update
|
|
87
|
+
|
|
88
|
+
**Allowed:** read error records, extract lessons, write to learning/mistakes/
|
|
89
|
+
**Forbidden:** modify source code, apply fixes (that's debugging mode)
|
|
90
|
+
**Mutations:** learning/mistakes/ only
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-dry-run
|
|
4
|
+
category: cognition
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: conditional
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Cognitive Dry-Run Protocol
|
|
10
|
+
|
|
11
|
+
When to activate dry-run mode and how to execute it.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Activation
|
|
16
|
+
|
|
17
|
+
Activate dry-run when:
|
|
18
|
+
|
|
19
|
+
- Task involves irreversible operations (delete, deploy, drop database)
|
|
20
|
+
- Task scope is unclear
|
|
21
|
+
- Task may affect shared/production systems
|
|
22
|
+
- User explicitly requests dry-run
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Severity Levels
|
|
27
|
+
|
|
28
|
+
| Level | Description | Action |
|
|
29
|
+
| ---------- | ------------------------------------ | ------------------------- |
|
|
30
|
+
| `safe` | Read-only or easily reversible | Proceed |
|
|
31
|
+
| `caution` | Reversible but significant | Confirm with user |
|
|
32
|
+
| `warning` | Hard to reverse | Show dry-run output first |
|
|
33
|
+
| `critical` | Irreversible or production-affecting | Require explicit approval |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Dry-Run Format
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
DRY RUN — What would happen:
|
|
41
|
+
|
|
42
|
+
1. [ACTION] file.ts — description of change
|
|
43
|
+
2. [CREATE] new-file.ts — what would be created
|
|
44
|
+
3. [DELETE] old-file.ts — what would be deleted
|
|
45
|
+
|
|
46
|
+
Severity: warning
|
|
47
|
+
Proceed? (yes / no)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Rules
|
|
53
|
+
|
|
54
|
+
- Never execute critical operations without dry-run first
|
|
55
|
+
- Never skip dry-run because "it's obvious"
|
|
56
|
+
- Dry-run output must list ALL side effects
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-execution-trace-format
|
|
4
|
+
category: cognition
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Execution Trace Format
|
|
10
|
+
|
|
11
|
+
Standard format for execution traces written to `memory/execution/traces/`.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## File Naming
|
|
16
|
+
|
|
17
|
+
`YYYYMMDD-HHMMSS-<story-id>-<phase>.json`
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Schema
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"traceId": "uuid",
|
|
26
|
+
"timestamp": "ISO 8601",
|
|
27
|
+
"protocolId": "finalize-story",
|
|
28
|
+
"storyId": "story-1-1-name",
|
|
29
|
+
"phaseId": "phase-1-name",
|
|
30
|
+
"steps": [
|
|
31
|
+
{
|
|
32
|
+
"stepId": "step-1",
|
|
33
|
+
"description": "What was done",
|
|
34
|
+
"status": "PASS | FAIL | WARN | SKIP",
|
|
35
|
+
"duration_ms": 0,
|
|
36
|
+
"output": "optional output summary"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"result": {
|
|
40
|
+
"status": "PASS | FAIL | WARN",
|
|
41
|
+
"summary": "One-line summary"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Rules
|
|
49
|
+
|
|
50
|
+
- Traces are append-only — never modify existing trace files
|
|
51
|
+
- One trace per protocol execution
|
|
52
|
+
- Failed traces must include error details in the step output
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-semantic-planning
|
|
4
|
+
category: cognition
|
|
5
|
+
scope: planning
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
applies_to:
|
|
8
|
+
- planning-request
|
|
9
|
+
- architecture-review
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Semantic Planning Protocol
|
|
13
|
+
|
|
14
|
+
How to conduct planning tasks in MONOLITH.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## When to Activate
|
|
19
|
+
|
|
20
|
+
- Task type is `planning-request`
|
|
21
|
+
- A new story requires upfront design
|
|
22
|
+
- Architecture review before implementation
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Steps
|
|
27
|
+
|
|
28
|
+
1. **Read context** — Read routing-map, active.md, roadmap-index
|
|
29
|
+
2. **Clarify objective** — One sentence: what does this plan achieve?
|
|
30
|
+
3. **Identify constraints** — What must NOT change?
|
|
31
|
+
4. **Propose approach** — 3-5 numbered steps, each actionable
|
|
32
|
+
5. **List affected files** — Specific paths, not "the codebase"
|
|
33
|
+
6. **Surface risks** — What could go wrong?
|
|
34
|
+
7. **Define done** — Measurable completion criteria
|
|
35
|
+
8. **Get user approval** — Do NOT implement without explicit "proceed"
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Output
|
|
40
|
+
|
|
41
|
+
Use `context/templates/plan-template.md` as the document format.
|
|
42
|
+
|
|
43
|
+
Store plan in `context/templates/` with a descriptive filename.
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Rules
|
|
48
|
+
|
|
49
|
+
- No implementation during planning mode
|
|
50
|
+
- Plans must be approved before any file is modified
|
|
51
|
+
- If scope changes during planning, restart from step 2
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-hybrid-execution
|
|
4
|
+
category: execution
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Hybrid Execution Protocol
|
|
10
|
+
|
|
11
|
+
Governance for hybrid local/cloud AI execution model.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Model Tiers
|
|
16
|
+
|
|
17
|
+
| Tier | When | Model |
|
|
18
|
+
| --------------- | ----------------------------------- | ------------------------ |
|
|
19
|
+
| cloud (default) | Public/internal data, general tasks | Default AI tool |
|
|
20
|
+
| local | Sensitive/restricted data | Local LLM (if available) |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Routing Decision
|
|
25
|
+
|
|
26
|
+
1. Classify context data using `context/models/privacy-classification.md`
|
|
27
|
+
2. If any data is `sensitive` or `restricted` → switch to local tier
|
|
28
|
+
3. If local model unavailable → pause and alert user
|
|
29
|
+
4. If data is `public` or `internal` → use default cloud model
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Rules
|
|
34
|
+
|
|
35
|
+
- Never send `sensitive` or `restricted` data to cloud models
|
|
36
|
+
- Always check privacy classification before starting a task with external data
|
|
37
|
+
- If in doubt, ask user to classify before proceeding
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-local-llm-governance
|
|
4
|
+
category: execution
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: conditional
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Local LLM Governance
|
|
10
|
+
|
|
11
|
+
Rules for AI operations using local LLM models.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## When Local Model is Required
|
|
16
|
+
|
|
17
|
+
- Context contains `sensitive` or `restricted` data (per privacy-classification.md)
|
|
18
|
+
- User explicitly requests local execution
|
|
19
|
+
- Compliance requirements mandate on-premise processing
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
1. **Capability check** — Verify local model is available before routing
|
|
26
|
+
2. **Fallback** — If local model unavailable: pause task, alert user, do not fall back to cloud for sensitive data
|
|
27
|
+
3. **Quality gate** — Local models may have lower capability; flag to user if confidence is low
|
|
28
|
+
4. **Audit** — Log all local model executions in execution traces
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Local Model Setup
|
|
33
|
+
|
|
34
|
+
Configure local model path in `monolith.config.json`:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"models": {
|
|
39
|
+
"local": "ollama://llama3.2"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-command-policy
|
|
4
|
+
category: governance
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Command Policy
|
|
10
|
+
|
|
11
|
+
What commands the AI assistant may execute without confirmation, with confirmation, and never.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Execute Without Confirmation
|
|
16
|
+
|
|
17
|
+
- `git status`, `git log`, `git diff` (read-only)
|
|
18
|
+
- `cat`, `ls`, `find`, `grep` (read-only)
|
|
19
|
+
- Build commands: `tsc`, `pnpm build`, `npm run build`
|
|
20
|
+
- Lint: `eslint`, `prettier`
|
|
21
|
+
- Test: `pnpm test`, `npm test`
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Execute With User Confirmation
|
|
26
|
+
|
|
27
|
+
- `git commit`, `git push`
|
|
28
|
+
- `git reset`, `git checkout`
|
|
29
|
+
- File creation in source directories
|
|
30
|
+
- `npm install`, `pnpm add`
|
|
31
|
+
- Any command that modifies shared state
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Never Execute Without Explicit Instruction
|
|
36
|
+
|
|
37
|
+
- `rm -rf`, `git clean -f`, `git reset --hard`
|
|
38
|
+
- Database migrations on production
|
|
39
|
+
- Deploy to production
|
|
40
|
+
- Publish to npm
|
|
41
|
+
- Delete branches
|
|
42
|
+
- Force push
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Rules
|
|
47
|
+
|
|
48
|
+
1. When in doubt: ask, don't act
|
|
49
|
+
2. Destructive operations: always show dry-run first
|
|
50
|
+
3. Production-affecting operations: require explicit written confirmation
|
|
51
|
+
4. Never bypass safety hooks (--no-verify, --force) without explicit instruction
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-core-invariants
|
|
4
|
+
category: governance
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
trigger: always_on
|
|
8
|
+
applies_to:
|
|
9
|
+
- all
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Core Invariants
|
|
13
|
+
|
|
14
|
+
Always-on operational invariants. Applied to every task regardless of cognitive mode.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Universal Invariants
|
|
19
|
+
|
|
20
|
+
These never change.
|
|
21
|
+
|
|
22
|
+
1. **One story at a time** — Never start a new story without finishing or explicitly pausing the current one.
|
|
23
|
+
2. **Vertical slice first** — Implement features end-to-end before expanding scope.
|
|
24
|
+
3. **No autonomous capability expansion** — Never add features not explicitly requested.
|
|
25
|
+
4. **No hidden state** — Every decision and state change must be visible and documented.
|
|
26
|
+
5. **Memory before code** — Read active.md before writing any code.
|
|
27
|
+
6. **Integrity before report** — Run integrity verification before claiming a story done.
|
|
28
|
+
7. **No silent semantic degradation** — If meaning changes, make it explicit.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Current Product Focus
|
|
33
|
+
|
|
34
|
+
<!-- Add project-specific invariants and current focus here. -->
|
|
35
|
+
<!-- This section is filled by the user after init. -->
|
|
36
|
+
|
|
37
|
+
<!-- Example: -->
|
|
38
|
+
<!-- - We are building a data pipeline MVP. No UI work until pipeline is stable. -->
|
|
39
|
+
<!-- - TypeScript strict mode everywhere. No `any` without justification. -->
|
|
40
|
+
<!-- - All new endpoints must have integration tests. -->
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-memory-governance
|
|
4
|
+
category: governance
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
applies_to:
|
|
8
|
+
- memory
|
|
9
|
+
- stories
|
|
10
|
+
- skills
|
|
11
|
+
topology_role: node
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Memory Governance
|
|
15
|
+
|
|
16
|
+
Rules for creating, updating, migrating, and deprecating memory.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Core Rules
|
|
21
|
+
|
|
22
|
+
### 1. Avoid Monolithic Context Files
|
|
23
|
+
|
|
24
|
+
Do not expand a single large file indefinitely. Prefer:
|
|
25
|
+
|
|
26
|
+
- phase memory (per-phase capsules)
|
|
27
|
+
- story capsules (per-story records)
|
|
28
|
+
- indexed references (pointers, not content duplication)
|
|
29
|
+
- modular memory (separate files per domain)
|
|
30
|
+
|
|
31
|
+
### 2. Separate Stable vs Volatile Memory
|
|
32
|
+
|
|
33
|
+
| Type | Location | Update Frequency |
|
|
34
|
+
| -------------------- | -------------------- | ----------------------- |
|
|
35
|
+
| Volatile (per-story) | `memory/working/` | Every story |
|
|
36
|
+
| Stable (cross-story) | `memory/long-term/` | On significant decision |
|
|
37
|
+
| Error records | `memory/errors/` | On failure |
|
|
38
|
+
| Lessons | `learning/mistakes/` | On self-improvement |
|
|
39
|
+
|
|
40
|
+
### 3. Single Source of Truth
|
|
41
|
+
|
|
42
|
+
Each fact has exactly one authoritative location. Reference, don't duplicate.
|
|
43
|
+
|
|
44
|
+
### 4. Append-Only History
|
|
45
|
+
|
|
46
|
+
`memory/long-term/execution-history.md` is append-only. Never edit past entries.
|
|
47
|
+
|
|
48
|
+
### 5. Story Context Required
|
|
49
|
+
|
|
50
|
+
All `memory/working/` updates must reference the active story ID.
|
|
51
|
+
|
|
52
|
+
### 6. Integrity Before Report
|
|
53
|
+
|
|
54
|
+
`memory/working/integrity-result.md` must be updated before finalizing a story.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-metadata-schema
|
|
4
|
+
category: governance
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Metadata Schema
|
|
10
|
+
|
|
11
|
+
YAML frontmatter schema for all MONOLITH artifacts.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Required Fields
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
---
|
|
19
|
+
type: memory | context | protocol | skill | schema | reference | template
|
|
20
|
+
id: unique-kebab-case-id
|
|
21
|
+
---
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Optional Fields
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
---
|
|
30
|
+
category: working | long-term | errors | execution | boot | governance | cognition
|
|
31
|
+
stability: volatile | stable | permanent
|
|
32
|
+
authority: authoritative | derived | reference
|
|
33
|
+
topology_role: root | node | leaf
|
|
34
|
+
enforcement: mandatory | conditional | optional
|
|
35
|
+
scope: system | project | story
|
|
36
|
+
applies_to:
|
|
37
|
+
- task-type-or-all
|
|
38
|
+
related_protocols:
|
|
39
|
+
- protocol-id
|
|
40
|
+
referenced_by:
|
|
41
|
+
- artifact-id
|
|
42
|
+
append_only: true | false
|
|
43
|
+
---
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## topology_role Values
|
|
49
|
+
|
|
50
|
+
| Value | Meaning |
|
|
51
|
+
| ------ | -------------------------------------------- |
|
|
52
|
+
| `root` | Entry point; must exist; read at boot |
|
|
53
|
+
| `node` | Internal; referenced by roots or other nodes |
|
|
54
|
+
| `leaf` | Terminal; not referenced by others |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Rules
|
|
59
|
+
|
|
60
|
+
- Every artifact must have `type` and `id`
|
|
61
|
+
- `id` must be unique across the instance
|
|
62
|
+
- `topology_role: root` artifacts are verified by the topology validator
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-skills-governance
|
|
4
|
+
category: governance
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skills Governance
|
|
10
|
+
|
|
11
|
+
Rules for AI skills — what they can do and what they cannot.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## What a Skill Is
|
|
16
|
+
|
|
17
|
+
A skill is a declarative procedure file that defines:
|
|
18
|
+
|
|
19
|
+
- when it activates (trigger)
|
|
20
|
+
- what it does (steps)
|
|
21
|
+
- what it produces (outputs)
|
|
22
|
+
- what it must verify (checks)
|
|
23
|
+
|
|
24
|
+
A skill does NOT contain runtime code. It is a specification read by the AI.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Skill Rules
|
|
29
|
+
|
|
30
|
+
1. **Atomic** — A skill runs to completion or not at all. No partial execution.
|
|
31
|
+
2. **Idempotent** — Running a skill twice must not corrupt state.
|
|
32
|
+
3. **Single story** — Skills operate on the active story only.
|
|
33
|
+
4. **Memory first** — Read `memory/working/active.md` before starting any skill.
|
|
34
|
+
5. **Verification required** — Skills that modify memory must verify their output.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Skill Boundaries
|
|
39
|
+
|
|
40
|
+
| Allowed | Forbidden |
|
|
41
|
+
| ------------------------------ | ------------------------------------------------- |
|
|
42
|
+
| Read any file | Delete files outside memory/ |
|
|
43
|
+
| Write to memory/ | Modify source code (except implementation skills) |
|
|
44
|
+
| Create context/templates/ | Push to remote repositories |
|
|
45
|
+
| Call other skills as sub-steps | Call skills recursively |
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Adding a Skill
|
|
50
|
+
|
|
51
|
+
1. Create `skills/<name>/SKILL.md`
|
|
52
|
+
2. Add entry to `skills/INDEX.md`
|
|
53
|
+
3. Add routing entry in `context/maps/routing-map.md` Table 2
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: protocol
|
|
3
|
+
id: protocol-work-session
|
|
4
|
+
category: governance
|
|
5
|
+
scope: system
|
|
6
|
+
enforcement: mandatory
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Work Session Protocol
|
|
10
|
+
|
|
11
|
+
Rules for managing work sessions.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Session Start
|
|
16
|
+
|
|
17
|
+
1. Read `AGENTS.md` and boot sequence
|
|
18
|
+
2. Verify `memory/working/active.md` — is there an active story?
|
|
19
|
+
3. If active story: continue it. If not: ask user what to work on.
|
|
20
|
+
4. Never start new work without knowing the active story.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## During Session
|
|
25
|
+
|
|
26
|
+
1. One story at a time — do not context-switch without explicit user request
|
|
27
|
+
2. Update `context/boot/HANDOFF.md` when pausing mid-story
|
|
28
|
+
3. Record architectural decisions as ADRs (index: `docs/adr/README.md`); log other significant decisions to `memory/long-term/decisions.md`
|
|
29
|
+
4. Create error records in `memory/errors/` when mistakes occur
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Session End
|
|
34
|
+
|
|
35
|
+
1. Update `context/boot/HANDOFF.md` with next step
|
|
36
|
+
2. Update `context/boot/WORK_SESSION.md` with session summary
|
|
37
|
+
3. If story is complete: run finalize-story skill
|
|
38
|
+
4. If story is paused: ensure active.md reflects current state
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
- Never close a session with uncommitted work silently
|
|
45
|
+
- Always leave `HANDOFF.md` in a state that the next session can resume from
|
|
46
|
+
- Story completion requires finalize-story skill, not manual documentation only
|