@slowcook-ai/cli 0.19.0-alpha.11 → 0.19.0-alpha.14
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/AGENTS.md +212 -0
- package/REPORTING.md +154 -0
- package/dist/cli.js +9 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/chef/drift-fix.d.ts +1 -1
- package/dist/commands/chef/drift-fix.d.ts.map +1 -1
- package/dist/commands/chef/drift-fix.js +36 -15
- package/dist/commands/chef/drift-fix.js.map +1 -1
- package/dist/commands/chef/index.js +13 -3
- package/dist/commands/chef/index.js.map +1 -1
- package/dist/commands/chef/orchestrate.d.ts +1 -1
- package/dist/commands/chef/orchestrate.d.ts.map +1 -1
- package/dist/commands/chef/orchestrate.js +32 -9
- package/dist/commands/chef/orchestrate.js.map +1 -1
- package/dist/commands/docs/index.d.ts +16 -0
- package/dist/commands/docs/index.d.ts.map +1 -0
- package/dist/commands/docs/index.js +127 -0
- package/dist/commands/docs/index.js.map +1 -0
- package/dist/commands/recon/index.d.ts +1 -1
- package/dist/commands/recon/index.d.ts.map +1 -1
- package/dist/commands/recon/index.js +9 -5
- package/dist/commands/recon/index.js.map +1 -1
- package/dist/commands/recon/stale-stubs.d.ts +4 -1
- package/dist/commands/recon/stale-stubs.d.ts.map +1 -1
- package/dist/commands/recon/stale-stubs.js +6 -1
- package/dist/commands/recon/stale-stubs.js.map +1 -1
- package/dist/lib/read-only.d.ts +22 -0
- package/dist/lib/read-only.d.ts.map +1 -0
- package/dist/lib/read-only.js +34 -0
- package/dist/lib/read-only.js.map +1 -0
- package/package.json +7 -5
package/AGENTS.md
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# slowcook for AI agents
|
|
2
|
+
|
|
3
|
+
You're an AI coding agent (Claude Code, Cursor, etc.) helping a human
|
|
4
|
+
ship features through slowcook. **This doc is the canonical entry
|
|
5
|
+
point.** Read it before running any `slowcook` command.
|
|
6
|
+
|
|
7
|
+
> Forge support today: **GitHub only.** No GitLab/Bitbucket adapter
|
|
8
|
+
> ships yet. If the consumer's repo is on a different forge, slowcook
|
|
9
|
+
> won't run — escalate that to the human.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Decision tree (start here)
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
What is the human asking?
|
|
17
|
+
|
|
18
|
+
├── "set up slowcook on this repo"
|
|
19
|
+
│ ├── greenfield (no src/) → `slowcook init`
|
|
20
|
+
│ └── brownfield (existing src/) → `slowcook init from-prod`
|
|
21
|
+
│ then `slowcook init entities`
|
|
22
|
+
│
|
|
23
|
+
├── "ship a feature / story"
|
|
24
|
+
│ ├── 1. Human files a GitHub issue describing the feature
|
|
25
|
+
│ │ (you may help draft it; final wording is theirs)
|
|
26
|
+
│ ├── 2. `gh workflow run slowcook-refine.yml -f issue=<num>`
|
|
27
|
+
│ │ → refine asks clarifying questions on the issue
|
|
28
|
+
│ ├── 3. Human answers; refine emits a spec PR
|
|
29
|
+
│ ├── 4. Human merges spec PR; vibe + recipe (testgen) workflows
|
|
30
|
+
│ │ auto-dispatch and open mockup + tests PRs
|
|
31
|
+
│ ├── 5. Human merges mockup + tests; `slowcook brew` workflow
|
|
32
|
+
│ │ auto-dispatches and opens a brew PR
|
|
33
|
+
│ ├── 6. If brew halts: chef-drift auto-dispatches; if
|
|
34
|
+
│ │ chef-drift exits 1 in --pr mode the workflow chains
|
|
35
|
+
│ │ to chef-orchestrate (decides redispatch / rebase /
|
|
36
|
+
│ │ escalate / close)
|
|
37
|
+
│ └── 7. All-green brew PR ships
|
|
38
|
+
│
|
|
39
|
+
├── "investigate a bug filed on the consumer's repo"
|
|
40
|
+
│ ├── `slowcook investigate --issue <num>` emits bug-profile
|
|
41
|
+
│ └── then `slowcook recipe --regression` emits a failing test
|
|
42
|
+
│
|
|
43
|
+
├── "audit my codebase for refactors / dead stubs"
|
|
44
|
+
│ ├── `slowcook recon --reuse-scan` near-duplicate components
|
|
45
|
+
│ ├── `slowcook recon --stub-scan` stale @slowcook-stub markers
|
|
46
|
+
│ └── `slowcook refactor` ranks proposals.json
|
|
47
|
+
│
|
|
48
|
+
└── "I'm reproducing a slowcook bug"
|
|
49
|
+
→ read REPORTING.md (or `slowcook docs reporting`)
|
|
50
|
+
→ set SLOWCOOK_READ_ONLY=1 before running anything on
|
|
51
|
+
someone else's repo
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Pipeline at a glance
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
issue
|
|
60
|
+
│
|
|
61
|
+
▼
|
|
62
|
+
refine ────────► spec PR ────────► (merge)
|
|
63
|
+
│
|
|
64
|
+
├──► vibe ────► mockup PR
|
|
65
|
+
│ │
|
|
66
|
+
│ ▼ (merge)
|
|
67
|
+
│
|
|
68
|
+
└──► recipe ────► tests PR
|
|
69
|
+
│
|
|
70
|
+
▼ (merge)
|
|
71
|
+
│
|
|
72
|
+
▼
|
|
73
|
+
port
|
|
74
|
+
│
|
|
75
|
+
▼
|
|
76
|
+
recon (gate)
|
|
77
|
+
│
|
|
78
|
+
▼
|
|
79
|
+
brew ──┐
|
|
80
|
+
│ │
|
|
81
|
+
(halt: AGENT_STALLED, │
|
|
82
|
+
MOCKUP_DESIGN_CONFLICT,│
|
|
83
|
+
MANIFEST_DRIFT, ...) │
|
|
84
|
+
│ │
|
|
85
|
+
▼ │
|
|
86
|
+
chef-drift ─┤
|
|
87
|
+
(exit 1? │
|
|
88
|
+
auto-chains │
|
|
89
|
+
to ...) │
|
|
90
|
+
│ │
|
|
91
|
+
▼ │
|
|
92
|
+
chef-orchestrate
|
|
93
|
+
├── escalate (PM)
|
|
94
|
+
├── close (superseded)
|
|
95
|
+
├── rebase (BEHIND main)
|
|
96
|
+
└── redispatch_brew
|
|
97
|
+
│
|
|
98
|
+
▼
|
|
99
|
+
back to brew or done
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Per-command quick reference
|
|
105
|
+
|
|
106
|
+
All commands accept `--help` for full flag listings. One-line summaries:
|
|
107
|
+
|
|
108
|
+
| Command | What it does | Cost / time |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `slowcook init` | Scaffold slowcook into a greenfield project (workflows, mock dir, etc.) | $0 / <1 min |
|
|
111
|
+
| `slowcook init from-prod` | Brownfield: emit `mock/` from `src/` per 4-strategy taxonomy | $0 / <1 min |
|
|
112
|
+
| `slowcook init entities` | Walk `supabase/migrations/*.sql` → emit per-table TS interface + zod schema | $0 / seconds |
|
|
113
|
+
| `slowcook init mock` | Add `mock/` skeleton + auto-wire pnpm workspace if applicable | $0 / seconds |
|
|
114
|
+
| `slowcook refine` | Read source issue, ask clarifying questions, emit spec yaml + PR | ~$0.50–1.50 |
|
|
115
|
+
| `slowcook vibe` | Read spec, emit mockup PR (mock-runtime React app) | ~$1–2 |
|
|
116
|
+
| `slowcook plate` | Apply `/plate <instruction>` PR-comment amendments to a mockup PR | ~$0.30–1.50 |
|
|
117
|
+
| `slowcook recipe` | (= `testgen`) emit tier-1 + tier-2 acceptance tests | ~$1–2 |
|
|
118
|
+
| `slowcook port` | Deterministic copy `mock/src/*` → `src/*`, rewrite mock-runtime imports | $0 / seconds |
|
|
119
|
+
| `slowcook recon` | Pre-brew structural backstop (renames + testid gaps + history conflicts) | $0 / seconds |
|
|
120
|
+
| `slowcook recon --reuse-scan` | Story-agnostic: flag near-duplicate components/APIs | $0 / seconds |
|
|
121
|
+
| `slowcook recon --stub-scan` | Find `@slowcook-stub` markers older than `--stub-max-age-days` | $0 / seconds |
|
|
122
|
+
| `slowcook brew [--with-navigator]` | Ratcheted implementation loop. `--with-navigator` adds pair-brew (~10–20% cost surcharge) | ~$0.50–3 |
|
|
123
|
+
| `slowcook brew --pair-sim` | Local-only pair-brew simulator (driver+navigator over a fixture) | varies |
|
|
124
|
+
| `slowcook chef --pr <n>` | Classify failing PR (self-fail / external / infra / out-of-date) | $0 (deterministic) |
|
|
125
|
+
| `slowcook chef-drift` | Surgical drift-fixer: triggered on mock-isolation / recon escalation / brew halt | ~$0.05–0.50/move |
|
|
126
|
+
| `slowcook chef-orchestrate --pr <n> --story <id>` | Decide redispatch_brew / rebase / escalate / close on a halted PR | ~$0.01–0.05 |
|
|
127
|
+
| `slowcook investigate --issue <n>` | Diagnose a bug from a GitHub issue, emit bug-profile JSON | ~$1–3 |
|
|
128
|
+
| `slowcook recipe --regression --bug-profile <path>` | Emit failing regression test for a sift'd bug | ~$0.50–1 |
|
|
129
|
+
| `slowcook sift --bug-profile <path>` | Narrow red→green ratchet for a bug fix, bounded by `fix_scope` | ~$0.50–2 |
|
|
130
|
+
| `slowcook refactor` | Read `.brewing/refactor/proposals.json`, rank by benefit/cost | $0 |
|
|
131
|
+
| `slowcook docs <topic>` | Print bundled doc (`reporting`, `agents`, `read-only`) | $0 |
|
|
132
|
+
| `slowcook help` | List all commands | $0 |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Pitfalls memory (read this — saves real money + time)
|
|
137
|
+
|
|
138
|
+
These are empirical lessons from the consumer dogfood. Treat them as
|
|
139
|
+
non-negotiable defaults unless the user specifically overrides.
|
|
140
|
+
|
|
141
|
+
### Publishing / packaging
|
|
142
|
+
|
|
143
|
+
- **Always `pnpm publish`, never `npm publish`.** npm leaves
|
|
144
|
+
`workspace:^` unresolved → consumers hit `EUNSUPPORTEDPROTOCOL`. Use
|
|
145
|
+
`pnpm publish --tag alpha --no-git-checks` (or whichever tag).
|
|
146
|
+
- **Build before publish, every time.** `prepublishOnly: tsc -b` is
|
|
147
|
+
the guard but verify `dist/` is fresh. Stale dist has shipped before.
|
|
148
|
+
- **Update README / CHANGELOG every point release.** Status table, line
|
|
149
|
+
per release. Don't accumulate undocumented alphas.
|
|
150
|
+
|
|
151
|
+
### pnpm + Next.js
|
|
152
|
+
|
|
153
|
+
- For consumers using Next.js + pnpm workspace, set `node-linker=hoisted`
|
|
154
|
+
in `.npmrc`. Default symlink layout breaks Next 16's turbopack root
|
|
155
|
+
inference (`couldn't find next/package.json from project directory`).
|
|
156
|
+
- `slowcook init mock` auto-wires the workspace when it detects pnpm.
|
|
157
|
+
npm/yarn consumers see a recommendation, not auto-migration (lockfile
|
|
158
|
+
re-resolution risk).
|
|
159
|
+
|
|
160
|
+
### Chef stack
|
|
161
|
+
|
|
162
|
+
- **Chef never edits `tests/`, `vitest.config.*`, or `.brewing/auto-gen/`.**
|
|
163
|
+
These are frozen. If the only fix requires a test edit, chef returns
|
|
164
|
+
`pm_question`.
|
|
165
|
+
- **Chef-drift uses `search_replace` only**, never full-file regeneration.
|
|
166
|
+
Find string must appear exactly once in target.
|
|
167
|
+
- **Chef-orchestrate prefers `escalate` on ties.** PM is the safety valve.
|
|
168
|
+
|
|
169
|
+
### Brew
|
|
170
|
+
|
|
171
|
+
- **Brew can't fix test infrastructure.** If the failure is in
|
|
172
|
+
`vitest.config.*` or `tests/_setup/`, brew will halt repeatedly. The
|
|
173
|
+
fix is upstream in slowcook, not in the consumer's code.
|
|
174
|
+
- **`--with-navigator` adds 10–20% spend** (a navigator LLM call per
|
|
175
|
+
iteration). Skip it on simple stories; use it when soft-prompt steering
|
|
176
|
+
needs hardening.
|
|
177
|
+
|
|
178
|
+
### Refine + spec
|
|
179
|
+
|
|
180
|
+
- **PM intent in the issue body + first refine answer is contractual.**
|
|
181
|
+
Refine cannot silently weaken (e.g., "similar to feed" → "emoji is a
|
|
182
|
+
later concern" is forbidden). Only an explicit later PM comment can.
|
|
183
|
+
- **Side-effects audit (0.18+):** when refine detects contradiction with
|
|
184
|
+
a prior story, it enumerates the exact assertions that would need to
|
|
185
|
+
flip. PM reviews granularly.
|
|
186
|
+
|
|
187
|
+
### Workflows
|
|
188
|
+
|
|
189
|
+
- **Self-hosted runners need `gh` CLI.** Slowcook's chef-drift workflow
|
|
190
|
+
installs it via the no-sudo binary. If you write a new workflow, add
|
|
191
|
+
the same step.
|
|
192
|
+
- **Chef-drift exit 1 auto-chains to chef-orchestrate** in the rewo
|
|
193
|
+
reference workflow shape. Mirror this if you wire your own.
|
|
194
|
+
|
|
195
|
+
### When something goes wrong
|
|
196
|
+
|
|
197
|
+
- **Read [REPORTING.md](./REPORTING.md)** (or `slowcook docs reporting`)
|
|
198
|
+
before filing a bug. Don't bundle artifacts; share URLs.
|
|
199
|
+
- **Use `SLOWCOOK_READ_ONLY=1`** when reproducing a bug on someone else's
|
|
200
|
+
repo. Blocks every GitHub-side write.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## What to read next
|
|
205
|
+
|
|
206
|
+
- [README.md](./README.md) — the marketing overview + status table
|
|
207
|
+
- [REPORTING.md](./REPORTING.md) — how to file a slowcook bug
|
|
208
|
+
- [docs/plans/](./docs/plans/) — the roadmap / design docs (if a story
|
|
209
|
+
references one, read it before running the agent)
|
|
210
|
+
|
|
211
|
+
If anything in this doc is wrong or outdated, file a slowcook issue
|
|
212
|
+
following the REPORTING.md recipe.
|
package/REPORTING.md
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Reporting a slowcook bug
|
|
2
|
+
|
|
3
|
+
Slowcook runs across several agents (refine / vibe / plate / testgen /
|
|
4
|
+
brew / chef / recon) and several surfaces (issues, PRs, workflow logs,
|
|
5
|
+
artifacts). When something goes wrong, the maintainer needs the full
|
|
6
|
+
reproduction context — but **we deliberately don't accept artifact
|
|
7
|
+
uploads or "report bundles."** Real-data fragments (database rows,
|
|
8
|
+
user emails, draft spec text) often live inside slowcook prompts; a
|
|
9
|
+
bundler is hard to verify against secret leakage. Instead we lean on
|
|
10
|
+
GitHub-native surfaces that you control.
|
|
11
|
+
|
|
12
|
+
> **Forge support today: GitHub only.** Slowcook's `forge` adapter
|
|
13
|
+
> currently has one implementation: `@slowcook-ai/forge-github`. GitLab,
|
|
14
|
+
> Bitbucket, etc. are architecturally possible (the core defines a
|
|
15
|
+
> `ForgeAdapter` interface) but no other adapter is published. If your
|
|
16
|
+
> consumer repo lives on GitLab, slowcook won't run today.
|
|
17
|
+
|
|
18
|
+
This doc covers how to file a bug for both **public OSS repos** and
|
|
19
|
+
**private repos** (both on GitHub).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## OSS / public repos (default path)
|
|
24
|
+
|
|
25
|
+
If your repo is public + Actions logs are public (the default),
|
|
26
|
+
**share four URLs** in a slowcook GitHub issue:
|
|
27
|
+
|
|
28
|
+
1. **Source-issue URL** — the issue that started the story (e.g.,
|
|
29
|
+
`https://github.com/<you>/<repo>/issues/149`). This carries the
|
|
30
|
+
full refine Q&A trail + every agent's `slowcook:cost` markers
|
|
31
|
+
for the story.
|
|
32
|
+
2. **PR URL(s)** — whichever slowcook-bot PRs are involved
|
|
33
|
+
(`/spec/`, `/mockup/`, `/tests/`, `/brew/`).
|
|
34
|
+
3. **Workflow run URL** — the specific failed run (e.g.,
|
|
35
|
+
`https://github.com/<you>/<repo>/actions/runs/25381565696`).
|
|
36
|
+
Logs are public; artifacts (`.brewing/chef/`, `.brewing/chef-drift-input/`,
|
|
37
|
+
etc.) are downloadable.
|
|
38
|
+
4. **What you expected vs. what happened** — one-paragraph summary.
|
|
39
|
+
|
|
40
|
+
That's it. Maintainer reads the workflow log + downloads artifacts
|
|
41
|
+
without needing any access from you.
|
|
42
|
+
|
|
43
|
+
### Reproducing locally
|
|
44
|
+
|
|
45
|
+
You can reproduce the exact LLM input chef-drift saw by:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# 1. Download the chef-drift artifact from the failing run
|
|
49
|
+
gh run download <run-id> -n chef-drift-story-<id> -D /tmp/chef-drift-repro
|
|
50
|
+
|
|
51
|
+
# 2. Re-dispatch chef-drift locally with the captured input
|
|
52
|
+
cd <your-repo>
|
|
53
|
+
ANTHROPIC_API_KEY=... slowcook chef-drift \
|
|
54
|
+
--story <id> \
|
|
55
|
+
--trigger brew_halt_class \
|
|
56
|
+
--trigger-detail "..." \
|
|
57
|
+
--trigger-raw /tmp/chef-drift-repro/halt-trigger.json \
|
|
58
|
+
--dry-run
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Same input → same prompt → reproducible LLM output (modulo
|
|
62
|
+
inherent stochasticity, which Anthropic's `temperature=0` minimises).
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Private repos
|
|
67
|
+
|
|
68
|
+
If your repo is private, neither logs nor artifacts are visible to
|
|
69
|
+
the slowcook maintainer. Two options:
|
|
70
|
+
|
|
71
|
+
### Preferred: read-only triage role for the duration of the bug
|
|
72
|
+
|
|
73
|
+
In your GitHub repo settings → Collaborators → add **`@aminazar`**
|
|
74
|
+
(slowcook's maintainer today; check the [repo](https://github.com/aminazar/slowcook)
|
|
75
|
+
for the current owner) as a **Triage** role. That gives them:
|
|
76
|
+
|
|
77
|
+
- Read access to source, PRs, issues, workflow logs, artifacts
|
|
78
|
+
- No ability to push, merge, change settings, or run actions
|
|
79
|
+
|
|
80
|
+
When the bug is resolved (or after a fixed window — 7 days is a
|
|
81
|
+
reasonable default), revoke. @aminazar doesn't expect indefinite
|
|
82
|
+
access.
|
|
83
|
+
|
|
84
|
+
### Fallback: scoped read-only PAT
|
|
85
|
+
|
|
86
|
+
If you'd rather not add a collaborator, generate a fine-grained
|
|
87
|
+
Personal Access Token with **read-only** scope on **just that one
|
|
88
|
+
repo** + only the permissions slowcook needs:
|
|
89
|
+
|
|
90
|
+
- `Contents: Read`
|
|
91
|
+
- `Issues: Read`
|
|
92
|
+
- `Pull requests: Read`
|
|
93
|
+
- `Actions: Read`
|
|
94
|
+
|
|
95
|
+
Share via 1Password or a similar trusted channel. Maintainer uses it
|
|
96
|
+
for the bug investigation only + revokes when done.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## What slowcook does NOT accept
|
|
101
|
+
|
|
102
|
+
- **Artifact uploads / log bundles via email or chat.** Real-data
|
|
103
|
+
fragments live inside agent prompts (a brew agent's prompt
|
|
104
|
+
includes test fixture rows that may have realistic-looking user
|
|
105
|
+
emails; a refine agent's prompt includes the spec body). A
|
|
106
|
+
bundler can't verifiably scrub these. We won't accept the risk.
|
|
107
|
+
- **Auto-telemetry.** No slowcook command phones home or sends usage
|
|
108
|
+
data to the maintainer. Cost / activity is visible to YOU via the
|
|
109
|
+
`slowcook:cost` markers on your own GitHub issues + PRs;
|
|
110
|
+
aggregating it for someone else is your call, not ours.
|
|
111
|
+
- **Direct API key sharing.** If a bug needs the maintainer to
|
|
112
|
+
re-run an agent live (rare), they can run it under their own
|
|
113
|
+
ANTHROPIC_API_KEY — never yours.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Cost-marker recipe (handy for bug reports)
|
|
118
|
+
|
|
119
|
+
Every agent in the slowcook pipeline emits an HTML cost marker on
|
|
120
|
+
its comments. To see what your story cost / which agent did what:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
gh issue view <issue-num> --comments | grep "slowcook:cost"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Output looks like:
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
<!-- slowcook:cost agent=refine usd=0.4630 round=questions ... -->
|
|
130
|
+
<!-- slowcook:cost agent=refine usd=0.6514 round=spec ... -->
|
|
131
|
+
<!-- slowcook:cost agent=testgen usd=0.6134 ... -->
|
|
132
|
+
<!-- slowcook:cost agent=brew usd=0.6291 iterations=3 halted=AGENT_STALLED_NO_EDITS ... -->
|
|
133
|
+
<!-- slowcook:cost agent=chef-drift usd=0.0123 decision=halt move=1 ... -->
|
|
134
|
+
<!-- slowcook:cost agent=chef-orchestrate usd=0.0123 kind=close pr=153 ... -->
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
When filing a bug, you can paste the relevant markers directly into
|
|
138
|
+
the issue — they're machine-readable + identify the involved agent
|
|
139
|
+
without any custom bundling.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Where to file
|
|
144
|
+
|
|
145
|
+
- **Public bug reports**: <https://github.com/aminazar/slowcook/issues>
|
|
146
|
+
- **Private bug reports** (when artifacts can't be public): same repo,
|
|
147
|
+
**but file a public issue** with the description + your reproduction
|
|
148
|
+
arrangement. Don't paste private logs into a public issue. The
|
|
149
|
+
maintainer responds with the access path that works for your setup.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
*This doc is intentionally short. Read [AGENTS.md](./AGENTS.md) for
|
|
154
|
+
the slowcook architecture overview.*
|
package/dist/cli.js
CHANGED
|
@@ -229,6 +229,15 @@ async function main() {
|
|
|
229
229
|
await refactor(args.slice(1), VERSION);
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
+
case "docs":
|
|
233
|
+
// 0.19.0-α.13 — `slowcook docs <topic>` prints bundled docs.
|
|
234
|
+
// Useful when an agent / maintainer is on a fresh box without a
|
|
235
|
+
// cloned slowcook repo. Topics: reporting, agents, read-only.
|
|
236
|
+
{
|
|
237
|
+
const { docs } = await import("./commands/docs/index.js");
|
|
238
|
+
await docs(args.slice(1), VERSION);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
232
241
|
case "vibe":
|
|
233
242
|
// 0.15.0-α.1 — design-first mockup generator (plate-pipeline α.1).
|
|
234
243
|
// Reads spec + brownfield extracts + code-map; emits a runnable
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACl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AG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -60,5 +60,5 @@ export declare function collectImportedSourceFiles(testContents: Record<string,
|
|
|
60
60
|
* different `exists` predicate).
|
|
61
61
|
*/
|
|
62
62
|
export declare function resolveImportToFile(importPath: string, testFile: string, repoRoot: string, exists: (p: string) => boolean): string | null;
|
|
63
|
-
export declare function chefDrift(argv: string[],
|
|
63
|
+
export declare function chefDrift(argv: string[], cliVersion: string): Promise<void>;
|
|
64
64
|
//# sourceMappingURL=drift-fix.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drift-fix.d.ts","sourceRoot":"","sources":["../../../src/commands/chef/drift-fix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;
|
|
1
|
+
{"version":3,"file":"drift-fix.d.ts","sourceRoot":"","sources":["../../../src/commands/chef/drift-fix.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAkEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG;IACjD,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAC;CAC5B,CA0BA;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAgBzG;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,GAC7B,MAAM,GAAG,IAAI,CAsBf;AAiZD,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuXjF"}
|
|
@@ -25,6 +25,7 @@ import { execSync } from "node:child_process";
|
|
|
25
25
|
import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
|
|
26
26
|
import { dirname, join } from "node:path";
|
|
27
27
|
import { AnthropicClient, CHEF_SYSTEM, buildChefPrompt, } from "@slowcook-ai/llm-anthropic";
|
|
28
|
+
import { isReadOnlyMode, logReadOnlyBanner } from "../../lib/read-only.js";
|
|
28
29
|
const FROZEN_PATH_PATTERNS = [
|
|
29
30
|
/^tests\//,
|
|
30
31
|
/^vitest\.config\.(ts|mjs|js)$/,
|
|
@@ -553,9 +554,14 @@ function buildAuditCommentBody(args) {
|
|
|
553
554
|
lines.push("");
|
|
554
555
|
}
|
|
555
556
|
lines.push(`**Cost:** $${move.cost_usd.toFixed(2)} (cumulative: $${args.ledger.cumulative_cost_usd.toFixed(2)})`);
|
|
557
|
+
// 0.19.0-α.12 — slowcook:cost HTML marker for downstream aggregation
|
|
558
|
+
// (`gh issue view N | grep slowcook:cost`). Format matches vibe / plate /
|
|
559
|
+
// brew / refine / testgen.
|
|
560
|
+
lines.push("");
|
|
561
|
+
lines.push(`<!-- slowcook:cost agent=chef-drift usd=${move.cost_usd.toFixed(4)} cumulative_usd=${args.ledger.cumulative_cost_usd.toFixed(4)} decision=${move.decision} trigger=${move.trigger_kind} story=${args.ledger.story_id} move=${move.n} cli=${args.cliVersion} -->`);
|
|
556
562
|
return lines.join("\n");
|
|
557
563
|
}
|
|
558
|
-
export async function chefDrift(argv,
|
|
564
|
+
export async function chefDrift(argv, cliVersion) {
|
|
559
565
|
const args = parseArgs(argv);
|
|
560
566
|
const apiKey = process.env["ANTHROPIC_API_KEY"];
|
|
561
567
|
if (!apiKey) {
|
|
@@ -563,6 +569,7 @@ export async function chefDrift(argv, _cliVersion) {
|
|
|
563
569
|
process.exit(2);
|
|
564
570
|
}
|
|
565
571
|
console.log(`slowcook chef-drift · story-${args.storyId} · trigger=${args.triggerKind}${args.prNumber ? ` · finisher mode (PR #${args.prNumber})` : ""}`);
|
|
572
|
+
logReadOnlyBanner("chef-drift");
|
|
566
573
|
// L2 finisher mode: check out the PR branch BEFORE reading any
|
|
567
574
|
// ledger or repo state. The brew PR's branch has its own .brewing/
|
|
568
575
|
// and a different working tree shape than main.
|
|
@@ -890,18 +897,25 @@ export async function chefDrift(argv, _cliVersion) {
|
|
|
890
897
|
}
|
|
891
898
|
// Commit chef's edits locally (workflow handles the push) when validation passed.
|
|
892
899
|
// L2 finisher mode: also push to the PR's branch directly so the PR re-runs CI.
|
|
900
|
+
// SLOWCOOK_READ_ONLY=1 gates BOTH the commit AND the push so a maintainer
|
|
901
|
+
// running chef-drift on a consumer's repo doesn't pollute their git history.
|
|
893
902
|
let commitSha = null;
|
|
894
903
|
if (verdict.kind === "autonomous_fix" && moveEntry.post_state === "clean" && !args.dryRun) {
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
if (result.sha) {
|
|
898
|
-
commitSha = result.sha;
|
|
899
|
-
console.log(` committed: ${result.sha.slice(0, 7)}`);
|
|
904
|
+
if (isReadOnlyMode()) {
|
|
905
|
+
console.log(` [SLOWCOOK_READ_ONLY=1] would commit ${verdict.edits.length} edit(s) + push to PR; skipping.`);
|
|
900
906
|
}
|
|
901
|
-
|
|
902
|
-
const
|
|
903
|
-
|
|
904
|
-
|
|
907
|
+
else {
|
|
908
|
+
const summary = `move ${moveN} on story-${args.storyId} — ${args.triggerKind}: ${verdict.rationale.slice(0, 120)}`;
|
|
909
|
+
const result = commitChefEdits(args.repoRoot, summary, verdict.edits);
|
|
910
|
+
if (result.sha) {
|
|
911
|
+
commitSha = result.sha;
|
|
912
|
+
console.log(` committed: ${result.sha.slice(0, 7)}`);
|
|
913
|
+
}
|
|
914
|
+
if (commitSha && prCheckout) {
|
|
915
|
+
const pushed = pushChefEditsToPrBranch(args.repoRoot, prCheckout.branchName, prCheckout.localRef);
|
|
916
|
+
if (pushed)
|
|
917
|
+
console.log(` finisher: pushed ${commitSha.slice(0, 7)} → ${prCheckout.branchName}`);
|
|
918
|
+
}
|
|
905
919
|
}
|
|
906
920
|
}
|
|
907
921
|
ledger.moves.push(moveEntry);
|
|
@@ -910,15 +924,22 @@ export async function chefDrift(argv, _cliVersion) {
|
|
|
910
924
|
saveLedger(args.repoRoot, ledger);
|
|
911
925
|
// Audit comment routing: in finisher mode (--pr) write to the PR;
|
|
912
926
|
// otherwise write to the source issue (L1 behavior).
|
|
927
|
+
// SLOWCOOK_READ_ONLY=1 gates the post too — maintainer-side replay
|
|
928
|
+
// doesn't comment on the consumer's repo.
|
|
913
929
|
if (verdict.kind === "autonomous_fix" && moveEntry.post_state === "clean" && !args.dryRun) {
|
|
914
|
-
const body = buildAuditCommentBody({ ledger, move: moveEntry, verdict });
|
|
930
|
+
const body = buildAuditCommentBody({ ledger, move: moveEntry, verdict, cliVersion });
|
|
915
931
|
const target = args.prNumber ?? (issueNumber > 0 ? issueNumber : null);
|
|
916
932
|
if (target !== null) {
|
|
917
|
-
|
|
918
|
-
|
|
933
|
+
if (isReadOnlyMode()) {
|
|
934
|
+
console.log(` [SLOWCOOK_READ_ONLY=1] would post audit comment on issue/PR #${target}; skipping.`);
|
|
919
935
|
}
|
|
920
|
-
|
|
921
|
-
|
|
936
|
+
else {
|
|
937
|
+
try {
|
|
938
|
+
postIssueComment(args.repoRoot, target, body);
|
|
939
|
+
}
|
|
940
|
+
catch (e) {
|
|
941
|
+
console.warn(` warn: audit comment failed (non-fatal): ${e.message.slice(0, 200)}`);
|
|
942
|
+
}
|
|
922
943
|
}
|
|
923
944
|
}
|
|
924
945
|
}
|