@oneie/claude 0.6.0 → 0.7.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.
Files changed (111) hide show
  1. package/agents/w1-recon.md +9 -4
  2. package/agents/w2-decide.md +51 -28
  3. package/agents/w3-edit.md +70 -78
  4. package/agents/w4-verify.md +164 -69
  5. package/commands/browser.md +98 -35
  6. package/commands/cc-connect.md +6 -0
  7. package/commands/chat.md +13 -1
  8. package/commands/close.md +45 -19
  9. package/commands/create.md +20 -10
  10. package/commands/db-sync.md +5 -1
  11. package/commands/deploy.md +174 -87
  12. package/commands/do-autonomous.md +31 -20
  13. package/commands/do-improve.md +4 -4
  14. package/commands/do-show.md +4 -3
  15. package/commands/do.md +53 -13
  16. package/commands/go.md +75 -0
  17. package/commands/improve.md +4 -2
  18. package/commands/kill.md +6 -8
  19. package/commands/notify.md +15 -2
  20. package/commands/oo-push.md +24 -9
  21. package/commands/rag.md +6 -0
  22. package/commands/release.md +46 -25
  23. package/commands/restart.md +5 -4
  24. package/commands/see.md +45 -35
  25. package/commands/skill-create.md +38 -5
  26. package/commands/sync.md +21 -11
  27. package/hooks/scripts/auto-continue.sh +70 -0
  28. package/hooks/scripts/branch-pin.sh +85 -0
  29. package/hooks/scripts/git-add-guard.sh +16 -5
  30. package/hooks/scripts/post-edit-check.sh +16 -0
  31. package/hooks/scripts/session-start.sh +13 -8
  32. package/hooks/scripts/sync-priority-todo.sh +5 -0
  33. package/package.json +1 -1
  34. package/rules/api.md +9 -0
  35. package/rules/design.md +13 -3
  36. package/rules/documentation.md +30 -71
  37. package/rules/engine.md +8 -1
  38. package/rules/ui.md +5 -1
  39. package/scripts/__pycache__/do-rank.cpython-313.pyc +0 -0
  40. package/scripts/browser-check.mjs +44 -103
  41. package/scripts/cc-events-proof.sh +13 -12
  42. package/scripts/chrome.mjs +381 -0
  43. package/scripts/do-analyze.sh +109 -4
  44. package/scripts/do-auto.sh +350 -43
  45. package/scripts/do-consumer-sweep.sh +72 -0
  46. package/scripts/do-derives-check.sh +88 -0
  47. package/scripts/do-fleet.sh +50 -1
  48. package/scripts/do-killswitch-audit.py +33 -14
  49. package/scripts/do-promise-lint.sh +150 -4
  50. package/scripts/do-promise-settle.sh +131 -9
  51. package/scripts/do-prove.sh +197 -17
  52. package/scripts/do-rank.py +606 -20
  53. package/scripts/do-rubric.py +21 -2
  54. package/scripts/do-signal.sh +157 -17
  55. package/scripts/do-smoke.sh +9 -0
  56. package/scripts/do-substrate-check.sh +49 -0
  57. package/scripts/do-tasks-wire-check.sh +81 -0
  58. package/scripts/do-tier.sh +90 -5
  59. package/scripts/do-ui-gate.sh +332 -0
  60. package/scripts/do-untracked-gate.sh +231 -0
  61. package/scripts/do-walk.sh +344 -0
  62. package/scripts/factory-check.sh +747 -0
  63. package/scripts/factory-repo.sh +1361 -0
  64. package/scripts/factory-tasks-check.sh +85 -0
  65. package/scripts/outcome-pull.ts +279 -0
  66. package/scripts/promise-manifest.mjs +167 -0
  67. package/scripts/reconcile-allow.txt +5 -0
  68. package/scripts/rubric-weights.json +64 -0
  69. package/scripts/spine-canary.sh +20 -0
  70. package/scripts/typedb-cluster-status.sh +128 -0
  71. package/scripts/typedb-env.sh +182 -0
  72. package/scripts/typedb-flap-recorder.sh +85 -0
  73. package/scripts/typedb-probes/containment-probe.py +88 -0
  74. package/scripts/typedb-probes/panic-probe-version.py +92 -0
  75. package/scripts/typedb-probes/panic-probe.py +77 -0
  76. package/scripts/typedb-scratch.sh +73 -0
  77. package/scripts/urls-lint.sh +58 -0
  78. package/scripts/w4-rubric.ts +96 -12
  79. package/scripts/wf-check.mjs +75 -0
  80. package/skills/ai-ui/SKILL.md +1 -1
  81. package/skills/astro/SKILL.md +177 -132
  82. package/skills/astro/add-content-collection.md +29 -13
  83. package/skills/astro/check-build.md +19 -13
  84. package/skills/astro/create-component.md +36 -9
  85. package/skills/astro/create-page.md +39 -10
  86. package/skills/astro/optimize-performance.md +36 -8
  87. package/skills/cli/SKILL.md +254 -220
  88. package/skills/dev/SKILL.md +1 -1
  89. package/skills/directory-autofill/SKILL.md +68 -0
  90. package/skills/docs/SKILL.md +4 -4
  91. package/skills/mcp/SKILL.md +186 -156
  92. package/skills/promise-make/SKILL.md +2 -2
  93. package/skills/puck/SKILL.md +465 -250
  94. package/skills/react19/SKILL.md +196 -296
  95. package/skills/reactflow/SKILL.md +387 -412
  96. package/skills/sdk/SKILL.md +167 -106
  97. package/skills/shadcn/SKILL.md +245 -201
  98. package/skills/signal/SKILL.md +5 -0
  99. package/skills/sui/SKILL.md +6 -1
  100. package/skills/tutorial/SKILL.md +15 -0
  101. package/skills/typedb/SKILL.md +427 -217
  102. package/skills/typedb/examples/python-patterns.py +11 -4
  103. package/skills/typedb/examples/query-patterns.tql +8 -3
  104. package/skills/typedb/examples/schema-patterns.tql +4 -2
  105. package/skills/typedb/reference/migration-2x-3x.md +19 -1
  106. package/skills/typedb/reference/python-driver.md +17 -1
  107. package/skills/voice/SKILL.md +117 -0
  108. package/skills/writer/SKILL.md +29 -12
  109. package/templates/template-feature.md +26 -1
  110. package/templates/template-tests.md +4 -0
  111. package/templates/template-todo.md +65 -10
