@caupulican/pi-adaptative 0.90.12 → 0.91.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +39 -0
- package/README.md +8 -10
- package/dist/bundled-resources/skills/icm-architect/LICENSE +21 -0
- package/dist/bundled-resources/skills/icm-architect/SKILL.md +112 -0
- package/dist/bundled-resources/skills/icm-architect/assets/templates/CLAUDE.md +27 -0
- package/dist/bundled-resources/skills/icm-architect/assets/templates/CONTEXT.md +14 -0
- package/dist/bundled-resources/skills/icm-architect/assets/templates/node.md +29 -0
- package/dist/bundled-resources/skills/icm-architect/assets/templates/object.md +43 -0
- package/dist/bundled-resources/skills/icm-architect/assets/templates/process.md +38 -0
- package/dist/bundled-resources/skills/icm-architect/assets/templates/questionnaire.md +9 -0
- package/dist/bundled-resources/skills/icm-architect/assets/templates/schema.md +24 -0
- package/dist/bundled-resources/skills/icm-architect/assets/templates/stage-CONTEXT.md +21 -0
- package/dist/bundled-resources/skills/icm-architect/references/core.md +92 -0
- package/dist/bundled-resources/skills/icm-architect/references/forms.md +182 -0
- package/dist/bundled-resources/skills/icm-architect/references/system-map.md +122 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-paths.d.ts +2 -2
- package/dist/core/agent-paths.d.ts.map +1 -1
- package/dist/core/agent-paths.js +1 -0
- package/dist/core/agent-paths.js.map +1 -1
- package/dist/core/agent-session.d.ts +12 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +40 -10
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.d.ts.map +1 -1
- package/dist/core/autonomy/lane-tool-surface.js +2 -0
- package/dist/core/autonomy/lane-tool-surface.js.map +1 -1
- package/dist/core/background-tool-task-controller.d.ts +9 -0
- package/dist/core/background-tool-task-controller.d.ts.map +1 -1
- package/dist/core/background-tool-task-controller.js +23 -0
- package/dist/core/background-tool-task-controller.js.map +1 -1
- package/dist/core/bash-executor.js +3 -3
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/context/local-graph-memory-provider.d.ts +9 -0
- package/dist/core/context/local-graph-memory-provider.d.ts.map +1 -0
- package/dist/core/context/local-graph-memory-provider.js +122 -0
- package/dist/core/context/local-graph-memory-provider.js.map +1 -0
- package/dist/core/context/tool-output-packer.d.ts +2 -2
- package/dist/core/context/tool-output-packer.d.ts.map +1 -1
- package/dist/core/context/tool-output-packer.js +3 -3
- package/dist/core/context/tool-output-packer.js.map +1 -1
- package/dist/core/context-gc.d.ts.map +1 -1
- package/dist/core/context-gc.js +2 -0
- package/dist/core/context-gc.js.map +1 -1
- package/dist/core/default-tool-surface.d.ts.map +1 -1
- package/dist/core/default-tool-surface.js +5 -0
- package/dist/core/default-tool-surface.js.map +1 -1
- package/dist/core/delegation/worker-agent-control-coordinator.d.ts +1 -0
- package/dist/core/delegation/worker-agent-control-coordinator.d.ts.map +1 -1
- package/dist/core/delegation/worker-agent-control-coordinator.js +16 -8
- package/dist/core/delegation/worker-agent-control-coordinator.js.map +1 -1
- package/dist/core/delegation/worker-agent-control.d.ts +2 -0
- package/dist/core/delegation/worker-agent-control.d.ts.map +1 -1
- package/dist/core/delegation/worker-agent-control.js.map +1 -1
- package/dist/core/delegation/worker-context-inheritance-policy.d.ts +3 -3
- package/dist/core/delegation/worker-context-inheritance-policy.js +4 -4
- package/dist/core/delegation/worker-context-inheritance-policy.js.map +1 -1
- package/dist/core/delegation/worker-delegation-controller.d.ts +1 -5
- package/dist/core/delegation/worker-delegation-controller.d.ts.map +1 -1
- package/dist/core/delegation/worker-delegation-controller.js +19 -9
- package/dist/core/delegation/worker-delegation-controller.js.map +1 -1
- package/dist/core/delegation/worker-tree-budget-coordinator.d.ts +2 -0
- package/dist/core/delegation/worker-tree-budget-coordinator.d.ts.map +1 -1
- package/dist/core/delegation/worker-tree-budget-coordinator.js +6 -0
- package/dist/core/delegation/worker-tree-budget-coordinator.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +1 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/foreground-terminal-handoff-controller.d.ts +0 -1
- package/dist/core/foreground-terminal-handoff-controller.d.ts.map +1 -1
- package/dist/core/foreground-terminal-handoff-controller.js +1 -2
- package/dist/core/foreground-terminal-handoff-controller.js.map +1 -1
- package/dist/core/goals/goal-continuation-controller.d.ts +7 -1
- package/dist/core/goals/goal-continuation-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-continuation-controller.js +16 -0
- package/dist/core/goals/goal-continuation-controller.js.map +1 -1
- package/dist/core/goals/goal-runtime-snapshot.d.ts +3 -0
- package/dist/core/goals/goal-runtime-snapshot.d.ts.map +1 -1
- package/dist/core/goals/goal-runtime-snapshot.js +8 -1
- package/dist/core/goals/goal-runtime-snapshot.js.map +1 -1
- package/dist/core/goals/goal-session-controller.d.ts +2 -0
- package/dist/core/goals/goal-session-controller.d.ts.map +1 -1
- package/dist/core/goals/goal-session-controller.js +1 -0
- package/dist/core/goals/goal-session-controller.js.map +1 -1
- package/dist/core/goals/goal-tool-core.d.ts +18 -0
- package/dist/core/goals/goal-tool-core.d.ts.map +1 -1
- package/dist/core/goals/goal-tool-core.js +62 -0
- package/dist/core/goals/goal-tool-core.js.map +1 -1
- package/dist/core/goals/natural-language-goal.d.ts.map +1 -1
- package/dist/core/goals/natural-language-goal.js +4 -2
- package/dist/core/goals/natural-language-goal.js.map +1 -1
- package/dist/core/human-input-controller.d.ts +3 -34
- package/dist/core/human-input-controller.d.ts.map +1 -1
- package/dist/core/human-input-controller.js +3 -161
- package/dist/core/human-input-controller.js.map +1 -1
- package/dist/core/keybindings.d.ts +5 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +2 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/learning/reflection-turn-analysis.d.ts.map +1 -1
- package/dist/core/learning/reflection-turn-analysis.js +10 -1
- package/dist/core/learning/reflection-turn-analysis.js.map +1 -1
- package/dist/core/memory/providers/file-store.d.ts.map +1 -1
- package/dist/core/memory/providers/file-store.js +4 -0
- package/dist/core/memory/providers/file-store.js.map +1 -1
- package/dist/core/memory-controller.d.ts +3 -0
- package/dist/core/memory-controller.d.ts.map +1 -1
- package/dist/core/memory-controller.js +18 -0
- package/dist/core/memory-controller.js.map +1 -1
- package/dist/core/model-capability.d.ts.map +1 -1
- package/dist/core/model-capability.js +1 -0
- package/dist/core/model-capability.js.map +1 -1
- package/dist/core/orchestration/work-state-projection.d.ts +4 -0
- package/dist/core/orchestration/work-state-projection.d.ts.map +1 -1
- package/dist/core/orchestration/work-state-projection.js +11 -0
- package/dist/core/orchestration/work-state-projection.js.map +1 -1
- package/dist/core/pipelines/context.d.ts +6 -0
- package/dist/core/pipelines/context.d.ts.map +1 -0
- package/dist/core/pipelines/context.js +102 -0
- package/dist/core/pipelines/context.js.map +1 -0
- package/dist/core/pipelines/discover.d.ts +11 -0
- package/dist/core/pipelines/discover.d.ts.map +1 -0
- package/dist/core/pipelines/discover.js +147 -0
- package/dist/core/pipelines/discover.js.map +1 -0
- package/dist/core/pipelines/increment.d.ts +24 -0
- package/dist/core/pipelines/increment.d.ts.map +1 -0
- package/dist/core/pipelines/increment.js +121 -0
- package/dist/core/pipelines/increment.js.map +1 -0
- package/dist/core/pipelines/index.d.ts +8 -0
- package/dist/core/pipelines/index.d.ts.map +1 -0
- package/dist/core/pipelines/index.js +8 -0
- package/dist/core/pipelines/index.js.map +1 -0
- package/dist/core/pipelines/parse-contract.d.ts +10 -0
- package/dist/core/pipelines/parse-contract.d.ts.map +1 -0
- package/dist/core/pipelines/parse-contract.js +105 -0
- package/dist/core/pipelines/parse-contract.js.map +1 -0
- package/dist/core/pipelines/run-state.d.ts +26 -0
- package/dist/core/pipelines/run-state.d.ts.map +1 -0
- package/dist/core/pipelines/run-state.js +135 -0
- package/dist/core/pipelines/run-state.js.map +1 -0
- package/dist/core/pipelines/session-pipeline-run.d.ts +6 -0
- package/dist/core/pipelines/session-pipeline-run.d.ts.map +1 -0
- package/dist/core/pipelines/session-pipeline-run.js +18 -0
- package/dist/core/pipelines/session-pipeline-run.js.map +1 -0
- package/dist/core/pipelines/types.d.ts +91 -0
- package/dist/core/pipelines/types.d.ts.map +1 -0
- package/dist/core/pipelines/types.js +44 -0
- package/dist/core/pipelines/types.js.map +1 -0
- package/dist/core/reflection-controller.d.ts +2 -0
- package/dist/core/reflection-controller.d.ts.map +1 -1
- package/dist/core/reflection-controller.js +53 -30
- package/dist/core/reflection-controller.js.map +1 -1
- package/dist/core/resource-loader.d.ts +21 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +45 -18
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/runtime-builder.d.ts +3 -0
- package/dist/core/runtime-builder.d.ts.map +1 -1
- package/dist/core/runtime-builder.js +49 -1
- package/dist/core/runtime-builder.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-role.d.ts.map +1 -1
- package/dist/core/session-role.js +2 -0
- package/dist/core/session-role.js.map +1 -1
- package/dist/core/settings-manager.d.ts +12 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +43 -9
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt-builder.js +1 -1
- package/dist/core/system-prompt-builder.js.map +1 -1
- package/dist/core/system-prompt.d.ts +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +30 -22
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tasks/task-projection.d.ts +2 -0
- package/dist/core/tasks/task-projection.d.ts.map +1 -1
- package/dist/core/tasks/task-projection.js +1 -0
- package/dist/core/tasks/task-projection.js.map +1 -1
- package/dist/core/tasks/task-state.d.ts.map +1 -1
- package/dist/core/tasks/task-state.js +6 -1
- package/dist/core/tasks/task-state.js.map +1 -1
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +11 -3
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/delegate.d.ts.map +1 -1
- package/dist/core/tools/delegate.js +9 -3
- package/dist/core/tools/delegate.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +47 -5
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/goal.d.ts +16 -1
- package/dist/core/tools/goal.d.ts.map +1 -1
- package/dist/core/tools/goal.js +14 -2
- package/dist/core/tools/goal.js.map +1 -1
- package/dist/core/tools/index.d.ts +1 -1
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +1 -1
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +5 -0
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +33 -2
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/pipeline.d.ts +35 -0
- package/dist/core/tools/pipeline.d.ts.map +1 -0
- package/dist/core/tools/pipeline.js +203 -0
- package/dist/core/tools/pipeline.js.map +1 -0
- package/dist/core/tools/skill-audit.d.ts.map +1 -1
- package/dist/core/tools/skill-audit.js +2 -1
- package/dist/core/tools/skill-audit.js.map +1 -1
- package/dist/core/tools/skill.d.ts.map +1 -1
- package/dist/core/tools/skill.js +2 -1
- package/dist/core/tools/skill.js.map +1 -1
- package/dist/core/tools/skillify.d.ts.map +1 -1
- package/dist/core/tools/skillify.js +3 -1
- package/dist/core/tools/skillify.js.map +1 -1
- package/dist/core/tools/task-steps.d.ts +1 -1
- package/dist/core/tools/task-steps.d.ts.map +1 -1
- package/dist/core/tools/task-steps.js +9 -0
- package/dist/core/tools/task-steps.js.map +1 -1
- package/dist/core/tools/tool-task.d.ts.map +1 -1
- package/dist/core/tools/tool-task.js +5 -1
- package/dist/core/tools/tool-task.js.map +1 -1
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +1 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +66 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +6 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +20 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-group.d.ts +4 -0
- package/dist/modes/interactive/components/tool-group.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-group.js +96 -7
- package/dist/modes/interactive/components/tool-group.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +8 -10
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/key-handlers.d.ts +1 -0
- package/dist/modes/interactive/key-handlers.d.ts.map +1 -1
- package/dist/modes/interactive/key-handlers.js +2 -1
- package/dist/modes/interactive/key-handlers.js.map +1 -1
- package/dist/modes/interactive/settings-selector-flow.d.ts.map +1 -1
- package/dist/modes/interactive/settings-selector-flow.js +12 -0
- package/dist/modes/interactive/settings-selector-flow.js.map +1 -1
- package/docs/extensions.md +7 -5
- package/docs/harness-architecture.md +3 -4
- package/docs/keybindings.md +3 -2
- package/docs/quickstart.md +4 -4
- package/docs/sdk.md +3 -1
- package/docs/settings.md +16 -2
- package/docs/task-steps.md +1 -0
- package/docs/usage.md +6 -7
- package/docs/worker-profiles.md +1 -1
- package/docs/worktree-sync.md +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/minimal-mode.ts +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/sdk/07-context-files.ts +5 -2
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,42 @@
|
|
|
1
|
+
## [0.91.2] - 2026-08-15
|
|
2
|
+
|
|
3
|
+
## [0.91.1] - 2026-08-15
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Host-owned `pipeline` tool walks numbered folder stages (ICM): status is `output/` files, increment completes the current stage then starts the next. `task_steps advance` and `goal increment` share that complete-current-then-start-next verb. Goal complete refuses an active pipeline; pipeline increment refuses linked open task_steps and running `tool_task`s. Current-stage context is injected as a GC-managed `<pipeline_context>` page. Workers and lean models cannot activate `pipeline`. The bundled `icm-architect` skill is the authoring method for building a workspace; the runtime does not name it from the tool.
|
|
8
|
+
|
|
9
|
+
## [0.91.0] - 2026-08-14
|
|
10
|
+
|
|
11
|
+
### Breaking Changes
|
|
12
|
+
|
|
13
|
+
- Omitted worker `forkTurns` now defaults to self-contained birth context (`none`) even for same-provider/model root workers. Set `forkTurns` to `all` or a positive turn count to inherit sanitized parent turns.
|
|
14
|
+
- Repository `AGENTS.md`/`CLAUDE.md`/`GEMINI.md` stay off until a settings layer sets `projectContextFiles` to `"on-demand"`, which lists paths only. They are not injected. Global `~/.pi/agent` context files remain mandatory. `--no-context-files` no longer disables the global file.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Packed tool output and truncated bash/python model previews now keep a head+tail window so first hits and terminal errors both survive. Live TUI preview stays tail-only. Full output is still saved to the artifact or managed file.
|
|
19
|
+
- Repository `AGENTS.md` loading is opt-in per directory. Default is global `~/.pi/agent` files only. `/settings` → Project AGENTS.md enables listing this project's files or keeps global-only; save per directory, project, or all projects.
|
|
20
|
+
- Collapsed file edits no longer dump the full diff. Consecutive edit/write calls group into a count, a 2–3 file snippet, and the last successful action; `Ctrl+O` expands the full list. Thinking blocks are hidden by default (`hideThinkingBlock`, `Ctrl+T` to show).
|
|
21
|
+
- Collapsed tool groups use human nouns: Task Step(s), Skill(s), Worker(s). Skill, Skillify, and Skill Audit share one skills group.
|
|
22
|
+
- Worker terminals that need parent review no longer interrupt the owner with Review now / Keep blocked. The parent agent wakes on the existing terminal handoff and decides via `delegate` status/review. The human stays on the edge: no blocking owner question is queued.
|
|
23
|
+
- `Ctrl+O` only expands or collapses tool output. Deferred session history loads on `Ctrl+Shift+H` (`app.history.load`) so an expand never remounts the transcript.
|
|
24
|
+
- Exported `loadProjectContextFiles()` now matches the live loader: default is global files only; `includeProject: true` lists project paths without injecting their bodies.
|
|
25
|
+
- Long-term memory retrieval now consults a local durable graph when one is present on disk, so graph recall happens automatically on the next turn.
|
|
26
|
+
- Wired built-in `memory`, `skillify`, `skill_audit`, and `improvement_loop` onto the default capable-session tool surface so they activate when the model/session can use them. Session create now initializes the bundled memory providers, so SDK sessions that never bind extensions still get the `memory` tool when the grant allows it. A `memory` write of a repeatable procedure now triggers reflection, and a clean `promote_skill` lands as a loadable skill under stock policy. An owner who enabled auto-apply and omitted `skill` still keeps that ceiling. Workers still cannot take the write/self-adaptation tools.
|
|
27
|
+
- Goal, `task_steps`, and `tool_task` now share a live join: a still-running background tool cannot verify goal evidence, agent complete refuses while linked checklist steps or cited tool tasks remain open, and continuation waits on those running tasks.
|
|
28
|
+
- A just-written or archived skill refreshes the live catalog, so `skill` search/load can use it in the same session without `/reload`.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- Goal start authority now accepts owner speech such as `this is a goal, use it` while still rejecting `goal-oriented` compounds and ordinary task text.
|
|
33
|
+
- Failed goal actions, including unauthorized start, now return `isError` so tool-failure recovery can block unchanged retries in the same turn.
|
|
34
|
+
- Failed `delegate` validation, API-correction, and start-skip results now return `isError` so unchanged retries are blocked instead of burning another worker turn.
|
|
35
|
+
- Worker `delegate list` now marks which session peers the caller can control. Nested-limit guidance tells the model to reuse only `controllable=true` descendants, not siblings.
|
|
36
|
+
- Nested worker start is rejected at admission when the tree already holds its `maxAttempts` ceiling, instead of returning started and dying before the first provider token.
|
|
37
|
+
- Corrected the `delegate` `forkTurns` parameter description so omitted starts document `none`, matching the runtime default.
|
|
38
|
+
- A worker tool denial for an exhausted token/cost/wall/tool budget now terminals the lane instead of blocking one call and letting the model retry other paths.
|
|
39
|
+
|
|
1
40
|
## [0.90.12] - 2026-08-14
|
|
2
41
|
|
|
3
42
|
### Fixed
|
package/README.md
CHANGED
|
@@ -238,8 +238,9 @@ See `/hotkeys` for the full list. Customize via `~/.pi/agent/keybindings.json`.
|
|
|
238
238
|
| Ctrl+L | Open model selector |
|
|
239
239
|
| Ctrl+P / Shift+Ctrl+P | Cycle scoped models forward/backward |
|
|
240
240
|
| Shift+Tab | Cycle thinking level |
|
|
241
|
-
| Ctrl+O |
|
|
242
|
-
| Ctrl+
|
|
241
|
+
| Ctrl+O | Expand or collapse tool output (edits stay as a count + short file list until then) |
|
|
242
|
+
| Ctrl+Shift+H | Load deferred session history into the chat |
|
|
243
|
+
| Ctrl+T | Show or hide thinking blocks (hidden by default) |
|
|
243
244
|
|
|
244
245
|
### Message Queue
|
|
245
246
|
|
|
@@ -329,14 +330,11 @@ Runtime orchestration, recovery, and learning telemetry stays local. See [docs/t
|
|
|
329
330
|
|
|
330
331
|
## Context Files
|
|
331
332
|
|
|
332
|
-
Pi Adaptative discovers `AGENTS.md`, `CLAUDE.md`, and `GEMINI.md` context files
|
|
333
|
-
- `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md` in `~/.pi/agent/` (global)
|
|
334
|
-
- Parent directories (
|
|
335
|
-
- Current directory
|
|
333
|
+
Pi Adaptative discovers `AGENTS.md`, `CLAUDE.md`, and `GEMINI.md` context files from:
|
|
334
|
+
- `AGENTS.md`, `CLAUDE.md`, or `GEMINI.md` in `~/.pi/agent/` (global) — always loaded into the system prompt
|
|
335
|
+
- Parent directories and the current directory — listed by path after opt-in (`/settings` → Project AGENTS.md), then read on demand, not injected at startup
|
|
336
336
|
|
|
337
|
-
Use
|
|
338
|
-
|
|
339
|
-
Disable context file discovery with `--no-context-files` (or `-nc`).
|
|
337
|
+
Use the global file for standing instructions. A repo `AGENTS.md` is off until you opt in for that directory: `/settings` → **Project AGENTS.md**. Then the agent sees the path and can read it. Set Load to **global-only** to keep only `~/.pi/agent`. `--no-context-files` (`-nc`) skips project files for that session. The global file always loads.
|
|
340
338
|
|
|
341
339
|
### System Prompt
|
|
342
340
|
|
|
@@ -602,7 +600,7 @@ Available built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`
|
|
|
602
600
|
| `--no-prompt-templates` | Disable prompt template discovery |
|
|
603
601
|
| `--theme <path>` | Load theme (repeatable) |
|
|
604
602
|
| `--no-themes` | Disable theme discovery |
|
|
605
|
-
| `--no-context-files`, `-nc` |
|
|
603
|
+
| `--no-context-files`, `-nc` | Skip project `AGENTS.md`/`CLAUDE.md`/`GEMINI.md`; global `~/.pi/agent` files still load |
|
|
606
604
|
|
|
607
605
|
Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings.json (e.g., `--no-extensions -e ./my-ext.ts`).
|
|
608
606
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jake Van Clief
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: icm-architect
|
|
3
|
+
description: Design any process, idea, problem, or body of knowledge into an ICM (Interpretable Context Methodology) workspace — folder structure as agent architecture — or restructure an existing folder, repo, or vault into one. Use when the user wants to (1) turn a recurring workflow into an agent-runnable folder pipeline, (2) organize scattered notes, files, or knowledge into a library one AI agent can walk, (3) map a team or company as connected context ("context map", "second brain", "team brain", "knowledge base for AI"), (4) audit a codebase or mixed folder into a walkable edit map (objects, processes, change-impact) so later agents can change it without slurping the tree, (5) audit or restructure an existing workspace to ICM conventions, or (6) says "make this an ICM", "ICM this", "map this repo", "audit this folder", "what would a change hit", "build me a workspace", or "structure this for agents".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ICM Architect
|
|
7
|
+
|
|
8
|
+
Build workspaces where the folder structure does the orchestration. One agent, reading the right files at the right moment, replaces a multi-agent framework: numbered folders carry sequencing, hierarchy carries context scoping, plain markdown files carry state. A human can open any folder and see exactly what state the system is in, because state is just files.
|
|
9
|
+
|
|
10
|
+
Think of the workspace as a library. The routing files are the catalog: small, stable, they point at everything and store almost nothing. The content lives on the shelves (stage folders, node files, reference material). One librarian — one model — walks the building, and the question decides which shelf gets walked to. Nobody photocopies the library into a backpack; that is what context-stuffing is. The catalog is small on purpose.
|
|
11
|
+
|
|
12
|
+
Method: Interpretable Context Methodology (Van Clief & McDermott, arXiv:2603.16021, MIT-licensed).
|
|
13
|
+
|
|
14
|
+
On Pi Adaptative, L0 is `AGENTS.md` (CLAUDE.md is accepted). After a workspace exists, drive a run with the host `pipeline` tool (`start` / `increment` / `status`). Increment completes the current stage when `output/` has files, then starts the next — it is not a Review-now latch. Concurrent or branching work still uses `delegate`.
|
|
15
|
+
|
|
16
|
+
## The invariants
|
|
17
|
+
|
|
18
|
+
Every ICM, whatever its form, obeys these. When building or restructuring, enforce all ten:
|
|
19
|
+
|
|
20
|
+
1. **One folder, one job.** Each folder does a single step or holds a single kind of thing, and states its own purpose in a file inside itself. The structure is the documentation.
|
|
21
|
+
2. **A small, stable entry file.** `CLAUDE.md` (or `AGENTS.md`) at the root answers "where am I, where does everything live, where do I go for task X" — and nothing else. Target under ~60 lines. It routes; it never holds content.
|
|
22
|
+
3. **Numbering encodes order.** `01_`, `02_`, … where sequence matters. Renaming folders reorders the pipeline — that is the point.
|
|
23
|
+
4. **Every folder-level contract is explicit.** A `CONTEXT.md` per working folder: what it reads (inputs), what it does (process), what it writes (outputs), what a human checks. See [assets/templates/stage-CONTEXT.md](assets/templates/stage-CONTEXT.md).
|
|
24
|
+
5. **Factory vs. product.** Reference material (rules, voice, schemas, templates — stable across runs) lives structurally apart from working artifacts (outputs, drafts — new every run). Configure the factory once; the product is what each run emits.
|
|
25
|
+
6. **Every output is an edit surface.** Intermediate outputs are plain files a human can open, edit, and save before the next step reads them. Nothing moves forward until a person has read the last output.
|
|
26
|
+
7. **Load only what the step needs.** An agent executing a step reads its contract, its references, and its inputs — not the whole workspace. 2,000–8,000 tokens per step is the healthy range.
|
|
27
|
+
8. **Plain text, linkable, queryable.** Markdown + YAML frontmatter. Links (`[[wikilinks]]` or relative paths) make it a graph; frontmatter labels make it queryable. One home per fact — a link beats a copy.
|
|
28
|
+
9. **The filesystem is the state machine.** "Status" is derivable by scanning what exists in output folders. Generated indexes (file maps, logs) are rebuilt by script, never hand-edited.
|
|
29
|
+
10. **Instantiate by copying.** New unit of work = copy a template folder, not a blank page. Keep templates in a `_templates/` or `_system/` folder.
|
|
30
|
+
|
|
31
|
+
## Choose a mode
|
|
32
|
+
|
|
33
|
+
- **Building from a described process, idea, or problem** → Build mode.
|
|
34
|
+
- **An existing folder, repo, or vault that needs ICM structure** → Restructure mode.
|
|
35
|
+
- **A body of work later agents must edit** (code, markdown, or mixed) → System map form. Read [references/system-map.md](references/system-map.md) after picking the form.
|
|
36
|
+
|
|
37
|
+
## Build mode
|
|
38
|
+
|
|
39
|
+
**1. Extract the structure from dialogue.** The structure is already in how the person describes the work — don't impose a shape, surface theirs. Ask (a few at a time, not all at once):
|
|
40
|
+
|
|
41
|
+
- What is the repeating unit of work? (an episode, a client, a report, a person, a team?)
|
|
42
|
+
- Walk me through one run, start to finish. Where do you stop and check something before continuing?
|
|
43
|
+
- What stays the same every run (voice, rules, brand, schema) vs. what is new every run?
|
|
44
|
+
- What does "done" look like — what artifact leaves the workspace?
|
|
45
|
+
- Who else touches this, and what do they need to find without asking you?
|
|
46
|
+
|
|
47
|
+
Their pauses become stage boundaries. Their "I always check X before Y" become human gates. Their "it always has to sound like / follow Z" becomes factory reference material.
|
|
48
|
+
|
|
49
|
+
**2. Pick the form.** Read [references/forms.md](references/forms.md) and choose:
|
|
50
|
+
|
|
51
|
+
| Form | Reach for it when |
|
|
52
|
+
|---|---|
|
|
53
|
+
| **Pipeline** | The same sequence runs repeatedly, producing a deliverable each run |
|
|
54
|
+
| **Umbrella** | Several distinct pipelines share one brand/voice/reference layer |
|
|
55
|
+
| **Record library** | The unit is a record (person, client, session) that accumulates, not a run |
|
|
56
|
+
| **Knowledge bundle** | The product is navigable knowledge itself (a brain, a wiki, a model of something) |
|
|
57
|
+
| **Context map** | The subject is an organization — teams, processes, data, and the links between them |
|
|
58
|
+
| **System map** | A folder later agents will edit — nouns, movements, and what a change hits. Method: [references/system-map.md](references/system-map.md) |
|
|
59
|
+
|
|
60
|
+
Real workspaces mix forms (a record library whose records are mini knowledge bundles; a pipeline that emits into a record library). Compose freely — the invariants hold at every level, recursively.
|
|
61
|
+
|
|
62
|
+
**3. Scaffold the smallest structure that carries the work.** Copy starters from [assets/templates/](assets/templates/) and fill them in. Do not create folders for stages that don't exist yet, empty "misc" buckets, or speculative depth. Three real stages beat seven imagined ones. If the whole job fits in one saved prompt, say so and don't build a workspace at all.
|
|
63
|
+
|
|
64
|
+
**4. Write the contracts.** Root `CLAUDE.md` (identity + routing table), root `CONTEXT.md` (the pipeline or schema definition), one `CONTEXT.md` per stage/hub folder, `setup/questionnaire.md` if the factory needs configuring per user. Write inputs as explicit file paths, split into working (this run) and reference (every run).
|
|
65
|
+
|
|
66
|
+
**5. Validate with the walk test** (below).
|
|
67
|
+
|
|
68
|
+
## Restructure mode
|
|
69
|
+
|
|
70
|
+
**1. Inventory before touching.** List the tree. For each area note: what it is, when last touched, what refers to it. Never delete or move in this pass.
|
|
71
|
+
|
|
72
|
+
**2. Find the hidden form.** Ask the owner (or infer and confirm): what is the repeating unit here? Where does work enter and leave? The mess usually contains a real pipeline, library, or map that grew without a skeleton — extract it, don't replace it. Interview the folder the way you'd interview the person.
|
|
73
|
+
|
|
74
|
+
**3. Classify every file** into one of five roles:
|
|
75
|
+
- **Catalog** — identity/routing (becomes or feeds `CLAUDE.md` / index files)
|
|
76
|
+
- **Contract** — describes how a step works (becomes a `CONTEXT.md`)
|
|
77
|
+
- **Factory** — stable reference (→ `_shared/`, `_system/`, or `references/`)
|
|
78
|
+
- **Product** — run-specific artifacts (→ stage `output/` or record folders)
|
|
79
|
+
- **Dead** — stale, duplicated, or superseded (→ propose `_archive/`, never silently delete)
|
|
80
|
+
|
|
81
|
+
**4. Propose before moving.** Present the target tree and a migration map (old path → new path → role). Get approval. This is a human gate in a method built on human gates — honor it.
|
|
82
|
+
|
|
83
|
+
**5. Migrate.** Move files, write the entry file and contracts, de-duplicate toward one-home-per-fact (leave a link where the copy lived if anything might reference it). Separate method from instance: if the structure will be reused elsewhere, the blank template lives apart from this filled-in deployment.
|
|
84
|
+
|
|
85
|
+
**6. Validate with the walk test.**
|
|
86
|
+
|
|
87
|
+
## The walk test
|
|
88
|
+
|
|
89
|
+
Validate any ICM — new or restructured — by walking it cold, as an agent with no memory:
|
|
90
|
+
|
|
91
|
+
- Open the root. Can you answer *where am I* and *where do I go for the current task* within the entry file plus at most two more reads?
|
|
92
|
+
- Pick any stage/node. Does its contract name exact input paths, the job, the output, and the human check?
|
|
93
|
+
- Can you state pipeline status purely by scanning what exists in `output/` folders (or node frontmatter)?
|
|
94
|
+
- Is any routing file carrying content payload? Move the payload to a shelf; leave a pointer.
|
|
95
|
+
- Is any fact stored in two places? Pick one home; link from the other.
|
|
96
|
+
- Token check: entry file + one contract + its inputs should land in roughly 2k–8k tokens.
|
|
97
|
+
- System map only: can a cold agent answer *what is X* and *what else moves if I change X* from `map/CLAUDE.md` plus one card? Extra checks are in [references/system-map.md](references/system-map.md).
|
|
98
|
+
|
|
99
|
+
If a step fails, fix the structure — not by explaining more, but by moving or splitting files until the walk works.
|
|
100
|
+
|
|
101
|
+
## Guardrails
|
|
102
|
+
|
|
103
|
+
- **Don't over-structure.** The ladder runs: chat → saved prompt/skill → folders + one agent. Only climb when the rung below is genuinely automated and repeating. A workspace for a thing done twice is scaffolding, not architecture.
|
|
104
|
+
- **Know where ICM loses.** Real-time multi-agent collaboration, high-concurrency multi-user serving, and automated mid-pipeline branching genuinely need framework code. ICM is for sequential, human-reviewed, repeatable work — which is most knowledge work, but not all of it.
|
|
105
|
+
- **Anti-patterns seen in the wild:** duplicated entry files that drift (generate one from the other, or make one a pointer); schema documents that mandate names the actual files stopped using (update the schema or the files — pick one); hand-edits to generated indexes; workshop sessions that produce slides instead of structured data (every working session should end in an artifact the structure can hold); patterns declared top-down (one team complaining is a gripe — the same shape appearing three independent times is structure).
|
|
106
|
+
|
|
107
|
+
## References
|
|
108
|
+
|
|
109
|
+
- [references/core.md](references/core.md) — the five design principles, the five-layer context hierarchy, naming conventions, token discipline. Read when writing contracts or when a structural call is contested.
|
|
110
|
+
- [references/forms.md](references/forms.md) — the six forms in depth: skeletons, moves, failure modes. Read at step 2 of Build mode or step 2 of Restructure mode.
|
|
111
|
+
- [references/system-map.md](references/system-map.md) — audit pipeline for the System map form. Read when that form is chosen.
|
|
112
|
+
- [assets/templates/](assets/templates/) — copyable starters: `CLAUDE.md`, workspace `CONTEXT.md`, `stage-CONTEXT.md`, `node.md`, `object.md`, `process.md`, `schema.md`, `questionnaire.md`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# {Workspace name}
|
|
2
|
+
|
|
3
|
+
{One sentence: what this workspace is and what leaves it.}
|
|
4
|
+
|
|
5
|
+
Built on ICM: folders carry sequencing, hierarchy carries context, files carry state. The structure is the documentation — if something needs explaining, the explanation goes in that folder's CONTEXT.md, not in your head.
|
|
6
|
+
|
|
7
|
+
## Where things live
|
|
8
|
+
|
|
9
|
+
| Folder | What it holds |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `stages/` | the pipeline, in execution order |
|
|
12
|
+
| `_shared/` | factory: rules and reference that never change per run |
|
|
13
|
+
| `_templates/` | blank starters — new work is a copy, not a blank page |
|
|
14
|
+
| `setup/` | one-time factory configuration |
|
|
15
|
+
|
|
16
|
+
## Route by what just happened
|
|
17
|
+
|
|
18
|
+
| If | Go to | Then stop at |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| starting a new run | `stages/01_.../CONTEXT.md` | human reads the output |
|
|
21
|
+
| {previous stage} output approved | next numbered stage | human reads the output |
|
|
22
|
+
| asked for status | scan `stages/*/output/` | report what exists |
|
|
23
|
+
| setting up for a new user | `setup/questionnaire.md` | answers written to `_shared/` |
|
|
24
|
+
|
|
25
|
+
## The one rule
|
|
26
|
+
|
|
27
|
+
Nothing moves to the next stage until a person has read the output of the last one.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# {Workspace name} — the pipeline
|
|
2
|
+
|
|
3
|
+
The flow in one line: {plan it, make it, check it, ship it — in your workspace's words}.
|
|
4
|
+
|
|
5
|
+
| Stage | Job | Input | Output | Human check |
|
|
6
|
+
|---|---|---|---|---|
|
|
7
|
+
| `01_{name}` | {five words} | {what it reads} | `output/{file}` | {what a person verifies} |
|
|
8
|
+
| `02_{name}` | {five words} | 01's output | `output/{file}` | {what a person verifies} |
|
|
9
|
+
| `03_{name}` | {five words} | 02's output | `output/{file}` | {what a person verifies} |
|
|
10
|
+
|
|
11
|
+
Factory (stable, every run): `_shared/{voice.md, rules.md, …}`
|
|
12
|
+
Product (new each run): each stage's `output/`
|
|
13
|
+
|
|
14
|
+
Status is whatever exists: a stage is COMPLETE when its `output/` holds files other than `.gitkeep`.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: process
|
|
3
|
+
team: {team-slug}
|
|
4
|
+
owner: {name}
|
|
5
|
+
ai-level: L0 # L0 manual · L1 copy-paste · L2 structured · L3 integrated
|
|
6
|
+
frequency: {daily|weekly|monthly|ad-hoc}
|
|
7
|
+
value: 3 # 1–5, to the business
|
|
8
|
+
pain: 3 # 1–5, to the people doing it
|
|
9
|
+
consumes: ["[[data-{input-asset}]]"]
|
|
10
|
+
produces: ["[[data-{output-asset}]]"]
|
|
11
|
+
governance: internal # internal · sensitive · external
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# {Process name}
|
|
15
|
+
|
|
16
|
+
## Input → Movement → Output
|
|
17
|
+
{What comes in, what the team does to it, what goes out. Three sentences.}
|
|
18
|
+
|
|
19
|
+
## Now
|
|
20
|
+
{How it actually runs today, at the ai-level declared above.}
|
|
21
|
+
|
|
22
|
+
## What is working / not working
|
|
23
|
+
{Honest, from the people who run it.}
|
|
24
|
+
|
|
25
|
+
## If we structure this
|
|
26
|
+
{What the AI-assisted version looks like — left as a stub until it's real.}
|
|
27
|
+
|
|
28
|
+
## What the human keeps checking
|
|
29
|
+
{The judgment that stays with a person no matter how automated this gets.}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: object
|
|
3
|
+
cluster: {cluster}
|
|
4
|
+
universe: live
|
|
5
|
+
status: stub
|
|
6
|
+
entity: {path to the owning file}
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# {Name}
|
|
10
|
+
|
|
11
|
+
{One sentence. If the product word and the file/type name differ, say both.}
|
|
12
|
+
|
|
13
|
+
## Why this shape
|
|
14
|
+
|
|
15
|
+
{The load-bearing why, not a field tour.}
|
|
16
|
+
|
|
17
|
+
## Shape
|
|
18
|
+
|
|
19
|
+
- {keys, constraints, or owning files}
|
|
20
|
+
|
|
21
|
+
Citations: `{path}:{line}`
|
|
22
|
+
|
|
23
|
+
## Connected to
|
|
24
|
+
|
|
25
|
+
- **owns:**
|
|
26
|
+
- **owned-by:**
|
|
27
|
+
- **joins:**
|
|
28
|
+
- **looks-like-but-is-not:**
|
|
29
|
+
|
|
30
|
+
## If you change this
|
|
31
|
+
|
|
32
|
+
- **Hits:**
|
|
33
|
+
- **Does not hit:**
|
|
34
|
+
|
|
35
|
+
## Surfaces
|
|
36
|
+
|
|
37
|
+
| Surface | Role |
|
|
38
|
+
|---|---|
|
|
39
|
+
| {who} | {reads / writes / none} |
|
|
40
|
+
|
|
41
|
+
## See
|
|
42
|
+
|
|
43
|
+
- Source: `{path}`
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: process
|
|
3
|
+
status: stub
|
|
4
|
+
consumes: []
|
|
5
|
+
produces: []
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# {process-name}
|
|
9
|
+
|
|
10
|
+
{One sentence: the movement, not the nouns.}
|
|
11
|
+
|
|
12
|
+
## Input → Movement → Output
|
|
13
|
+
|
|
14
|
+
{Three sentences.}
|
|
15
|
+
|
|
16
|
+
## Why this shape
|
|
17
|
+
|
|
18
|
+
{What would break if the obvious shortcut existed.}
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
1. {Cite `{path}:{line}`.}
|
|
23
|
+
|
|
24
|
+
## If you change this
|
|
25
|
+
|
|
26
|
+
- **Hits:**
|
|
27
|
+
- **Does not hit:**
|
|
28
|
+
|
|
29
|
+
## Surfaces
|
|
30
|
+
|
|
31
|
+
| Surface | Role |
|
|
32
|
+
|---|---|
|
|
33
|
+
| {who} | {role} |
|
|
34
|
+
|
|
35
|
+
## See
|
|
36
|
+
|
|
37
|
+
- Objects: {links}
|
|
38
|
+
- Source: `{path}`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Setup questionnaire — configure the factory once
|
|
2
|
+
|
|
3
|
+
Answers get written into `_shared/` as reference files. Every future run reads them; no run should ever re-ask them.
|
|
4
|
+
|
|
5
|
+
1. Who is this workspace for, and what should a finished deliverable look like? (becomes `_shared/definition-of-done.md`)
|
|
6
|
+
2. Voice and tone: paste two examples of past work that sound right, and one that sounds wrong. (becomes `_shared/voice.md`)
|
|
7
|
+
3. Hard constraints that never bend: length, format, brand rules, compliance. (becomes `_shared/rules.md`)
|
|
8
|
+
4. What does the human always check before anything ships? (becomes each stage's Human check line)
|
|
9
|
+
5. What already exists that runs should reuse — templates, examples, data sources? (linked from `_shared/`, one home per fact)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Schema — the rules of this workspace
|
|
2
|
+
|
|
3
|
+
The closed set of note types, the labels they carry, and the naming they follow. When practice and this file disagree, reconcile the same day — schema drift is how structures rot.
|
|
4
|
+
|
|
5
|
+
## Node types
|
|
6
|
+
|
|
7
|
+
| `type:` | Lives at | Carries |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| team | `teams/<slug>/{Team Name}.md` | In / Movement / Out / Edges |
|
|
10
|
+
| process | `teams/<slug>/processes/<slug>.md` | full scoring frontmatter (see node template) |
|
|
11
|
+
| job | `teams/<slug>/jobs/<slug>.md` | the outcome, who owns it |
|
|
12
|
+
| data-asset | `teams/<slug>/data/data-<thing>.md` | source of truth, shape, sensitivity |
|
|
13
|
+
| governance | `teams/<slug>/governance.md` | what may not be automated, and why |
|
|
14
|
+
| pattern | `patterns/<slug>.md` | only after 3+ independent occurrences |
|
|
15
|
+
|
|
16
|
+
## Labels that make it queryable
|
|
17
|
+
|
|
18
|
+
`type`, `team`, `owner`, `ai-level` (L0–L3), `value` (1–5), `pain` (1–5), `governance` (internal / sensitive / external). `consumes:` and `produces:` are wikilinks to data assets — the links draw the map on their own. value + pain ≥ 8 flags a pilot candidate.
|
|
19
|
+
|
|
20
|
+
## Naming
|
|
21
|
+
|
|
22
|
+
- Slugs: kebab-case. Data assets always `data-<thing>.md`.
|
|
23
|
+
- Human-browsed cards may use Title Case filenames — but declare that choice here and hold it everywhere.
|
|
24
|
+
- `_meta/` holds the rules (this file). Generated indexes are rebuilt by script, never hand-edited.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# {NN}_{stage-name} — {the job in five words}
|
|
2
|
+
|
|
3
|
+
One job: {the single thing this stage does}.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
- Working (this run): ../{NN-1}_{prev-stage}/output/{file}
|
|
7
|
+
- Reference (every run): ../../_shared/{rules-file}.md
|
|
8
|
+
- Reference (every run): references/{stage-specific-guide}.md
|
|
9
|
+
|
|
10
|
+
Do NOT load: {anything an eager agent would wrongly pull in — other stages' references, prior runs, the whole _shared folder}.
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
1. {Read the inputs.}
|
|
14
|
+
2. {Transform, following the reference constraints.}
|
|
15
|
+
3. {Hard limits worth restating: length, count, format.}
|
|
16
|
+
|
|
17
|
+
## Outputs
|
|
18
|
+
- {artifact}.md → output/
|
|
19
|
+
|
|
20
|
+
## Human check
|
|
21
|
+
{One concrete act: read it aloud / verify the numbers against X / confirm the order survived. Edit the output in place — the next stage reads whatever is here.}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# ICM Core
|
|
2
|
+
|
|
3
|
+
The canon, distilled from the ICM paper (arXiv:2603.16021) and production workspaces. Read this when writing contracts, arguing a structural call, or checking a workspace against the method.
|
|
4
|
+
|
|
5
|
+
Contents: Five principles · Five-layer hierarchy · Stage contract format · Naming conventions · Library rules · Token discipline · Where ICM loses
|
|
6
|
+
|
|
7
|
+
## The five design principles
|
|
8
|
+
|
|
9
|
+
Each is borrowed from fifty-year-old, still-standing engineering practice:
|
|
10
|
+
|
|
11
|
+
1. **One stage, one job** (Unix / Parnas). Each stage handles a single step and writes to its own folder. A stage that fetches does not also filter; a stage that filters does not also format.
|
|
12
|
+
2. **Plain text as the interface** (Kernighan & Pike). Stages communicate through markdown and JSON. No binary formats, no databases in the loop, no proprietary serialization. Any human with a text editor can inspect or modify any artifact.
|
|
13
|
+
3. **Layered context loading.** Agents load only what the current stage needs — prevention, not compression. Within content, reference material (internalize as constraints) is kept structurally separate from working artifacts (process as input), because they ask different things of the model.
|
|
14
|
+
4. **Every output is an edit surface** (Horvitz / Shneiderman). Each intermediate output is a file a human can open, edit, and save before the next stage runs. The next stage reads whatever the human left there.
|
|
15
|
+
5. **Configure the factory, not the product** (continuous delivery). Set up preferences, brand, style, and structure once; every run emits a new deliverable from the same configuration.
|
|
16
|
+
|
|
17
|
+
The consequence, stated once: *stage sequencing is the folder numbering; context scoping is the folder hierarchy; state management is the files on disk; coordination is one folder's output being another folder's input.* The filesystem does the work a framework would do in code.
|
|
18
|
+
|
|
19
|
+
## The five-layer context hierarchy
|
|
20
|
+
|
|
21
|
+
| Layer | Typical file | Question it answers | Role | Size |
|
|
22
|
+
|---|---|---|---|---|
|
|
23
|
+
| L0 | `CLAUDE.md` | Where am I? | routing | 300–800 tokens |
|
|
24
|
+
| L1 | root `CONTEXT.md` | Where do I go? | routing | 200–500 tokens |
|
|
25
|
+
| L2 | stage `CONTEXT.md` | What do I do? | **the control point** | 200–500 tokens |
|
|
26
|
+
| L3 | `references/`, `_shared/` | What rules apply? | factory (stable) | 500–2k tokens |
|
|
27
|
+
| L4 | `output/`, run artifacts | What am I working with? | product (per-run) | varies |
|
|
28
|
+
|
|
29
|
+
- L0–L2 are the catalog: small, stable, no content payload.
|
|
30
|
+
- L2 is the control surface of the whole system — its Inputs section is what makes context selection explicit, editable, and auditable instead of left to agent judgment.
|
|
31
|
+
- L3 vs L4 is the factory/product split. L3 = the recipe (voice.md, design-system.md, schema.md). L4 = the ingredients and the dish (research-output.md, draft.md).
|
|
32
|
+
- Large L3 collections get their own internal `CONTEXT.md` router — the L1 routing pattern applied recursively. The hierarchy is self-similar at every depth; apply it inside any folder that grows past easy scanning.
|
|
33
|
+
|
|
34
|
+
## Stage contract format
|
|
35
|
+
|
|
36
|
+
Every working folder carries a `CONTEXT.md` shaped like this (copy from `assets/templates/stage-CONTEXT.md`):
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
# 02_script — turn research into a script
|
|
40
|
+
|
|
41
|
+
One job: write the script from the research output.
|
|
42
|
+
|
|
43
|
+
## Inputs
|
|
44
|
+
- Working (this run): ../01_research/output/research.md
|
|
45
|
+
- Reference (every run): ../../_shared/voice.md
|
|
46
|
+
- Reference (every run): references/structure.md
|
|
47
|
+
|
|
48
|
+
## Process
|
|
49
|
+
1. Read the research output.
|
|
50
|
+
2. Draft to the structure in structure.md, in the tone of voice.md.
|
|
51
|
+
3. Keep under 90 seconds spoken.
|
|
52
|
+
|
|
53
|
+
## Outputs
|
|
54
|
+
- script_draft.md → output/
|
|
55
|
+
|
|
56
|
+
## Human check
|
|
57
|
+
Read the draft aloud. Verify the argument order survived from research. Edit in place; the next stage reads whatever is here.
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Rules: inputs are exact paths, split working vs reference. The process is numbered and short — constraints live in L3 files, not restated here. Exactly one human check, stated as something a person does, not a vague "review."
|
|
61
|
+
|
|
62
|
+
## Naming conventions
|
|
63
|
+
|
|
64
|
+
- Stage folders: `NN_kebab-name` (`01_research`). Ordinal-only prefixes (`00-tracker.md`) for ordered files inside a folder.
|
|
65
|
+
- Meta/system folders get an underscore prefix and sort to the top: `_meta/`, `_system/`, `_shared/`, `_config/`, `_templates/`, `_index/`, `_archive/`. Underscore = "about the workspace, not of the work."
|
|
66
|
+
- Records and nodes: kebab-case slugs for machine-facing files, or human-readable Title Case where a person browses daily (an Obsidian vault). Pick one per workspace and write the choice into the schema — drift between schema and files is the most common decay.
|
|
67
|
+
- Typed content files may prefix their type: `data-customer-list.md`.
|
|
68
|
+
- Entry file: `CLAUDE.md` for Claude Code, `AGENTS.md` for other agents. If both exist, one is generated from the other or is a one-line pointer — never two hand-maintained copies.
|
|
69
|
+
- Templates are blank, named for what they produce, and live together: `_templates/pilot-brief.md`.
|
|
70
|
+
|
|
71
|
+
## Library rules
|
|
72
|
+
|
|
73
|
+
- **The catalog holds no books.** Routing files point at everything and store almost nothing. When a routing file grows, it is absorbing payload — move the payload to a shelf.
|
|
74
|
+
- **One home per fact; a link beats a copy.** Duplication is how structures rot.
|
|
75
|
+
- **Generated indexes are never hand-edited.** A file map built from frontmatter by a script cannot drift; a hand-curated one always does. If an index matters, script it and schedule the rebuild.
|
|
76
|
+
- **The structure is the documentation.** If something needs explaining, the explanation goes in that folder's `CONTEXT.md`, not in a wiki elsewhere and not in anyone's head. A new collaborator should understand the whole pipeline by reading the CONTEXT files top to bottom, without running anything.
|
|
77
|
+
- **Method and instance live apart.** The blank, reusable template of a structure is a different artifact from any filled-in deployment of it. When a structure proves out, extract the template before it tangles with the data.
|
|
78
|
+
- **Working sessions end in artifacts.** A workshop, interview, or planning call that produces only slides or vibes has failed the structure; it should end with files the structure can shelve.
|
|
79
|
+
|
|
80
|
+
## Token discipline
|
|
81
|
+
|
|
82
|
+
A stage's full context — entry + contract + references + inputs — should land around 2,000–8,000 tokens. That keeps the model in the range where it performs best and keeps every load auditable. A monolithic everything-prompt for the same pipeline typically runs 30k–50k tokens, most of it irrelevant to the current step; ICM never loads those tokens rather than compressing them later. If a stage's context balloons: split the stage, tighten the Inputs list, or push detail down into an L3 file the contract points at but doesn't inline.
|
|
83
|
+
|
|
84
|
+
## Where ICM loses
|
|
85
|
+
|
|
86
|
+
Name these honestly rather than overclaiming:
|
|
87
|
+
|
|
88
|
+
- **Real-time multi-agent collaboration** — agents responding to each other in tight loops need message-passing infrastructure; file handoffs are too slow.
|
|
89
|
+
- **High concurrency** — many users hitting one pipeline needs queueing, state isolation, deployment. ICM is local-first by design.
|
|
90
|
+
- **Automated mid-pipeline branching** — a human choosing stage 3a vs 3b between stages is natural; the *system* branching on AI output mid-run pushes ICM toward becoming the framework it replaced.
|
|
91
|
+
|
|
92
|
+
The claim is not that ICM replaces frameworks everywhere. The claim is that for sequential, human-reviewed, repeatable workflows — most knowledge work — the framework is more complexity than the problem requires, and that complexity costs opacity, fragility, and developer dependency.
|