@haaaiawd/loom 2.0.1 → 2.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/CHANGELOG.md +34 -8
- package/EVIL_EVAL.md +13 -0
- package/README.md +40 -19
- package/README.zh-CN.md +27 -12
- package/cli/bin/loom.js +78 -4
- package/cli/src/protocol.js +387 -101
- package/cli/src/store.js +417 -62
- package/design.md +26 -11
- package/docs/PROMPT_CATALOG.md +25 -15
- package/docs/RELEASE_CHECKLIST.md +3 -3
- package/docs/UX_FLOW.md +14 -1
- package/package.json +1 -1
package/design.md
CHANGED
|
@@ -132,14 +132,15 @@ cli/src/protocol.js layered Agent prompts and every human-readable template
|
|
|
132
132
|
cli/test/run-all.js end-to-end contract tests
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
The CLI has six responsibilities:
|
|
135
|
+
The CLI has six responsibilities:
|
|
136
136
|
|
|
137
137
|
1. Initialize the minimal project backbone.
|
|
138
138
|
2. Record structured understanding and decision history safely.
|
|
139
139
|
3. Scaffold a scalable design-document graph and separate professional-field dossiers.
|
|
140
140
|
4. Maintain a large Work Map and a single active Task.
|
|
141
141
|
5. Compile only decision-relevant context after reset.
|
|
142
|
-
6.
|
|
142
|
+
6. Adapt clarification to whether a human response channel is actually available.
|
|
143
|
+
7. Prepare one-time Keeper and controlled Evil Eval artifacts.
|
|
143
144
|
|
|
144
145
|
It does not orchestrate models, browse the web, generate project documents, or pretend that a CLI command
|
|
145
146
|
clears model memory. Those capabilities belong to the host Agent and its tools.
|
|
@@ -169,15 +170,29 @@ generic updates cannot change status, and completion requires criterion-by-crite
|
|
|
169
170
|
- the stable Agent protocol;
|
|
170
171
|
- compact state counts and open uncertainty;
|
|
171
172
|
- PROJECT.md, with decision history identified as on-demand context;
|
|
172
|
-
- the active Task, if one exists;
|
|
173
|
-
- the exact design, capability, source, contract, or fixture files named in that Task's `reads` list.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
173
|
+
- the active Task, if one exists;
|
|
174
|
+
- the exact design, capability, source, contract, or fixture files named in that Task's `reads` list.
|
|
175
|
+
|
|
176
|
+
### Environment adaptation and isolated state
|
|
177
|
+
|
|
178
|
+
The host supplies human-channel availability at context time. With `available` (the default), the Agent may
|
|
179
|
+
ask the human for consequential intent, preference, authority, or facts that only they hold. With
|
|
180
|
+
`unavailable`, it must not fabricate a user exchange or replace an intent/authority question with web search.
|
|
181
|
+
It first inspects discoverable workspace facts and permitted tools, researches only objective external facts when
|
|
182
|
+
the task allows it, then records a bounded assumption and chooses a safe reversible action or blocks on
|
|
183
|
+
unavailable authority.
|
|
184
|
+
|
|
185
|
+
`--state-dir <outside-workspace-dir>` places LOOM's state tree in a per-run sidecar rather than the workspace.
|
|
186
|
+
This is for benchmark or sandbox runners whose scored workspace must remain pristine. The sidecar remains
|
|
187
|
+
semantically `.loom/` to LOOM documents and Task references, but initialization does not edit the workspace
|
|
188
|
+
or add an AGENTS.md anchor. Every command in that run must receive the same state directory.
|
|
189
|
+
|
|
190
|
+
When a Task is active, context also injects a short execution protocol. It tells a reset Agent to reconcile
|
|
191
|
+
the Task with the current workspace and version-control state, inspect relevant tests before editing, choose
|
|
192
|
+
verification according to risk and the exact `done_when` claims, persist `completed/current/next` at meaningful
|
|
193
|
+
handoff boundaries, and close only with reproducible criterion-level evidence. It deliberately does not require
|
|
194
|
+
a ceremonial unit test for every kind of work or a branch, commit, or pull request for every Task. Those
|
|
195
|
+
delivery mechanisms remain conditional on the human request and repository workflow.
|
|
181
196
|
|
|
182
197
|
Workspace code paths in `touches` are identified but not automatically copied into context. Full decision
|
|
183
198
|
history is not repeatedly injected because current truth belongs in PROJECT.md and linked design documents.
|
package/docs/PROMPT_CATALOG.md
CHANGED
|
@@ -14,21 +14,27 @@ order as JSON, so documentation cannot quietly describe a different prompt from
|
|
|
14
14
|
|
|
15
15
|
| Layer | Message | Injected when | Purpose |
|
|
16
16
|
|---|---|---|---|
|
|
17
|
-
| Stable core | `layers.stable_core` | Every `loom context` | Durable collaboration judgment: user ownership, evidence classes, question threshold, corrections, reversible delegation |
|
|
18
|
-
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
17
|
+
| Stable core | `layers.stable_core` | Every `loom context` | Durable collaboration judgment: user ownership, evidence classes, question threshold, corrections, reversible delegation |
|
|
18
|
+
| Environment adaptation | `layers.environment_adaptation_available` or `layers.environment_adaptation_unavailable` | Every `loom context` | States whether a human can answer; routes uncertainty through inspection, permitted factual research, clarification, bounded assumption, or block |
|
|
19
|
+
| Runtime adaptation | `layers.runtime_protocol` | Every `loom context` | LOOM-specific disk model, document graph, capability boundaries, Work Map, and three production loops |
|
|
20
|
+
| Project state | `layers.project_state` | Every `loom context` | Dynamic status, uncertainty, assumptions, document/capability inventory, Task counts, and Keeper feedback |
|
|
21
|
+
| Execution protocol | `layers.execution_protocol` | Active Task or `--task` | Recovery, workspace inspection, risk-based testing, progress persistence, exact proof, and delivery boundaries |
|
|
22
|
+
| Current task | `layers.current_task` | Active Task or `--task` | Exact Task JSON followed by the exact contents of every path in `reads` |
|
|
22
23
|
|
|
23
24
|
This separation is deliberate. Project-specific expertise does not inflate the stable prompt; it lives in
|
|
24
25
|
field dossiers. One-off Task instructions do not become global doctrine. Host permissions and tools are not
|
|
25
26
|
claimed by prompt text.
|
|
26
27
|
|
|
28
|
+
When the human channel is unavailable, the environment message explicitly forbids fabricated user interaction and
|
|
29
|
+
forbids treating web research as a substitute for user intent, preference, or authority. It preserves factual
|
|
30
|
+
research when the task and host actually permit it, then requires a reversible assumption or block for what cannot
|
|
31
|
+
be learned.
|
|
32
|
+
|
|
27
33
|
## Workspace and document messages
|
|
28
34
|
|
|
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.
|
|
35
|
+
`workspace_anchor` is the short block added to `AGENTS.md`. It tells an entering or reset Agent to run
|
|
36
|
+
`loom context`, rerun it before editing after an interruption, persist state at meaningful boundaries rather
|
|
37
|
+
than before every tool call, and keep CLI operation invisible to the human.
|
|
32
38
|
|
|
33
39
|
`templates.project_index` creates `.loom/PROJECT.md` as a concise whole and document map. It explicitly
|
|
34
40
|
prevents a large project's systems from being compressed into one file.
|
|
@@ -74,6 +80,10 @@ LOOM. It does not weaken the baseline or prohibit normal planning.
|
|
|
74
80
|
`evaluation.loom_condition` gives the same brief, model class, tools, workspace facts, and budget, adding only
|
|
75
81
|
LOOM continuity infrastructure and no extra authority.
|
|
76
82
|
|
|
83
|
+
`evaluation.unattended_baseline_condition` and `evaluation.unattended_loom_condition` are the same two
|
|
84
|
+
conditions when no user response channel exists. The environment fact is equal in both arms; only the LOOM arm
|
|
85
|
+
uses `loom context --human-channel unavailable`.
|
|
86
|
+
|
|
77
87
|
`evaluation.blind_judge` scores anonymized output on intent fidelity, question value, whole coverage,
|
|
78
88
|
professional depth, buildability, reset continuity, implementation evidence, human burden, and cost. It
|
|
79
89
|
penalizes ceremony and runs an order swap.
|
|
@@ -82,13 +92,13 @@ penalizes ceremony and runs an order swap.
|
|
|
82
92
|
|
|
83
93
|
`composition.normal_resume`, `composition.active_task`, and `composition.keeper_handoff` list the exact block
|
|
84
94
|
order. Keeper receives every design and capability document; a normal active Task receives only its declared
|
|
85
|
-
reads. This difference is intentional: Keeper audits whole-project coverage, while delivery protects context
|
|
86
|
-
focus.
|
|
87
|
-
|
|
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.
|
|
95
|
+
reads. This difference is intentional: Keeper audits whole-project coverage, while delivery protects context
|
|
96
|
+
focus.
|
|
97
|
+
|
|
98
|
+
The active Task composition adds `execution_protocol` between the recovered project whole and the exact Task.
|
|
99
|
+
It requires inspection of current workspace/version-control reality, risk-appropriate tests, restartable
|
|
100
|
+
progress, and criterion-level proof. It does not force a unit test for non-code claims or a branch/PR for every
|
|
101
|
+
Task; those are selected when the behavior, human request, or repository workflow makes them meaningful.
|
|
92
102
|
|
|
93
103
|
## CLI operational messages
|
|
94
104
|
|
|
@@ -31,9 +31,9 @@ already exist in the registry.
|
|
|
31
31
|
## 3. Publish deliberately
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
git tag v2.0.1
|
|
34
|
+
git tag v2.0.1
|
|
35
35
|
git push origin HEAD
|
|
36
|
-
git push origin v2.0.1
|
|
36
|
+
git push origin v2.0.1
|
|
37
37
|
npm publish --access public
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -46,7 +46,7 @@ In a clean temporary directory:
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
npm view @haaaiawd/loom version
|
|
49
|
-
npx @haaaiawd/loom@2.0.1 --version
|
|
49
|
+
npx @haaaiawd/loom@2.0.1 --version
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Then open the GitHub README and npm package page to confirm the SVG header, diagrams, links, and changelog
|
package/docs/UX_FLOW.md
CHANGED
|
@@ -59,6 +59,15 @@ details that do not affect the current whole, or framework questions whose only
|
|
|
59
59
|
After every answer round, the Agent re-evaluates the whole. If material uncertainty remains, it loops to another adaptive
|
|
60
60
|
round. If only reversible local uncertainty remains, it continues.
|
|
61
61
|
|
|
62
|
+
### When no human response channel exists
|
|
63
|
+
|
|
64
|
+
Some unattended, sandboxed, or benchmark runs have no human to answer. The host invokes
|
|
65
|
+
`loom context --human-channel unavailable`; this does not create a synthetic user. The Agent first inspects
|
|
66
|
+
discoverable workspace facts and permitted tools, researches only objective external facts when the task permits it,
|
|
67
|
+
and never treats web research as a substitute for user intent, preference, or authority. It records a bounded
|
|
68
|
+
assumption and selects a safe reversible action, or blocks if the missing answer controls irreversible, high-risk,
|
|
69
|
+
or materially costly work.
|
|
70
|
+
|
|
62
71
|
## 3. Build project-specific capability
|
|
63
72
|
|
|
64
73
|
The Agent maps which established professional fields could change questions, design, implementation, risk, or verification.
|
|
@@ -164,8 +173,12 @@ human authority govern later changes.
|
|
|
164
173
|
## Primary evaluation question
|
|
165
174
|
|
|
166
175
|
The causal baseline is a normal capable Agent with no LOOM—not LOOM v1. Both conditions receive the same raw brief, model,
|
|
167
|
-
tools, workspace, user oracle, budget, and reset schedule. LOOM v1 may be added as a secondary regression condition, but it does
|
|
176
|
+
tools, workspace, human-channel availability, user oracle when one exists, budget, and reset schedule. LOOM v1 may be added as a secondary regression condition, but it does
|
|
168
177
|
not answer whether the framework itself creates value over no framework.
|
|
169
178
|
|
|
179
|
+
For an unattended external benchmark, both conditions receive `human_channel: unavailable` and no fabricated user
|
|
180
|
+
oracle. A fresh LOOM sidecar sits outside the scored workspace and is passed through `--state-dir` on every LOOM
|
|
181
|
+
command, so framework state cannot alter task files or hidden-test behavior.
|
|
182
|
+
|
|
170
183
|
The anonymization harness must preserve runnable relative layout, record a file/digest manifest, and rerun each condition's
|
|
171
184
|
declared tests and smoke command before judging. Packet-construction failures are eval failures, never evidence against a run.
|