package/commands/close.md CHANGED
@@ -41,22 +41,39 @@ This is Rule 1 enforced at the human boundary.
41
41
 
42
42
  ### `<task-id>` — success
43
43
 
44
- 1. Run W4 gate — score code rubric (each dimension 0–1, composite 0.65 to close):
45
- - **security**: no injections, no secrets, all API routes validated
46
- - **stability**: tests pass, zero type errors, every handler closes its loop
47
- - **simplicity**: files focused, functions ≤ 20 lines, no ceremony beyond scope
48
- - **integration**: every declared surface wired nav + inbound links + SDK/MCP/CLI exports + docs (deterministic from `.w2-surface-checklist.json`)
49
- - **speed**: Lighthouse held, bundle ≤ W0, tokens lean, cache hit ≥ 80%
50
- - composite: `0.30·security + 0.25·stability + 0.20·simplicity + 0.15·integration + 0.10·speed`
51
- 2. POST `http://localhost:4321/api/tasks/{id}/complete`
52
- 3. POST `http://localhost:4321/api/mark-dims` with `{ security, stability, simplicity, integration, speed }`:
44
+ 1. Run W4 gate — the **cycle** rubric. Weights and axis definitions live in
45
+ `.claude/scripts/rubric-weights.json` (`cycle` block); read them there, never
46
+ restate them here. Today: `0.30·goal-fit + 0.18·security + 0.18·stability +
47
+ 0.12·simplicity + 0.12·integration + 0.10·speed`.
48
+ - **goal-fit** is the heaviest axis *and* an independent hard gate. Score it
49
+ against the todo's `outcome:` line, not against general quality.
50
+ - **integration** is deterministic from `.w2-surface-checklist.json` an
51
+ absent checklist is a W4 fail, never a fallback to vibes.
52
+ - Gate, all four conjuncts: `composite 0.65` **AND** `goal-fit 0.50` **AND**
53
+ no adversarial > 0.5 **AND** `delta_tsc ≤ 0`.
54
+
55
+ Do **not** use `w4-rubric.ts`'s number here. That script computes the `task`
56
+ rubric — five axes, no goal-fit, because a bare diff carries no plan context.
57
+ It prints `task-composite=` for exactly this reason. Comparing it to this gate
58
+ silently drops the 0.30 axis and makes the `goal-fit ≥ 0.50` gate unevaluable.
59
+ 2. Close the substrate task — POST `http://localhost:4321/api/ask/tasks:status` with
60
+ `{ "data": { "tid": "<tid>", "status": "done", "workspace": "<slug>" } }`.
61
+ Don't have the tid? Use the slug door instead — `bash .claude/scripts/do-signal.sh --task-link <slug> "docs=<slug>"`,
62
+ which resolves the task by its `slug:` tag and stamps provenance as it closes.
63
+ (There is no `/api/tasks/{id}/complete` route — `tasks:status` is the only status door.)
64
+ 3. POST `http://localhost:4321/api/mark-dims` with
65
+ `{ "edge": "<from>→<to>", "dims": { security, stability, simplicity, speed, integration } }`
66
+ (the route Zod-parses exactly this shape — a bare `{ security, … }` body is rejected;
67
+ `integration` is the optional 5th axis):
53
68
  - Dim ≥ 0.5 → mark() on that dimension path (strength++)
