@haaaiawd/loom 2.0.0 → 2.0.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/CHANGELOG.md +15 -10
- package/CONTRIBUTING.md +37 -37
- package/EVIL_EVAL.md +112 -112
- package/README.md +209 -204
- package/README.zh-CN.md +171 -169
- package/SECURITY.md +11 -11
- package/cli/src/protocol.js +404 -360
- package/cli/src/store.js +624 -622
- package/design.md +198 -191
- package/docs/PROMPT_CATALOG.md +99 -92
- package/docs/RELEASE_CHECKLIST.md +53 -53
- package/docs/UX_FLOW.md +171 -171
- package/docs/brand/loom-mark.svg +18 -18
- package/docs/brand/loom-readme-header.svg +34 -34
- package/docs/brand/loom-readme-header.zh-CN.svg +29 -29
- package/docs/loom-eval-loop.drawio +21 -21
- package/docs/loom-eval-loop.svg +56 -56
- package/docs/loom-production-loop.drawio +41 -41
- package/docs/loom-production-loop.svg +92 -92
- package/package.json +52 -52
package/design.md
CHANGED
|
@@ -1,194 +1,201 @@
|
|
|
1
|
-
# LOOM 2 System Design
|
|
2
|
-
|
|
3
|
-
Status: implemented core, evaluation pending independent trials.
|
|
4
|
-
|
|
5
|
-
## Product decision
|
|
6
|
-
|
|
7
|
-
LOOM is for the Agent, not the human. Its job is to make a normal capable Agent substantially better at
|
|
8
|
-
understanding a personalized project, acquiring the right professional judgment, continuing after context
|
|
9
|
-
loss, and completing real work. The human experience remains natural conversation.
|
|
10
|
-
|
|
11
|
-
The system therefore optimizes for four observable outcomes:
|
|
12
|
-
|
|
13
|
-
1. The Agent can explain the intended whole rather than mirror a feature list.
|
|
14
|
-
2. Consequential uncertainty becomes useful conversation instead of silent guessing or a fixed questionnaire.
|
|
15
|
-
3. Consequential product, experience, system, contract, and verification decisions remain navigable as
|
|
16
|
-
separate documents rather than collapsing into one summary.
|
|
17
|
-
4. Each relevant professional field changes decisions and produces a distinctive project stance without
|
|
18
|
-
being blended into an invented hybrid capability.
|
|
19
|
-
5. A fresh Agent can resume the current Task from disk without inherited chat memory.
|
|
20
|
-
|
|
21
|
-
Document production, role performance, stage completion, and graph density are not success metrics.
|
|
22
|
-
|
|
23
|
-
## Minimal closed loop
|
|
24
|
-
|
|
25
|
-
```text
|
|
26
|
-
Understand → Clarify → Record → Map professional fields
|
|
27
|
-
↑ ↓
|
|
28
|
-
└──── update whole ← Design document graph → Work Map
|
|
29
|
-
↑ ↓
|
|
30
|
-
└── Keeper gaps ← fresh Keeper
|
|
31
|
-
↓ passed
|
|
32
|
-
blocked/reopen ← Active Task → Evidence → next Task
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Understand and clarify
|
|
36
|
-
|
|
37
|
-
The Agent inspects the workspace when the user's request makes it relevant. It describes the emerging
|
|
38
|
-
result naturally and identifies the current uncertainty frontier. The frontier contains only decisions
|
|
39
|
-
whose answers could materially change outcome, behavior, boundary, system, risk, or completion.
|
|
40
|
-
|
|
41
|
-
The prompt constrains judgment, not question content. It requires a coherent high-value round, adaptive
|
|
42
|
-
grouping, first-principles re-evaluation, and a convergence condition. It does not mandate headings,
|
|
43
|
-
question counts, or a universal sequence.
|
|
44
|
-
|
|
45
|
-
Convergence means the Agent can explain the whole result, its boundaries, the professional capability it
|
|
46
|
-
needs, and how completion will be observed. Remaining unknowns must be reversible and local, explicitly
|
|
47
|
-
delegated to the Agent, or explicitly skipped by the human after a concrete warning.
|
|
48
|
-
|
|
49
|
-
### Record
|
|
50
|
-
|
|
51
|
-
Markdown stores human-readable project truth. JSON stores machine state that people do not need to edit.
|
|
52
|
-
Important corrections do not leave contradictory truths scattered through the corpus: PROJECT.md maps the
|
|
53
|
-
current whole, `.loom/design/` owns detailed decisions, and DECISIONS.md records consequential supersession
|
|
54
|
-
with rationale and impact.
|
|
55
|
-
|
|
56
|
-
### Design document graph
|
|
57
|
-
|
|
58
|
-
`PROJECT.md` is an entry point, not a compression target. Product definition, experience, independent
|
|
59
|
-
systems, contracts, verification, operations, and research receive separate documents when they have their
|
|
60
|
-
own decisions, interfaces, failure modes, or proof. Project size determines document count. This keeps a small
|
|
61
|
-
project small while allowing a large system to become fully legible instead of “minimal” in the anemic sense.
|
|
62
|
-
|
|
63
|
-
### Acquire capability
|
|
64
|
-
|
|
65
|
-
Capabilities are project-scoped professional-field dossiers, not reusable expert personas or task methods.
|
|
66
|
-
One dossier maps to one recognizable field. UI/UX design, visual art direction, game design, psychology,
|
|
67
|
-
biology, security, and distributed systems remain separate when they use different evidence or judgments.
|
|
68
|
-
Cross-field synthesis lives in the design document whose decision it changes. A dossier contains:
|
|
69
|
-
|
|
70
|
-
- the field boundary, the decisions it changes, and the project reality grounding it;
|
|
71
|
-
- specialist principles, evidence, sources, conflicts, and uncertainty;
|
|
72
|
-
- an authored, falsifiable project stance and deliberate refusals;
|
|
73
|
-
- questions whose answers could change the decision;
|
|
74
|
-
- design and implementation consequences;
|
|
75
|
-
- generic failure modes and observable verification signals;
|
|
76
|
-
- opened sources, what each changed, conflicts, and uncertainty when research is used.
|
|
77
|
-
|
|
78
|
-
Acquisition can happen quietly. The Agent may briefly name the capability it is obtaining, but does not
|
|
79
|
-
turn research logistics into user workflow.
|
|
80
|
-
|
|
81
|
-
### Work Map and Task
|
|
82
|
-
|
|
83
|
-
Planning uses progressive resolution. A broad initial Work Map protects whole-project coverage and may be
|
|
84
|
-
very long. Only the active horizon receives detailed actions. The context compiler returns counts and the
|
|
85
|
-
current Task rather than injecting the whole plan.
|
|
86
|
-
|
|
87
|
-
Task is the single execution contract:
|
|
88
|
-
|
|
89
|
-
```json
|
|
90
|
-
{
|
|
91
|
-
"id": "TASK-001",
|
|
92
|
-
"title": "Implement restartable context",
|
|
93
|
-
"outcome": "A fresh Agent receives only decision-relevant context",
|
|
94
|
-
"done_when": ["A forced-reset transcript resumes correctly"],
|
|
95
|
-
"boundaries": ["The human never operates LOOM"],
|
|
96
|
-
"depends_on": [],
|
|
97
|
-
"reads": [".loom/PROJECT.md", ".loom/design/context-system.md", ".loom/capabilities/human-agent-interaction.md", "fixtures/reset-case.md"],
|
|
98
|
-
"touches": ["cli/src/context.js"],
|
|
99
|
-
"status": "active",
|
|
100
|
-
"progress": {
|
|
101
|
-
"completed": [],
|
|
102
|
-
"current": "Implementing selector",
|
|
103
|
-
"next": "Run reset transcript"
|
|
104
|
-
},
|
|
105
|
-
"evidence": []
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
There is at most one active Task. Completion requires a concrete evidence mapping for every exact `done_when`
|
|
110
|
-
criterion. A completed Task can be reopened with a reason when later evidence disproves it. The Task plan may change without
|
|
111
|
-
human approval when the change is a reversible implementation refinement inside the agreed whole; outcome,
|
|
112
|
-
authority, risk, or material cost changes return to the conversation.
|
|
113
|
-
|
|
114
|
-
### One-time Keeper
|
|
115
|
-
|
|
116
|
-
Keeper is not a recurring role. It is a single isolation test at the transition from shaping to material
|
|
117
|
-
execution. A fresh Agent receives no prior conversation, runs `loom context --keeper`, explains the whole,
|
|
118
|
-
selects a first Task, navigates its design documents and professional capabilities, and identifies concrete evidence. Every attempt binds a unique
|
|
119
|
-
fresh-thread `run_id` to the digest frozen by `project ready`. It may return gaps; summary, evidence and exact gaps
|
|
120
|
-
are injected into the main Agent's next context. Revision must change project truth or Task definitions before a
|
|
121
|
-
new digest and fresh Keeper run are allowed. Once passed, normal Task evidence replaces further Keeper ceremony.
|
|
122
|
-
|
|
123
|
-
If the host lacks subagents, LOOM supplies a one-sentence prompt for a new window. Explicit skip is possible
|
|
124
|
-
but must preserve a concrete reason and reduced confidence.
|
|
125
|
-
|
|
126
|
-
## Runtime structure
|
|
127
|
-
|
|
128
|
-
```text
|
|
129
|
-
cli/bin/loom.js small command router
|
|
130
|
-
cli/src/store.js state, design, capability, Task, Keeper, context and eval operations
|
|
131
|
-
cli/src/protocol.js layered Agent prompts and every human-readable template
|
|
132
|
-
cli/test/run-all.js end-to-end contract tests
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
The CLI has
|
|
136
|
-
|
|
137
|
-
1. Initialize the minimal project backbone.
|
|
138
|
-
2. Record structured understanding and decision history safely.
|
|
139
|
-
3. Scaffold a scalable design-document graph and separate professional-field dossiers.
|
|
140
|
-
4. Maintain a large Work Map and a single active Task.
|
|
141
|
-
5. Compile only decision-relevant context after reset.
|
|
142
|
-
6. Prepare one-time Keeper and controlled Evil Eval artifacts.
|
|
143
|
-
|
|
144
|
-
It does not orchestrate models, browse the web, generate project documents, or pretend that a CLI command
|
|
145
|
-
clears model memory. Those capabilities belong to the host Agent and its tools.
|
|
146
|
-
|
|
147
|
-
## State transition
|
|
148
|
-
|
|
149
|
-
Project status is a compact orientation signal, not a phase bureaucracy:
|
|
150
|
-
|
|
151
|
-
```text
|
|
152
|
-
shaping ⇄ question, design-document, and professional-capability loop
|
|
153
|
-
↓
|
|
154
|
-
ready_for_keeper ⇄ fresh Keeper needs_revision or blocked → shaping
|
|
155
|
-
↓ passed
|
|
156
|
-
build_ready → building ⇄ Task repair or block or reopen → complete
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
`project ready` checks only structural prerequisites: PROJECT.md is no longer a template, at least one design
|
|
160
|
-
document and a Work Map exist, and no high-impact open question remains. Keeper judges semantic build-readiness. Task start requires Keeper
|
|
161
|
-
pass or an explicit recorded skip. An unchanged revision, duplicate Keeper run, wrong digest, or stale prepared
|
|
162
|
-
state is rejected. Imported Tasks start open, `task start` rejects missing or directory-level context reads,
|
|
163
|
-
generic updates cannot change status, and completion requires criterion-by-criterion evidence.
|
|
164
|
-
|
|
165
|
-
## Context selection
|
|
166
|
-
|
|
167
|
-
`loom context` always injects:
|
|
168
|
-
|
|
169
|
-
- the stable Agent protocol;
|
|
170
|
-
- compact state counts and open uncertainty;
|
|
171
|
-
- PROJECT.md, with decision history identified as on-demand context;
|
|
1
|
+
# LOOM 2 System Design
|
|
2
|
+
|
|
3
|
+
Status: implemented core, evaluation pending independent trials.
|
|
4
|
+
|
|
5
|
+
## Product decision
|
|
6
|
+
|
|
7
|
+
LOOM is for the Agent, not the human. Its job is to make a normal capable Agent substantially better at
|
|
8
|
+
understanding a personalized project, acquiring the right professional judgment, continuing after context
|
|
9
|
+
loss, and completing real work. The human experience remains natural conversation.
|
|
10
|
+
|
|
11
|
+
The system therefore optimizes for four observable outcomes:
|
|
12
|
+
|
|
13
|
+
1. The Agent can explain the intended whole rather than mirror a feature list.
|
|
14
|
+
2. Consequential uncertainty becomes useful conversation instead of silent guessing or a fixed questionnaire.
|
|
15
|
+
3. Consequential product, experience, system, contract, and verification decisions remain navigable as
|
|
16
|
+
separate documents rather than collapsing into one summary.
|
|
17
|
+
4. Each relevant professional field changes decisions and produces a distinctive project stance without
|
|
18
|
+
being blended into an invented hybrid capability.
|
|
19
|
+
5. A fresh Agent can resume the current Task from disk without inherited chat memory.
|
|
20
|
+
|
|
21
|
+
Document production, role performance, stage completion, and graph density are not success metrics.
|
|
22
|
+
|
|
23
|
+
## Minimal closed loop
|
|
24
|
+
|
|
25
|
+
```text
|
|
26
|
+
Understand → Clarify → Record → Map professional fields
|
|
27
|
+
↑ ↓
|
|
28
|
+
└──── update whole ← Design document graph → Work Map
|
|
29
|
+
↑ ↓
|
|
30
|
+
└── Keeper gaps ← fresh Keeper
|
|
31
|
+
↓ passed
|
|
32
|
+
blocked/reopen ← Active Task → Evidence → next Task
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Understand and clarify
|
|
36
|
+
|
|
37
|
+
The Agent inspects the workspace when the user's request makes it relevant. It describes the emerging
|
|
38
|
+
result naturally and identifies the current uncertainty frontier. The frontier contains only decisions
|
|
39
|
+
whose answers could materially change outcome, behavior, boundary, system, risk, or completion.
|
|
40
|
+
|
|
41
|
+
The prompt constrains judgment, not question content. It requires a coherent high-value round, adaptive
|
|
42
|
+
grouping, first-principles re-evaluation, and a convergence condition. It does not mandate headings,
|
|
43
|
+
question counts, or a universal sequence.
|
|
44
|
+
|
|
45
|
+
Convergence means the Agent can explain the whole result, its boundaries, the professional capability it
|
|
46
|
+
needs, and how completion will be observed. Remaining unknowns must be reversible and local, explicitly
|
|
47
|
+
delegated to the Agent, or explicitly skipped by the human after a concrete warning.
|
|
48
|
+
|
|
49
|
+
### Record
|
|
50
|
+
|
|
51
|
+
Markdown stores human-readable project truth. JSON stores machine state that people do not need to edit.
|
|
52
|
+
Important corrections do not leave contradictory truths scattered through the corpus: PROJECT.md maps the
|
|
53
|
+
current whole, `.loom/design/` owns detailed decisions, and DECISIONS.md records consequential supersession
|
|
54
|
+
with rationale and impact.
|
|
55
|
+
|
|
56
|
+
### Design document graph
|
|
57
|
+
|
|
58
|
+
`PROJECT.md` is an entry point, not a compression target. Product definition, experience, independent
|
|
59
|
+
systems, contracts, verification, operations, and research receive separate documents when they have their
|
|
60
|
+
own decisions, interfaces, failure modes, or proof. Project size determines document count. This keeps a small
|
|
61
|
+
project small while allowing a large system to become fully legible instead of “minimal” in the anemic sense.
|
|
62
|
+
|
|
63
|
+
### Acquire capability
|
|
64
|
+
|
|
65
|
+
Capabilities are project-scoped professional-field dossiers, not reusable expert personas or task methods.
|
|
66
|
+
One dossier maps to one recognizable field. UI/UX design, visual art direction, game design, psychology,
|
|
67
|
+
biology, security, and distributed systems remain separate when they use different evidence or judgments.
|
|
68
|
+
Cross-field synthesis lives in the design document whose decision it changes. A dossier contains:
|
|
69
|
+
|
|
70
|
+
- the field boundary, the decisions it changes, and the project reality grounding it;
|
|
71
|
+
- specialist principles, evidence, sources, conflicts, and uncertainty;
|
|
72
|
+
- an authored, falsifiable project stance and deliberate refusals;
|
|
73
|
+
- questions whose answers could change the decision;
|
|
74
|
+
- design and implementation consequences;
|
|
75
|
+
- generic failure modes and observable verification signals;
|
|
76
|
+
- opened sources, what each changed, conflicts, and uncertainty when research is used.
|
|
77
|
+
|
|
78
|
+
Acquisition can happen quietly. The Agent may briefly name the capability it is obtaining, but does not
|
|
79
|
+
turn research logistics into user workflow.
|
|
80
|
+
|
|
81
|
+
### Work Map and Task
|
|
82
|
+
|
|
83
|
+
Planning uses progressive resolution. A broad initial Work Map protects whole-project coverage and may be
|
|
84
|
+
very long. Only the active horizon receives detailed actions. The context compiler returns counts and the
|
|
85
|
+
current Task rather than injecting the whole plan.
|
|
86
|
+
|
|
87
|
+
Task is the single execution contract:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"id": "TASK-001",
|
|
92
|
+
"title": "Implement restartable context",
|
|
93
|
+
"outcome": "A fresh Agent receives only decision-relevant context",
|
|
94
|
+
"done_when": ["A forced-reset transcript resumes correctly"],
|
|
95
|
+
"boundaries": ["The human never operates LOOM"],
|
|
96
|
+
"depends_on": [],
|
|
97
|
+
"reads": [".loom/PROJECT.md", ".loom/design/context-system.md", ".loom/capabilities/human-agent-interaction.md", "fixtures/reset-case.md"],
|
|
98
|
+
"touches": ["cli/src/context.js"],
|
|
99
|
+
"status": "active",
|
|
100
|
+
"progress": {
|
|
101
|
+
"completed": [],
|
|
102
|
+
"current": "Implementing selector",
|
|
103
|
+
"next": "Run reset transcript"
|
|
104
|
+
},
|
|
105
|
+
"evidence": []
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
There is at most one active Task. Completion requires a concrete evidence mapping for every exact `done_when`
|
|
110
|
+
criterion. A completed Task can be reopened with a reason when later evidence disproves it. The Task plan may change without
|
|
111
|
+
human approval when the change is a reversible implementation refinement inside the agreed whole; outcome,
|
|
112
|
+
authority, risk, or material cost changes return to the conversation.
|
|
113
|
+
|
|
114
|
+
### One-time Keeper
|
|
115
|
+
|
|
116
|
+
Keeper is not a recurring role. It is a single isolation test at the transition from shaping to material
|
|
117
|
+
execution. A fresh Agent receives no prior conversation, runs `loom context --keeper`, explains the whole,
|
|
118
|
+
selects a first Task, navigates its design documents and professional capabilities, and identifies concrete evidence. Every attempt binds a unique
|
|
119
|
+
fresh-thread `run_id` to the digest frozen by `project ready`. It may return gaps; summary, evidence and exact gaps
|
|
120
|
+
are injected into the main Agent's next context. Revision must change project truth or Task definitions before a
|
|
121
|
+
new digest and fresh Keeper run are allowed. Once passed, normal Task evidence replaces further Keeper ceremony.
|
|
122
|
+
|
|
123
|
+
If the host lacks subagents, LOOM supplies a one-sentence prompt for a new window. Explicit skip is possible
|
|
124
|
+
but must preserve a concrete reason and reduced confidence.
|
|
125
|
+
|
|
126
|
+
## Runtime structure
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
cli/bin/loom.js small command router
|
|
130
|
+
cli/src/store.js state, design, capability, Task, Keeper, context and eval operations
|
|
131
|
+
cli/src/protocol.js layered Agent prompts and every human-readable template
|
|
132
|
+
cli/test/run-all.js end-to-end contract tests
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The CLI has six responsibilities:
|
|
136
|
+
|
|
137
|
+
1. Initialize the minimal project backbone.
|
|
138
|
+
2. Record structured understanding and decision history safely.
|
|
139
|
+
3. Scaffold a scalable design-document graph and separate professional-field dossiers.
|
|
140
|
+
4. Maintain a large Work Map and a single active Task.
|
|
141
|
+
5. Compile only decision-relevant context after reset.
|
|
142
|
+
6. Prepare one-time Keeper and controlled Evil Eval artifacts.
|
|
143
|
+
|
|
144
|
+
It does not orchestrate models, browse the web, generate project documents, or pretend that a CLI command
|
|
145
|
+
clears model memory. Those capabilities belong to the host Agent and its tools.
|
|
146
|
+
|
|
147
|
+
## State transition
|
|
148
|
+
|
|
149
|
+
Project status is a compact orientation signal, not a phase bureaucracy:
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
shaping ⇄ question, design-document, and professional-capability loop
|
|
153
|
+
↓
|
|
154
|
+
ready_for_keeper ⇄ fresh Keeper needs_revision or blocked → shaping
|
|
155
|
+
↓ passed
|
|
156
|
+
build_ready → building ⇄ Task repair or block or reopen → complete
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`project ready` checks only structural prerequisites: PROJECT.md is no longer a template, at least one design
|
|
160
|
+
document and a Work Map exist, and no high-impact open question remains. Keeper judges semantic build-readiness. Task start requires Keeper
|
|
161
|
+
pass or an explicit recorded skip. An unchanged revision, duplicate Keeper run, wrong digest, or stale prepared
|
|
162
|
+
state is rejected. Imported Tasks start open, `task start` rejects missing or directory-level context reads,
|
|
163
|
+
generic updates cannot change status, and completion requires criterion-by-criterion evidence.
|
|
164
|
+
|
|
165
|
+
## Context selection
|
|
166
|
+
|
|
167
|
+
`loom context` always injects:
|
|
168
|
+
|
|
169
|
+
- the stable Agent protocol;
|
|
170
|
+
- compact state counts and open uncertainty;
|
|
171
|
+
- PROJECT.md, with decision history identified as on-demand context;
|
|
172
172
|
- the active Task, if one exists;
|
|
173
173
|
- the exact design, capability, source, contract, or fixture files named in that Task's `reads` list.
|
|
174
174
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
175
|
+
When a Task is active, context also injects a short execution protocol. It tells a reset Agent to reconcile
|
|
176
|
+
the Task with the current workspace and version-control state, inspect relevant tests before editing, choose
|
|
177
|
+
verification according to risk and the exact `done_when` claims, persist `completed/current/next` at meaningful
|
|
178
|
+
handoff boundaries, and close only with reproducible criterion-level evidence. It deliberately does not require
|
|
179
|
+
a ceremonial unit test for every kind of work or a branch, commit, or pull request for every Task. Those
|
|
180
|
+
delivery mechanisms remain conditional on the human request and repository workflow.
|
|
181
|
+
|
|
182
|
+
Workspace code paths in `touches` are identified but not automatically copied into context. Full decision
|
|
183
|
+
history is not repeatedly injected because current truth belongs in PROJECT.md and linked design documents.
|
|
184
|
+
`loom context --keeper` includes history, every design document, and every professional capability dossier
|
|
185
|
+
because whole-project coverage and contradiction detection are exactly what the isolated handoff tests.
|
|
186
|
+
|
|
187
|
+
## Compatibility decision
|
|
188
|
+
|
|
189
|
+
LOOM 2 is a major redesign. It does not silently mutate `.loom/v1` projects and does not preserve the old command
|
|
190
|
+
surface. Encountering a legacy layout produces an explicit migration boundary. Git remains the recovery path;
|
|
191
|
+
an automated semantic migration can be designed only after real v1 projects reveal which history is valuable.
|
|
192
|
+
|
|
193
|
+
## Known boundaries
|
|
194
|
+
|
|
195
|
+
- External capability acquisition is represented but not automated yet; the host Agent performs research.
|
|
196
|
+
- Markdown is intentionally human-editable. LOOM validates file existence and structured state, not prose truth.
|
|
197
|
+
- Keeper independence depends on the host creating a fresh thread or window.
|
|
198
|
+
- Evil Eval scaffolding controls experiment design but does not itself launch model runs.
|
|
199
|
+
- A one-time Keeper verifies build-readiness, not the eventual quality of every implementation Task.
|
|
200
|
+
|
|
201
|
+
These are honest capability boundaries, not deferred stages disguised as completion.
|
package/docs/PROMPT_CATALOG.md
CHANGED
|
@@ -1,99 +1,106 @@
|
|
|
1
|
-
# LOOM Prompt and Message Catalog
|
|
2
|
-
|
|
3
|
-
LOOM's prompts are cognitive interfaces, not a collection of role-playing personas. The exact live
|
|
4
|
-
inventory is emitted by:
|
|
5
|
-
|
|
6
|
-
```bash
|
|
7
|
-
loom prompts
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
The command is the auditable source of truth. It returns the complete text, placeholders, and composition
|
|
11
|
-
order as JSON, so documentation cannot quietly describe a different prompt from the one Agents receive.
|
|
12
|
-
|
|
13
|
-
## Instruction layers
|
|
14
|
-
|
|
15
|
-
| Layer | Message | Injected when | Purpose |
|
|
16
|
-
|---|---|---|---|
|
|
1
|
+
# LOOM Prompt and Message Catalog
|
|
2
|
+
|
|
3
|
+
LOOM's prompts are cognitive interfaces, not a collection of role-playing personas. The exact live
|
|
4
|
+
inventory is emitted by:
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
loom prompts
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
The command is the auditable source of truth. It returns the complete text, placeholders, and composition
|
|
11
|
+
order as JSON, so documentation cannot quietly describe a different prompt from the one Agents receive.
|
|
12
|
+
|
|
13
|
+
## Instruction layers
|
|
14
|
+
|
|
15
|
+
| Layer | Message | Injected when | Purpose |
|
|
16
|
+
|---|---|---|---|
|
|
17
17
|
| Stable core | `layers.stable_core` | Every `loom context` | Durable collaboration judgment: user ownership, evidence classes, question threshold, corrections, reversible delegation |
|
|
18
18
|
| Runtime adaptation | `layers.runtime_protocol` | Every `loom context` | LOOM-specific disk model, document graph, capability boundaries, Work Map, and three production loops |
|
|
19
19
|
| Project state | `layers.project_state` | Every `loom context` | Dynamic status, uncertainty, assumptions, document/capability inventory, Task counts, and Keeper feedback |
|
|
20
|
+
| Execution protocol | `layers.execution_protocol` | Active Task or `--task` | Recovery, workspace inspection, risk-based testing, progress persistence, exact proof, and delivery boundaries |
|
|
20
21
|
| Current task | `layers.current_task` | Active Task or `--task` | Exact Task JSON followed by the exact contents of every path in `reads` |
|
|
21
|
-
|
|
22
|
-
This separation is deliberate. Project-specific expertise does not inflate the stable prompt; it lives in
|
|
23
|
-
field dossiers. One-off Task instructions do not become global doctrine. Host permissions and tools are not
|
|
24
|
-
claimed by prompt text.
|
|
25
|
-
|
|
26
|
-
## Workspace and document messages
|
|
27
|
-
|
|
28
|
-
`workspace_anchor` is the short block added to `AGENTS.md`. It tells an entering Agent to run
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
the
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
`
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- `
|
|
62
|
-
- `
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
22
|
+
|
|
23
|
+
This separation is deliberate. Project-specific expertise does not inflate the stable prompt; it lives in
|
|
24
|
+
field dossiers. One-off Task instructions do not become global doctrine. Host permissions and tools are not
|
|
25
|
+
claimed by prompt text.
|
|
26
|
+
|
|
27
|
+
## Workspace and document messages
|
|
28
|
+
|
|
29
|
+
`workspace_anchor` is the short block added to `AGENTS.md`. It tells an entering or reset Agent to run
|
|
30
|
+
`loom context`, rerun it before editing after an interruption, persist state at meaningful boundaries rather
|
|
31
|
+
than before every tool call, and keep CLI operation invisible to the human.
|
|
32
|
+
|
|
33
|
+
`templates.project_index` creates `.loom/PROJECT.md` as a concise whole and document map. It explicitly
|
|
34
|
+
prevents a large project's systems from being compressed into one file.
|
|
35
|
+
|
|
36
|
+
`templates.design_documents` contains all seven live design templates:
|
|
37
|
+
|
|
38
|
+
1. `product` — outcome, users, problem, product principles, scope, end-to-end behavior, success and failure.
|
|
39
|
+
2. `experience` — journey, information architecture, states, content, visual direction, accessibility, recovery, usability proof.
|
|
40
|
+
3. `system` — responsibilities, boundaries, control flow, data, interfaces, dependencies, failure, implementation, verification.
|
|
41
|
+
4. `contract` — consumers, schemas or commands, invariants, permissions, errors, compatibility, fixtures, contract tests.
|
|
42
|
+
5. `verification` — claims, environments, fixtures, acceptance matrix, commands, negative tests, blind spots.
|
|
43
|
+
6. `operations` — authority, procedures, commands, safety, failure recovery, evidence and audit trail.
|
|
44
|
+
7. `research` — decision, evidence, method, sources, findings, conflicts, consequences and follow-up proof.
|
|
45
|
+
|
|
46
|
+
These are possible document kinds, not a fixed seven-file checklist. The Agent creates as many actual
|
|
47
|
+
documents as the project's independent decision surfaces require.
|
|
48
|
+
|
|
49
|
+
`templates.professional_capability` is the only capability template. It enforces one recognizable field per
|
|
50
|
+
file, a project-specific diagnosis and stance, opened evidence, rejected generic defaults, concrete design and
|
|
51
|
+
verification consequences, failure modes, and links to adjacent fields without merging them.
|
|
52
|
+
|
|
53
|
+
`templates.decision_history` is the preamble for consequential superseding decisions. Current truth stays in
|
|
54
|
+
the project map and linked design documents.
|
|
55
|
+
|
|
56
|
+
## Keeper message
|
|
57
|
+
|
|
58
|
+
`keeper` is the exact independent handoff prompt. It binds a unique fresh-Agent `run_id` to a frozen
|
|
59
|
+
`prepared_digest`, asks the Keeper to navigate the whole corpus and attempt the first Task, and defines three
|
|
60
|
+
verdicts:
|
|
61
|
+
|
|
62
|
+
- `passed`: a fresh Agent can responsibly begin.
|
|
63
|
+
- `needs_revision`: concrete disk-truth gaps can be repaired.
|
|
64
|
+
- `blocked`: progress needs unavailable authority or external state.
|
|
65
|
+
|
|
66
|
+
A failed result is injected into the next project-state message. A retry requires changed project truth, a
|
|
67
|
+
new digest, and another fresh Keeper.
|
|
68
|
+
|
|
69
|
+
## Evil Eval messages
|
|
70
|
+
|
|
71
|
+
`evaluation.baseline_condition` gives a normal capable Agent the identical brief and ordinary tools without
|
|
72
|
+
LOOM. It does not weaken the baseline or prohibit normal planning.
|
|
73
|
+
|
|
74
|
+
`evaluation.loom_condition` gives the same brief, model class, tools, workspace facts, and budget, adding only
|
|
75
|
+
LOOM continuity infrastructure and no extra authority.
|
|
76
|
+
|
|
77
|
+
`evaluation.blind_judge` scores anonymized output on intent fidelity, question value, whole coverage,
|
|
78
|
+
professional depth, buildability, reset continuity, implementation evidence, human burden, and cost. It
|
|
79
|
+
penalizes ceremony and runs an order swap.
|
|
80
|
+
|
|
81
|
+
## Composition messages
|
|
82
|
+
|
|
83
|
+
`composition.normal_resume`, `composition.active_task`, and `composition.keeper_handoff` list the exact block
|
|
84
|
+
order. Keeper receives every design and capability document; a normal active Task receives only its declared
|
|
83
85
|
reads. This difference is intentional: Keeper audits whole-project coverage, while delivery protects context
|
|
84
86
|
focus.
|
|
85
87
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
88
|
+
The active Task composition adds `execution_protocol` between the recovered project whole and the exact Task.
|
|
89
|
+
It requires inspection of current workspace/version-control reality, risk-appropriate tests, restartable
|
|
90
|
+
progress, and criterion-level proof. It does not force a unit test for non-code claims or a branch/PR for every
|
|
91
|
+
Task; those are selected when the behavior, human request, or repository workflow makes them meaningful.
|
|
92
|
+
|
|
93
|
+
## CLI operational messages
|
|
94
|
+
|
|
95
|
+
`loom --help` is the complete command-oriented message surface. JSON command results report state and the next
|
|
96
|
+
host action. Validation errors are contract enforcement rather than cognitive prompts; they reject unsafe
|
|
97
|
+
references, template-only readiness, missing design documents, open high-impact uncertainty, unchanged Keeper
|
|
98
|
+
retries, stale digests, duplicate run identities, Task dependency violations, missing or directory-level Task
|
|
99
|
+
reads, status bypasses, completion without evidence for every done condition, and reasonless reopening of a
|
|
100
|
+
disproven completion.
|
|
101
|
+
|
|
102
|
+
The short human fallback when the host cannot create a Keeper Agent remains:
|
|
103
|
+
|
|
104
|
+
```text
|
|
105
|
+
Please open a new window in this project, run loom keeper prompt, and follow it.
|
|
106
|
+
```
|