coaiajs 0.1.0 → 0.1.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/dist/mcp/config.d.ts +4 -0
- package/dist/mcp/config.d.ts.map +1 -0
- package/dist/mcp/config.js +52 -26
- package/dist/mcp/config.js.map +1 -0
- package/dist/mcp/prompts.d.ts +19 -0
- package/dist/mcp/prompts.d.ts.map +1 -0
- package/dist/mcp/prompts.js +111 -0
- package/dist/mcp/prompts.js.map +1 -0
- package/dist/mcp/resources.d.ts +5 -0
- package/dist/mcp/resources.d.ts.map +1 -0
- package/dist/mcp/resources.js +77 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +164 -73
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/coaiapy-tools.d.ts.map +1 -0
- package/dist/mcp/tools/coaiapy-tools.js +1 -0
- package/dist/mcp/tools/coaiapy-tools.js.map +1 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/src/audio.d.ts.map +1 -0
- package/dist/src/audio.js.map +1 -0
- package/dist/src/cli-helpers.d.ts.map +1 -0
- package/dist/src/cli-helpers.js.map +1 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/environment.d.ts.map +1 -0
- package/dist/src/environment.js.map +1 -0
- package/dist/src/github.d.ts.map +1 -0
- package/dist/src/github.js.map +1 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +13 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/langfuse/client.d.ts.map +1 -0
- package/dist/src/langfuse/client.js.map +1 -0
- package/dist/src/langfuse/comments.d.ts.map +1 -0
- package/dist/src/langfuse/comments.js.map +1 -0
- package/dist/src/langfuse/datasets.d.ts.map +1 -0
- package/dist/src/langfuse/datasets.js.map +1 -0
- package/dist/src/langfuse/index.d.ts.map +1 -0
- package/dist/src/langfuse/index.js.map +1 -0
- package/dist/src/langfuse/media.d.ts.map +1 -0
- package/dist/src/langfuse/media.js.map +1 -0
- package/dist/src/langfuse/observations.d.ts.map +1 -0
- package/dist/src/langfuse/observations.js.map +1 -0
- package/dist/src/langfuse/prompts.d.ts.map +1 -0
- package/dist/src/langfuse/prompts.js.map +1 -0
- package/dist/src/langfuse/scores.d.ts.map +1 -0
- package/dist/src/langfuse/scores.js.map +1 -0
- package/dist/src/langfuse/traces.d.ts.map +1 -0
- package/dist/src/langfuse/traces.js.map +1 -0
- package/dist/src/llm.d.ts.map +1 -0
- package/dist/src/llm.js.map +1 -0
- package/dist/src/narrative/graph-manager.d.ts.map +1 -0
- package/dist/src/narrative/graph-manager.js.map +1 -0
- package/dist/src/narrative/index.d.ts +32 -1
- package/dist/src/narrative/index.d.ts.map +1 -0
- package/dist/src/narrative/index.js +97 -1
- package/dist/src/narrative/index.js.map +1 -0
- package/dist/src/narrative/markdown-export.d.ts.map +1 -0
- package/dist/src/narrative/markdown-export.js.map +1 -0
- package/dist/src/narrative/tool-definitions.d.ts.map +1 -0
- package/dist/src/narrative/tool-definitions.js.map +1 -0
- package/dist/src/narrative/tool-handlers.d.ts.map +1 -0
- package/dist/src/narrative/tool-handlers.js.map +1 -0
- package/dist/src/narrative/types.d.ts.map +1 -0
- package/dist/src/narrative/types.js.map +1 -0
- package/dist/src/narrative/validation.d.ts.map +1 -0
- package/dist/src/narrative/validation.js.map +1 -0
- package/dist/src/pde/index.d.ts +4 -0
- package/dist/src/pde/index.d.ts.map +1 -0
- package/dist/src/pde/index.js +19 -0
- package/dist/src/pde/index.js.map +1 -0
- package/dist/src/pde/mcp-handlers.d.ts.map +1 -0
- package/dist/src/pde/mcp-handlers.js.map +1 -0
- package/dist/src/pde/mcp-tools.d.ts.map +1 -0
- package/dist/src/pde/mcp-tools.js.map +1 -0
- package/dist/src/pde/session-manager.d.ts.map +1 -0
- package/dist/src/pde/session-manager.js.map +1 -0
- package/dist/src/pde/stc-mapper.d.ts.map +1 -0
- package/dist/src/pde/stc-mapper.js.map +1 -0
- package/dist/src/pipeline/index.d.ts.map +1 -0
- package/dist/src/pipeline/index.js.map +1 -0
- package/dist/src/pipeline/template-engine.d.ts.map +1 -0
- package/dist/src/pipeline/template-engine.js.map +1 -0
- package/dist/src/planning/index.d.ts +3 -0
- package/dist/src/planning/index.d.ts.map +1 -0
- package/dist/src/planning/index.js +13 -0
- package/dist/src/planning/index.js.map +1 -0
- package/dist/src/planning/mcp-handlers.d.ts.map +1 -0
- package/dist/src/planning/mcp-handlers.js.map +1 -0
- package/dist/src/planning/mcp-tools.d.ts.map +1 -0
- package/dist/src/planning/mcp-tools.js.map +1 -0
- package/dist/src/planning/plan-parser.d.ts.map +1 -0
- package/dist/src/planning/plan-parser.js.map +1 -0
- package/dist/src/redis.d.ts.map +1 -0
- package/dist/src/redis.js.map +1 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +66 -1
- package/rispecs/00-coaiajs-platform.spec.md +18 -6
- package/rispecs/01-core-config.spec.md +7 -37
- package/rispecs/02-redis-module.spec.md +2 -1
- package/rispecs/03-langfuse-module.spec.md +7 -5
- package/rispecs/04-narrative-engine.spec.md +9 -9
- package/rispecs/05-pde-engine.spec.md +23 -23
- package/rispecs/06-planning-engine.spec.md +14 -13
- package/rispecs/07-pipeline-templates.spec.md +7 -7
- package/rispecs/08-cli-interface.spec.md +13 -25
- package/rispecs/09-mcp-server.spec.md +41 -44
- package/rispecs/10-audio-module.spec.md +3 -3
- package/rispecs/KINSHIP.md +4 -4
- package/rispecs/README.md +33 -7
- package/articles/academic/creative-orientation-vs-problem-solving.md +0 -177
- package/articles/academic/jsonl-knowledge-graphs-agent-memory.md +0 -142
- package/articles/academic/langfuse-observability-llm-pipelines.md +0 -144
- package/articles/academic/medicine-wheel-software-architecture.md +0 -163
- package/articles/academic/mmot-autonomous-agents.md +0 -156
- package/articles/academic/model-context-protocol-interagent.md +0 -161
- package/articles/academic/pde-prompt-decomposition.md +0 -186
- package/articles/academic/structural-tension-in-ai-agents.md +0 -134
- package/articles/reviews/mcp-protocol-design-review.md +0 -170
- package/articles/reviews/observability-ai-systems-review.md +0 -176
- package/articles/reviews/prompt-engineering-decomposition-review.md +0 -184
- package/articles/surveys/agent-orchestration-survey.md +0 -186
- package/articles/surveys/knowledge-graph-storage-survey.md +0 -204
- package/articles/surveys/structural-tension-methodology-survey.md +0 -154
- package/articles/technical/aws-sdk-v3-polly.md +0 -270
- package/articles/technical/commander-cli-framework.md +0 -262
- package/articles/technical/dotenv-config-patterns.md +0 -360
- package/articles/technical/ioredis-vs-redis.md +0 -142
- package/articles/technical/langfuse-js-sdk-vs-rest.md +0 -191
- package/articles/technical/mcp-sdk-typescript.md +0 -291
- package/articles/technical/octokit-github-api.md +0 -293
- package/articles/technical/openai-sdk-modern.md +0 -231
- package/articles/technical/yaml-parsing-node.md +0 -266
- package/articles/technical/zod-runtime-validation.md +0 -212
- package/mcp/config.ts +0 -196
- package/mcp/server.ts +0 -402
- package/mcp/tools/coaiapy-tools.ts +0 -364
- package/mcp/tools/index.ts +0 -4
- package/src/audio.ts +0 -76
- package/src/cli-helpers.ts +0 -86
- package/src/cli.ts +0 -1223
- package/src/config.ts +0 -172
- package/src/environment.ts +0 -171
- package/src/github.ts +0 -143
- package/src/langfuse/client.ts +0 -105
- package/src/langfuse/comments.ts +0 -52
- package/src/langfuse/datasets.ts +0 -178
- package/src/langfuse/index.ts +0 -33
- package/src/langfuse/media.ts +0 -193
- package/src/langfuse/observations.ts +0 -131
- package/src/langfuse/prompts.ts +0 -157
- package/src/langfuse/scores.ts +0 -456
- package/src/langfuse/traces.ts +0 -276
- package/src/llm.ts +0 -106
- package/src/narrative/graph-manager.ts +0 -1358
- package/src/narrative/index.ts +0 -32
- package/src/narrative/markdown-export.ts +0 -535
- package/src/narrative/tool-definitions.ts +0 -635
- package/src/narrative/tool-handlers.ts +0 -528
- package/src/narrative/types.ts +0 -9
- package/src/narrative/validation.ts +0 -179
- package/src/pde/index.ts +0 -8
- package/src/pde/mcp-handlers.ts +0 -359
- package/src/pde/mcp-tools.ts +0 -201
- package/src/pde/session-manager.ts +0 -248
- package/src/pde/stc-mapper.ts +0 -298
- package/src/pipeline/index.ts +0 -7
- package/src/pipeline/template-engine.ts +0 -398
- package/src/planning/index.ts +0 -13
- package/src/planning/mcp-handlers.ts +0 -369
- package/src/planning/mcp-tools.ts +0 -155
- package/src/planning/plan-parser.ts +0 -587
- package/src/redis.ts +0 -97
- package/src/types.ts +0 -280
- package/tsconfig.json +0 -26
|
@@ -9,7 +9,7 @@ A unified config loader that provides every CoAiA module with its settings throu
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
- `src/config.ts` is
|
|
12
|
+
- [`src/config.ts`](../src/config.ts) is implemented with `readConfig()`, `getConfig()`, `mergeConfigs()`, `resetConfig()`, and a `config` Proxy for lazy access
|
|
13
13
|
- Supports env vars > .env > coaia.json > defaults priority chain
|
|
14
14
|
- Searches for `coaia.json` or `.coaia/config.json` in cwd and home directory
|
|
15
15
|
- Covers Redis (URL, host/port, Upstash), Langfuse, OpenAI, AWS, GitHub credentials
|
|
@@ -30,42 +30,12 @@ Config system that handles all module configuration needs including:
|
|
|
30
30
|
|
|
31
31
|
```typescript
|
|
32
32
|
interface CoaiaConfig {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
langfuse_secret_key?: string;
|
|
40
|
-
langfuse_public_key?: string;
|
|
41
|
-
langfuse_host?: string;
|
|
42
|
-
langfuse_dataset_name?: string;
|
|
43
|
-
langfuse_prompt_cache_ttl?: number;
|
|
44
|
-
|
|
45
|
-
// OpenAI
|
|
46
|
-
openai_api_key?: string;
|
|
47
|
-
openai_model?: string;
|
|
48
|
-
|
|
49
|
-
// AWS (Polly)
|
|
50
|
-
aws_access_key_id?: string;
|
|
51
|
-
aws_secret_access_key?: string;
|
|
52
|
-
aws_region?: string;
|
|
53
|
-
aws_polly_voice?: string;
|
|
54
|
-
|
|
55
|
-
// GitHub
|
|
56
|
-
github_token?: string;
|
|
57
|
-
|
|
58
|
-
// Narrative
|
|
59
|
-
memory_file_path?: string;
|
|
60
|
-
|
|
61
|
-
// PDE
|
|
62
|
-
pde_dir?: string;
|
|
63
|
-
|
|
64
|
-
// Pipeline
|
|
65
|
-
pipeline_template_dir?: string;
|
|
66
|
-
|
|
67
|
-
// MCP
|
|
68
|
-
mcp_mode?: 'MINIMAL' | 'STANDARD' | 'FULL';
|
|
33
|
+
redis?: { url?: string; host?: string; port?: number; password?: string; upstashUrl?: string; upstashToken?: string };
|
|
34
|
+
langfuse?: { publicKey?: string; secretKey?: string; baseUrl?: string };
|
|
35
|
+
openai?: { apiKey?: string; model?: string };
|
|
36
|
+
aws?: { accessKeyId?: string; secretAccessKey?: string; region?: string };
|
|
37
|
+
github?: { token?: string };
|
|
38
|
+
[key: string]: unknown;
|
|
69
39
|
}
|
|
70
40
|
```
|
|
71
41
|
|
|
@@ -9,11 +9,12 @@ A thin Redis wrapper providing `tash(key, value, ttl?)` and `fetch(key)` with la
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
- `src/redis.ts` is
|
|
12
|
+
- [`src/redis.ts`](../src/redis.ts) is implemented with `tash()`, `fetch()`, `del()`, `keys()`, `exists()`, `disconnect()`, `resetClient()`
|
|
13
13
|
- Uses ioredis with lazy connection
|
|
14
14
|
- Supports direct URL, Upstash REST (`rediss://`) URLs, host/port fallback
|
|
15
15
|
- Key-value operations with optional TTL
|
|
16
16
|
- Parity with coaiapy's `tash/fetch` pattern achieved
|
|
17
|
+
- [`mcp/server.ts`](../mcp/server.ts) wires `coaia_tash` and `coaia_fetch` through the Redis module.
|
|
17
18
|
|
|
18
19
|
**Desired Outcome:**
|
|
19
20
|
Redis module with everything currently implemented plus:
|
|
@@ -9,11 +9,13 @@ A comprehensive Langfuse client covering traces, observations, prompts, datasets
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
- `src/langfuse/`
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
12
|
+
- [`src/langfuse/`](../src/langfuse/) is implemented as a REST client module split by domain:
|
|
13
|
+
- [`client.ts`](../src/langfuse/client.ts) centralizes auth, base URL, JSON requests, and errors.
|
|
14
|
+
- [`traces.ts`](../src/langfuse/traces.ts), [`observations.ts`](../src/langfuse/observations.ts), [`prompts.ts`](../src/langfuse/prompts.ts), [`datasets.ts`](../src/langfuse/datasets.ts), [`scores.ts`](../src/langfuse/scores.ts), [`comments.ts`](../src/langfuse/comments.ts), and [`media.ts`](../src/langfuse/media.ts) port the coaiapy `cofuse.py` surface.
|
|
15
|
+
- [`index.ts`](../src/langfuse/index.ts) exposes a public barrel for `coaiajs/langfuse`.
|
|
16
|
+
- [`mcp/server.ts`](../mcp/server.ts) wires coaiapy-compatible Langfuse MCP tools such as `coaia_fuse_trace_create`, `coaia_fuse_add_observation`, `coaia_fuse_score_apply`, comments, prompts, datasets, and media.
|
|
17
|
+
- Types defined in [`src/types.ts`](../src/types.ts): `ScoreCategory`, `ScoreConfig`.
|
|
18
|
+
- Remaining gap: not every Langfuse formatting and cache helper from `cofuse.py` has a TypeScript equivalent; the core trace/observation/prompt/dataset/score/comment/media path is present.
|
|
17
19
|
|
|
18
20
|
**Desired Outcome:**
|
|
19
21
|
TypeScript Langfuse client with:
|
|
@@ -11,15 +11,15 @@ A KnowledgeGraphManager that provides full CRUD for entities and relations store
|
|
|
11
11
|
## Structural Tension
|
|
12
12
|
|
|
13
13
|
**Current Reality:**
|
|
14
|
-
- `src/narrative/`
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
19
|
-
- `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- coaia
|
|
14
|
+
- [`src/narrative/`](../src/narrative/) is implemented:
|
|
15
|
+
- [`graph-manager.ts`](../src/narrative/graph-manager.ts) is the core JSONL graph/STC/narrative/MMOT engine.
|
|
16
|
+
- [`tool-definitions.ts`](../src/narrative/tool-definitions.ts) defines the MCP tool schemas and groups.
|
|
17
|
+
- [`tool-handlers.ts`](../src/narrative/tool-handlers.ts) connects MCP tool calls to `KnowledgeGraphManager`.
|
|
18
|
+
- [`markdown-export.ts`](../src/narrative/markdown-export.ts) handles chart, progress, stats, and all-chart markdown exports.
|
|
19
|
+
- [`index.ts`](../src/narrative/index.ts) exposes library and CLI helper functions for `coaiajs/narrative`.
|
|
20
|
+
- Types are shared through [`src/types.ts`](../src/types.ts) and re-exported through [`src/narrative/types.ts`](../src/narrative/types.ts).
|
|
21
|
+
- [`mcp/server.ts`](../mcp/server.ts) now routes narrative tools to `handleToolCall()` with a `KnowledgeGraphManager`.
|
|
22
|
+
- `coaia narrative list` smoke-tested successfully against an empty memory file.
|
|
23
23
|
|
|
24
24
|
**Desired Outcome:**
|
|
25
25
|
Narrative engine in `src/narrative/` that:
|
|
@@ -9,13 +9,15 @@ A PDE module that transforms `DecompositionResult` objects into coaia-narrative-
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
- `src/pde/`
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
18
|
-
-
|
|
12
|
+
- [`src/pde/`](../src/pde/) is implemented:
|
|
13
|
+
- [`stc-mapper.ts`](../src/pde/stc-mapper.ts) transforms `DecompositionResult` into coaia-narrative-compatible `Entity[]` and `Relation[]`.
|
|
14
|
+
- [`session-manager.ts`](../src/pde/session-manager.ts) persists PDE/STC sessions as JSONL in `.coaia/pde/`.
|
|
15
|
+
- [`mcp-tools.ts`](../src/pde/mcp-tools.ts) defines 10 implemented MCP tool schemas.
|
|
16
|
+
- [`mcp-handlers.ts`](../src/pde/mcp-handlers.ts) handles import, STC creation, session listing/viewing, action progress, action completion, current-reality updates, and session completion.
|
|
17
|
+
- [`index.ts`](../src/pde/index.ts) exposes library and CLI helper functions.
|
|
18
|
+
- PDE types are defined in [`src/types.ts`](../src/types.ts): `DecompositionResult`, `PrimaryIntent`, `SecondaryIntent`, `DirectionMap`, `ActionItem`, `AmbiguityFlag`, `StoredDecomposition`, `PdeSession`.
|
|
19
|
+
- [`mcp/server.ts`](../mcp/server.ts) wires PDE tools and namespaces session-action tools that conflict with narrative names (`pde_add_action_step`, `pde_update_current_reality`, etc.).
|
|
20
|
+
- Remaining gap: prompt decomposition itself (`pde_decompose`, `pde_parse_response`, `pde_get`, `pde_list`, `pde_export_markdown`) is not implemented inside `coaiajs`; `coaiajs` currently consumes stored/external PDE outputs and maps them to STC.
|
|
19
21
|
|
|
20
22
|
**Desired Outcome:**
|
|
21
23
|
PDE engine in `src/pde/` that:
|
|
@@ -77,22 +79,20 @@ class SessionManager {
|
|
|
77
79
|
}
|
|
78
80
|
```
|
|
79
81
|
|
|
80
|
-
## MCP Tools (
|
|
82
|
+
## MCP Tools (Implemented)
|
|
81
83
|
|
|
82
84
|
| Tool | Purpose |
|
|
83
85
|
|------|---------|
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
87
|
-
| `
|
|
88
|
-
| `
|
|
89
|
-
| `
|
|
90
|
-
| `
|
|
91
|
-
| `
|
|
92
|
-
| `
|
|
93
|
-
| `
|
|
94
|
-
| `pde_session_status` | Get session transformation status |
|
|
95
|
-
| `pde_bridge_plan` | Bridge to planning engine |
|
|
86
|
+
| `import_pde_decomposition` | Load stored `.pde` decomposition and create an STC session |
|
|
87
|
+
| `create_stc_from_pde` | Create an STC session from an in-memory `DecompositionResult` |
|
|
88
|
+
| `list_pde_decompositions` | List importable stored PDE decomposition files |
|
|
89
|
+
| `get_session` | Get PDE/STC session state |
|
|
90
|
+
| `list_sessions` | List PDE/STC sessions |
|
|
91
|
+
| `pde_update_action_progress` | Add factual progress to a session action |
|
|
92
|
+
| `pde_mark_action_complete` | Mark a session action complete |
|
|
93
|
+
| `pde_add_action_step` | Add a session action step |
|
|
94
|
+
| `pde_update_current_reality` | Add observations to session current reality |
|
|
95
|
+
| `complete_session` | Mark a session completed |
|
|
96
96
|
|
|
97
97
|
## Relation to Planning Engine
|
|
98
98
|
|
|
@@ -106,7 +106,7 @@ Claude Plan mode → plan.md → coaiajs planning-engine → narrative JSONL →
|
|
|
106
106
|
## Quality Criteria
|
|
107
107
|
|
|
108
108
|
- ✅ StcMapper produces entities/relations compatible with narrative engine's JSONL format
|
|
109
|
-
- ✅
|
|
110
|
-
- ✅ PDE sessions are persisted as `.pde/*.
|
|
111
|
-
-
|
|
109
|
+
- ✅ Implemented PDE MCP tools route through `mcp/server.ts`
|
|
110
|
+
- ✅ PDE sessions are persisted as `.coaia/pde/*.jsonl` files
|
|
111
|
+
- ⚠️ Preview mapping and native prompt decomposition remain desired capabilities
|
|
112
112
|
- ✅ Ambiguities from decomposition surface as tension sources in the STC
|
|
@@ -9,12 +9,13 @@ A planning module that parses markdown plans (particularly Claude Plan mode outp
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
- `src/planning/`
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
-
|
|
12
|
+
- [`src/planning/`](../src/planning/) is implemented:
|
|
13
|
+
- [`plan-parser.ts`](../src/planning/plan-parser.ts) parses markdown plans, converts plans to STC entities/relations, exports JSONL, and converts `DecompositionResult` to plan/STC output.
|
|
14
|
+
- [`mcp-tools.ts`](../src/planning/mcp-tools.ts) defines 6 MCP tool schemas.
|
|
15
|
+
- [`mcp-handlers.ts`](../src/planning/mcp-handlers.ts) handles parse, plan-to-STC, plan-to-chart sync, chart-to-plan sync, plan trace creation, and PDE-to-plan conversion.
|
|
16
|
+
- [`index.ts`](../src/planning/index.ts) exposes library and CLI helper functions.
|
|
17
|
+
- Types are defined in [`src/types.ts`](../src/types.ts): `StructuralTensionPlan`, `StructuralElement`.
|
|
18
|
+
- [`mcp/server.ts`](../mcp/server.ts) routes planning tools to `handlePlanningTool()`.
|
|
18
19
|
|
|
19
20
|
**Desired Outcome:**
|
|
20
21
|
Planning engine in `src/planning/` that:
|
|
@@ -108,21 +109,21 @@ STC → Plan:
|
|
|
108
109
|
|
|
109
110
|
Conflict resolution: STC wins by default (it is the source of truth). Conflicts are reported in `SyncResult.conflicts` for human review.
|
|
110
111
|
|
|
111
|
-
## MCP Tools (
|
|
112
|
+
## MCP Tools (Implemented)
|
|
112
113
|
|
|
113
114
|
| Tool | Purpose |
|
|
114
115
|
|------|---------|
|
|
115
|
-
| `
|
|
116
|
+
| `parse_plan_structural` | Parse markdown plan into structured object |
|
|
116
117
|
| `plan_to_stc` | Convert parsed plan to STC entities |
|
|
117
|
-
| `
|
|
118
|
-
| `
|
|
119
|
-
| `
|
|
120
|
-
| `
|
|
118
|
+
| `sync_plan_to_chart` | Write plan-derived STC JSONL |
|
|
119
|
+
| `sync_chart_to_plan` | Generate plan markdown from STC JSONL |
|
|
120
|
+
| `create_plan_trace` | Generate trace payload for plan→STC transformation |
|
|
121
|
+
| `pde_to_plan` | Convert PDE decomposition into STC JSONL |
|
|
121
122
|
|
|
122
123
|
## Quality Criteria
|
|
123
124
|
|
|
124
125
|
- ✅ Parses Claude Plan mode output without modification
|
|
125
126
|
- ✅ Checkbox state (`[ ]` / `[x]`) maps correctly to action completion
|
|
126
127
|
- ✅ Sub-items preserved through parse → STC → plan round-trip
|
|
127
|
-
- ✅ Bidirectional sync
|
|
128
|
+
- ✅ Bidirectional sync supports dry-run and write modes
|
|
128
129
|
- ✅ Generated markdown is readable and re-parseable
|
|
@@ -9,13 +9,13 @@ A template engine that loads pipeline definitions, renders them with `{{variable
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
- `src/pipeline/`
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
12
|
+
- [`src/pipeline/`](../src/pipeline/) is implemented:
|
|
13
|
+
- [`template-engine.ts`](../src/pipeline/template-engine.ts) ports coaiapy `pipeline.py` and `mobile_template.py` patterns into `MobileTemplateEngine`, `TemplateLoader`, and `TemplateRenderer`.
|
|
14
|
+
- [`index.ts`](../src/pipeline/index.ts) exports the public pipeline API.
|
|
15
|
+
- Types are defined in [`src/types.ts`](../src/types.ts): `PipelineVariable`, `PipelineStep`, `PipelineTemplate`.
|
|
16
|
+
- Pipeline templates use `{{variable}}` substitution, simple filters, conditionals, defaults, and built-in functions.
|
|
17
|
+
- [`mcp/resources.ts`](../mcp/resources.ts) exposes template listing, template detail, and template-variable resources.
|
|
18
|
+
- Remaining gap: pipeline execution as a first-class MCP tool remains desired; current implementation renders template steps but does not execute external action dependencies.
|
|
19
19
|
|
|
20
20
|
**Desired Outcome:**
|
|
21
21
|
Pipeline engine in `src/pipeline/` that:
|
|
@@ -9,12 +9,11 @@ A single `coaia` CLI binary that provides subcommands for every CoAiA module —
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
-
|
|
13
|
-
- commander
|
|
14
|
-
-
|
|
15
|
-
- coaia
|
|
16
|
-
-
|
|
17
|
-
- coaia-planning has no CLI
|
|
12
|
+
- [`package.json`](../package.json) defines `"coaia": "./dist/src/cli.js"`.
|
|
13
|
+
- [`src/cli.ts`](../src/cli.ts) implements a commander-based CLI covering root coaiapy parity commands, Langfuse, pipeline, environment, GitHub, narrative, PDE, and planning command groups.
|
|
14
|
+
- [`src/narrative/index.ts`](../src/narrative/index.ts), [`src/pde/index.ts`](../src/pde/index.ts), and [`src/planning/index.ts`](../src/planning/index.ts) expose helper functions used by the CLI dynamic module loader.
|
|
15
|
+
- `npx coaia --help` works from an installed package tarball.
|
|
16
|
+
- Remaining gaps: `synthesize` and explicit `mcp` CLI subcommands are desired but not currently registered as CLI groups.
|
|
18
17
|
|
|
19
18
|
**Desired Outcome:**
|
|
20
19
|
Unified CLI at `src/cli.ts` using commander, with subcommands:
|
|
@@ -26,12 +25,10 @@ coaia env [list|get|set|unset|init]
|
|
|
26
25
|
coaia fuse [traces|trace|prompts|scores|datasets]
|
|
27
26
|
coaia pipeline [list|render|execute] <template>
|
|
28
27
|
coaia transcribe <audio-file>
|
|
29
|
-
coaia synthesize <text> --output <file>
|
|
30
28
|
coaia gh [issues|issue|comments]
|
|
31
29
|
coaia narrative [charts|chart|progress|export]
|
|
32
|
-
coaia pde [
|
|
33
|
-
coaia plan [parse|to-
|
|
34
|
-
coaia mcp [start|tools]
|
|
30
|
+
coaia pde [import|list|sessions|show]
|
|
31
|
+
coaia plan [parse|convert|sync-to-chart|sync-to-plan]
|
|
35
32
|
```
|
|
36
33
|
|
|
37
34
|
## Core Structure
|
|
@@ -54,7 +51,6 @@ program.addCommand(ghCommands());
|
|
|
54
51
|
program.addCommand(narrativeCommands());
|
|
55
52
|
program.addCommand(pdeCommands());
|
|
56
53
|
program.addCommand(planCommands());
|
|
57
|
-
program.addCommand(mcpCommands());
|
|
58
54
|
```
|
|
59
55
|
|
|
60
56
|
## Command Details
|
|
@@ -95,26 +91,18 @@ coaia narrative export <id> [--format md|json] # Export chart
|
|
|
95
91
|
|
|
96
92
|
### PDE Commands
|
|
97
93
|
```
|
|
98
|
-
coaia pde
|
|
94
|
+
coaia pde import <id> # Import stored PDE decomposition into STC session
|
|
99
95
|
coaia pde list # List decompositions
|
|
100
|
-
coaia pde
|
|
101
|
-
coaia pde
|
|
102
|
-
coaia pde to-stc <id> # Transform to STC
|
|
96
|
+
coaia pde sessions # List PDE sessions
|
|
97
|
+
coaia pde show <session-id> # Show PDE session state
|
|
103
98
|
```
|
|
104
99
|
|
|
105
100
|
### Plan Commands
|
|
106
101
|
```
|
|
107
102
|
coaia plan parse <file> # Parse plan markdown
|
|
108
|
-
coaia plan
|
|
109
|
-
coaia plan
|
|
110
|
-
coaia plan sync <
|
|
111
|
-
coaia plan diff <file> <chart-id> # Show differences
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
### MCP Commands
|
|
115
|
-
```
|
|
116
|
-
coaia mcp start [--mode MINIMAL|STANDARD|FULL] # Start MCP server
|
|
117
|
-
coaia mcp tools [--mode X] # List available tools
|
|
103
|
+
coaia plan convert <file> # Convert plan to STC JSONL
|
|
104
|
+
coaia plan sync-to-chart <file> <jsonl> # Sync plan into chart JSONL
|
|
105
|
+
coaia plan sync-to-plan <jsonl> <file> # Sync chart JSONL back to plan markdown
|
|
118
106
|
```
|
|
119
107
|
|
|
120
108
|
## Output Formatting
|
|
@@ -9,36 +9,36 @@ A single MCP server (`coaiajs-mcp`) that consolidates the 44 tools from coaia-na
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
- Users currently need 3 MCP server entries in their config to access all tools
|
|
12
|
+
- [`package.json`](../package.json) defines `"coaiajs-mcp": "./dist/mcp/server.js"`.
|
|
13
|
+
- [`mcp/server.ts`](../mcp/server.ts) implements stdio MCP transport using `@modelcontextprotocol/sdk`.
|
|
14
|
+
- [`mcp/config.ts`](../mcp/config.ts) implements `MINIMAL`, `STANDARD`, `OBSERVABILITY`, and `FULL` feature sets via `COAIAJS_FEATURES` or `--features`.
|
|
15
|
+
- [`mcp/tools/coaiapy-tools.ts`](../mcp/tools/coaiapy-tools.ts) defines coaiapy-compatible Redis and Langfuse tool schemas.
|
|
16
|
+
- [`mcp/resources.ts`](../mcp/resources.ts) implements `coaia://templates/` resources backed by the pipeline template loader.
|
|
17
|
+
- [`mcp/prompts.ts`](../mcp/prompts.ts) implements the three coaiapy-mcp prompt templates.
|
|
18
|
+
- `npx coaiajs-mcp` starts successfully from an installed package tarball and reports `STANDARD: 64 tools, 3 prompts, 3 resources`.
|
|
19
|
+
- Remaining gap: several desired package-native tool groups (audio and pipeline execution tools) are not exposed as standalone MCP tools yet; pipeline templates are currently exposed as resources.
|
|
21
20
|
|
|
22
21
|
**Desired Outcome:**
|
|
23
22
|
Single MCP server at `mcp/server.ts` providing:
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- Feature gating via `
|
|
23
|
+
- Parent and coaiapy-compatible tools through one stdio server
|
|
24
|
+
- Template resources and workflow prompts from coaiapy-mcp
|
|
25
|
+
- Feature gating via `COAIAJS_FEATURES` or `--features`
|
|
27
26
|
- Single server entry in MCP client config
|
|
28
27
|
|
|
29
28
|
## Feature Gating
|
|
30
29
|
|
|
31
30
|
```typescript
|
|
32
|
-
type
|
|
31
|
+
type FeatureLevel = 'MINIMAL' | 'STANDARD' | 'OBSERVABILITY' | 'FULL';
|
|
33
32
|
```
|
|
34
33
|
|
|
35
34
|
| Mode | Tools loaded | Use case |
|
|
36
35
|
|------|-------------|----------|
|
|
37
|
-
| **MINIMAL** |
|
|
38
|
-
| **STANDARD** | MINIMAL +
|
|
39
|
-
| **
|
|
36
|
+
| **MINIMAL** | Redis + Langfuse observability core tools | Observability-only sessions |
|
|
37
|
+
| **STANDARD** | MINIMAL + narrative + PDE + planning tools | Standard development sessions |
|
|
38
|
+
| **OBSERVABILITY** | Alias of STANDARD in current implementation | Compatibility mode |
|
|
39
|
+
| **FULL** | All registered tools, including media tools | Full-featured agent sessions |
|
|
40
40
|
|
|
41
|
-
Default
|
|
41
|
+
Default feature level: `STANDARD`.
|
|
42
42
|
|
|
43
43
|
## Server Architecture
|
|
44
44
|
|
|
@@ -82,47 +82,44 @@ Narrative Beats: `create_narrative_beat`, `telescope_narrative_beat`, `list_narr
|
|
|
82
82
|
|
|
83
83
|
MMOT: `perform_mmot_evaluation`, `init_llm_guidance`
|
|
84
84
|
|
|
85
|
-
### PDE Engine (
|
|
85
|
+
### PDE Engine (10 tools — STANDARD+)
|
|
86
86
|
|
|
87
|
-
`
|
|
87
|
+
`import_pde_decomposition`, `create_stc_from_pde`, `list_pde_decompositions`, `get_session`, `list_sessions`, `pde_update_action_progress`, `pde_mark_action_complete`, `pde_add_action_step`, `pde_update_current_reality`, `complete_session`
|
|
88
88
|
|
|
89
89
|
### Planning Engine (6 tools — STANDARD+)
|
|
90
90
|
|
|
91
|
-
`
|
|
91
|
+
`parse_plan_structural`, `plan_to_stc`, `sync_plan_to_chart`, `sync_chart_to_plan`, `create_plan_trace`, `pde_to_plan`
|
|
92
92
|
|
|
93
|
-
### Redis
|
|
93
|
+
### Redis
|
|
94
94
|
|
|
95
|
-
`
|
|
95
|
+
`coaia_tash`, `coaia_fetch`
|
|
96
96
|
|
|
97
|
-
### Langfuse
|
|
97
|
+
### Langfuse
|
|
98
98
|
|
|
99
|
-
`
|
|
99
|
+
`coaia_fuse_trace_create`, `coaia_fuse_add_observation`, `coaia_fuse_trace_patch_output`, `coaia_fuse_trace_get`, `coaia_fuse_trace_view`, `coaia_fuse_observation_get`, `coaia_fuse_traces_list`, `coaia_fuse_traces_session_view`, comments, prompts, datasets, score configs, score application, and media tools.
|
|
100
100
|
|
|
101
|
-
###
|
|
101
|
+
### Resources
|
|
102
102
|
|
|
103
|
-
`
|
|
103
|
+
`coaia://templates/`, `coaia://templates/{name}`, `coaia://templates/{name}/variables`
|
|
104
104
|
|
|
105
|
-
###
|
|
105
|
+
### Prompts
|
|
106
106
|
|
|
107
|
-
`
|
|
107
|
+
`mia_miette_duo`, `create_observability_pipeline`, `analyze_audio_workflow`
|
|
108
108
|
|
|
109
109
|
## Tool Registration Pattern
|
|
110
110
|
|
|
111
|
-
|
|
111
|
+
The current server uses plain tool definition arrays plus dispatch handlers:
|
|
112
112
|
|
|
113
113
|
```typescript
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
});
|
|
124
|
-
// ... more tools
|
|
125
|
-
}
|
|
114
|
+
const allToolDefs = [
|
|
115
|
+
...getCoaiapyToolDefinitions(featureConfig),
|
|
116
|
+
...getNarrativeToolDefinitions(featureConfig),
|
|
117
|
+
...getPdeToolDefinitions(featureConfig),
|
|
118
|
+
...getPlanningToolDefinitions(featureConfig),
|
|
119
|
+
];
|
|
120
|
+
|
|
121
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: allToolDefs }));
|
|
122
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => routeToolCall(request.params));
|
|
126
123
|
```
|
|
127
124
|
|
|
128
125
|
## Transport
|
|
@@ -132,9 +129,9 @@ stdio transport only (standard MCP pattern). Server reads JSON-RPC from stdin, w
|
|
|
132
129
|
## Quality Criteria
|
|
133
130
|
|
|
134
131
|
- ✅ Single MCP config entry replaces three separate servers
|
|
135
|
-
- ✅
|
|
132
|
+
- ✅ Implemented parent tools route to TypeScript handlers instead of placeholders
|
|
136
133
|
- ✅ Feature gating reduces tool count without breaking functionality
|
|
137
|
-
- ✅ `
|
|
138
|
-
- ✅ Server starts
|
|
134
|
+
- ✅ `COAIAJS_FEATURES` and `--features` select feature level
|
|
135
|
+
- ✅ Server starts from installed tarball with `npx coaiajs-mcp`
|
|
139
136
|
- ✅ Tool descriptions are self-documenting (LLMs understand usage without external docs)
|
|
140
137
|
- ✅ Error responses include actionable information
|
|
@@ -9,11 +9,11 @@ An audio module providing speech-to-text transcription via OpenAI Whisper and te
|
|
|
9
9
|
## Structural Tension
|
|
10
10
|
|
|
11
11
|
**Current Reality:**
|
|
12
|
-
- `src/audio.ts`
|
|
13
|
-
- `src/llm.ts`
|
|
12
|
+
- [`src/audio.ts`](../src/audio.ts) implements `synthesize()` with AWS Polly and lazy client initialization.
|
|
13
|
+
- [`src/llm.ts`](../src/llm.ts) implements `transcribeAudio()` with OpenAI Whisper and exposes `llm()`, `generateImage()`, and `abstractProcess()`.
|
|
14
14
|
- Both use lazy client initialization
|
|
15
15
|
- coaiapy's `syntation.py` provides the same functionality via boto3 and openai Python packages
|
|
16
|
-
-
|
|
16
|
+
- Remaining gap: audio is available through the library and CLI transcription path, but standalone MCP audio tools are not wired yet.
|
|
17
17
|
|
|
18
18
|
**Desired Outcome:**
|
|
19
19
|
Audio module consolidating transcription and synthesis in one place:
|
package/rispecs/KINSHIP.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
**Name:** coaiajs rispecs
|
|
6
6
|
**Role:** RISE-based structural specifications for the coaiajs platform
|
|
7
|
-
**Status:**
|
|
7
|
+
**Status:** Maintained implementation-linked specs (updated 2026-05-07)
|
|
8
8
|
|
|
9
9
|
## Lineage
|
|
10
10
|
|
|
@@ -34,10 +34,10 @@ These specifications synthesize the creative intent, structural patterns, and be
|
|
|
34
34
|
## Accountabilities
|
|
35
35
|
|
|
36
36
|
1. **Completeness** — These specs are sufficient for another LLM to re-implement the entire coaiajs platform from scratch
|
|
37
|
-
2. **Accuracy** — Current reality assessments are honest and factual, reflecting actual implementation state as of 2026-
|
|
37
|
+
2. **Accuracy** — Current reality assessments are honest and factual, reflecting actual implementation state as of 2026-05-07
|
|
38
38
|
3. **Creative orientation** — All desired outcomes use creation language, not problem-solving language
|
|
39
39
|
4. **Backward compatibility** — Specs preserve behavioral compatibility with parent projects
|
|
40
|
-
5. **
|
|
40
|
+
5. **Traceability** — Specs link to the code files that carry current behavior
|
|
41
41
|
|
|
42
42
|
## Consumers
|
|
43
43
|
|
|
@@ -53,4 +53,4 @@ These specifications synthesize the creative intent, structural patterns, and be
|
|
|
53
53
|
|
|
54
54
|
**Desired Outcome:** These rispecs serve as the single source of truth for what coaiajs should become — complete enough for autonomous re-implementation, accurate enough for MMOT self-evaluation.
|
|
55
55
|
|
|
56
|
-
**Current Reality:** 13 spec files covering the full platform. Parent project rispecs remain authoritative for deep behavioral details (especially coaia-narrative's 15 specs). These specs
|
|
56
|
+
**Current Reality:** 13 spec files covering the full platform. Parent project rispecs remain authoritative for deep behavioral details (especially coaia-narrative's 15 specs). These specs now include implementation links for `src/`, `mcp/`, and package metadata so evaluators can trace desired behavior to current code.
|
package/rispecs/README.md
CHANGED
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
These rispecs define the structural specifications for **coaiajs** — the unified TypeScript platform that consolidates `coaiapy`, `coaia-narrative`, `coaia-pde`, and `coaia-planning` into a single modern Node.js package.
|
|
9
9
|
|
|
10
|
+
## RISE Framework Source
|
|
11
|
+
|
|
12
|
+
These specs use the RISE Framework at `/src/llms/llms-rise-framework.txt` as the governing method:
|
|
13
|
+
|
|
14
|
+
- **Reverse-engineer** parent package behavior from `coaiapy`, `coaia-narrative`, `coaia-pde`, and `coaia-planning`.
|
|
15
|
+
- **Intent-extract** the creative outcome each module makes possible.
|
|
16
|
+
- **Specify** the structural tension between current implementation and desired package behavior.
|
|
17
|
+
- **Export** enough code-linked detail for an evaluator or implementation agent to act without rediscovery.
|
|
18
|
+
|
|
10
19
|
## Specification Index
|
|
11
20
|
|
|
12
21
|
### Platform
|
|
@@ -73,6 +82,22 @@ These rispecs define the structural specifications for **coaiajs** — the unifi
|
|
|
73
82
|
└─────────────────────────────────────────────────────┘
|
|
74
83
|
```
|
|
75
84
|
|
|
85
|
+
## Implementation Map
|
|
86
|
+
|
|
87
|
+
| Spec | Primary implementation |
|
|
88
|
+
|------|------------------------|
|
|
89
|
+
| 00 platform | [`package.json`](../package.json), [`src/index.ts`](../src/index.ts) |
|
|
90
|
+
| 01 config | [`src/config.ts`](../src/config.ts), [`src/types.ts`](../src/types.ts) |
|
|
91
|
+
| 02 redis | [`src/redis.ts`](../src/redis.ts), [`mcp/tools/coaiapy-tools.ts`](../mcp/tools/coaiapy-tools.ts) |
|
|
92
|
+
| 03 langfuse | [`src/langfuse/`](../src/langfuse/), [`mcp/server.ts`](../mcp/server.ts) |
|
|
93
|
+
| 04 narrative | [`src/narrative/`](../src/narrative/), [`src/narrative/index.ts`](../src/narrative/index.ts) |
|
|
94
|
+
| 05 PDE | [`src/pde/`](../src/pde/), [`src/pde/mcp-tools.ts`](../src/pde/mcp-tools.ts) |
|
|
95
|
+
| 06 planning | [`src/planning/`](../src/planning/), [`src/planning/mcp-tools.ts`](../src/planning/mcp-tools.ts) |
|
|
96
|
+
| 07 pipeline | [`src/pipeline/`](../src/pipeline/), [`mcp/resources.ts`](../mcp/resources.ts) |
|
|
97
|
+
| 08 CLI | [`src/cli.ts`](../src/cli.ts), [`package.json`](../package.json) `bin.coaia` |
|
|
98
|
+
| 09 MCP | [`mcp/server.ts`](../mcp/server.ts), [`mcp/config.ts`](../mcp/config.ts), [`mcp/prompts.ts`](../mcp/prompts.ts) |
|
|
99
|
+
| 10 audio | [`src/audio.ts`](../src/audio.ts), [`src/llm.ts`](../src/llm.ts) |
|
|
100
|
+
|
|
76
101
|
## Conventions
|
|
77
102
|
|
|
78
103
|
- **Creative orientation**: Desired Outcome describes what IS CREATED, not what is fixed
|
|
@@ -80,7 +105,7 @@ These rispecs define the structural specifications for **coaiajs** — the unifi
|
|
|
80
105
|
- **Structural tension**: The gap between current and desired that drives advancement
|
|
81
106
|
- **Variable detail**: Broad for obvious patterns, precise for critical behavior
|
|
82
107
|
- **Naming**: `NN-kebab-case.spec.md`
|
|
83
|
-
- **
|
|
108
|
+
- **Code-linked**: Specs describe behavior and link to the implementation files that currently carry it
|
|
84
109
|
|
|
85
110
|
## Relationship to Parent Rispecs
|
|
86
111
|
|
|
@@ -91,10 +116,11 @@ These rispecs define the structural specifications for **coaiajs** — the unifi
|
|
|
91
116
|
| coaia-planning | — | No rispecs yet — spec 06 here is the first |
|
|
92
117
|
| coaiapy | — | No rispecs — specs 01-03, 07, 10 here are the first |
|
|
93
118
|
|
|
94
|
-
##
|
|
119
|
+
## Maintenance Protocol
|
|
120
|
+
|
|
121
|
+
When code changes, update the relevant spec in the same pass:
|
|
95
122
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
- **E**xport: Produce specs sufficient for autonomous re-implementation
|
|
123
|
+
1. Adjust **Current Reality** to match implemented files and verified behavior.
|
|
124
|
+
2. Add or revise implementation links in the local spec and this README map.
|
|
125
|
+
3. Keep **Desired Outcome** forward-looking only where a gap remains.
|
|
126
|
+
4. Re-run `npm run build`, `npm test`, and `npm pack --dry-run` before handing off.
|