54
69
  - Dim < 0.5 → warn() on that dimension path (resistance++)
55
70
  4. Self-checkoff: update task checkbox in the TODO file `[ ]` → `[x]`
56
- 5. **Emit feedback signal** — POST `http://localhost:4321/api/signal`:
71
+ 5. **Emit feedback signal** — POST `http://localhost:4321/api/signal/loop:feedback`.
72
+ The receiver is a **path segment**, never a body field: `/api/signal` with no segment
73
+ returns 400 `receiver required`. `loop:feedback` has no registered handler, so this
74
+ lands as a generic substrate `writeSignal` — which is the point; the path is the address.
57
75
  ```json
58
76
  {
59
- "receiver": "loop:feedback",
60
77
  "data": {
61
78
  "tags": ["<task-tags>"],
62
79
  "strength": "<composite 0–1>",
@@ -72,10 +89,18 @@ This is Rule 1 enforced at the human boundary.
72
89
  ```
73
90
  This is the return-path pheromone. Future agents with matching tags follow this path.
74
91
  `composite >= 0.65` → mark each tag path. `composite < 0.65` → warn(0.5) each tag path.
75
- 6. **Settle the promise** — if the slug has a promise (`text/<slug>.md` with a `proof:`), run
92
+ 6. **Settle the promise** — if the slug has a promise (`text/<slug>.md` with a `proof:`), first run
93
+ `.claude/scripts/do-derives-check.sh <slug>` (zero LLM: every `derives: <key>: true` file-shaped
94
+ artifact must exist on disk — closes the class that let security-gates ship a missing `-docs.md`);
95
+ a missing artifact forces the settle to BROKEN. Then run
76
96
  `.claude/scripts/do-promise-settle.sh <slug> --composite <composite>`. Zero LLM: proof exits 0
77
- → `mark` on `promise:<slug>→proof` (strength = composite×5) + `world:announce` broadcast; non-zero
78
- `warn`; no observable → dissolved (reported, never silent). If the promise was minted on-chain
97
+ → `mark` on `promise:<slug>→proof` (strength = composite×5) + `world:announce` broadcast; **exit 3
98
+ UNVERIFIABLE neither verb, promise stays open, re-run later**; any other non-zero
99
+ → `warn`; no observable → dissolved (reported, never silent). **Exit 3 is not a close.** A
100
+ `proof:` is an `&&`-join, so a leg that cannot reach its substrate stops the chain and returns 3;
101
+ folding that into `warn` would deposit resistance on a proven path for a cluster blip — a promise
102
+ recorded BROKEN for a reason its maker cannot fix. `/close` must treat 3 as "not settled yet" and
103
+ re-run when the substrate answers (`text/factory.md` § A note on "red" vs "cannot run"). If the promise was minted on-chain
79
104
  (`object_id:` in its contract block) the same run submits the generated `settle_promise`
80
105
  (kept/broken, amount = strength×1000 bps) — the state ratchet makes settlement final; unarmed or
81
106
  failed chain write degrades cleanly, the off-chain settle stands. Build-time reputation lands on
@@ -105,7 +130,7 @@ This is Rule 1 enforced at the human boundary.
105
130
 
106
131
  ### `--fail`
107
132
 
