@haaaiawd/loom 1.3.1 → 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.
Files changed (84) hide show
  1. package/CHANGELOG.md +16 -86
  2. package/CONTRIBUTING.md +37 -0
  3. package/EVIL_EVAL.md +112 -0
  4. package/README.md +156 -403
  5. package/README.zh-CN.md +176 -0
  6. package/SECURITY.md +11 -0
  7. package/cli/bin/loom.js +171 -998
  8. package/cli/src/protocol.js +411 -0
  9. package/cli/src/store.js +628 -0
  10. package/design.md +201 -0
  11. package/docs/PROMPT_CATALOG.md +106 -0
  12. package/docs/RELEASE_CHECKLIST.md +53 -0
  13. package/docs/UX_FLOW.md +171 -0
  14. package/docs/brand/loom-mark.svg +18 -0
  15. package/docs/brand/loom-readme-header.svg +34 -0
  16. package/docs/brand/loom-readme-header.zh-CN.svg +29 -0
  17. package/docs/loom-eval-loop.drawio +21 -0
  18. package/docs/loom-eval-loop.svg +56 -0
  19. package/docs/loom-production-loop.drawio +41 -0
  20. package/docs/loom-production-loop.svg +92 -0
  21. package/package.json +27 -24
  22. package/EXTERNAL_ACQUISITION_DESIGN.md +0 -143
  23. package/cli/help/asset.md +0 -36
  24. package/cli/help/atelier.md +0 -37
  25. package/cli/help/atlas.md +0 -48
  26. package/cli/help/capability.md +0 -118
  27. package/cli/help/concepts.md +0 -105
  28. package/cli/help/doctor.md +0 -80
  29. package/cli/help/expertise.md +0 -52
  30. package/cli/help/loop.md +0 -134
  31. package/cli/help/patch.md +0 -33
  32. package/cli/help/proposals.md +0 -21
  33. package/cli/help/version.md +0 -136
  34. package/cli/help/workflow.md +0 -116
  35. package/cli/src/activate.js +0 -505
  36. package/cli/src/asset-library.js +0 -384
  37. package/cli/src/atelier.js +0 -331
  38. package/cli/src/atlas.js +0 -282
  39. package/cli/src/auto.js +0 -116
  40. package/cli/src/capability-graph.js +0 -724
  41. package/cli/src/capability-proposals.js +0 -225
  42. package/cli/src/diagnostics.js +0 -859
  43. package/cli/src/expertise-pack.js +0 -336
  44. package/cli/src/guide.js +0 -548
  45. package/cli/src/help.js +0 -41
  46. package/cli/src/init.js +0 -187
  47. package/cli/src/intent-draft.js +0 -303
  48. package/cli/src/intent-map.js +0 -747
  49. package/cli/src/patch.js +0 -214
  50. package/cli/src/philosophy.js +0 -331
  51. package/cli/src/shared/intent-ref.js +0 -38
  52. package/cli/src/shared/md-utils.js +0 -125
  53. package/cli/src/shared/paths.js +0 -73
  54. package/cli/src/shared/proof-reference.js +0 -19
  55. package/cli/src/shared/verification-method.js +0 -32
  56. package/cli/src/verify.js +0 -394
  57. package/cli/src/version.js +0 -134
  58. package/dimensions/AUTHORSHIP.md +0 -45
  59. package/dimensions/PART_DECOMPOSITION.md +0 -42
  60. package/dimensions/SEARCH_METHODOLOGY.md +0 -101
  61. package/dimensions/examples/AGENT_SYSTEM/README.md +0 -219
  62. package/dimensions/examples/CLI_TOOL/README.md +0 -163
  63. package/dimensions/universal/COLLABORATION_PHILOSOPHY.md +0 -28
  64. package/dimensions/universal/ENGINEERING_CREED.md +0 -30
  65. package/dimensions/universal/PRODUCT_PHILOSOPHY.md +0 -32
  66. package/meta/BASELINE.md +0 -91
  67. package/meta/INTENT_LOOP.md +0 -296
  68. package/meta/PHILOSOPHY_WEAVER.md +0 -110
  69. package/meta/ROLE_ACTIVATION.md +0 -114
  70. package/roles/architect.md +0 -92
  71. package/roles/forge.md +0 -110
  72. package/roles/impact-reviewer.md +0 -37
  73. package/roles/keeper.md +0 -113
  74. package/roles/visionary.md +0 -57
  75. package/templates/ASSET_LIBRARY_MANIFEST_TEMPLATE.json +0 -10
  76. package/templates/ATELIER_RECORD_TEMPLATE.json +0 -48
  77. package/templates/ATLAS_TEMPLATE.html +0 -104
  78. package/templates/CAPABILITY_BRIEF_TEMPLATE.md +0 -36
  79. package/templates/CAPABILITY_GRAPH_EXAMPLE.json +0 -188
  80. package/templates/CAPABILITY_GRAPH_TEMPLATE.json +0 -78
  81. package/templates/EXPERTISE_PACK_TEMPLATE.json +0 -22
  82. package/templates/INTENT_MAP_TEMPLATE.json +0 -85
  83. package/templates/PHILOSOPHY_TEMPLATE.md +0 -44
  84. package/templates/VISION_TEMPLATE.md +0 -44
