@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,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: context
|
|
3
|
+
id: model-registry
|
|
4
|
+
authority: authoritative
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Model Registry
|
|
8
|
+
|
|
9
|
+
Available AI models and their capability tiers for this project.
|
|
10
|
+
|
|
11
|
+
Reference: `context/models/privacy-classification.md`
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Tiers
|
|
16
|
+
|
|
17
|
+
| Tier | Description | Use When |
|
|
18
|
+
| --------- | ------------------------------ | ----------------------------------- |
|
|
19
|
+
| `default` | Cloud model (e.g. Claude Opus) | General tasks, public/internal data |
|
|
20
|
+
| `local` | Local LLM (e.g. Ollama) | Sensitive/restricted data |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Default Model
|
|
25
|
+
|
|
26
|
+
**Tool:** {{AI_TOOL}}
|
|
27
|
+
**Default tier:** cloud
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Privacy Override
|
|
32
|
+
|
|
33
|
+
When context contains `sensitive` or `restricted` data:
|
|
34
|
+
→ Switch to `local` tier if available
|
|
35
|
+
→ Otherwise: proceed with caution and flag to user
|
|
36
|
+
|
|
37
|
+
See: `protocols/execution/hybrid-execution.md`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: context
|
|
3
|
+
id: privacy-classification
|
|
4
|
+
authority: authoritative
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Privacy Classification
|
|
8
|
+
|
|
9
|
+
Data classification levels that determine model tier routing.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Levels
|
|
14
|
+
|
|
15
|
+
| Level | Examples | Model Tier |
|
|
16
|
+
| ------------ | ------------------------------- | --------------- |
|
|
17
|
+
| `public` | Open source code, public docs | default (cloud) |
|
|
18
|
+
| `internal` | Internal architecture, planning | default (cloud) |
|
|
19
|
+
| `sensitive` | API keys, credentials, PII | local only |
|
|
20
|
+
| `restricted` | Compliance data, secrets | local only |
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Detection Rules
|
|
25
|
+
|
|
26
|
+
Flag as `sensitive` or `restricted` if the context includes:
|
|
27
|
+
|
|
28
|
+
- API keys or tokens
|
|
29
|
+
- Database credentials
|
|
30
|
+
- Personal identifiable information (PII)
|
|
31
|
+
- Payment data
|
|
32
|
+
- Health data
|
|
33
|
+
- Anything marked CONFIDENTIAL
|
|
34
|
+
|
|
35
|
+
When flagged: route to `local` tier, or pause and alert user.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: template
|
|
3
|
+
id: plan-template
|
|
4
|
+
category: templates
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Plan: {{PLAN_TITLE}}
|
|
8
|
+
|
|
9
|
+
**Story:** STORY X.Y — Story Name
|
|
10
|
+
**Date:** YYYY-MM-DD
|
|
11
|
+
**Mode:** planning
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Objective
|
|
16
|
+
|
|
17
|
+
<!-- What does this plan achieve? -->
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Constraints
|
|
22
|
+
|
|
23
|
+
<!-- What must NOT change? What are the boundaries? -->
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Approach
|
|
28
|
+
|
|
29
|
+
<!-- Step-by-step implementation approach. -->
|
|
30
|
+
|
|
31
|
+
1.
|
|
32
|
+
2.
|
|
33
|
+
3.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Files Affected
|
|
38
|
+
|
|
39
|
+
| File | Change Type |
|
|
40
|
+
| ---- | ----------- |
|
|
41
|
+
| | |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Risks
|
|
46
|
+
|
|
47
|
+
<!-- What could go wrong? -->
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Definition of Done
|
|
52
|
+
|
|
53
|
+
<!-- How will we know this is complete? -->
|
|
54
|
+
|
|
55
|
+
- [ ]
|
|
56
|
+
- [ ]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
This directory stores active governance rules for this project.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
governance/
|
|
9
|
+
├── RULE_SCHEMA.md — format for GOV-*.md files
|
|
10
|
+
├── README.md — this file
|
|
11
|
+
└── GOV-*.md — active governance rules (created at runtime)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## What Are Governance Rules?
|
|
15
|
+
|
|
16
|
+
Rules created when repeated failure patterns are detected. They encode project-specific behavioral constraints that the AI assistant must follow.
|
|
17
|
+
|
|
18
|
+
Unlike `protocols/governance/core-invariants.md` (universal rules), GOV-\*.md files are project-specific and evolve with the project.
|
|
19
|
+
|
|
20
|
+
## Lifecycle
|
|
21
|
+
|
|
22
|
+
1. A failure pattern is detected (via self-improvement skill or governance evaluation)
|
|
23
|
+
2. A `GOV-*.md` file is created following `RULE_SCHEMA.md`
|
|
24
|
+
3. The rule is enforced on subsequent sessions via the governance gate
|
|
25
|
+
4. Rules can be superseded or archived when no longer relevant
|
|
26
|
+
|
|
27
|
+
## Governance Evaluation
|
|
28
|
+
|
|
29
|
+
Run `monolith validate` to check for rule violations.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: schema
|
|
3
|
+
id: governance-rule-schema
|
|
4
|
+
authority: authoritative
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Governance Rule Schema
|
|
8
|
+
|
|
9
|
+
Format for governance rules in `governance/GOV-*.md`.
|
|
10
|
+
|
|
11
|
+
## File Naming
|
|
12
|
+
|
|
13
|
+
`GOV-YYYY-XXXX.md` where YYYY = year, XXXX = sequential ID.
|
|
14
|
+
|
|
15
|
+
## Fields
|
|
16
|
+
|
|
17
|
+
```yaml
|
|
18
|
+
---
|
|
19
|
+
id: GOV-YYYY-XXXX
|
|
20
|
+
date: YYYY-MM-DD
|
|
21
|
+
trigger: pattern that activates this rule
|
|
22
|
+
severity: critical | high | medium | low
|
|
23
|
+
status: active | superseded | archived
|
|
24
|
+
origin_story: STORY X.Y (optional — which story created this rule)
|
|
25
|
+
---
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Body
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## Rule
|
|
32
|
+
|
|
33
|
+
One-sentence statement of the rule. Must be actionable and unambiguous.
|
|
34
|
+
|
|
35
|
+
## Context
|
|
36
|
+
|
|
37
|
+
Why this rule exists. What failure pattern it prevents.
|
|
38
|
+
|
|
39
|
+
## Pattern
|
|
40
|
+
|
|
41
|
+
The trigger condition: what behavior or situation activates this rule.
|
|
42
|
+
|
|
43
|
+
## Action
|
|
44
|
+
|
|
45
|
+
What to do when the pattern is detected.
|
|
46
|
+
|
|
47
|
+
## Examples
|
|
48
|
+
|
|
49
|
+
Concrete examples of the rule in action.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## When to Create a Rule
|
|
53
|
+
|
|
54
|
+
Create `GOV-*.md` when:
|
|
55
|
+
|
|
56
|
+
- A mistake occurs more than once with the same root cause
|
|
57
|
+
- A boundary violation is detected in governance evaluation
|
|
58
|
+
- A new constraint is established through discussion
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
id: learning-index
|
|
4
|
+
authority: authoritative
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Learning Layer
|
|
8
|
+
|
|
9
|
+
Overview of the MONOLITH learning system for this project.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Capture lessons from mistakes and inject them into future tasks to prevent repetition.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Structure
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
learning/
|
|
23
|
+
├── INDEX.md — this file (navigation overview)
|
|
24
|
+
├── taxonomy.md — 8 error categories
|
|
25
|
+
├── injection-map.md — task type → lesson categories
|
|
26
|
+
└── mistakes/
|
|
27
|
+
├── architecture/ — architectural mistakes
|
|
28
|
+
├── dependencies/ — dependency/import errors
|
|
29
|
+
├── nonexistent-api/ — calling nonexistent methods/APIs
|
|
30
|
+
├── context-sync/ — memory/state sync errors
|
|
31
|
+
├── workflow/ — protocol violations
|
|
32
|
+
├── typescript/ — TypeScript errors
|
|
33
|
+
└── documentation/ — missing or incorrect docs
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## How Lessons Are Injected
|
|
39
|
+
|
|
40
|
+
At boot step 8, the AI reads `learning/injection-map.md` to determine which lesson categories to load based on the current task type.
|
|
41
|
+
|
|
42
|
+
Lessons are searched by filename, tags, and keywords. Matching lessons are prepended to the task context to prevent known mistakes.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## How to Add a Lesson
|
|
47
|
+
|
|
48
|
+
Use the `self-improvement` skill. Or manually create `LESSON-YYYY-XXXX.md` in the appropriate category directory.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
id: learning-injection-map
|
|
4
|
+
authority: authoritative
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Learning Injection Map
|
|
8
|
+
|
|
9
|
+
Maps task types to lesson categories that should be loaded at boot step 8.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Injection Rules
|
|
14
|
+
|
|
15
|
+
| Task Type | Load Lesson Categories |
|
|
16
|
+
| ---------------------- | --------------------------------------------------------- |
|
|
17
|
+
| `implementation-task` | architecture, typescript, dependencies |
|
|
18
|
+
| `new-feature` | architecture, dependencies |
|
|
19
|
+
| `bug-investigation` | architecture, nonexistent-api, context-sync, dependencies |
|
|
20
|
+
| `code-review` | architecture, typescript |
|
|
21
|
+
| `finalize-story` | workflow, architecture |
|
|
22
|
+
| `architecture-review` | architecture |
|
|
23
|
+
| `planning-request` | architecture |
|
|
24
|
+
| `documentation-update` | documentation |
|
|
25
|
+
| `self-improvement` | all categories |
|
|
26
|
+
| `learning-update` | all categories |
|
|
27
|
+
| `status-check` | context-sync |
|
|
28
|
+
| `global-overview` | context-sync |
|
|
29
|
+
| `story-transition` | workflow |
|
|
30
|
+
| `exploration-request` | context-sync |
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Injection Threshold
|
|
35
|
+
|
|
36
|
+
Load lessons if they contain at least one of:
|
|
37
|
+
|
|
38
|
+
- A keyword matching the current task description
|
|
39
|
+
- A tag matching the current task type or cognitive mode
|
|
40
|
+
- A protocol name referenced in the current context
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Custom Injections
|
|
45
|
+
|
|
46
|
+
Add project-specific injection rules at the bottom of this file.
|
|
47
|
+
|
|
48
|
+
<!-- Example: -->
|
|
49
|
+
<!-- | `database-migration` | architecture, context-sync, workflow | -->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
id: learning-taxonomy
|
|
4
|
+
authority: authoritative
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Learning Taxonomy
|
|
8
|
+
|
|
9
|
+
7 canonical categories for organizing lessons and mistakes.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
| Category | Lessons About |
|
|
14
|
+
| ----------------- | ----------------------------------------------------------------------------------- |
|
|
15
|
+
| `architecture` | Structural violations, layer boundary breaches, coupling issues, wrong abstractions |
|
|
16
|
+
| `dependencies` | Missing packages, version conflicts, circular imports, import resolution errors |
|
|
17
|
+
| `nonexistent-api` | Calling functions, methods, endpoints, or properties that do not exist |
|
|
18
|
+
| `context-sync` | Memory state out of sync with actual project state, stale assumptions |
|
|
19
|
+
| `workflow` | Protocol violations, skipped steps, wrong execution order, gate bypass |
|
|
20
|
+
| `typescript` | Type errors, incorrect generics, wrong inference, `any` misuse |
|
|
21
|
+
| `documentation` | Missing docs, stale descriptions, incorrect examples, wrong paths |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
- When creating a lesson with the self-improvement skill, map the mistake to exactly one category
|
|
28
|
+
- When searching for lessons, start with the most specific category
|
|
29
|
+
- Use `context-sync` for "I assumed X but it was actually Y" mistakes
|
|
30
|
+
- Use `nonexistent-api` for "I called X which doesn't exist" mistakes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Error Memory
|
|
2
|
+
|
|
3
|
+
This directory stores failure records for this project.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
memory/errors/
|
|
9
|
+
├── SCHEMA.md — format for ERR-*.md files
|
|
10
|
+
├── TAXONOMY.md — 8 error categories
|
|
11
|
+
└── ERR-*.md — individual error records (created at runtime)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## When to Create a Record
|
|
15
|
+
|
|
16
|
+
Create an `ERR-*.md` file when:
|
|
17
|
+
|
|
18
|
+
- A significant error occurred during implementation
|
|
19
|
+
- A misunderstanding caused wrong behavior
|
|
20
|
+
- A pattern of mistakes was identified
|
|
21
|
+
|
|
22
|
+
## How to Create
|
|
23
|
+
|
|
24
|
+
Use the `self-improvement` skill or manually create `ERR-YYYY-XXXX.md` following `SCHEMA.md`.
|
|
25
|
+
|
|
26
|
+
Lessons extracted from errors live in `learning/mistakes/<category>/`.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: schema
|
|
3
|
+
id: error-schema
|
|
4
|
+
category: errors
|
|
5
|
+
authority: authoritative
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Error Record Schema
|
|
9
|
+
|
|
10
|
+
Schema for error records in `memory/errors/`.
|
|
11
|
+
|
|
12
|
+
## Format
|
|
13
|
+
|
|
14
|
+
Filename: `ERR-YYYY-XXXX.md` where YYYY = year, XXXX = sequential ID.
|
|
15
|
+
|
|
16
|
+
## Fields
|
|
17
|
+
|
|
18
|
+
```yaml
|
|
19
|
+
---
|
|
20
|
+
id: ERR-YYYY-XXXX
|
|
21
|
+
date: YYYY-MM-DD
|
|
22
|
+
category: architecture | dependencies | nonexistent-api | context-sync | workflow | typescript | documentation | other
|
|
23
|
+
severity: critical | high | medium | low
|
|
24
|
+
story: STORY X.Y — Story Name (optional)
|
|
25
|
+
resolved: true | false
|
|
26
|
+
---
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Body
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
## Error Description
|
|
33
|
+
|
|
34
|
+
What went wrong.
|
|
35
|
+
|
|
36
|
+
## Root Cause
|
|
37
|
+
|
|
38
|
+
Why it happened.
|
|
39
|
+
|
|
40
|
+
## Resolution
|
|
41
|
+
|
|
42
|
+
How it was fixed.
|
|
43
|
+
|
|
44
|
+
## Prevention
|
|
45
|
+
|
|
46
|
+
How to avoid in future (becomes a lesson in learning/mistakes/).
|
|
47
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
id: error-taxonomy
|
|
4
|
+
category: errors
|
|
5
|
+
authority: authoritative
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Error Taxonomy
|
|
9
|
+
|
|
10
|
+
8 canonical error categories for MONOLITH projects.
|
|
11
|
+
|
|
12
|
+
| Category | Description |
|
|
13
|
+
| ----------------- | -------------------------------------------------------------- |
|
|
14
|
+
| `architecture` | Structural violations, wrong layer boundaries, coupling issues |
|
|
15
|
+
| `dependencies` | Missing packages, version conflicts, import errors |
|
|
16
|
+
| `nonexistent-api` | Calling functions/methods/endpoints that don't exist |
|
|
17
|
+
| `context-sync` | Memory state out of sync with actual project state |
|
|
18
|
+
| `workflow` | Protocol violations, skipped steps, wrong execution order |
|
|
19
|
+
| `typescript` | Type errors, inference failures, incorrect generics |
|
|
20
|
+
| `documentation` | Missing, stale, or incorrect documentation |
|
|
21
|
+
| `other` | Errors that don't fit the above categories |
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
- Reference when creating `ERR-*.md` records
|
|
26
|
+
- The `category` field must match one of the above exactly
|
|
27
|
+
- Lessons in `learning/mistakes/` are organized by these categories
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: memory
|
|
3
|
+
id: memory-long-term-architecture-principles
|
|
4
|
+
category: long-term
|
|
5
|
+
authority: authoritative
|
|
6
|
+
related_protocols:
|
|
7
|
+
- memory-governance
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Architecture Principles
|
|
11
|
+
|
|
12
|
+
Stable architectural principles for this project. Read before every implementation task.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Principles
|
|
17
|
+
|
|
18
|
+
<!-- Add your core architectural principles here. -->
|
|
19
|
+
<!-- Example: "Vertical slice first. Feature complete before horizontal scale." -->
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Stack Decisions
|
|
24
|
+
|
|
25
|
+
<!-- Key technology choices and the reasoning behind them. -->
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Invariants
|
|
30
|
+
|
|
31
|
+
<!-- Things that must never change without an explicit ADR. -->
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: memory
|
|
3
|
+
id: memory-long-term-decisions
|
|
4
|
+
category: long-term
|
|
5
|
+
authority: authoritative
|
|
6
|
+
related_protocols:
|
|
7
|
+
- memory-governance
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Decisions
|
|
11
|
+
|
|
12
|
+
Project decisions that are **not** ADRs (`DEC-…` records). Architecture Decision Records are not listed or summarised here: if this project keeps ADRs, their only index is `docs/adr/README.md`.
|
|
13
|
+
|
|
14
|
+
Updated by the finalize-story skill when a story records a decision that is not an ADR.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Decision Template
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
### DEC-YYYY-XXXX — Decision Title
|
|
22
|
+
|
|
23
|
+
**Date:** YYYY-MM-DD
|
|
24
|
+
**Story:** STORY X.Y — Story Name
|
|
25
|
+
**Status:** Active | Superseded | Deprecated
|
|
26
|
+
|
|
27
|
+
**Context:** Why this decision was needed.
|
|
28
|
+
**Decision:** What was decided.
|
|
29
|
+
**Consequences:** What changes as a result.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Decisions
|
|
35
|
+
|
|
36
|
+
<!-- Decisions are recorded here as stories are finalized. -->
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: memory
|
|
3
|
+
id: memory-long-term-execution-history
|
|
4
|
+
category: long-term
|
|
5
|
+
authority: authoritative
|
|
6
|
+
append_only: true
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Execution History
|
|
10
|
+
|
|
11
|
+
Append-only log of completed story finalizations.
|
|
12
|
+
|
|
13
|
+
Each entry is written by the finalize-story skill at story completion.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## History
|
|
18
|
+
|
|
19
|
+
<!-- Entries are appended here. Do not edit or delete existing entries. -->
|
|
20
|
+
<!-- Format: ## STORY X.Y — Story Name (YYYY-MM-DD) -->
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: memory
|
|
3
|
+
id: memory-long-term-tech-debt
|
|
4
|
+
category: long-term
|
|
5
|
+
authority: authoritative
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Technical Debt Registry
|
|
9
|
+
|
|
10
|
+
Tracks intentional technical debt to prevent accidental "fixing" of accepted trade-offs.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Open Debt
|
|
15
|
+
|
|
16
|
+
| ID | Description | Accepted | Rationale |
|
|
17
|
+
| --- | ----------- | -------- | --------- |
|
|
18
|
+
| — | — | — | — |
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Accepted Debt
|
|
23
|
+
|
|
24
|
+
<!-- Debt that has been consciously accepted with a known trade-off. -->
|
|
25
|
+
<!-- Do NOT fix accepted debt without explicitly revisiting the decision. -->
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: memory
|
|
3
|
+
id: memory-working-active
|
|
4
|
+
category: working
|
|
5
|
+
stability: volatile
|
|
6
|
+
authority: authoritative
|
|
7
|
+
topology_role: root
|
|
8
|
+
related_protocols:
|
|
9
|
+
- memory-governance
|
|
10
|
+
referenced_by:
|
|
11
|
+
- skill-finalize-story
|
|
12
|
+
- skill-current-status
|
|
13
|
+
- skill-global-status
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Active Working Memory
|
|
17
|
+
|
|
18
|
+
## Active Phase
|
|
19
|
+
|
|
20
|
+
No active phase.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Current Story
|
|
25
|
+
|
|
26
|
+
No active story.
|
|
27
|
+
|
|
28
|
+
Previous: —
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Last Finalization
|
|
33
|
+
|
|
34
|
+
No finalization recorded yet.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Current Operational Focus
|
|
39
|
+
|
|
40
|
+
<!-- Update this section when starting the first phase. -->
|
|
41
|
+
<!-- Describe what the project is building and what is in focus now. -->
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: memory
|
|
3
|
+
id: memory-working-story-index
|
|
4
|
+
category: working
|
|
5
|
+
topology_role: root
|
|
6
|
+
authority: authoritative
|
|
7
|
+
related_protocols:
|
|
8
|
+
- memory-governance
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Story Index
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Fast navigation index for implementation history.
|
|
16
|
+
|
|
17
|
+
Use this when you need to know:
|
|
18
|
+
|
|
19
|
+
- where a feature was implemented
|
|
20
|
+
- which story changed a module
|
|
21
|
+
- why a decision was made
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# Stories
|
|
26
|
+
|
|
27
|
+
<!-- Stories are added here as they are finalized via the finalize-story skill. -->
|
|
28
|
+
<!-- Format: ## Phase N — Phase Name / ### STORY X.Y — Story Name -->
|