108
- 1. POST `http://localhost:4321/api/tasks/{id}/complete` with `{ failed: true }`
133
+ 1. POST `http://localhost:4321/api/ask/tasks:status` with `{ "data": { "tid": "<tid>", "status": "failed", "workspace": "<slug>" } }`
109
134
  2. warn(1) — resistance += 1 on the path. Full failure, chain breaks.
110
135
  3. Report:
111
136
  ```
@@ -115,7 +140,7 @@ This is Rule 1 enforced at the human boundary.
115
140
 
116
141
  ### `--dissolved`
117
142
 
118
- 1. POST `http://localhost:4321/api/tasks/{id}/complete` with `{ dissolved: true }`
143
+ 1. POST `http://localhost:4321/api/ask/tasks:status` with `{ "data": { "tid": "<tid>", "status": "dissolved", "workspace": "<slug>" } }`
119
144
  2. warn(0.5) — resistance += 0.5. Mild warn — path doesn't exist yet.
120
145
  3. Report:
121
146
  ```
@@ -125,7 +150,7 @@ This is Rule 1 enforced at the human boundary.
125
150
 
126
151
  ### `--timeout`
127
152
 
128
- 1. POST `http://localhost:4321/api/tasks/{id}/complete` with `{ timeout: true }`
153
+ 1. Leave `task-status` untouched a timeout is not an outcome, so the task stays `picked` and the lease holds.
129
154
  2. No mark, no warn — neutral. Slow, not bad.
130
155
  3. Report:
131
156
  ```
@@ -136,8 +161,9 @@ This is Rule 1 enforced at the human boundary.
136
161
  ### *(no arg)* — session report
137
162
 
138
163
  1. Read git diff: `git diff --stat HEAD` — what changed this session
139
- 2. For each completed task this session: POST `/api/tasks/{id}/complete`
140
- 3. POST `http://localhost:4321/api/tick` — process accumulated pheromone
164
+ 2. For each completed task this session: POST `/api/ask/tasks:status` with `{ "data": { "tid": "<tid>", "status": "done", "workspace": "<slug>" } }`
165
+ 3. POST `http://localhost:4321/api/fade` — apply the group fade-rate to accumulated
166
+ pheromone (there is no `/api/tick` route; `fade` is the decay door)
141
167
  4. Report session outcomes (numbers first):
142
168
  ```
143
169
  Session: N tasks completed M tests K commits
@@ -20,10 +20,15 @@ Every noun writes to TypeDB and/or the in-memory queue.
20
20
 
21
21
  | Noun | Primitive | Destination |
22
22
  |------|-----------|-------------|
23
- | task | `send()` | POST `/api/tasks` |
24
- | todo | `send()` | Write `docs/{name}-todo.md` + POST `/api/tasks/sync` |
23
+ | task | `send()` | POST `/api/ask/tasks:create` (MCP tool `tasks_create`) |
24
+ | todo | `send()` | Write `text/{name}-todo.md` |
25
25
  | agent | `send()` | `agent-md.ts` → TypeDB unit + skills + capabilities |
26
- | signal | `send()` | POST `/api/signal` |
26
+ | signal | `send()` | POST `/api/signal/<receiver>` |
27
+
28
+ **Not built (do not invoke) — verified 2026-08-02:** `POST /api/tasks` and
29
+ `POST /api/tasks/sync`. There is no `/api/tasks*` route at all. The
30
+ `sync-todo-docs.sh` hook still best-effort-POSTs `/api/tasks/sync` and silently
31
+ no-ops — known drift, not a working wire.
27
32
 
28
33
  ## Steps
29
34
 
@@ -36,29 +41,34 @@ Every noun writes to TypeDB and/or the in-memory queue.
36
41
  - persona: ceo / dev / investor / gamer / kid / freelancer / agent
37
42
  - tags (space-separated), blocks (other task IDs), exit condition
38
43
  2. Compute priority: value + phase + persona + blocking weight (max 115, min 35)
39
- 3. POST to `http://localhost:4321/api/tasks` with JSON body
40
- 4. Confirm created task: id, name, priority score + formula, tags
44
+ 3. POST to `http://localhost:4321/api/ask/tasks:create` with body
45
+ `{ title, notes?, tags?, assignee?, workspace? }` the `tasks:create` receiver
46
+ (`packages/sdk/src/receivers.ts`). It writes one open task and announces it by
47
+ its tags in the same act, returning the new `tid`. Tags are plain words: `:` and
48
+ `@` are reserved for `workspace:`/assignee namespaces.
49
+ Equivalent: the MCP tool `tasks_create`.
50
+ 4. Confirm created task: tid, title, priority score + formula, tags
41
51
  5. Suggest `/see tasks` to view ranked list
