@haaaiawd/loom 1.3.1 → 2.0.0
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 +11 -86
- package/CONTRIBUTING.md +37 -0
- package/EVIL_EVAL.md +112 -0
- package/README.md +193 -445
- package/README.zh-CN.md +174 -0
- package/SECURITY.md +11 -0
- package/cli/bin/loom.js +171 -998
- package/cli/src/protocol.js +367 -0
- package/cli/src/store.js +626 -0
- package/design.md +194 -0
- package/docs/PROMPT_CATALOG.md +99 -0
- package/docs/RELEASE_CHECKLIST.md +53 -0
- package/docs/UX_FLOW.md +171 -0
- package/docs/brand/loom-mark.svg +18 -0
- package/docs/brand/loom-readme-header.svg +34 -0
- package/docs/brand/loom-readme-header.zh-CN.svg +29 -0
- package/docs/loom-eval-loop.drawio +21 -0
- package/docs/loom-eval-loop.svg +56 -0
- package/docs/loom-production-loop.drawio +41 -0
- package/docs/loom-production-loop.svg +92 -0
- package/package.json +43 -40
- package/EXTERNAL_ACQUISITION_DESIGN.md +0 -143
- package/cli/help/asset.md +0 -36
- package/cli/help/atelier.md +0 -37
- package/cli/help/atlas.md +0 -48
- package/cli/help/capability.md +0 -118
- package/cli/help/concepts.md +0 -105
- package/cli/help/doctor.md +0 -80
- package/cli/help/expertise.md +0 -52
- package/cli/help/loop.md +0 -134
- package/cli/help/patch.md +0 -33
- package/cli/help/proposals.md +0 -21
- package/cli/help/version.md +0 -136
- package/cli/help/workflow.md +0 -116
- package/cli/src/activate.js +0 -505
- package/cli/src/asset-library.js +0 -384
- package/cli/src/atelier.js +0 -331
- package/cli/src/atlas.js +0 -282
- package/cli/src/auto.js +0 -116
- package/cli/src/capability-graph.js +0 -724
- package/cli/src/capability-proposals.js +0 -225
- package/cli/src/diagnostics.js +0 -859
- package/cli/src/expertise-pack.js +0 -336
- package/cli/src/guide.js +0 -548
- package/cli/src/help.js +0 -41
- package/cli/src/init.js +0 -187
- package/cli/src/intent-draft.js +0 -303
- package/cli/src/intent-map.js +0 -747
- package/cli/src/patch.js +0 -214
- package/cli/src/philosophy.js +0 -331
- package/cli/src/shared/intent-ref.js +0 -38
- package/cli/src/shared/md-utils.js +0 -125
- package/cli/src/shared/paths.js +0 -73
- package/cli/src/shared/proof-reference.js +0 -19
- package/cli/src/shared/verification-method.js +0 -32
- package/cli/src/verify.js +0 -394
- package/cli/src/version.js +0 -134
- package/dimensions/AUTHORSHIP.md +0 -45
- package/dimensions/PART_DECOMPOSITION.md +0 -42
- package/dimensions/SEARCH_METHODOLOGY.md +0 -101
- package/dimensions/examples/AGENT_SYSTEM/README.md +0 -219
- package/dimensions/examples/CLI_TOOL/README.md +0 -163
- package/dimensions/universal/COLLABORATION_PHILOSOPHY.md +0 -28
- package/dimensions/universal/ENGINEERING_CREED.md +0 -30
- package/dimensions/universal/PRODUCT_PHILOSOPHY.md +0 -32
- package/meta/BASELINE.md +0 -91
- package/meta/INTENT_LOOP.md +0 -296
- package/meta/PHILOSOPHY_WEAVER.md +0 -110
- package/meta/ROLE_ACTIVATION.md +0 -114
- package/roles/architect.md +0 -92
- package/roles/forge.md +0 -110
- package/roles/impact-reviewer.md +0 -37
- package/roles/keeper.md +0 -113
- package/roles/visionary.md +0 -57
- package/templates/ASSET_LIBRARY_MANIFEST_TEMPLATE.json +0 -10
- package/templates/ATELIER_RECORD_TEMPLATE.json +0 -48
- package/templates/ATLAS_TEMPLATE.html +0 -104
- package/templates/CAPABILITY_BRIEF_TEMPLATE.md +0 -36
- package/templates/CAPABILITY_GRAPH_EXAMPLE.json +0 -188
- package/templates/CAPABILITY_GRAPH_TEMPLATE.json +0 -78
- package/templates/EXPERTISE_PACK_TEMPLATE.json +0 -22
- package/templates/INTENT_MAP_TEMPLATE.json +0 -85
- package/templates/PHILOSOPHY_TEMPLATE.md +0 -44
- package/templates/VISION_TEMPLATE.md +0 -44
package/README.md
CHANGED
|
@@ -1,461 +1,209 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
>
|
|
4
|
-
>
|
|
5
|
-
>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
LOOM
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
1
|
+
<p align="center"><strong>English</strong> · <a href="README.zh-CN.md">简体中文</a></p>
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="docs/brand/loom-readme-header.svg" alt="LOOM — Keep the whole. Continue the work." width="100%">
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@haaaiawd/loom"><img src="https://img.shields.io/npm/v/%40haaaiawd%2Floom?style=flat-square&color=4169E1&label=npm" alt="npm version"></a>
|
|
9
|
+
<img src="https://img.shields.io/badge/node-%E2%89%A518-17212B?style=flat-square" alt="Node.js 18 or newer">
|
|
10
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-9AD8C2?style=flat-square&labelColor=17212B" alt="MIT license"></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center"><strong>The human talks to the Agent. LOOM helps the Agent remember, understand, and continue.</strong></p>
|
|
14
|
+
|
|
15
|
+
LOOM is invisible project-understanding and continuity infrastructure for AI Agents. It supports
|
|
16
|
+
any work that can be materially advanced through code or command-line tools: software, operations,
|
|
17
|
+
research workflows, office automation, data work, and highly personalized projects.
|
|
18
|
+
|
|
19
|
+
The human does not learn a framework or operate a CLI. They describe what they want, answer useful
|
|
20
|
+
questions, disagree, delegate decisions, and watch the work become real. The Agent uses LOOM in the
|
|
21
|
+
background to preserve the whole project across context compression, new sessions, and implementation.
|
|
22
|
+
|
|
23
|
+
<table>
|
|
24
|
+
<tr>
|
|
25
|
+
<td width="33%"><strong>Whole over fragments</strong><br>Keep the result, decisions, systems, and unknowns connected.</td>
|
|
26
|
+
<td width="33%"><strong>Expertise over costumes</strong><br>Compile project-specific professional judgment, not decorative expert personas.</td>
|
|
27
|
+
<td width="33%"><strong>Proof over ceremony</strong><br>Use independent handoff, exact done conditions, and disk evidence.</td>
|
|
28
|
+
</tr>
|
|
29
|
+
</table>
|
|
30
|
+
|
|
31
|
+
## The loop
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
LOOM has three explicit feedback loops: understanding converges on the whole project; a fresh Keeper
|
|
36
|
+
tests the frozen handoff and returns concrete gaps; restartable Tasks carry implementation and evidence
|
|
37
|
+
across interruptions. A failed Keeper does not become a warning that everyone politely ignores—it sends
|
|
38
|
+
the project back to the exact source that needs repair, then requires a changed digest and a new Keeper.
|
|
39
|
+
|
|
40
|
+
The loop is adaptive. LOOM does not provide a universal questionnaire, fixed professional roles, or
|
|
41
|
+
a mandatory phase ritual. The Agent keeps clarifying while unknowns could materially change the whole.
|
|
42
|
+
It proceeds when the remaining uncertainty is reversible and local, or when the human explicitly asks
|
|
43
|
+
to skip after hearing the concrete cost.
|
|
44
|
+
|
|
45
|
+
## Project truth on disk
|
|
46
|
+
|
|
47
|
+
An initialized project contains one small semantic backbone:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
.loom/
|
|
51
|
+
├── PROJECT.md concise entry point and map of the current whole
|
|
52
|
+
├── DECISIONS.md concise history when important decisions supersede earlier ones
|
|
53
|
+
├── design/ product, experience, system, contract, verification, operations, or research docs
|
|
54
|
+
├── capabilities/ one project-specific dossier per recognizable professional field
|
|
55
|
+
├── state.json confirmed facts, assumptions, unresolved questions, Keeper status
|
|
56
|
+
├── tasks.json broad Work Map plus the detailed active horizon
|
|
57
|
+
└── eval/ optional Evil Eval scenarios for testing LOOM itself
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Small projects may need few design documents; large projects may need many. A consequential subsystem,
|
|
61
|
+
experience, interface, contract, or operational concern gets its own document when a fresh Agent must
|
|
62
|
+
understand or verify it independently. `PROJECT.md` maps the whole instead of becoming a thousand-line attic.
|
|
63
|
+
|
|
64
|
+
### Capability dossiers
|
|
65
|
+
|
|
66
|
+
A dossier exists only when specialist knowledge would change a question, design choice,
|
|
67
|
+
implementation, risk, or verification method. Each dossier represents one recognizable professional
|
|
68
|
+
field—such as UI/UX design, visual art direction, game design, psychology, security, or distributed
|
|
69
|
+
systems. Different fields remain separate even when tightly coupled; their synthesis belongs in the
|
|
70
|
+
design document whose decision they jointly shape. A task technique such as triage, ranking, parsing,
|
|
71
|
+
or caching is not allowed to masquerade as the project's entire capability surface.
|
|
72
|
+
|
|
73
|
+
### Work Map and Task
|
|
74
|
+
|
|
75
|
+
The Work Map may be hundreds or thousands of lines. It is stored, searched, and revised on disk; it
|
|
76
|
+
is not injected into every model context. Planning begins broadly, while detailed steps are compiled
|
|
77
|
+
only for the active horizon.
|
|
78
|
+
|
|
79
|
+
A Task is not a miniature bureaucracy. It is the smallest restartable checkpoint that tells a fresh
|
|
80
|
+
Agent:
|
|
81
|
+
|
|
82
|
+
- what observable result to create;
|
|
83
|
+
- what proves completion;
|
|
84
|
+
- what must not be damaged;
|
|
85
|
+
- which project and capability documents matter;
|
|
86
|
+
- what has happened, what is happening, and what comes next;
|
|
87
|
+
- which evidence already exists and which exact done condition it proves.
|
|
88
|
+
|
|
89
|
+
## Agent quick start
|
|
90
|
+
|
|
91
|
+
Install the CLI:
|
|
68
92
|
|
|
69
93
|
```bash
|
|
70
94
|
npm install --global @haaaiawd/loom
|
|
71
95
|
loom --version
|
|
72
96
|
```
|
|
73
97
|
|
|
74
|
-
|
|
98
|
+
Or install from the repository during development:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npm install --global .
|
|
102
|
+
loom --version
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Inside a project, the Agent runs:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
loom init
|
|
109
|
+
loom context
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The Agent edits `.loom/PROJECT.md`, design documents, and capability dossiers as human-readable project truth. Structured
|
|
113
|
+
writes use JSON files so long content remains auditable and shell quoting does not corrupt it:
|
|
75
114
|
|
|
76
115
|
```bash
|
|
77
|
-
|
|
116
|
+
loom record --json-file understanding-update.json
|
|
117
|
+
loom design add product --title "Product definition" --kind product
|
|
118
|
+
loom design add local-analysis --title "Local analysis system" --kind system
|
|
119
|
+
loom design add acceptance --title "Vertical-slice verification" --kind verification
|
|
120
|
+
loom capability add ui-ux-design --title "UI/UX design"
|
|
121
|
+
loom capability add behavioral-psychology --title "Behavioral psychology"
|
|
122
|
+
loom task plan --json-file initial-work-map.json
|
|
123
|
+
loom project ready
|
|
78
124
|
```
|
|
79
125
|
|
|
80
|
-
|
|
81
|
-
|
|
126
|
+
At the transition to material execution, open a fresh Agent thread and give it one short instruction:
|
|
127
|
+
|
|
128
|
+
```text
|
|
129
|
+
Run loom keeper prompt in this project and follow it. Decide whether you can responsibly start.
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
If Keeper returns `needs_revision` or `blocked`, those exact gaps reappear in `loom context`. The Agent
|
|
133
|
+
repairs the relevant project, design, capability, or Task source, prepares a changed digest, and opens a
|
|
134
|
+
different fresh Keeper. If the host cannot create a subagent, the human can open a new window and use the
|
|
135
|
+
same sentence. After the one-time handoff passes, the execution Agent starts and maintains Tasks normally:
|
|
136
|
+
|
|
82
137
|
```bash
|
|
83
|
-
loom
|
|
84
|
-
loom
|
|
138
|
+
loom task next
|
|
139
|
+
loom task start TASK-001
|
|
140
|
+
loom context
|
|
141
|
+
loom task update TASK-001 --json-file progress.json
|
|
142
|
+
loom task block TASK-001 --json-file block.json
|
|
143
|
+
loom task reopen TASK-001
|
|
144
|
+
loom task reopen TASK-001 --reason "Prior completion evidence was disproven"
|
|
145
|
+
loom task done TASK-001 --json-file evidence.json
|
|
85
146
|
```
|
|
86
147
|
|
|
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
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
**输入**:用户需求(产品要解决什么问题、目标用户是谁)
|
|
130
|
-
**Visionary 会做什么**:基于哲学定义产品愿景 → 为每个 Intent 写意图叙事("为什么存在")
|
|
131
|
-
**产出**:`.loom/v1/01_VISION.md`(含北极星 + 意图叙事列表)
|
|
132
|
-
**怎么判断合格**:意图叙事是"为什么"不是"做什么"。如果写成了功能列表,让它重做
|
|
133
|
-
**下一步**:激活 Architect 设计系统
|
|
134
|
-
|
|
135
|
-
### 步骤 4:设计系统
|
|
136
|
-
|
|
137
|
-
```bash
|
|
138
|
-
loom activate architect
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
**输入**:愿景文档 + 哲学文档
|
|
142
|
-
**Architect 会做什么**:先展开 Capability Graph → 设计系统边界 → 绘制 Intent Map → 定义完成契约、按需的质量契约与专业能力需求
|
|
143
|
-
**产出**:`.loom/v1/07_CAPABILITY_GRAPH.json` + `07_CAPABILITY_BRIEFS/` + `.loom/v1/02_ARCHITECTURE.md` + `.loom/v1/04_INTENT_MAP.json`
|
|
144
|
-
**怎么判断合格**:高影响图谱节点都有路由、Intent 都可回链到图谱,完成契约可观察,质量契约可比较,依赖无环
|
|
145
|
-
**下一步**:进入 Intent Loop
|
|
146
|
-
|
|
147
|
-
### 步骤 5:进入 Intent Loop
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
# Keeper 选 Intent 并更新状态
|
|
151
|
-
loom intent next # 查看下一个可执行 Intent
|
|
152
|
-
loom intent update INT-001 --status in_progress
|
|
153
|
-
|
|
154
|
-
# Forge 编译专业能力并实现
|
|
155
|
-
loom activate forge --intent INT-001
|
|
156
|
-
|
|
157
|
-
# 仅当 Architect 为该 Intent 声明 quality_strategy=atelier
|
|
158
|
-
loom atelier init INT-001
|
|
159
|
-
loom atelier validate INT-001
|
|
160
|
-
|
|
161
|
-
# Keeper 独立形成 Quality Proof
|
|
162
|
-
loom activate keeper --intent INT-001
|
|
163
|
-
loom verify contract INT-001 # 查看验收契约
|
|
164
|
-
loom verify write --json-file verification.json # 写入验证记录
|
|
165
|
-
|
|
166
|
-
# 根据判定结果
|
|
167
|
-
loom intent update INT-001 --status completed # passed
|
|
168
|
-
loom intent update INT-001 --status blocked # blocked
|
|
169
|
-
|
|
170
|
-
# 查看进度
|
|
171
|
-
loom intent status
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
**Loop 结束**:所有 Intent 为 completed,且 `loom atlas validate` 通过当前版本的决策图谱交付门。
|
|
175
|
-
|
|
176
|
-
### 步骤 6:决策图谱交付
|
|
177
|
-
|
|
148
|
+
Completion is deliberately explicit:
|
|
149
|
+
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"evidence": ["npm test: 21 passed, 0 failed"],
|
|
153
|
+
"checks": [
|
|
154
|
+
{
|
|
155
|
+
"criterion": "The exact done_when sentence from the Task.",
|
|
156
|
+
"evidence": ["The command, artifact, or observation that proves this criterion."]
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Run `loom --help` for the complete command surface. Run `loom check` for structural health. Run
|
|
163
|
+
`loom prompts` to print every cognitive message LOOM can inject: the stable collaboration core,
|
|
164
|
+
runtime protocol, dynamic state layer, all document templates, Keeper prompt, eval conditions, judge
|
|
165
|
+
prompt, and their composition order. See the [prompt and message catalog](docs/PROMPT_CATALOG.md).
|
|
166
|
+
|
|
167
|
+
## What LOOM deliberately removed
|
|
168
|
+
|
|
169
|
+
LOOM 2 replaces the v1 chain of Doctrine, Vision, Capability Graph, Impact Gate, Intent Map, Expertise
|
|
170
|
+
Pack, Atelier, Quality Arena, per-Intent Keeper, and Atlas with one adaptive understanding loop, a
|
|
171
|
+
scalable graph of design documents, separate professional-field dossiers, one Work Map, and one
|
|
172
|
+
restartable Task contract.
|
|
173
|
+
|
|
174
|
+
The valuable ideas remain: project judgment, external professional capability, authored choices,
|
|
175
|
+
observable completion, context isolation, and evidence. They no longer require separate roles and gates.
|
|
176
|
+
|
|
177
|
+
## Proving that LOOM helps
|
|
178
|
+
|
|
179
|
+
`loom eval scaffold --json-file scenario.json` creates an Evil Eval scenario with equal model, tools,
|
|
180
|
+
workspace, user facts, and budget across two conditions. The only intended difference is the availability
|
|
181
|
+
of LOOM. Runs are repeated, context is forcibly reset, outputs are blinded and order-swapped, and ceremony,
|
|
182
|
+
user burden, time, and token cost are penalized alongside quality. See [EVIL_EVAL.md](EVIL_EVAL.md).
|
|
183
|
+
|
|
184
|
+

|
|
185
|
+
|
|
186
|
+
## Development
|
|
187
|
+
|
|
178
188
|
```bash
|
|
179
|
-
|
|
180
|
-
loom atlas --regen # 输出已装配资料的 Composer Pack,生成 loom-atlas.html
|
|
181
|
-
loom atlas validate # 校验 Atlas 是否是当前版本合格交付物
|
|
182
|
-
loom atlas # 打开合格的决策图谱
|
|
189
|
+
npm test
|
|
183
190
|
```
|
|
184
191
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
|
195
|
-
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
| `loom init` | 初始化项目 |
|
|
204
|
-
| `loom guide` | 诊断当前阶段,输出下一步引导 |
|
|
205
|
-
| `loom guide --dry-run` | 只读诊断当前阶段,不写 heartbeat |
|
|
206
|
-
| `loom auto on\|off\|status` | AUTO 模式开关 |
|
|
207
|
-
| `loom activate <role>` | 输出角色激活提示词 |
|
|
208
|
-
| `loom activate <role> --intent <id>` | 输出仅含指定 draft/官方 Intent 的角色上下文 |
|
|
209
|
-
| `loom atlas build` | 编译当前版本的 Atlas Model |
|
|
210
|
-
| `loom atlas --regen` | 输出 command-assembled Composer Pack,生成 `loom-atlas.html` |
|
|
211
|
-
| `loom atlas status\|validate` | 检查资料与 HTML 是否新鲜、完整且可交付 |
|
|
212
|
-
| `loom atlas` | 打开通过校验的决策图谱 |
|
|
213
|
-
| `loom help <topic>` | 分层指南(含 workflow、concepts、loop、capability、atelier、version、patch、doctor、atlas) |
|
|
214
|
-
| `loom version list` | 列出所有版本(* 标记当前) |
|
|
215
|
-
| `loom version new` | 创建新版本 + 自动切换(Major 升级) |
|
|
216
|
-
| `loom version use <v>` | 切换当前版本 |
|
|
217
|
-
| `loom version diff <v1> <v2>` | 对比两个版本的文件差异 |
|
|
218
|
-
| `loom patch record --json-file <path>` | 写入权威 Patch JSON 并生成 Markdown 投影 |
|
|
219
|
-
| `loom patch list` | 列出当前版本 Patch |
|
|
220
|
-
| `loom patch get <id>` | 查看单条 Patch |
|
|
221
|
-
| `loom patch validate` | 校验 Patch ledger 和生成投影 |
|
|
222
|
-
| `loom intent next` | 下一个可执行 Intent |
|
|
223
|
-
| `loom intent status` | 进度概览 |
|
|
224
|
-
| `loom intent get <id>` | Intent 详情 |
|
|
225
|
-
| `loom intent add --title <text> [--depends-on <ids>]` | 创建当前版本新增 Intent draft |
|
|
226
|
-
| `loom intent revise <id> --reason <text>` | 创建修订 draft 并报告反向依赖 |
|
|
227
|
-
| `loom intent draft <id>` | 查看 draft |
|
|
228
|
-
| `loom intent finalize <id> [--review <ids> --unaffected <ids>]` | 校验 draft 并原子更新官方 Map/topo_order;修订时必须分类全部下游影响 |
|
|
229
|
-
| `loom capability graph\|frontier\|get\|coverage\|compile` | 查看能力图谱、未路由前沿、覆盖缺口和当前 Intent 的能力编译输入 |
|
|
230
|
-
| `loom capability proposal list\|get\|submit\|decide\|close` | 以 provenance 提交新发现,并由 Architect 裁决和闭合 |
|
|
231
|
-
| `loom asset import\|list\|search\|get\|validate` | 管理带来源、许可、哈希、批准状态与 evidence 回链的本地素材 |
|
|
232
|
-
| `loom expertise init\|get\|validate <id>` | 创建和校验 revision-scoped Search Plan、外部来源与 Capability Capsules |
|
|
233
|
-
| `loom atelier init\|get\|validate <id>` | 为显式 Atelier Intent 创建、读取和校验创作记录 |
|
|
234
|
-
| `loom intent deprecate <id> --reason <text>` | 只读评估当前版本弃用影响;加 `--confirm` 并完整分类依赖方后原子写入 |
|
|
235
|
-
| `loom intent narrative <id>` | Intent 意图叙事 |
|
|
236
|
-
| `loom intent trace <id>` | Intent 完整追溯链(依赖+验证+哲学+叙事) |
|
|
237
|
-
| `loom intent diff <v1> <v2>` | 按显式 lineage 比较新建、修订、拆分、合并和未映射 Intent |
|
|
238
|
-
| `loom intent reverse-dep <id>` | 反向依赖(谁依赖这个 Intent) |
|
|
239
|
-
| `loom intent reverse-ref <anchor>` | 反向哲学引用(哪些 Intent 引用这个锚点) |
|
|
240
|
-
| `loom intent update <id> --status <s>` | 更新状态(Keeper 用) |
|
|
241
|
-
| `loom philosophy get <anchor>` | 加载哲学章节 |
|
|
242
|
-
| `loom philosophy impact <anchor>` | 只读返回直接引用该锚点的 Intent 及传递依赖影响 |
|
|
243
|
-
| `loom philosophy revise <anchor> --classification <clarification\|minor\|major> --reason <text>` | 只读评估哲学修订;clarification/minor 加 `--confirm` 和完整分区后写审计 ADR |
|
|
244
|
-
| `loom verify contract <id>` | 获取验收契约 |
|
|
245
|
-
| `loom verify write --json-file <path>` | 写入验证记录 |
|
|
246
|
-
| `loom verify history <ref> --across-versions` | 沿 predecessors 读取各 owning version 的本地验证历史 |
|
|
247
|
-
| `loom doctor` | 项目健康检查 |
|
|
248
|
-
| `loom context` | 上下文摘要(Agent 重启后一条命令获取状态) |
|
|
249
|
-
|
|
250
|
-
读命令 `intent get`、`intent narrative`、`intent trace` 和 `verify history` 支持 `v1:INT-003` 形式的跨版本引用;裸 ID 仍指当前版本。历史引用只读。跨版本沿革必须显式写在可选 `lineage.predecessors` 中,同 ID 或同标题不会建立映射,且 lineage 不属于 `depends_on`。
|
|
251
|
-
|
|
252
|
-
弃用只适用于当前版本中已 `completed` 的 Intent。首次运行 `loom intent deprecate <id> --reason "<why>"` 只返回目标、直接/传递依赖方、各自状态和确认命令,不写文件。确认时用 `--review` 与 `--unaffected` 将所有依赖方恰好分类一次;叶子 Intent 不需要分类参数。弃用记录写入 `lifecycle.deprecation`,目标仍为 `completed`,依赖和契约不被修改。重复确认会明确失败。
|
|
253
|
-
|
|
254
|
-
哲学修订由 CLI 分析后果和记录审计,不由 CLI 自动改写哲学文本。`philosophy impact` 与未确认的 `philosophy revise` 严格只读。确认 clarification 时全部受影响 Intent 必须归入 `--unaffected`;确认 minor 时可将确需重验的 Intent 归入 `--review`,其中 `completed` 才转为 `needs_review`。两者都不改 acceptance,并在 `03_DECISIONS/PHIL-REV-NNN.md` 记录审计。Major 永不修改当前版本,只返回 `loom version new`。
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## 系统结构
|
|
259
|
-
|
|
260
|
-
```
|
|
261
|
-
LOOM/
|
|
262
|
-
├── README.md 你在这里。系统总览
|
|
263
|
-
│
|
|
264
|
-
├── meta/ 元规范(薄而硬——我们写的核心)
|
|
265
|
-
│ ├── BASELINE.md 不可妥协的底线(5 条)
|
|
266
|
-
│ ├── ROLE_ACTIVATION.md 角色怎么激活、哲学怎么加载
|
|
267
|
-
│ ├── INTENT_LOOP.md Loop 控制流 + Intent Map + Verification 底线
|
|
268
|
-
│ └── PHILOSOPHY_WEAVER.md 哲学织造器规范
|
|
269
|
-
│
|
|
270
|
-
├── dimensions/ 哲学维度库(Weaver 的弹药库)
|
|
271
|
-
│ ├── SEARCH_METHODOLOGY.md 检索方法论(怎么找到优质思想)
|
|
272
|
-
│ ├── AUTHORSHIP.md Atelier 启用时加载的作者性方法
|
|
273
|
-
│ ├── universal/ 通用层:产品/工程/协作(按需填充)
|
|
274
|
-
│ ├── domain/ 领域层:UX/游戏/后端/AI(按需填充)
|
|
275
|
-
│ └── crosscutting/ 交叉层:性能/安全/心理学/增长(按需填充)
|
|
276
|
-
│
|
|
277
|
-
├── roles/ 角色原型定义
|
|
278
|
-
│ ├── visionary.md 远见者——定义愿景,织造意图叙事
|
|
279
|
-
│ ├── architect.md 建筑师——展开图谱,设计系统,绘制 Intent Map
|
|
280
|
-
│ ├── forge.md 锻造师——在哲学约束下自主实现
|
|
281
|
-
│ └── keeper.md 守护者——验证意图忠实度
|
|
282
|
-
│
|
|
283
|
-
├── cli/ CLI 传感器层(Agent 通过 CLI 访问磁盘数据)
|
|
284
|
-
│ ├── bin/loom.js 命令入口
|
|
285
|
-
│ ├── src/ 核心库(intent-map / capability / atelier / verify)
|
|
286
|
-
│ ├── help/ Agent 可直接读取的工作流指南
|
|
287
|
-
│ └── test/ 端到端测试
|
|
288
|
-
│
|
|
289
|
-
└── templates/ 项目级起点骨架
|
|
290
|
-
├── PHILOSOPHY_TEMPLATE.md 哲学文档起点
|
|
291
|
-
├── VISION_TEMPLATE.md 愿景文档起点
|
|
292
|
-
├── INTENT_MAP_TEMPLATE.json Intent Map 起点
|
|
293
|
-
├── CAPABILITY_GRAPH_TEMPLATE.json Capability Graph 起点
|
|
294
|
-
├── CAPABILITY_BRIEF_TEMPLATE.md Capability Brief 起点
|
|
295
|
-
├── ASSET_LIBRARY_MANIFEST_TEMPLATE.json Asset Library 起点
|
|
296
|
-
├── EXPERTISE_PACK_TEMPLATE.json 外部能力获取记录起点
|
|
297
|
-
├── ATELIER_RECORD_TEMPLATE.json Atelier Record 起点
|
|
298
|
-
└── ATLAS_TEMPLATE.html 决策图谱 H5 起点
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
### 文档导航
|
|
302
|
-
|
|
303
|
-
**想了解什么 → 读哪个文件**:
|
|
304
|
-
|
|
305
|
-
| 想了解 | 读这个 |
|
|
306
|
-
|---|---|
|
|
307
|
-
| 底线是什么、什么不能做 | `meta/BASELINE.md` |
|
|
308
|
-
| Loop 怎么跑、验证怎么判定 | `meta/INTENT_LOOP.md` |
|
|
309
|
-
| 角色怎么激活 | `meta/ROLE_ACTIVATION.md` |
|
|
310
|
-
| 哲学怎么织造 | `meta/PHILOSOPHY_WEAVER.md` |
|
|
311
|
-
| Visionary 做什么 | `roles/visionary.md` |
|
|
312
|
-
| Architect 做什么 | `roles/architect.md` |
|
|
313
|
-
| Forge 做什么 | `roles/forge.md` |
|
|
314
|
-
| Keeper 做什么 | `roles/keeper.md` |
|
|
315
|
-
| 哲学文档长什么样 | `templates/PHILOSOPHY_TEMPLATE.md` |
|
|
316
|
-
| 愿景文档长什么样 | `templates/VISION_TEMPLATE.md` |
|
|
317
|
-
| Capability Graph、Lens Contract 与 Brief 长什么样 | `cli/help/capability.md`、`templates/CAPABILITY_GRAPH_TEMPLATE.json`、`templates/CAPABILITY_GRAPH_EXAMPLE.json` |
|
|
318
|
-
| 为什么必须外部检索、Expertise Pack 怎么闭合 | `cli/help/expertise.md`、`EXTERNAL_ACQUISITION_DESIGN.md` |
|
|
319
|
-
| Author 与 Atelier 怎么工作 | `cli/help/atelier.md`、`dimensions/AUTHORSHIP.md` |
|
|
320
|
-
| 决策图谱如何生成、怎样验收 | `cli/help/atlas.md`、`templates/ATLAS_TEMPLATE.html` |
|
|
321
|
-
| Intent Map 长什么样 | `templates/INTENT_MAP_TEMPLATE.json` |
|
|
322
|
-
| 怎么搜索高质量参考 | `dimensions/SEARCH_METHODOLOGY.md` |
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## 我们写的 vs Agent 生成的
|
|
327
|
-
|
|
328
|
-
**我们写的**(LOOM 的内核,薄而硬):
|
|
329
|
-
- `meta/` — 元规范:怎么织造哲学、loop 怎么跑、角色怎么激活、底线是什么
|
|
330
|
-
- `roles/` — 角色原型:每个角色的身份、自主空间、职责
|
|
331
|
-
- `templates/` — 起点骨架:Agent 生成的起点,不是填空模板
|
|
332
|
-
|
|
333
|
-
**Agent 生成的**(每个项目跑出来的,厚而灵活):
|
|
334
|
-
- 哲学文档体系(Weaver 决定要几个、多详细)
|
|
335
|
-
- 愿景文档(带意图叙事)
|
|
336
|
-
- 架构文档(根据哲学决定结构)
|
|
337
|
-
- Capability Graph 与按需生成的 Capability Brief
|
|
338
|
-
- Intent Map(意图依赖图,JSON)
|
|
339
|
-
- 验证契约和验证记录
|
|
340
|
-
|
|
341
|
-
**我们的规范是元规范**——规范"怎么生成规范",不直接规范"规范长什么样"。
|
|
342
|
-
|
|
343
|
-
---
|
|
344
|
-
|
|
345
|
-
## 四个角色
|
|
346
|
-
|
|
347
|
-
| 角色 | 原型 | 职责 | 激活时机 |
|
|
348
|
-
|---|---|---|---|
|
|
349
|
-
| **Visionary** 远见者 | 产品联合创始人 | 定义愿景,织造意图叙事 | 项目启动 |
|
|
350
|
-
| **Architect** 建筑师 | 系统建筑师 | 展开 Capability Graph,设计系统,绘制 Intent Map | Visionary 完成后 |
|
|
351
|
-
| **Forge** 锻造师 | 高级工程师 | 在哲学约束下自主实现 | Intent Loop 实现阶段 |
|
|
352
|
-
| **Keeper** 守护者 | 独立验证者(独立激活) | 从磁盘事实验证意图与质量主张 | Intent Loop 验证阶段 |
|
|
353
|
-
|
|
354
|
-
Visionary 和 Keeper **同源但独立**——同一个产品哲学,但 Keeper 是"回溯验证者",作为子代理运行,不继承 Forge 的实现上下文。
|
|
355
|
-
|
|
356
|
-
---
|
|
357
|
-
|
|
358
|
-
## Intent-Driven Loop
|
|
359
|
-
|
|
360
|
-
```
|
|
361
|
-
Host/Orchestrator 选 Intent → Forge 加载意图链并自主实现 → Keeper 子代理独立验证 → 判定
|
|
362
|
-
↑ │
|
|
363
|
-
│ │
|
|
364
|
-
└────────────── passed: 闭合,下一个 Intent ──────────────────────────┘
|
|
365
|
-
deviated: Keeper 与 Forge 对话修正 → 重新实现 → 重新验证
|
|
366
|
-
blocked: 停下,报告用户
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
Loop 的单元是意图,验证的核心问题是"实现是否忠实于原始意图"。
|
|
370
|
-
|
|
371
|
-
---
|
|
372
|
-
|
|
373
|
-
## 五条底线
|
|
374
|
-
|
|
375
|
-
所有角色、所有哲学、所有项目都必须遵守:
|
|
376
|
-
|
|
377
|
-
1. **B1:必须有结构设计** — 编码前必须有明确的结构设计
|
|
378
|
-
2. **B2:禁止硬编码** — 密钥、配置、环境值不进代码
|
|
379
|
-
3. **B3:接口契约必须显式** — 对外可观察的接口必须有显式定义
|
|
380
|
-
4. **B4:决策必须可追溯** — 影响架构/接口/技术栈的决策必须记录
|
|
381
|
-
5. **B5:意图必须可回溯** — 任何实现都必须能回溯到原始意图
|
|
382
|
-
|
|
383
|
-
底线不可被哲学覆盖。哲学内化底线,不是绕过底线。
|
|
384
|
-
|
|
385
|
-
---
|
|
386
|
-
|
|
387
|
-
## 项目级文档结构
|
|
388
|
-
|
|
389
|
-
Agent 在项目中生成的文档结构:
|
|
390
|
-
|
|
391
|
-
```
|
|
392
|
-
.loom/
|
|
393
|
-
└── v{N}/ 版本目录(跟随项目演进)
|
|
394
|
-
├── 00_PHILOSOPHY/ Weaver 产出
|
|
395
|
-
│ ├── PRODUCT_PHILOSOPHY.md
|
|
396
|
-
│ ├── ENGINEERING_CREED.md
|
|
397
|
-
│ ├── DECISION_RUBRIC.md
|
|
398
|
-
│ └── ...(按需,Weaver 决定)
|
|
399
|
-
├── 01_VISION.md Visionary 产出(带意图叙事)
|
|
400
|
-
├── 02_ARCHITECTURE.md Architect 产出
|
|
401
|
-
├── 03_DECISIONS/ 架构决策记录
|
|
402
|
-
├── 04_INTENT_MAP.json 意图依赖图(DAG)
|
|
403
|
-
├── 05_VERIFICATION.md 每个 Intent 的验证契约
|
|
404
|
-
├── 06_CHANGELOG.json Patch 变更记录(唯一权威来源)
|
|
405
|
-
├── 06_CHANGELOG.md 确定性生成的只读投影
|
|
406
|
-
├── 07_CAPABILITY_GRAPH.json 问题面、能力缺口、风险、证据与 Intent 回链
|
|
407
|
-
├── 07_CAPABILITY_BRIEFS/ 按需生成的项目化能力 Brief
|
|
408
|
-
└── verifications/ Keeper 的验证记录
|
|
409
|
-
├── INT-001.json
|
|
410
|
-
├── INT-001.md
|
|
411
|
-
└── ...
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
---
|
|
415
|
-
|
|
416
|
-
## 格式原则
|
|
417
|
-
|
|
418
|
-
| 内容 | 格式 | 理由 |
|
|
419
|
-
|---|---|---|
|
|
420
|
-
| 哲学、愿景、架构、决策 | **MD** | 叙事性,人类可读,Git diff 友好 |
|
|
421
|
-
| Intent Map、验证判定 | **JSON** | 结构化,机器可读,CLI 可查询 |
|
|
422
|
-
| 混合内容 | **JSON + MD + ref 互引** | JSON 存结构,MD 存叙事 |
|
|
423
|
-
|
|
424
|
-
Agent 通过 **CLI 访问** JSON,不直接读文件——省 token、更高效、还能做校验。
|
|
425
|
-
|
|
426
|
-
---
|
|
427
|
-
|
|
428
|
-
## 运行流程
|
|
429
|
-
|
|
430
|
-
```
|
|
431
|
-
1. Weaver 织造 Project Doctrine
|
|
432
|
-
→ 读取项目事实 → 提炼长期判断 → 按决策未知搜索 → 转译为原则、边界与 Evidence Map
|
|
433
|
-
|
|
434
|
-
2. Visionary 定义愿景
|
|
435
|
-
→ 基于哲学写愿景 → 每个意图带意图叙事 → 识别需要的哲学维度
|
|
436
|
-
|
|
437
|
-
3. Architect 先展开 Capability Graph,再设计系统
|
|
438
|
-
→ 基于愿景检查问题面、能力缺口、风险与证据 → Impact Gate 经独立子代理复审 → 路由高影响节点并外部获取 → 绘制 Intent Map → 定义验证契约
|
|
439
|
-
|
|
440
|
-
4. LOOM Quality Engine
|
|
441
|
-
→ Forge 编译 Expertise Pack → 按需编译 Authorial Stance / 进入 Atelier
|
|
442
|
-
→ Quality Arena 实现/比较 → Keeper 形成 Quality Proof
|
|
443
|
-
→ 循环直到所有 Intent 闭合
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
---
|
|
447
|
-
|
|
448
|
-
## 当前状态
|
|
449
|
-
|
|
450
|
-
- [x] `meta/` 元规范(4 个文件)
|
|
451
|
-
- [x] `roles/` 角色契约(6 个角色,含独立 Impact Reviewer)
|
|
452
|
-
- [x] `templates/` 起点骨架
|
|
453
|
-
- [x] `README.md` 系统总览
|
|
454
|
-
- [x] `dimensions/SEARCH_METHODOLOGY.md` 检索方法论
|
|
455
|
-
- [x] `cli/` CLI 访问层(Capability Graph / Proposal / Asset Library / Atelier / Quality Proof)
|
|
456
|
-
- [x] `dimensions/AUTHORSHIP.md` 按需创作方法
|
|
457
|
-
- [ ] 继续通过真实项目校准专业维度与 Atelier 的质量增益
|
|
458
|
-
|
|
459
|
-
---
|
|
460
|
-
|
|
461
|
-
> **LOOM 的信条**:编排而非控制。给 Agent 价值观和边界,让它在边界内自主发挥。底线守住不会崩,哲学填充边界内的内容,loop 确保实现忠实于意图。
|
|
192
|
+
The v2 test suite exercises the complete loop, including a 250-Task Work Map, context selection,
|
|
193
|
+
superseding decisions, scalable design documents, professional-field separation, capability compilation,
|
|
194
|
+
multi-attempt Keeper revision, stale digest and duplicate-run
|
|
195
|
+
rejection, exact-file Task start, block/reopen including disproven completion, per-done-condition evidence,
|
|
196
|
+
and Evil Eval controls. See the
|
|
197
|
+
[complete UX and loop specification](docs/UX_FLOW.md).
|
|
198
|
+
|
|
199
|
+
## Documentation
|
|
200
|
+
|
|
201
|
+
| Read this | When you need |
|
|
202
|
+
| --- | --- |
|
|
203
|
+
| [System design](design.md) | The architecture, storage model, invariants, and command contracts |
|
|
204
|
+
| [UX and loop specification](docs/UX_FLOW.md) | Every human, Agent, LOOM, Keeper, and Task transition |
|
|
205
|
+
| [Prompt and message catalog](docs/PROMPT_CATALOG.md) | Every message LOOM injects and how the layers compose |
|
|
206
|
+
| [Evil Eval protocol](EVIL_EVAL.md) | A controlled framework-vs-no-framework comparison |
|
|
207
|
+
| [Changelog](CHANGELOG.md) | What changed in LOOM 2 |
|
|
208
|
+
|
|
209
|
+
Editable Draw.io sources live beside both flow diagrams in [`docs/`](docs/).
|