compound-workflow 1.9.2 → 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/package.json +1 -1
- package/src/skills/setup-agents/SKILL.md +66 -37
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.
|
|
@@ -81,32 +104,40 @@ For each value, state whether it was detected or defaulted.
|
|
|
81
104
|
|
|
82
105
|
## Phase 2: Confirm the Proposed Config
|
|
83
106
|
|
|
84
|
-
|
|
107
|
+
This is the **only** user prompt in the skill. Emit one block and one question. Nothing else.
|
|
85
108
|
|
|
86
|
-
**
|
|
109
|
+
**Forbidden in this phase:**
|
|
87
110
|
|
|
88
|
-
|
|
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
|
|
116
|
+
|
|
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.
|
|
118
|
+
|
|
119
|
+
Output exactly this structure — no preamble, no trailing questions:
|
|
89
120
|
|
|
90
121
|
```
|
|
91
|
-
Proposed AGENTS.md config:
|
|
92
|
-
|
|
93
|
-
default_branch: <value> [detected|default|existing]
|
|
94
|
-
project_tracker: <value> [detected|default|existing]
|
|
95
|
-
dev_server_url: <value> [detected|default|existing]
|
|
96
|
-
test_command: <value> [detected|existing]
|
|
97
|
-
test_fast_command: <value> [detected|existing|omit]
|
|
98
|
-
lint_command: <value> [detected|existing|omit]
|
|
99
|
-
typecheck_command: <value> [detected|existing|omit]
|
|
100
|
-
format_command: <value> [detected|existing|omit]
|
|
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]
|
|
101
132
|
worktree_dir: <value> [default|existing]
|
|
102
|
-
worktree_install_command: <value> [detected|existing]
|
|
103
|
-
worktree_copy_files: [<files>] [detected|existing]
|
|
133
|
+
worktree_install_command: <value> [detected|existing|updated]
|
|
134
|
+
worktree_copy_files: [<files>] [detected|existing|updated]
|
|
104
135
|
harnesses: [<dirs>] [detected]
|
|
105
136
|
|
|
106
|
-
|
|
137
|
+
Reply `ok` to accept, or send `<key>: <value>` lines to override. Anything else cancels.
|
|
107
138
|
```
|
|
108
139
|
|
|
109
|
-
|
|
140
|
+
On reply: apply overrides (if any), proceed to Phase 3 and Phase 4. Do not re-confirm.
|
|
110
141
|
|
|
111
142
|
---
|
|
112
143
|
|
|
@@ -114,18 +145,9 @@ One round-trip. If the user accepts, proceed to Phase 3. If they override fields
|
|
|
114
145
|
|
|
115
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.
|
|
116
147
|
|
|
117
|
-
**Include every discovered skill automatically.** The installed skill set is the source of truth
|
|
118
|
-
|
|
119
|
-
Show the resolved list so the user can see what will be written:
|
|
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.
|
|
120
149
|
|
|
121
|
-
|
|
122
|
-
Skill Index will include all installed skills from <$skills_dir>:
|
|
123
|
-
- <name> — <description from frontmatter>
|
|
124
|
-
- <name> — <description from frontmatter>
|
|
125
|
-
...
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
**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.
|
|
129
151
|
|
|
130
152
|
---
|
|
131
153
|
|
|
@@ -254,12 +276,19 @@ If any check fails, fix before confirming completion.
|
|
|
254
276
|
|
|
255
277
|
## Rules
|
|
256
278
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
-
|
|
260
|
-
-
|
|
261
|
-
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
-
|
|
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).
|