compound-workflow 1.9.1 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +1 -1
- package/src/skills/setup-agents/SKILL.md +78 -31
package/README.md
CHANGED
|
@@ -68,6 +68,8 @@ Log session outcomes and spot trends. `/metrics` records a single session. `/ass
|
|
|
68
68
|
|
|
69
69
|
**`/test-browser`** — Browser-level validation of affected routes. Useful for UI changes where automated tests aren't enough.
|
|
70
70
|
|
|
71
|
+
**`/setup-agents`** — Tailor `AGENTS.md` to this project. Detects your stack and installed harnesses, curates the Skill Index, and prompts for anything it can't infer. Re-run whenever harnesses or skills change.
|
|
72
|
+
|
|
71
73
|
**`/install`** — Re-run setup. Safe to run again after updating the package or adding a new harness.
|
|
72
74
|
|
|
73
75
|
---
|
package/package.json
CHANGED
|
@@ -16,6 +16,29 @@ triggers:
|
|
|
16
16
|
|
|
17
17
|
Create or update a minimal, authoritative `AGENTS.md` for any project.
|
|
18
18
|
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Developer Experience Contract (CRITICAL)
|
|
22
|
+
|
|
23
|
+
This skill is a config generator, not a survey. The developer interaction budget is **one round-trip**: propose a complete config, let the user accept or override.
|
|
24
|
+
|
|
25
|
+
**Hard constraints — violating any of these is a skill failure:**
|
|
26
|
+
|
|
27
|
+
- **One prompt total.** Do not emit numbered question lists (`1. … 2. … 3. …`). Do not split prompts across multiple messages. Phase 2 is the only user interaction.
|
|
28
|
+
- **Never ask about skills.** Skill inclusion is not a decision — every skill in `$skills_dir` is included automatically. Do not ask "keep all four guardrails?", "which skills to include?", or anything equivalent.
|
|
29
|
+
- **Never ask meta questions.** Do not surface observations like "project-specific skills appear elsewhere — flag as a gap?" or "strip extra sections?". If the template forbids something, silently conform; if it's out of scope, ignore it.
|
|
30
|
+
- **Never present "ambiguous — need your call" sections.** Ambiguity is resolved by the deterministic rules below, then surfaced in the proposed config block for the user to override if they disagree. Pick a value. Do not ask.
|
|
31
|
+
- **Never re-confirm.** After the user replies to the Phase 2 prompt (accept or overrides), write the file. No second confirmation pass.
|
|
32
|
+
|
|
33
|
+
**Ambiguity resolution (apply without asking):**
|
|
34
|
+
|
|
35
|
+
- **Monorepo with multiple apps:** pick the workspace whose `scripts.dev` / `scripts.test` matches the detected harness target, or the newest one by `package.json` mtime. Record as `[detected]` and let the user override in Phase 2.
|
|
36
|
+
- **Multiple candidate commands (e.g. `npm test` vs `npm run test:web2:run`):** prefer the most specific workspace-scoped command over the root alias.
|
|
37
|
+
- **Memory or prior config suggests a different target than current code:** treat code as source of truth. Surface the detected value; the user can override.
|
|
38
|
+
- **Legacy/deprecated paths visible in code:** ignore for detection. Pick the active target.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
19
42
|
## Mode Detection
|
|
20
43
|
|
|
21
44
|
Before doing anything, check whether `AGENTS.md` exists in the repo root.
|
|
@@ -70,25 +93,51 @@ From these, infer:
|
|
|
70
93
|
| `format_command` | `scripts.format` in package.json; prettier config presence |
|
|
71
94
|
| `dev_server_url` | vite config `server.port`; default `http://localhost:5173` for Vite, `http://localhost:3000` for others |
|
|
72
95
|
| `worktree_install_command` | `package-lock.json` → `npm ci`; `yarn.lock` → `yarn install`; `pnpm-lock.yaml` → `pnpm install` |
|
|
96
|
+
| `default_branch` | `git symbolic-ref refs/remotes/origin/HEAD` → strip `refs/remotes/origin/`; fallback `main` |
|
|
97
|
+
| `project_tracker` | `.github/` exists → `github`; else `none` |
|
|
98
|
+
| `worktree_dir` | default `.worktrees` |
|
|
99
|
+
| `worktree_copy_files` | glob `.env*` in repo root, excluding `.env.example` and `.env.sample` |
|
|
73
100
|
|
|
74
|
-
For each value, state whether it was detected or
|
|
101
|
+
For each value, state whether it was detected or defaulted.
|
|
75
102
|
|
|
76
103
|
---
|
|
77
104
|
|
|
78
|
-
## Phase 2:
|
|
105
|
+
## Phase 2: Confirm the Proposed Config
|
|
106
|
+
|
|
107
|
+
This is the **only** user prompt in the skill. Emit one block and one question. Nothing else.
|
|
79
108
|
|
|
80
|
-
|
|
109
|
+
**Forbidden in this phase:**
|
|
81
110
|
|
|
82
|
-
|
|
111
|
+
- Numbered question lists
|
|
112
|
+
- Separate "Ambiguous — need your call" sections
|
|
113
|
+
- Any prompt about skills, guardrails, extra sections, or template compliance
|
|
114
|
+
- Per-field prompting ("confirm this? confirm that?")
|
|
115
|
+
- Commentary about memory, deprecated paths, or detected inconsistencies outside the block itself
|
|
83
116
|
|
|
84
|
-
|
|
85
|
-
- `project_tracker` — ask: `github`, `linear`, or none
|
|
86
|
-
- `dev_server_url` — confirm detected value or ask
|
|
87
|
-
- `worktree_dir` — suggest `.worktrees`
|
|
88
|
-
- `worktree_copy_files` — ask which env/config files should be copied into new worktrees (e.g. `.env.local`)
|
|
89
|
-
- `harnesses` — show detected list from Phase 1; confirm or correct
|
|
117
|
+
**Update mode:** start from the values already in `AGENTS.md`. Only overwrite with a Phase 1 detection when the existing value is empty or clearly stale (references a command that no longer exists). Mark overrides `[updated]` so the user can see what changed.
|
|
90
118
|
|
|
91
|
-
|
|
119
|
+
Output exactly this structure — no preamble, no trailing questions:
|
|
120
|
+
|
|
121
|
+
```
|
|
122
|
+
Proposed AGENTS.md config (update|init mode):
|
|
123
|
+
|
|
124
|
+
default_branch: <value> [detected|default|existing|updated]
|
|
125
|
+
project_tracker: <value> [detected|default|existing|updated]
|
|
126
|
+
dev_server_url: <value> [detected|default|existing|updated]
|
|
127
|
+
test_command: <value> [detected|existing|updated]
|
|
128
|
+
test_fast_command: <value> [detected|existing|updated|omit]
|
|
129
|
+
lint_command: <value> [detected|existing|updated|omit]
|
|
130
|
+
typecheck_command: <value> [detected|existing|updated|omit]
|
|
131
|
+
format_command: <value> [detected|existing|updated|omit]
|
|
132
|
+
worktree_dir: <value> [default|existing]
|
|
133
|
+
worktree_install_command: <value> [detected|existing|updated]
|
|
134
|
+
worktree_copy_files: [<files>] [detected|existing|updated]
|
|
135
|
+
harnesses: [<dirs>] [detected]
|
|
136
|
+
|
|
137
|
+
Reply `ok` to accept, or send `<key>: <value>` lines to override. Anything else cancels.
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
On reply: apply overrides (if any), proceed to Phase 3 and Phase 4. Do not re-confirm.
|
|
92
141
|
|
|
93
142
|
---
|
|
94
143
|
|
|
@@ -96,18 +145,9 @@ Required:
|
|
|
96
145
|
|
|
97
146
|
List all directories under `$skills_dir` (resolved in Phase 1). For each one, read `SKILL.md` frontmatter to get `name` and `description`. These are the only skills that may appear in the Skill Index — never reference a skill not present on disk.
|
|
98
147
|
|
|
99
|
-
**Include every discovered skill automatically.** The installed skill set is the source of truth
|
|
148
|
+
**Include every discovered skill automatically. No user prompt.** The installed skill set is the source of truth. If the user wants to exclude a skill, they remove it from `$skills_dir` — this skill does not curate.
|
|
100
149
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
Skill Index will include all installed skills from <$skills_dir>:
|
|
105
|
-
- <name> — <description from frontmatter>
|
|
106
|
-
- <name> — <description from frontmatter>
|
|
107
|
-
...
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
**Update mode:** diff against the existing Skill Index and note additions/removals, then write the refreshed list. If the user wants to exclude a skill, they should uninstall or remove it from `$skills_dir` rather than hand-curate the index.
|
|
150
|
+
**Update mode:** diff against the existing Skill Index silently and write the refreshed list. Do not surface the diff as a question.
|
|
111
151
|
|
|
112
152
|
---
|
|
113
153
|
|
|
@@ -236,12 +276,19 @@ If any check fails, fix before confirming completion.
|
|
|
236
276
|
|
|
237
277
|
## Rules
|
|
238
278
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
-
|
|
242
|
-
-
|
|
243
|
-
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
-
|
|
279
|
+
**Developer experience (non-negotiable):**
|
|
280
|
+
|
|
281
|
+
- One user prompt per run — the Phase 2 block. No other questions.
|
|
282
|
+
- No numbered question lists, no "ambiguous — need your call" sections, no skill curation prompts, no meta-observations about the codebase.
|
|
283
|
+
- Resolve ambiguity deterministically using the rules in the Developer Experience Contract. Surface the pick in the block; let the user override.
|
|
284
|
+
|
|
285
|
+
**Content integrity:**
|
|
286
|
+
|
|
287
|
+
- Never add sections beyond what the template defines — keep it minimal. Silently conform; do not ask.
|
|
288
|
+
- Never hardcode skill names — discover everything from the detected skills directory.
|
|
289
|
+
- Never hardcode harness paths — detect what exists on disk first; `harnesses` in AGENTS.md reflects reality, not assumptions.
|
|
290
|
+
- Never invent skill descriptions — always read from the skill's `SKILL.md` frontmatter.
|
|
291
|
+
- Never hardcode tool or platform names.
|
|
292
|
+
- Never duplicate content that lives in command or skill docs.
|
|
293
|
+
- In update mode, preserve values that are still valid; only replace stale or empty ones.
|
|
294
|
+
- When the Phase 4 template changes, update `src/AGENTS.md` to match (it is the populated default instance).
|