42
52
 
43
53
  ### todo
44
54
 
45
- 1. Resolve source doc from `$ARGUMENTS`: try full path → `docs/$ARGUMENTS` → `docs/$ARGUMENTS.md`
55
+ 1. Resolve source doc from `$ARGUMENTS`: try full path → `text/$ARGUMENTS` → `text/$ARGUMENTS.md`. All docs live in `text/` — there is no `one/` directory, and `docs/` holds only two unrelated files.
46
56
  2. Run Haiku one-shot to extract raw tasks (~$0.004):
47
57
  - Read doc, extract actionable items as checkbox tasks with metadata
48
- 3. Load base context: `one/dictionary.md`, `one/rubrics.md`, `one/template-todo.md`
58
+ 3. Load base context: `text/dictionary.md`, `text/rubrics.md`, `text/template-todo.md`
49
59
  4. Promote raw tasks into full wave template:
50
60
  - Group by cycles (Wire → Prove → Grow) and waves (W1=Haiku, W2=Opus, W3=Sonnet, W4=Sonnet)
51
61
  - Assign full metadata per task: id, value, effort, phase, persona, blocks, exit, tags
52
62
  - `outcome:` — when a promise exists (`text/<slug>.md` with `proof:`), the todo's `outcome:` is the promise's `proof:`, verbatim — never restated loosely
53
63
  - Include: routing diagram, schema reference, wave structure, rubric scoring in W4, self-checkoff
54
- 5. Write `docs/{docname}-todo.md`
64
+ 5. Write `text/{docname}-todo.md` — always by copying `text/template-todo.md` first (`cp text/template-todo.md text/{docname}-todo.md`), never from scratch; the template encodes the frontmatter contract `/do` reads at plan start
55
65
  6. Verify: all tasks have 7 metadata fields, blocks references are valid, exit conditions are verifiable
56
66
  7. Report: cycle count, tasks per cycle, critical path, cost estimate
57
67
 
58
68
  ### agent
59
69
 
60
70
  1. Read `<markdown-file>` (frontmatter: name, model, channels, group, skills, sensitivity)
61
- 2. Parse via `src/engine/agent-md.ts` → `AgentSpec`
71
+ 2. Parse via the shipped parser — `one.ie/web/src/lib/agent-md.ts` or `channels/src/lib/agent-md.ts` (there is no `src/engine/agent-md.ts`) → `AgentSpec`
62
72
  3. Sync to TypeDB:
63
73
  - Unit: uid, name, model, system-prompt, tags
64
74
  - Skills: skill-id, name, price, tags per skill
@@ -71,7 +81,7 @@ Every noun writes to TypeDB and/or the in-memory queue.
71
81
  1. Parse `<receiver>` and `<data>` from `$ARGUMENTS`
72
82
  - receiver: string (e.g. `bob:schema`, `analyst`)
73
83
  - data: JSON or plain string
74
- 2. POST to `http://localhost:4321/api/signal` with `{ receiver, data }`
84
+ 2. POST to `http://localhost:4321/api/signal/<receiver>` with `{ data }` — the receiver is a **path segment**, not a body field (`src/pages/api/signal/[receiver].ts`, with `[...receiver].ts` handling multi-segment names)
75
85
  3. Report: signal sent, response outcome (result / timeout / dissolved / failure), any path marks triggered
76
86
 
77
87
  ---
@@ -12,7 +12,11 @@ Run this any time local data goes missing (after a `git clean`, fresh checkout,
12
12
 
13
13
  ## Prerequisites
14
14
 
15
- `CLOUDFLARE_EMAIL` and `CLOUDFLARE_GLOBAL_API_KEY` must be in env (both are in `.env` — already loaded in your shell).
15
+ `CLOUDFLARE_EMAIL` and `CLOUDFLARE_GLOBAL_API_KEY` must reach `process.env`. Both
16
+ are declared in `one.ie/web/.env`, and Bun auto-loads `.env` from the working
17
+ directory — which is why every command below `cd`s into `one.ie/web` first. Run
18
+ it from anywhere else and the script exits with
19
+ `ERROR: CLOUDFLARE_EMAIL and CLOUDFLARE_GLOBAL_API_KEY must be set in env.`
16
20
 
17
21
  ## One-shot command
18
22