@haaaiawd/loom 2.1.2 → 2.1.3
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 +50 -40
- package/README.md +223 -224
- package/README.zh-CN.md +172 -172
- package/cli/bin/loom.js +293 -254
- package/cli/src/protocol.js +697 -691
- package/cli/src/store.js +1017 -946
- package/docs/PROMPT_CATALOG.md +139 -116
- package/docs/UX_FLOW.md +188 -184
- package/package.json +56 -56
package/docs/PROMPT_CATALOG.md
CHANGED
|
@@ -1,116 +1,139 @@
|
|
|
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
|
-
| 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
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
##
|
|
92
|
-
|
|
93
|
-
`
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
+
| 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, blocked Tasks with reasons and recovery conditions, and Keeper feedback |
|
|
21
|
+
| Project state after failure | `layers.project_state_after_keeper_failure` | Keeper `needs_revision`/`blocked` | Prior finding text, the repair expectation, and the `loom project ready` → fresh-Keeper retry contract |
|
|
22
|
+
| Keeper review of prior failure | `layers.keeper_review_of_prior_failure` | `--keeper` after a failed attempt | The exact prior findings the fresh Keeper must re-verify before passing |
|
|
23
|
+
| Execution protocol | `layers.execution_protocol` | Active Task or `--task` | Recovery, workspace inspection, risk-based testing, progress persistence, exact proof, and delivery boundaries |
|
|
24
|
+
| Current task | `layers.current_task` | Active Task or `--task` | Exact Task JSON followed by the exact contents of every path in `reads` |
|
|
25
|
+
| On-demand map | `layers.on_demand_map` | Every `loom context` | Pointers to decision history, design documents, capability dossiers, and STRUCTURE.md for lazy loading |
|
|
26
|
+
| Keeper context | `layers.keeper_context` | `--keeper` | Full decision history, work-map summary, and every design and capability document for whole-corpus audit |
|
|
27
|
+
|
|
28
|
+
This separation is deliberate. Project-specific expertise does not inflate the stable prompt; it lives in
|
|
29
|
+
field dossiers. One-off Task instructions do not become global doctrine. Host permissions and tools are not
|
|
30
|
+
claimed by prompt text.
|
|
31
|
+
|
|
32
|
+
When the human channel is unavailable, the environment message explicitly forbids fabricated user interaction and
|
|
33
|
+
forbids treating web research as a substitute for user intent, preference, or authority. It preserves factual
|
|
34
|
+
research when the task and host actually permit it, then requires a reversible assumption or block for what cannot
|
|
35
|
+
be learned.
|
|
36
|
+
|
|
37
|
+
## Workspace and document messages
|
|
38
|
+
|
|
39
|
+
`workspace_anchor` is the short block added to `AGENTS.md`. It tells an entering or reset Agent to run
|
|
40
|
+
`loom context`, rerun it before editing after an interruption, persist state at meaningful boundaries rather
|
|
41
|
+
than before every tool call, and keep CLI operation invisible to the human. The anchor is durable-only:
|
|
42
|
+
`loom init` never rewrites existing `AGENTS.md` content, and current mechanics always reach the Agent through
|
|
43
|
+
`loom context` output rather than through the anchor text.
|
|
44
|
+
|
|
45
|
+
`templates.project_index` creates `.loom/PROJECT.md` as a concise whole and document map. It explicitly
|
|
46
|
+
prevents a large project's systems from being compressed into one file.
|
|
47
|
+
|
|
48
|
+
`templates.design_documents` contains all seven live design templates:
|
|
49
|
+
|
|
50
|
+
1. `product` — outcome, users, problem, product principles, scope, end-to-end behavior, success and failure.
|
|
51
|
+
2. `experience` — journey, information architecture, states, content, visual direction, accessibility, recovery, usability proof.
|
|
52
|
+
3. `system` — responsibilities, boundaries, control flow, data, interfaces, dependencies, failure, implementation, verification.
|
|
53
|
+
4. `contract` — consumers, schemas or commands, invariants, permissions, errors, compatibility, fixtures, contract tests.
|
|
54
|
+
5. `verification` — claims, environments, fixtures, acceptance matrix, commands, negative tests, blind spots.
|
|
55
|
+
6. `operations` — authority, procedures, commands, safety, failure recovery, evidence and audit trail.
|
|
56
|
+
7. `research` — decision, evidence, method, sources, findings, conflicts, consequences and follow-up proof.
|
|
57
|
+
|
|
58
|
+
These are possible document kinds, not a fixed seven-file checklist. The Agent creates as many actual
|
|
59
|
+
documents as the project's independent decision surfaces require.
|
|
60
|
+
|
|
61
|
+
`templates.professional_capability` is the only capability template. It enforces one recognizable field per
|
|
62
|
+
file, a project-specific diagnosis and stance, opened evidence, rejected generic defaults, concrete design and
|
|
63
|
+
verification consequences, failure modes, and links to adjacent fields without merging them.
|
|
64
|
+
|
|
65
|
+
`templates.decision_history` is the preamble for consequential superseding decisions. Current truth stays in
|
|
66
|
+
the project map and linked design documents.
|
|
67
|
+
|
|
68
|
+
## Keeper message
|
|
69
|
+
|
|
70
|
+
`keeper` is the exact independent handoff prompt. It binds a unique fresh-Agent `run_id` to a frozen
|
|
71
|
+
`prepared_digest`, asks the Keeper to navigate the whole corpus and attempt the first Task, and defines three
|
|
72
|
+
verdicts:
|
|
73
|
+
|
|
74
|
+
- `passed`: a fresh Agent can responsibly begin.
|
|
75
|
+
- `needs_revision`: concrete disk-truth gaps can be repaired.
|
|
76
|
+
- `blocked`: progress needs unavailable authority or external state.
|
|
77
|
+
|
|
78
|
+
A `passed` verdict must carry independent review provenance (`review.mode: "independent"` plus a
|
|
79
|
+
`reviewer_id` and evidence that a separate Agent ran the review). A self-review or an unattested pass is
|
|
80
|
+
rejected at record time; a legacy unattested pass blocks `task start` and is an error in `loom check` until
|
|
81
|
+
replaced by a fresh review or an explicit `loom keeper skip --reason`.
|
|
82
|
+
|
|
83
|
+
Findings are cumulative across attempts: a pass must carry `closure_results` with evidence for every gap
|
|
84
|
+
still open from earlier rounds, not only the latest attempt's. A changed project digest proves that
|
|
85
|
+
something changed — never that findings were resolved. There is no auto-pass.
|
|
86
|
+
|
|
87
|
+
A failed result is injected into the next project-state message. A retry requires changed project truth, a
|
|
88
|
+
new digest, and another fresh Keeper. `loom review --help` describes the staging steps for opening that
|
|
89
|
+
fresh Agent without inherited conversation.
|
|
90
|
+
|
|
91
|
+
## Evil Eval messages
|
|
92
|
+
|
|
93
|
+
`evaluation.baseline_condition` gives a normal capable Agent the identical brief and ordinary tools without
|
|
94
|
+
LOOM. It does not weaken the baseline or prohibit normal planning.
|
|
95
|
+
|
|
96
|
+
`evaluation.loom_condition` gives the same brief, model class, tools, workspace facts, and budget, adding only
|
|
97
|
+
LOOM continuity infrastructure and no extra authority.
|
|
98
|
+
|
|
99
|
+
`evaluation.unattended_baseline_condition` and `evaluation.unattended_loom_condition` are the same two
|
|
100
|
+
conditions when no user response channel exists. The environment fact is equal in both arms; only the LOOM arm
|
|
101
|
+
uses `loom context --human-channel unavailable`.
|
|
102
|
+
|
|
103
|
+
`evaluation.blind_judge` scores anonymized output on intent fidelity, question value, whole coverage,
|
|
104
|
+
professional depth, buildability, reset continuity, implementation evidence, human burden, and cost. It
|
|
105
|
+
penalizes ceremony and runs an order swap.
|
|
106
|
+
|
|
107
|
+
## Composition messages
|
|
108
|
+
|
|
109
|
+
`composition.normal_resume`, `composition.active_task`, and `composition.keeper_handoff` list the exact block
|
|
110
|
+
order. Keeper receives every design and capability document; a normal active Task receives only its declared
|
|
111
|
+
reads. This difference is intentional: Keeper audits whole-project coverage, while delivery protects context
|
|
112
|
+
focus.
|
|
113
|
+
|
|
114
|
+
The active Task composition adds `execution_protocol` between the recovered project whole and the exact Task.
|
|
115
|
+
It requires inspection of current workspace/version-control reality, risk-appropriate tests, restartable
|
|
116
|
+
progress, and criterion-level proof. It does not force a unit test for non-code claims or a branch/PR for every
|
|
117
|
+
Task; those are selected when the behavior, human request, or repository workflow makes them meaningful.
|
|
118
|
+
|
|
119
|
+
## CLI operational messages
|
|
120
|
+
|
|
121
|
+
`loom --help` is the complete command-oriented message surface. `loom review` and `loom review --help` are
|
|
122
|
+
the read-only entry points an Agent uses to stage an independent Keeper handoff; `loom keeper --help` covers
|
|
123
|
+
`keeper prompt`, `keeper record`, and `keeper skip`. JSON command results report state and the next
|
|
124
|
+
host action. Validation errors are contract enforcement rather than cognitive prompts; they reject unsafe
|
|
125
|
+
references, template-only readiness, missing design documents, open high-impact uncertainty, unchanged Keeper
|
|
126
|
+
retries, stale digests, duplicate run identities, Task dependency violations, missing or directory-level Task
|
|
127
|
+
reads, Task references to nonexistent design sections or capability nodes, status bypasses, completion
|
|
128
|
+
without evidence for every done condition, silent rewriting of a done Task, and reasonless reopening of a
|
|
129
|
+
disproven completion or unmet block.
|
|
130
|
+
|
|
131
|
+
Warning channels are closable rather than permanent: a decision-affected done Task warns only until it is
|
|
132
|
+
reopened and re-completed after the decision, deliverable coverage distinguishes planned from delivered, and
|
|
133
|
+
blocked Tasks surface their recovery conditions in `loom context` until reopened with a concrete reason.
|
|
134
|
+
|
|
135
|
+
The short human fallback when the host cannot create a Keeper Agent remains:
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
Please open a new window in this project, run loom keeper prompt, and follow it.
|
|
139
|
+
```
|