package/design.md ADDED
@@ -0,0 +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 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
+ - 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
+ 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.
@@ -0,0 +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
+ |---|---|---|---|
17
+ | Stable core | `layers.stable_core` | Every `loom context` | Durable collaboration judgment: user ownership, evidence classes, question threshold, corrections, reversible delegation |
18
+ | Runtime adaptation | `layers.runtime_protocol` | Every `loom context` | LOOM-specific disk model, document graph, capability boundaries, Work Map, and three production loops |
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 |
21
+ | Current task | `layers.current_task` | Active Task or `--task` | Exact Task JSON followed by the exact contents of every path in `reads` |
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
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.
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
+ ```
@@ -0,0 +1,53 @@
1
+ # LOOM release checklist
2
+
3
+ This checklist stops a documentation-complete release from becoming a runtime-incomplete release.
4
+
5
+ ## 1. Confirm the release surface
6
+
7
+ ```bash
8
+ node cli/bin/loom.js --version
9
+ node cli/bin/loom.js --help
10
+ node cli/bin/loom.js prompts
11
+ npm test
12
+ npm pack --dry-run
13
+ ```
14
+
15
+ Confirm that the package contains the CLI runtime, English and Chinese READMEs, design, prompt catalog, UX flow, Evil Eval
16
+ protocol, changelog, license, contribution guide, and security policy. Check that it does not contain pilot
17
+ workspaces, eval artifacts, temporary browser profiles, or local project state.
18
+
19
+ ## 2. Confirm metadata and registry state
20
+
21
+ ```bash
22
+ npm whoami
23
+ npm view @haaaiawd/loom version
24
+ git status --short
25
+ git diff --check
26
+ ```
27
+
28
+ The version in `package.json`, `CHANGELOG.md`, and `loom --version` must agree. The new version must not
29
+ already exist in the registry.
30
+
31
+ ## 3. Publish deliberately
32
+
33
+ ```bash
34
+ git tag v2.0.1
35
+ git push origin HEAD
36
+ git push origin v2.0.1
37
+ npm publish --access public
38
+ ```
39
+
40
+ Run these commands only after reviewing the final diff and confirming the authenticated GitHub remote and
41
+ npm identity. Tags and published npm versions are externally visible and should not be used as test steps.
42
+
43
+ ## 4. Verify from the outside
44
+
45
+ In a clean temporary directory:
46
+
47
+ ```bash
48
+ npm view @haaaiawd/loom version
49
+ npx @haaaiawd/loom@2.0.1 --version
50
+ ```
51
+
52
+ Then open the GitHub README and npm package page to confirm the SVG header, diagrams, links, and changelog
53
+ render correctly. Record any unverified platform boundary instead of silently declaring it passed.
@@ -0,0 +1,171 @@
1
+ # LOOM 2 Complete UX and Loop Specification
2
+
3
+ ## Experience promise
4
+
5
+ The human experiences one capable Agent who understands, asks, decides, builds, and recovers. They do not experience
6
+ framework stages, role handoffs, status commands, or document maintenance. LOOM is the Agent's backstage continuity
7
+ system.
8
+
9
+ The system has three nested production loops and one external evaluation loop:
10
+
11
+ 1. Understanding loop — converge on the whole, its design-document graph, and the professional fields it needs.
12
+ 2. Readiness loop — let a fresh Keeper expose missing context and feed gaps back into understanding.
13
+ 3. Delivery loop — execute one restartable Task, test, repair or reflow, attach evidence, and continue.
14
+ 4. Evil Eval — compare the same Agent with no LOOM against the Agent using LOOM under equal conditions.
15
+
16
+ ## Surfaces and responsibilities
17
+
18
+ | Surface | Human visible | Responsibility |
19
+ |---|---:|---|
20
+ | Natural conversation | Yes | Desired result, meaningful questions, delegated decisions, risk authority, progress and delivery |
21
+ | Workspace and product artifacts | When useful | The real code, files, commands, reports, or operational result |
22
+ | PROJECT.md, design docs, capability dossiers | Optional | Human-editable whole, detailed system decisions, and separate professional judgments |
23
+ | `loom context` and structured state | No | Agent continuity after compression or a new session |
24
+ | Work Map and active Task | Normally no | Broad coverage, current outcome, boundaries, relevant context, progress and evidence |
25
+ | Keeper prompt and attempts | Only if a new window is required | One readiness handoff, with revision loops before execution |
26
+ | Evil Eval harness | No during normal work | Controlled evidence about whether LOOM itself helps |
27
+
28
+ ## 0. Resume or receive a request
29
+
30
+ The Agent runs `loom context` when LOOM exists. It then interprets the current request normally. Existing workspace
31
+ inspection is conditional: inspect only when the request depends on the existing project, not because LOOM demands a scan.
32
+
33
+ Human UX: nothing framework-specific appears.
34
+
35
+ ## 1. Form the emerging whole
36
+
37
+ The Agent explains what it currently believes the finished result should be. This is conversational, not a mandatory
38
+ template recital. It is most useful initially, after a consequential correction, and before material execution.
39
+
40
+ The Agent identifies the current uncertainty frontier: decisions whose answers could materially change outcome,
41
+ experience, boundaries, architecture, risk, cost, or proof of completion.
42
+
43
+ ## 2. Ask one dense, adaptive round
44
+
45
+ The Agent asks all currently visible high-value questions in a coherent round. It may group by a natural decision cluster,
46
+ but it does not follow a fixed domain list or question count.
47
+
48
+ It does not ask facts reliably discoverable from tools, professional decisions it can responsibly make, speculative future
49
+ details that do not affect the current whole, or framework questions whose only purpose is filling a schema.
50
+
51
+ | Human response | Agent behavior |
52
+ |---|---|
53
+ | Direct answer | Record confirmed fact and update current truth |
54
+ | Correction | Update PROJECT.md and affected design docs; append a superseding decision with impact |
55
+ | `You decide` | Make the best reversible Agent decision, explain the important tradeoff, and record it |
56
+ | `I don't know` | Research or decide when safe; ask again only if the human owns the missing preference or authority |
57
+ | `Skip questions and continue` | Name the concrete quality or risk loss, record skipped uncertainty, then proceed |
58
+
59
+ After every answer round, the Agent re-evaluates the whole. If material uncertainty remains, it loops to another adaptive
60
+ round. If only reversible local uncertainty remains, it continues.
61
+
62
+ ## 3. Build project-specific capability
63
+
64
+ The Agent maps which established professional fields could change questions, design, implementation, risk, or verification.
65
+ It creates one dossier per recognizable field. UI/UX design, visual art direction, game design, psychology, biology, security,
66
+ and other fields remain separate when their evidence or judgments differ. Task techniques such as triage, ranking, parsing,
67
+ or caching are design mechanisms, not replacements for the capability map. Cross-field synthesis belongs in the affected
68
+ design document.
69
+
70
+ A useful dossier changes action. It contains its field boundary, specialist evidence, a falsifiable project stance,
71
+ deliberate refusals, decision-changing questions, implementation consequences, failure modes, verification signals, sources,
72
+ and tensions. Generic summaries and expert roleplay fail this step.
73
+
74
+ Research can be quiet. A natural update is enough: `I need to strengthen the privacy, cognitive-load and information-architecture judgment; I will bring the consequences back into the design.`
75
+
76
+ ## 4. Shape the project corpus and Work Map
77
+
78
+ PROJECT.md is the concise entry point and map. DECISIONS.md holds only consequential supersession. The actual product,
79
+ experience, independent systems, contracts, verification, research, and operations decisions live under `.loom/design/`.
80
+ A document is split when its subject has independent responsibilities, interfaces, failure modes, or proof. Document count
81
+ therefore scales with project complexity: neither a fixed checklist nor an artificial one-file minimum.
82
+
83
+ The Agent creates a broad initial Work Map early. It may be thousands of lines because it remains on disk. Only the active
84
+ horizon receives detailed actions. Every Task states outcome, done conditions, boundaries, dependencies, relevant reads,
85
+ affected paths, progress, next action, and evidence.
86
+
87
+ ## 5. Transition to readiness
88
+
89
+ Before engineering or other material execution, the Agent tells the human what is about to happen and which important
90
+ assumptions remain. Ordinary reversible work does not require another approval. Irreversible, high-risk, or materially costly
91
+ action requires explicit authority.
92
+
93
+ `loom project ready` verifies structural readiness and freezes a digest of the project map, design documents, capability dossiers, and Task
94
+ definitions for the next Keeper attempt.
95
+
96
+ ## 6. Keeper readiness loop
97
+
98
+ A fresh Agent thread runs `loom keeper prompt` and `loom context --keeper`. It receives no prior conversation. Each attempt has
99
+ a unique `run_id`, attempt number, and prepared digest.
100
+
101
+ Keeper tests whether it can explain the whole, navigate every necessary design system, locate distinct professional capabilities, select the correct first Task, find all context,
102
+ name the first concrete action, and reproduce completion evidence.
103
+
104
+ ### Passed
105
+
106
+ State becomes `build_ready`. Keeper leaves the normal workflow permanently; Task evidence now carries delivery quality.
107
+
108
+ ### Needs revision or blocked
109
+
110
+ The result records summary, evidence, and exact gaps. State returns to `shaping`. The next `loom context` injects this feedback
111
+ as the highest-priority uncertainty.
112
+
113
+ The main Agent decides where the gap belongs, repairs everything it can, asks the human only for decisions they genuinely own,
114
+ changes the relevant disk truth, runs `loom project ready` again, and opens a new Keeper run with a new run_id and digest.
115
+
116
+ LOOM refuses an unchanged revision, a duplicate run_id, a result for the wrong digest, and a result written before ready.
117
+
118
+ If the host has no subagents, the human sees one short request: `Please open a new window in this project, run loom keeper prompt, and follow it.`
119
+
120
+ ## 7. Delivery loop
121
+
122
+ The Agent selects `loom task next`, starts it, and runs `loom context`. Context contains the current whole, current Task, and the
123
+ exact design, capability, source, contract, and fixture files in `reads`—not the full Work Map or history.
124
+
125
+ - A local failure keeps the Task active. Update progress and evidence, repair, and test again.
126
+ - A missing permission, dependency, or upper-level contradiction uses `task block` with a reason and recovery conditions.
127
+ - After the condition is repaired, use `task reopen`, then start it again. A prior `done` may also be
128
+ reopened with a concrete reason when its evidence is disproven.
129
+ - `task done` requires a check quoting every exact `done_when` criterion and mapping it to concrete evidence.
130
+ - Generic update cannot modify status, and imported Tasks must begin open.
131
+
132
+ When a Task is done, the Agent chooses the next dependency-ready Task. When every Task is done, project status becomes complete
133
+ and the Agent delivers the real result, evidence, remaining tradeoffs, and any user-owned follow-up.
134
+
135
+ ## 8. Mid-build change
136
+
137
+ New user information is first evaluated for impact. A local reversible implementation detail updates the active Task. A change
138
+ to the desired whole updates PROJECT.md and affected design documents, records a superseding decision, revises affected Task definitions, and blocks or reopens
139
+ the active Task as needed. The one-time Keeper does not return after initial build-readiness; implementation evidence and explicit
140
+ human authority govern later changes.
141
+
142
+ ## Recovery matrix
143
+
144
+ | Failure | Recovery |
145
+ |---|---|
146
+ | Context compressed | `loom context` compiles current truth and active horizon |
147
+ | User contradicts earlier answer | Update PROJECT.md and affected design docs; append superseding decision; revise affected Tasks |
148
+ | Important answer unavailable | Agent decides reversibly or records open or skipped uncertainty |
149
+ | Capability is generic or hybrid | Split into recognizable fields; move synthesis to design docs; add stance, consequences and proof |
150
+ | Keeper cannot start | Feedback returns to shaping; change disk truth; new digest and fresh run |
151
+ | Project changes after ready | Old Keeper result rejected as stale |
152
+ | Same Keeper identity reused | Duplicate run_id rejected |
153
+ | Local implementation test fails | Keep Task active, record observation, repair and repeat |
154
+ | Dependency or authority missing | Block Task with recovery conditions, then reopen |
155
+ | Attempt to mark done without evidence | CLI rejects it |
156
+ | Evidence disproves an earlier done state | Reopen with a reason, then repair, re-verify, or block |
157
+ | Host cannot spawn Keeper | Ask the human to open a new window with one short prompt |
158
+
159
+ ## Flow diagrams
160
+
161
+ - [Production loops](loom-production-loop.drawio) — editable Draw.io source; [SVG](loom-production-loop.svg).
162
+ - [Evil Eval](loom-eval-loop.drawio) — editable Draw.io source; [SVG](loom-eval-loop.svg).
163
+
164
+ ## Primary evaluation question
165
+
166
+ 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
168
+ not answer whether the framework itself creates value over no framework.
169
+
170
+ The anonymization harness must preserve runnable relative layout, record a file/digest manifest, and rerun each condition's
171
+ declared tests and smoke command before judging. Packet-construction failures are eval failures, never evidence against a run.
@@ -0,0 +1,18 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="256" height="256" viewBox="0 0 256 256" role="img" aria-labelledby="title desc">
2
+ <title id="title">LOOM mark</title>
3
+ <desc id="desc">A continuous thread passes through four frames, resumes after a gap, and loops forward.</desc>
4
+ <rect width="256" height="256" rx="52" fill="#F5F2EA"/>
5
+ <g fill="none" stroke="#17212B" stroke-width="6">
6
+ <rect x="38" y="61" width="42" height="88" rx="9"/>
7
+ <rect x="88" y="61" width="42" height="88" rx="9"/>
8
+ <rect x="138" y="61" width="42" height="88" rx="9"/>
9
+ <rect x="188" y="61" width="30" height="88" rx="9"/>
10
+ </g>
11
+ <path d="M24 105H50C61 105 61 82 72 82S83 128 94 128s11-46 22-46 11 46 22 46 11-46 22-46 11 46 22 46"
12
+ fill="none" stroke="#4169E1" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"/>
13
+ <circle cx="198" cy="128" r="5" fill="#4169E1"/>
14
+ <circle cx="214" cy="128" r="5" fill="#4169E1" opacity=".55"/>
15
+ <path d="M226 128c14 0 17 12 17 23 0 23-18 42-42 42H79"
16
+ fill="none" stroke="#4169E1" stroke-width="10" stroke-linecap="round"/>
17
+ <path d="M92 180 75 193l17 13" fill="none" stroke="#4169E1" stroke-width="10" stroke-linecap="round" stroke-linejoin="round"/>
18
+ </svg>
@@ -0,0 +1,34 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1280" height="360" viewBox="0 0 1280 360" role="img" aria-labelledby="title desc">
2
+ <title id="title">LOOM — Keep the whole. Continue the work.</title>
3
+ <desc id="desc">A flat minimal header showing a continuous thread moving through project understanding, expertise, verification, and delivery.</desc>
4
+ <rect width="1280" height="360" rx="28" fill="#F5F2EA"/>
5
+ <path d="M0 304H1280" stroke="#D8D3C8"/>
6
+ <g transform="translate(84 70)">
7
+ <g fill="none" stroke="#17212B" stroke-width="4">
8
+ <rect x="0" y="16" width="38" height="76" rx="8"/>
9
+ <rect x="47" y="16" width="38" height="76" rx="8"/>
10
+ <rect x="94" y="16" width="38" height="76" rx="8"/>
11
+ <rect x="141" y="16" width="30" height="76" rx="8"/>
12
+ </g>
13
+ <path d="M-14 54H10c10 0 10-20 20-20s10 40 20 40 10-40 20-40 10 40 20 40 10-40 20-40 10 40 20 40"
14
+ fill="none" stroke="#4169E1" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
15
+ <circle cx="145" cy="74" r="4" fill="#4169E1"/><circle cx="158" cy="74" r="4" fill="#4169E1" opacity=".5"/>
16
+ <path d="M171 74c20 0 27 13 27 28 0 23-18 42-42 42H59" fill="none" stroke="#4169E1" stroke-width="8" stroke-linecap="round"/>
17
+ <path d="M72 132 56 144l16 12" fill="none" stroke="#4169E1" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
18
+ </g>
19
+ <g font-family="Inter,Segoe UI,Arial,sans-serif" fill="#17212B">
20
+ <text x="350" y="142" font-size="94" font-weight="750" letter-spacing="12">LOOM</text>
21
+ <text x="355" y="190" font-size="24" font-weight="560">Keep the whole. Continue the work.</text>
22
+ <text x="355" y="228" font-size="17" fill="#58636D">Invisible project understanding and continuity for AI Agents.</text>
23
+ </g>
24
+ <g transform="translate(82 311)" font-family="Inter,Segoe UI,Arial,sans-serif" font-size="13" font-weight="650" letter-spacing="1.1" fill="#17212B">
25
+ <circle cx="4" cy="-1" r="4" fill="#4169E1"/><text x="18" y="4">UNDERSTAND</text>
26
+ <path d="M126-1h42" stroke="#9AD8C2" stroke-width="3"/>
27
+ <circle cx="181" cy="-1" r="4" fill="#9AD8C2"/><text x="195" y="4">REMEMBER</text>
28
+ <path d="M306-1h42" stroke="#E88773" stroke-width="3"/>
29
+ <circle cx="361" cy="-1" r="4" fill="#E88773"/><text x="375" y="4">VERIFY</text>
30
+ <path d="M452-1h42" stroke="#4169E1" stroke-width="3"/>
31
+ <circle cx="507" cy="-1" r="4" fill="#4169E1"/><text x="521" y="4">CONTINUE</text>
32
+ </g>
33
+ <text x="1198" y="322" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Consolas,monospace" font-size="13" fill="#58636D">npm i -g @haaaiawd/loom</text>
34
+ </svg>
@@ -0,0 +1,29 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1280" height="360" viewBox="0 0 1280 360" role="img" aria-labelledby="title desc">
2
+ <title id="title">LOOM — 记住全貌,继续工作。</title>
3
+ <desc id="desc">一根连续的线穿过项目理解、专业能力、独立验证和交付,并在中断后继续向前。</desc>
4
+ <rect width="1280" height="360" rx="28" fill="#F5F2EA"/>
5
+ <path d="M0 304H1280" stroke="#D8D3C8"/>
6
+ <g transform="translate(84 70)">
7
+ <g fill="none" stroke="#17212B" stroke-width="4">
8
+ <rect x="0" y="16" width="38" height="76" rx="8"/><rect x="47" y="16" width="38" height="76" rx="8"/><rect x="94" y="16" width="38" height="76" rx="8"/><rect x="141" y="16" width="30" height="76" rx="8"/>
9
+ </g>
10
+ <path d="M-14 54H10c10 0 10-20 20-20s10 40 20 40 10-40 20-40 10 40 20 40 10-40 20-40 10 40 20 40" fill="none" stroke="#4169E1" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
11
+ <circle cx="145" cy="74" r="4" fill="#4169E1"/><circle cx="158" cy="74" r="4" fill="#4169E1" opacity=".5"/>
12
+ <path d="M171 74c20 0 27 13 27 28 0 23-18 42-42 42H59" fill="none" stroke="#4169E1" stroke-width="8" stroke-linecap="round"/>
13
+ <path d="M72 132 56 144l16 12" fill="none" stroke="#4169E1" stroke-width="8" stroke-linecap="round" stroke-linejoin="round"/>
14
+ </g>
15
+ <g font-family="Inter,Segoe UI,Arial,sans-serif" fill="#17212B">
16
+ <text x="350" y="142" font-size="94" font-weight="750" letter-spacing="12">LOOM</text>
17
+ </g>
18
+ <g font-family="Noto Sans SC,Microsoft YaHei,PingFang SC,Segoe UI,Arial,sans-serif" fill="#17212B">
19
+ <text x="355" y="190" font-size="24" font-weight="650">记住全貌,继续工作。</text>
20
+ <text x="355" y="228" font-size="17" fill="#58636D">为 AI Agent 提供无形的项目理解与连续性基础设施。</text>
21
+ </g>
22
+ <g transform="translate(82 311)" font-family="Noto Sans SC,Microsoft YaHei,PingFang SC,Segoe UI,Arial,sans-serif" font-size="13" font-weight="700" letter-spacing="1.6" fill="#17212B">
23
+ <circle cx="4" cy="-1" r="4" fill="#4169E1"/><text x="18" y="4">理解</text><path d="M70-1h42" stroke="#9AD8C2" stroke-width="3"/>
24
+ <circle cx="125" cy="-1" r="4" fill="#9AD8C2"/><text x="139" y="4">记住</text><path d="M191-1h42" stroke="#E88773" stroke-width="3"/>
25
+ <circle cx="246" cy="-1" r="4" fill="#E88773"/><text x="260" y="4">验证</text><path d="M312-1h42" stroke="#4169E1" stroke-width="3"/>
26
+ <circle cx="367" cy="-1" r="4" fill="#4169E1"/><text x="381" y="4">继续</text>
27
+ </g>
28
+ <text x="1198" y="322" text-anchor="end" font-family="ui-monospace,SFMono-Regular,Consolas,monospace" font-size="13" fill="#58636D">npm i -g @haaaiawd/loom</text>
29
+ </svg>