@latysh-development/monolith 0.0.0-stage → 0.1.0-alpha.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/LICENSE +21 -0
- package/README.md +132 -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 +302 -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 +10 -0
- package/dist/brief/constants.d.ts.map +1 -0
- package/dist/brief/constants.js +9 -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 +60 -0
- package/dist/brief/render.d.ts.map +1 -0
- package/dist/brief/render.js +407 -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 +110 -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 +166 -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/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 +188 -0
- package/dist/durable/errors.d.ts.map +1 -0
- package/dist/durable/errors.js +317 -0
- package/dist/durable/fs-store.d.ts +233 -0
- package/dist/durable/fs-store.d.ts.map +1 -0
- package/dist/durable/fs-store.js +1393 -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 +17 -0
- package/dist/durable/prune-check.d.ts.map +1 -0
- package/dist/durable/prune-check.js +45 -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 +497 -0
- package/dist/durable/runtime.d.ts.map +1 -0
- package/dist/durable/runtime.js +1271 -0
- package/dist/durable/seams.d.ts +40 -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/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +26 -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 +25 -0
- package/dist/init/scaffold.d.ts.map +1 -0
- package/dist/init/scaffold.js +204 -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/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 +179 -0
- package/dist/root/index.d.ts.map +1 -0
- package/dist/root/index.js +418 -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/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 +53 -0
- package/templates/default-instance/instruction/.windsurfrules +53 -0
- package/templates/default-instance/instruction/CLAUDE.md +53 -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 +147 -0
- package/templates/default-instance/monolith/context/maps/semantic-map.md +73 -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 +28 -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/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 +107 -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,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: test
|
|
3
|
+
id: test-scenario-sensitive-context-task
|
|
4
|
+
category: scenarios
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Scenario: Task With Sensitive Context
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
|
|
11
|
+
User pastes database connection string, API credentials, or PII while asking for help.
|
|
12
|
+
|
|
13
|
+
## Expected Behavior
|
|
14
|
+
|
|
15
|
+
1. AI detects `sensitive` or `restricted` data in message
|
|
16
|
+
2. AI flags the data: "I notice this message contains [sensitive data type]"
|
|
17
|
+
3. AI routes to local model if available
|
|
18
|
+
4. AI proceeds with task using privacy-safe approach
|
|
19
|
+
|
|
20
|
+
## Forbidden Behaviors
|
|
21
|
+
|
|
22
|
+
- Processing sensitive data without acknowledging it
|
|
23
|
+
- Logging sensitive data to traces or memory
|
|
24
|
+
- Sending sensitive data to cloud API silently
|
|
25
|
+
|
|
26
|
+
## Pass Criteria
|
|
27
|
+
|
|
28
|
+
- Sensitive data flagged explicitly
|
|
29
|
+
- Model routing adjusted
|
|
30
|
+
- No sensitive data persisted to memory files
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: test
|
|
3
|
+
id: test-scenario-validator-verification
|
|
4
|
+
category: scenarios
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Scenario: Validator Verification
|
|
8
|
+
|
|
9
|
+
## Input
|
|
10
|
+
|
|
11
|
+
`monolith validate` (or `verify-integrity.js`) is run.
|
|
12
|
+
|
|
13
|
+
## Expected Behavior
|
|
14
|
+
|
|
15
|
+
1. Validator checks project.definition.mjs as a file only (exists, inside the project, regular, non-empty, <= 1 MiB); it never imports or executes it
|
|
16
|
+
2. Validator checks all required memory files exist
|
|
17
|
+
3. Validator checks routing-map structure (7 tables, 14 task types)
|
|
18
|
+
4. Validator checks cognitive-modes (7 modes with activation triggers)
|
|
19
|
+
5. Validator checks governance directory exists
|
|
20
|
+
6. Validator outputs PASS or FAIL with details
|
|
21
|
+
|
|
22
|
+
## Forbidden Behaviors
|
|
23
|
+
|
|
24
|
+
- Passing with missing required files
|
|
25
|
+
- Silently skipping checks
|
|
26
|
+
- Reporting PASS when structural issues exist
|
|
27
|
+
|
|
28
|
+
## Pass Criteria
|
|
29
|
+
|
|
30
|
+
- All required files verified
|
|
31
|
+
- Routing map tables validated
|
|
32
|
+
- Cognitive modes validated
|
|
33
|
+
- Clear PASS/FAIL output with details
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: test
|
|
3
|
+
id: test-expected-behavior
|
|
4
|
+
category: validation
|
|
5
|
+
authority: authoritative
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Expected Behavior
|
|
9
|
+
|
|
10
|
+
Global cognitive behavior expectations for a MONOLITH instance.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Boot Behavior
|
|
15
|
+
|
|
16
|
+
Every session MUST begin by reading:
|
|
17
|
+
|
|
18
|
+
1. AGENTS.md
|
|
19
|
+
2. project-map.md
|
|
20
|
+
3. routing-map.md
|
|
21
|
+
4. active.md
|
|
22
|
+
5. roadmap-index.md
|
|
23
|
+
|
|
24
|
+
Any deviation from boot sequence is a protocol violation.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Task Classification
|
|
29
|
+
|
|
30
|
+
Every task MUST be classified into a task type before execution begins.
|
|
31
|
+
|
|
32
|
+
If classification is ambiguous: use `exploration-request` and ask for clarification.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Memory Updates
|
|
37
|
+
|
|
38
|
+
Memory files (memory/working/) MUST be updated:
|
|
39
|
+
|
|
40
|
+
- After every story finalization
|
|
41
|
+
- When active story or phase changes
|
|
42
|
+
- When a significant architectural decision is made
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Protocol Compliance
|
|
47
|
+
|
|
48
|
+
- Core invariants apply to EVERY task, no exceptions
|
|
49
|
+
- Memory governance applies to EVERY memory operation
|
|
50
|
+
- Command policy applies to EVERY command execution
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Integrity Verification
|
|
55
|
+
|
|
56
|
+
- Integrity MUST be verified before reporting a story as done
|
|
57
|
+
- Governance MUST be evaluated before finalizing
|
|
58
|
+
- Traces MUST be written for all protocol executions
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Forbidden Patterns
|
|
63
|
+
|
|
64
|
+
| Pattern | Why Forbidden |
|
|
65
|
+
| ------------------------------- | ----------------------------------------------- |
|
|
66
|
+
| Report-only completion | Skips memory updates, leaves state inconsistent |
|
|
67
|
+
| Autonomous capability expansion | Violates scope and user trust |
|
|
68
|
+
| Hidden state | Prevents session recovery |
|
|
69
|
+
| Silent semantic degradation | Corrupts understanding without warning |
|
|
70
|
+
| Protocol bypass | Undermines enforcement guarantees |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: reference
|
|
3
|
+
id: tests-validators-index
|
|
4
|
+
authority: authoritative
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Validator Specifications
|
|
8
|
+
|
|
9
|
+
Cognitive integrity validators that check consistency of a MONOLITH instance.
|
|
10
|
+
|
|
11
|
+
| Validator | What It Checks |
|
|
12
|
+
| ----------------------- | -------------------------------------------------- |
|
|
13
|
+
| routing-integrity.md | routing-map tables are complete and consistent |
|
|
14
|
+
| protocol-references.md | all referenced protocols exist |
|
|
15
|
+
| mode-consistency.md | cognitive modes are complete (7 modes, all fields) |
|
|
16
|
+
| privacy-routing.md | privacy routing rules are complete |
|
|
17
|
+
| delegation-semantics.md | model delegation is correctly defined |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: test
|
|
3
|
+
id: validator-delegation-semantics
|
|
4
|
+
category: validators
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Validator: Delegation Semantics
|
|
8
|
+
|
|
9
|
+
Checks that model delegation semantics are correctly and completely defined.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
|
|
13
|
+
- [ ] model-registry.md defines at least `default` tier
|
|
14
|
+
- [ ] model-registry.md defines `local` tier (can be null if not used)
|
|
15
|
+
- [ ] routing-map Table 6 assigns a tier to every task type
|
|
16
|
+
- [ ] No task type is missing a tier assignment
|
|
17
|
+
- [ ] hybrid-execution.md defines fallback behavior for unavailable local model
|
|
18
|
+
- [ ] monolith.config.json models section is present and valid
|
|
19
|
+
|
|
20
|
+
## Pass Criteria
|
|
21
|
+
|
|
22
|
+
All task types have model tier assignments. Fallback behavior is defined.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: test
|
|
3
|
+
id: validator-mode-consistency
|
|
4
|
+
category: validators
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Validator: Mode Consistency
|
|
8
|
+
|
|
9
|
+
Checks that cognitive-modes.md is complete with all 7 modes.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
|
|
13
|
+
- [ ] cognitive-modes.md exists
|
|
14
|
+
- [ ] Mode `exploration` defined with activation triggers, allowed, forbidden
|
|
15
|
+
- [ ] Mode `planning` defined with activation triggers, allowed, forbidden
|
|
16
|
+
- [ ] Mode `implementation` defined with activation triggers, allowed, forbidden
|
|
17
|
+
- [ ] Mode `debugging` defined with activation triggers, allowed, forbidden
|
|
18
|
+
- [ ] Mode `review` defined with activation triggers, allowed, forbidden
|
|
19
|
+
- [ ] Mode `finalization` defined with activation triggers, allowed, forbidden
|
|
20
|
+
- [ ] Mode `reflection` defined with activation triggers, allowed, forbidden
|
|
21
|
+
- [ ] Each mode in routing-map Table 1 has a corresponding mode definition
|
|
22
|
+
|
|
23
|
+
## Pass Criteria
|
|
24
|
+
|
|
25
|
+
All 7 modes defined and all routing-map modes exist in cognitive-modes.md.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: test
|
|
3
|
+
id: validator-privacy-routing
|
|
4
|
+
category: validators
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Validator: Privacy Routing
|
|
8
|
+
|
|
9
|
+
Checks that privacy classification and model routing are correctly defined.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
|
|
13
|
+
- [ ] `context/models/privacy-classification.md` exists with 4 levels
|
|
14
|
+
- [ ] `context/models/model-registry.md` exists with tier definitions
|
|
15
|
+
- [ ] routing-map Table 6 references model-registry.md
|
|
16
|
+
- [ ] `protocols/execution/hybrid-execution.md` exists
|
|
17
|
+
- [ ] hybrid-execution.md references privacy-classification.md
|
|
18
|
+
- [ ] `sensitive` level routes to local tier (not default cloud)
|
|
19
|
+
- [ ] `restricted` level routes to local tier (not default cloud)
|
|
20
|
+
|
|
21
|
+
## Pass Criteria
|
|
22
|
+
|
|
23
|
+
All checks PASS. Privacy routing chain is complete.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: test
|
|
3
|
+
id: validator-protocol-references
|
|
4
|
+
category: validators
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Validator: Protocol References
|
|
8
|
+
|
|
9
|
+
Checks that all protocols referenced in routing-map exist as files.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
|
|
13
|
+
- [ ] `protocols/boot/boot-sequence.md` exists
|
|
14
|
+
- [ ] `protocols/cognition/cognitive-modes.md` exists
|
|
15
|
+
- [ ] `protocols/governance/memory-governance.md` exists
|
|
16
|
+
- [ ] `protocols/governance/command-policy.md` exists
|
|
17
|
+
- [ ] `protocols/governance/core-invariants.md` exists
|
|
18
|
+
- [ ] `protocols/governance/metadata-schema.md` exists
|
|
19
|
+
- [ ] All protocols referenced in routing-map Table 3 have corresponding files
|
|
20
|
+
|
|
21
|
+
## Pass Criteria
|
|
22
|
+
|
|
23
|
+
All referenced protocol files exist.
|
|
24
|
+
|
|
25
|
+
## Failure Action
|
|
26
|
+
|
|
27
|
+
Report missing protocols with their expected paths.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: test
|
|
3
|
+
id: validator-routing-integrity
|
|
4
|
+
category: validators
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Validator: Routing Integrity
|
|
8
|
+
|
|
9
|
+
Checks that routing-map.md is complete and internally consistent.
|
|
10
|
+
|
|
11
|
+
## Checks
|
|
12
|
+
|
|
13
|
+
- [ ] routing-map.md exists at `context/maps/routing-map.md`
|
|
14
|
+
- [ ] Has YAML frontmatter with `id: routing-map`
|
|
15
|
+
- [ ] Table 1 exists and has all 14 task types
|
|
16
|
+
- [ ] Table 2 exists and maps all task types to skills or "(no dedicated skill)"
|
|
17
|
+
- [ ] Table 3 exists and maps protocols to task types
|
|
18
|
+
- [ ] Table 4 exists and maps memory regions to task types
|
|
19
|
+
- [ ] Table 5 exists and maps learning categories to task types
|
|
20
|
+
- [ ] Table 6 exists and maps model tiers to task types
|
|
21
|
+
- [ ] Table 7 exists with fallback rules
|
|
22
|
+
- [ ] All skill references in Table 2 have corresponding SKILL.md files
|
|
23
|
+
|
|
24
|
+
## Pass Criteria
|
|
25
|
+
|
|
26
|
+
All 10 checks PASS.
|
|
27
|
+
|
|
28
|
+
## Failure Action
|
|
29
|
+
|
|
30
|
+
If any check fails: report missing/incomplete section, do not proceed with task until resolved.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: context
|
|
3
|
+
id: agents-root
|
|
4
|
+
topology_role: root
|
|
5
|
+
authority: authoritative
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# {{PROJECT_NAME}} — AI Assistant Guide
|
|
9
|
+
|
|
10
|
+
This is the primary entry point for AI assistants working in this project.
|
|
11
|
+
|
|
12
|
+
Read this file first on every session start.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Project
|
|
17
|
+
|
|
18
|
+
**Name:** {{PROJECT_NAME}}
|
|
19
|
+
**Language:** {{LANGUAGE}}
|
|
20
|
+
**AI Tool:** {{AI_TOOL}}
|
|
21
|
+
**MONOLITH Root:** `{{MONOLITH_ROOT}}/`
|
|
22
|
+
|
|
23
|
+
<!-- Add project description here -->
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Boot Sequence
|
|
28
|
+
|
|
29
|
+
On every session start, read in this order:
|
|
30
|
+
|
|
31
|
+
1. This file (AGENTS.md)
|
|
32
|
+
2. `{{MONOLITH_ROOT}}/context/maps/project-map.md`
|
|
33
|
+
3. `{{MONOLITH_ROOT}}/context/maps/routing-map.md` — classify task type
|
|
34
|
+
4. `{{MONOLITH_ROOT}}/memory/working/active.md` — current phase and story
|
|
35
|
+
5. `{{MONOLITH_ROOT}}/context/maps/roadmap-index.md`
|
|
36
|
+
6. `{{MONOLITH_ROOT}}/protocols/governance/memory-governance.md`
|
|
37
|
+
7. Relevant skill from `{{MONOLITH_ROOT}}/skills/` (resolved via routing-map)
|
|
38
|
+
8. `{{MONOLITH_ROOT}}/learning/injection-map.md` — load relevant lessons
|
|
39
|
+
9. `{{MONOLITH_ROOT}}/protocols/cognition/cognitive-modes.md` — apply behavioral constraints
|
|
40
|
+
|
|
41
|
+
See full sequence: `{{MONOLITH_ROOT}}/protocols/boot/boot-sequence.md`
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Navigation
|
|
46
|
+
|
|
47
|
+
| What | Where |
|
|
48
|
+
| ----------------- | --------------------------------------------------- |
|
|
49
|
+
| Active story | `{{MONOLITH_ROOT}}/memory/working/active.md` |
|
|
50
|
+
| Project map | `{{MONOLITH_ROOT}}/context/maps/project-map.md` |
|
|
51
|
+
| Routing decisions | `{{MONOLITH_ROOT}}/context/maps/routing-map.md` |
|
|
52
|
+
| Skills | `{{MONOLITH_ROOT}}/skills/INDEX.md` |
|
|
53
|
+
| Protocols | `{{MONOLITH_ROOT}}/protocols/boot/boot-sequence.md` |
|
|
54
|
+
| Roadmap | `{{MONOLITH_ROOT}}/context/maps/roadmap-index.md` |
|
|
55
|
+
| Lessons | `{{MONOLITH_ROOT}}/learning/INDEX.md` |
|
|
56
|
+
| Governance rules | `{{MONOLITH_ROOT}}/governance/` |
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Mission Lifecycle (Coordinatorium v0.1)
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
monolith mission start --title "..." --system "..."
|
|
64
|
+
monolith mission list
|
|
65
|
+
monolith mission show <id>
|
|
66
|
+
monolith mission finish <id> --result completed|failed|cancelled [--summary "..."]
|
|
67
|
+
monolith mission checkpoint <missionId> --summary "..." [--remaining "..." ...] [--context "..."]
|
|
68
|
+
monolith mission checkpoints <missionId>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
This records development missions in `{{MONOLITH_ROOT}}/state.json`,
|
|
72
|
+
independent of any single AI session's memory. **This is not
|
|
73
|
+
runtime-enforced in v0.1:** nothing prevents an AI session from editing
|
|
74
|
+
code without ever calling `mission start`/`finish`. It is a recommended
|
|
75
|
+
discipline, not a gate.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Project Brief
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
monolith brief [--max-chars N] [--strict]
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Prints a deterministic, read-only, bounded summary of current project
|
|
86
|
+
state (State Keeper status, active missions and latest checkpoints,
|
|
87
|
+
mandatory protocols, current story, accepted ADRs), with the source of
|
|
88
|
+
each section. It supplements the Boot Sequence; it does not replace it.
|
|
89
|
+
The first line is `Completeness: COMPLETE` or `INCOMPLETE`; exit code 2
|
|
90
|
+
under `--strict` means INCOMPLETE. ADR directories are
|
|
91
|
+
listed in `monolith.config.json` under `contextGateway.adrDirs`; a new instance
|
|
92
|
+
sets `["docs/adr"]`, the only ADR location.
|
|
93
|
+
|
|
94
|
+
**Mission Checkpoints (COORDINATORIUM-002):** an `in_progress` mission can
|
|
95
|
+
accumulate durable, append-only checkpoints (`summary` required,
|
|
96
|
+
`remainingSteps` via repeated `--remaining`, optional `context`) —
|
|
97
|
+
immutable once created, no update/delete command. Rejected for a
|
|
98
|
+
completed/failed/cancelled mission; `mission checkpoints` keeps listing a
|
|
99
|
+
finished mission's history regardless.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Core Rule
|
|
104
|
+
|
|
105
|
+
One story at a time. Vertical slice first. No autonomous capability expansion.
|
|
106
|
+
|
|
107
|
+
Read `{{MONOLITH_ROOT}}/protocols/governance/core-invariants.md` before starting any task.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"project": {
|
|
3
|
+
"name": "{{PROJECT_NAME}}",
|
|
4
|
+
"language": "{{LANGUAGE}}",
|
|
5
|
+
"packageManager": "{{PACKAGE_MANAGER}}",
|
|
6
|
+
"aiTool": "{{AI_TOOL}}"
|
|
7
|
+
},
|
|
8
|
+
"monolithRoot": "{{MONOLITH_ROOT}}",
|
|
9
|
+
"contextGateway": {
|
|
10
|
+
"adrDirs": ["docs/adr"]
|
|
11
|
+
},
|
|
12
|
+
"finalizationProtocol": "{{FINALIZATION_PROTOCOL}}",
|
|
13
|
+
"gates": {
|
|
14
|
+
"enabled": [
|
|
15
|
+
"emission",
|
|
16
|
+
"memory-update",
|
|
17
|
+
"mistake-injection",
|
|
18
|
+
"governance-boundary",
|
|
19
|
+
"protocol-drift"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"models": {
|
|
23
|
+
"default": "claude-opus",
|
|
24
|
+
"local": null,
|
|
25
|
+
"tiers": {
|
|
26
|
+
"implementation": "default",
|
|
27
|
+
"review": "default",
|
|
28
|
+
"planning": "default",
|
|
29
|
+
"sensitive": "local"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MONOLITH Project Definition — Instance Configuration
|
|
3
|
+
*
|
|
4
|
+
* This file is the single source of truth for all project-specific knowledge.
|
|
5
|
+
* The Kernel reads this file instead of hardcoding project facts.
|
|
6
|
+
*
|
|
7
|
+
* Kernel knows HOW. Instance knows WHAT.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export const PROJECT_DEFINITION = {
|
|
11
|
+
monolithRoot: '{{MONOLITH_ROOT}}',
|
|
12
|
+
|
|
13
|
+
finalizationProtocolId: '{{FINALIZATION_PROTOCOL}}',
|
|
14
|
+
|
|
15
|
+
protocols: {{PROTOCOLS_JSON}},
|
|
16
|
+
|
|
17
|
+
mistakeRoots: {{MISTAKE_ROOTS_JSON}},
|
|
18
|
+
|
|
19
|
+
driftLogPath: '{{DRIFT_LOG_PATH}}',
|
|
20
|
+
|
|
21
|
+
forcedInjectionTerms: {
|
|
22
|
+
'{{FINALIZATION_PROTOCOL}}': ['protocol_drift', 'workflow', '{{FINALIZATION_PROTOCOL}}'],
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
requiredRootArtifacts: [
|
|
26
|
+
'agents-root',
|
|
27
|
+
'project-map',
|
|
28
|
+
'semantic-map',
|
|
29
|
+
'dependency-map',
|
|
30
|
+
'roadmap-index',
|
|
31
|
+
'memory-working-active',
|
|
32
|
+
'memory-working-story-index',
|
|
33
|
+
],
|
|
34
|
+
|
|
35
|
+
projectRootFiles: ['AGENTS.md'],
|
|
36
|
+
|
|
37
|
+
requiredFinalizationDocs: [
|
|
38
|
+
{ path: 'ROADMAP.md', label: 'Project roadmap' },
|
|
39
|
+
{ path: 'docs/current-state.md', label: 'Current state document' },
|
|
40
|
+
],
|
|
41
|
+
};
|