ai-engineering-kit 0.3.0 → 0.5.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.
- package/README.md +1 -1
- package/dist/cli.js +109 -56
- package/package.json +1 -1
- package/template/agents/claude-code.CLAUDE.md +3 -3
- package/template/agents/codex.AGENTS.md +3 -3
- package/template/skills/core-workflow/{kickoff → brainstorm}/SKILL.md +2 -2
- package/template/skills/core-workflow/setup-foundations/SKILL.md +3 -3
- package/template/skills/engineering/{grill-with-docs → discovery}/SKILL.md +2 -2
- package/template/skills/engineering/improve-codebase-architecture/SKILL.md +2 -2
- package/template/skills/engineering/setup-matt-pocock-skills/SKILL.md +0 -121
- package/template/skills/engineering/setup-matt-pocock-skills/domain.md +0 -51
- package/template/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md +0 -22
- package/template/skills/engineering/setup-matt-pocock-skills/issue-tracker-gitlab.md +0 -23
- package/template/skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md +0 -19
- package/template/skills/engineering/setup-matt-pocock-skills/triage-labels.md +0 -15
- package/template/skills/engineering/tdd/SKILL.md +0 -109
- package/template/skills/engineering/tdd/deep-modules.md +0 -33
- package/template/skills/engineering/tdd/interface-design.md +0 -31
- package/template/skills/engineering/tdd/mocking.md +0 -59
- package/template/skills/engineering/tdd/refactoring.md +0 -10
- package/template/skills/engineering/tdd/tests.md +0 -61
- package/template/skills/engineering/to-issues/SKILL.md +0 -83
- package/template/skills/engineering/to-prd/SKILL.md +0 -74
- package/template/skills/engineering/triage/AGENT-BRIEF.md +0 -168
- package/template/skills/engineering/triage/OUT-OF-SCOPE.md +0 -101
- package/template/skills/engineering/triage/SKILL.md +0 -103
- package/template/skills/productivity/grill-me/SKILL.md +0 -10
- package/template/skills/productivity/write-a-skill/SKILL.md +0 -117
- /package/template/skills/engineering/{grill-with-docs → discovery}/ADR-FORMAT.md +0 -0
- /package/template/skills/engineering/{grill-with-docs → discovery}/CONTEXT-FORMAT.md +0 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
`ai-engineering-kit` scaffolds a repeatable workflow for building software with AI coding agents:
|
|
8
8
|
|
|
9
9
|
- **Skills** — Markdown playbooks, grouped into categories you pick at install time:
|
|
10
|
-
- **core-workflow** —
|
|
10
|
+
- **core-workflow** — brainstorm → foundations → PRD → plan → implement → review → verify.
|
|
11
11
|
- **engineering**, **productivity**, **misc** — additional day-to-day skills forked from [`mattpocock/skills`](https://github.com/mattpocock/skills) (see attribution below).
|
|
12
12
|
- **A structured workspace** — `ai/` for ephemeral artifacts (brainstorms, PRDs, plans, reviews) and `docs/foundations/` for canonical, long-lived project knowledge.
|
|
13
13
|
- **Agent-agnostic wiring** — skills live as portable Markdown in `ai/skills/`; the kit generates the entry file each agent reads (`CLAUDE.md` + a `.claude/skills/` symlink for Claude Code, `AGENTS.md` for Codex). More agents are a template + a manifest entry away.
|
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/cli.ts
|
|
4
|
-
import { basename as
|
|
5
|
-
import { intro, outro, confirm, select, isCancel as isCancel2, cancel as cancel2,
|
|
4
|
+
import { basename as basename3 } from "path";
|
|
5
|
+
import { intro, outro, confirm, select as select2, isCancel as isCancel2, cancel as cancel2, note } from "@clack/prompts";
|
|
6
6
|
|
|
7
7
|
// src/catalog/load.ts
|
|
8
8
|
import { readdirSync, readFileSync } from "fs";
|
|
@@ -25,7 +25,7 @@ var CATEGORIES = [
|
|
|
25
25
|
{
|
|
26
26
|
id: "core-workflow",
|
|
27
27
|
label: "Core workflow",
|
|
28
|
-
hint: "End-to-end loop:
|
|
28
|
+
hint: "End-to-end loop: brainstorm \u2192 PRD \u2192 plan \u2192 implement \u2192 review \u2192 verify",
|
|
29
29
|
from: "skills/core-workflow",
|
|
30
30
|
to: "ai/skills"
|
|
31
31
|
},
|
|
@@ -162,6 +162,31 @@ function resolveSelection(catalog, selection) {
|
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
+
// src/menu/summary.ts
|
|
166
|
+
import { basename } from "path";
|
|
167
|
+
var labelOf = (id) => COMPONENTS.find((c) => c.id === id)?.label ?? id;
|
|
168
|
+
function summarize(files, plan) {
|
|
169
|
+
const byPath = new Map(files.map((f) => [f.targetPath, f]));
|
|
170
|
+
const groups = /* @__PURE__ */ new Map();
|
|
171
|
+
const conflicts = [];
|
|
172
|
+
let written = 0;
|
|
173
|
+
for (const action of plan.actions) {
|
|
174
|
+
if (action.type === "conflict") {
|
|
175
|
+
conflicts.push(action.path);
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
if (action.type !== "add" && action.type !== "refresh") continue;
|
|
179
|
+
const file = byPath.get(action.path);
|
|
180
|
+
if (!file) continue;
|
|
181
|
+
written++;
|
|
182
|
+
const group = groups.get(file.component) ?? groups.set(file.component, { component: file.component, label: labelOf(file.component), count: 0, names: [] }).get(file.component);
|
|
183
|
+
group.count++;
|
|
184
|
+
if (file.component === "entry-files") group.names.push(basename(file.targetPath));
|
|
185
|
+
}
|
|
186
|
+
const ordered = COMPONENTS.map((c) => groups.get(c.id)).filter((g) => g !== void 0);
|
|
187
|
+
return { groups: ordered, conflicts, written };
|
|
188
|
+
}
|
|
189
|
+
|
|
165
190
|
// src/planner/planner.ts
|
|
166
191
|
function planInstall(input) {
|
|
167
192
|
const files = resolveSelection(input.catalog, input.selection);
|
|
@@ -338,8 +363,8 @@ On Windows, enable Developer Mode (or run as admin) and re-run, or point Claude
|
|
|
338
363
|
}
|
|
339
364
|
|
|
340
365
|
// src/menu/prompt.ts
|
|
341
|
-
import { basename } from "path";
|
|
342
|
-
import { multiselect, text, isCancel, cancel } from "@clack/prompts";
|
|
366
|
+
import { basename as basename2 } from "path";
|
|
367
|
+
import { select, multiselect, text, isCancel, cancel } from "@clack/prompts";
|
|
343
368
|
|
|
344
369
|
// src/menu/menu.ts
|
|
345
370
|
function componentOptions() {
|
|
@@ -351,6 +376,13 @@ function categoryOptions() {
|
|
|
351
376
|
function agentOptions() {
|
|
352
377
|
return AGENTS.map((a) => ({ value: a.id, label: a.label, hint: a.hint }));
|
|
353
378
|
}
|
|
379
|
+
function presetSelection(preset) {
|
|
380
|
+
return {
|
|
381
|
+
components: COMPONENTS.map((c) => c.id),
|
|
382
|
+
categories: preset === "everything" ? CATEGORIES.map((c) => c.id) : ["core-workflow"],
|
|
383
|
+
agents: AGENTS.map((a) => a.id)
|
|
384
|
+
};
|
|
385
|
+
}
|
|
354
386
|
function buildSelection(answers) {
|
|
355
387
|
return {
|
|
356
388
|
components: answers.components,
|
|
@@ -367,35 +399,31 @@ function required(value) {
|
|
|
367
399
|
}
|
|
368
400
|
return value;
|
|
369
401
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
})
|
|
379
|
-
);
|
|
402
|
+
async function pick(message, options) {
|
|
403
|
+
return required(await multiselect({ message, options, required: true }));
|
|
404
|
+
}
|
|
405
|
+
async function chooseSelection() {
|
|
406
|
+
const components = await pick("Select parts to install", componentOptions());
|
|
407
|
+
const categories = components.includes("skills") ? await pick("Select skill categories", categoryOptions()) : [];
|
|
408
|
+
const agents = components.includes("entry-files") ? await pick("Select coding agents", agentOptions()) : [];
|
|
409
|
+
return buildSelection({ components, categories, agents });
|
|
380
410
|
}
|
|
381
411
|
async function promptForSelection(projectDir) {
|
|
382
|
-
const
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
const projectName = required(
|
|
392
|
-
await text({
|
|
393
|
-
message: "Project name",
|
|
394
|
-
defaultValue: basename(projectDir),
|
|
395
|
-
placeholder: basename(projectDir)
|
|
412
|
+
const mode = required(
|
|
413
|
+
await select({
|
|
414
|
+
message: `How do you want to set up ${basename2(projectDir)}?`,
|
|
415
|
+
options: [
|
|
416
|
+
{ value: "everything", label: "Everything", hint: "all skills, docs, and workspace \u2014 Claude Code + Codex" },
|
|
417
|
+
{ value: "core", label: "Core skills only", hint: "core-workflow skills, docs, and workspace \u2014 both agents" },
|
|
418
|
+
{ value: "choose", label: "Choose what to install\u2026", hint: "pick components, skill categories, and agents" }
|
|
419
|
+
]
|
|
396
420
|
})
|
|
397
421
|
);
|
|
398
|
-
|
|
422
|
+
const selection = mode === "choose" ? await chooseSelection() : presetSelection(mode);
|
|
423
|
+
const projectName = selection.components.includes("entry-files") ? required(
|
|
424
|
+
await text({ message: "Project name", defaultValue: basename2(projectDir), placeholder: basename2(projectDir) })
|
|
425
|
+
) : basename2(projectDir);
|
|
426
|
+
return { selection, projectName };
|
|
399
427
|
}
|
|
400
428
|
|
|
401
429
|
// src/applier/update.ts
|
|
@@ -547,7 +575,29 @@ function planFor(projectDir, selection) {
|
|
|
547
575
|
onDisk: readOnDiskHashes(projectDir, files),
|
|
548
576
|
manifest: readManifest(projectDir)
|
|
549
577
|
});
|
|
550
|
-
return { catalog, plan };
|
|
578
|
+
return { catalog, files, plan };
|
|
579
|
+
}
|
|
580
|
+
function formatSummary(summary) {
|
|
581
|
+
if (summary.written === 0 && summary.conflicts.length === 0) return "Everything is already up to date.";
|
|
582
|
+
const width = Math.max(0, ...summary.groups.map((g) => g.label.length));
|
|
583
|
+
const lines = summary.groups.map((g) => {
|
|
584
|
+
const detail = g.names.length > 0 ? g.names.join(", ") : String(g.count);
|
|
585
|
+
return ` ${g.label.padEnd(width)} ${detail}`;
|
|
586
|
+
});
|
|
587
|
+
if (summary.conflicts.length > 0) {
|
|
588
|
+
lines.push("", `Conflicts \u2014 you edited these (you'll choose per file):`);
|
|
589
|
+
for (const path of summary.conflicts) lines.push(` ${path}`);
|
|
590
|
+
}
|
|
591
|
+
return lines.join("\n");
|
|
592
|
+
}
|
|
593
|
+
function successOutro(verb, written, selection) {
|
|
594
|
+
if (selection.components.includes("skills")) {
|
|
595
|
+
note(
|
|
596
|
+
"Open your coding agent in this project and run a skill:\n setup-foundations fill in docs/foundations\n brainstorm shape the MVP before building",
|
|
597
|
+
"Next steps"
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
outro(`${verb} ${written} file${written === 1 ? "" : "s"}.`);
|
|
551
601
|
}
|
|
552
602
|
function reportConflict(error) {
|
|
553
603
|
if (!(error instanceof ApplyConflictError)) return false;
|
|
@@ -567,7 +617,7 @@ function dryRun(args) {
|
|
|
567
617
|
function init(args) {
|
|
568
618
|
const projectDir = process.cwd();
|
|
569
619
|
const selection = selectionFromArgs(args);
|
|
570
|
-
const projectName = parseValue(args, "--name") ??
|
|
620
|
+
const projectName = parseValue(args, "--name") ?? basename3(projectDir);
|
|
571
621
|
try {
|
|
572
622
|
const result = runInit({ projectDir, selection, projectName });
|
|
573
623
|
console.log(`ai-engineering-kit ${kitVersion()} installed into ${projectDir}`);
|
|
@@ -587,7 +637,7 @@ async function runReRun(projectDir) {
|
|
|
587
637
|
const manifest = readManifest(projectDir);
|
|
588
638
|
intro(`ai-engineering-kit ${kitVersion()} \u2014 already installed`);
|
|
589
639
|
const mode = bail(
|
|
590
|
-
await
|
|
640
|
+
await select2({
|
|
591
641
|
message: "What would you like to do?",
|
|
592
642
|
options: [
|
|
593
643
|
{ value: "update", label: "Update installed parts to latest" },
|
|
@@ -597,7 +647,7 @@ async function runReRun(projectDir) {
|
|
|
597
647
|
})
|
|
598
648
|
);
|
|
599
649
|
let addParts = EMPTY_SELECTION;
|
|
600
|
-
let projectName =
|
|
650
|
+
let projectName = basename3(projectDir);
|
|
601
651
|
if (mode === "add" || mode === "both") {
|
|
602
652
|
const picked = await promptForSelection(projectDir);
|
|
603
653
|
addParts = picked.selection;
|
|
@@ -607,24 +657,27 @@ async function runReRun(projectDir) {
|
|
|
607
657
|
const applicable = {
|
|
608
658
|
actions: prepared.plan.actions.filter((a) => prepared.applyTypes.has(a.type))
|
|
609
659
|
};
|
|
610
|
-
|
|
660
|
+
const pending = applicable.actions.filter((a) => a.type !== "skip").length;
|
|
661
|
+
if (pending === 0) {
|
|
662
|
+
outro("Already up to date \u2014 nothing to do.");
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
note(formatSummary(summarize(prepared.files, applicable)), mode === "add" ? "This will add" : "This will update");
|
|
611
666
|
const resolutions = /* @__PURE__ */ new Map();
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
}
|
|
667
|
+
const conflicts = applicable.actions.filter((a) => a.type === "conflict");
|
|
668
|
+
for (const [index, action] of conflicts.entries()) {
|
|
669
|
+
const choice = bail(
|
|
670
|
+
await select2({
|
|
671
|
+
message: `Conflict ${index + 1}/${conflicts.length}: you edited ${action.path}, and a newer version exists.`,
|
|
672
|
+
options: [
|
|
673
|
+
{ value: "keep-mine", label: "Keep mine", hint: "discard the update for this file" },
|
|
674
|
+
{ value: "overwrite", label: "Use the new version", hint: "replace your file" },
|
|
675
|
+
{ value: "keep-theirs", label: "Keep mine + save theirs", hint: `writes ${basename3(action.path)}.new` }
|
|
676
|
+
]
|
|
677
|
+
})
|
|
678
|
+
);
|
|
679
|
+
resolutions.set(action.path, choice);
|
|
626
680
|
}
|
|
627
|
-
const pending = applicable.actions.filter((a) => a.type !== "skip").length;
|
|
628
681
|
const proceed = await confirm({ message: `Apply ${pending} changes in ${projectDir}?` });
|
|
629
682
|
if (isCancel2(proceed) || !proceed) {
|
|
630
683
|
outro("Nothing written.");
|
|
@@ -642,24 +695,24 @@ async function runReRun(projectDir) {
|
|
|
642
695
|
projectName,
|
|
643
696
|
applyTypes: prepared.applyTypes
|
|
644
697
|
});
|
|
645
|
-
|
|
698
|
+
successOutro(mode === "add" ? "Added" : "Updated", result.written.length, prepared.selection);
|
|
646
699
|
}
|
|
647
700
|
async function runInteractive() {
|
|
648
701
|
const projectDir = process.cwd();
|
|
649
702
|
if (readManifest(projectDir)) return runReRun(projectDir);
|
|
650
703
|
intro(`ai-engineering-kit ${kitVersion()}`);
|
|
651
704
|
const { selection, projectName } = await promptForSelection(projectDir);
|
|
652
|
-
const { plan } = planFor(projectDir, selection);
|
|
653
|
-
|
|
705
|
+
const { files, plan } = planFor(projectDir, selection);
|
|
706
|
+
note(formatSummary(summarize(files, plan)), "This will add");
|
|
654
707
|
const pending = plan.actions.filter((a) => a.type !== "skip").length;
|
|
655
|
-
const proceed = await confirm({ message: `
|
|
708
|
+
const proceed = await confirm({ message: `Install ${pending} files into ${projectDir}?` });
|
|
656
709
|
if (isCancel2(proceed) || !proceed) {
|
|
657
710
|
outro("Nothing written.");
|
|
658
711
|
return;
|
|
659
712
|
}
|
|
660
713
|
try {
|
|
661
714
|
const result = runInit({ projectDir, selection, projectName });
|
|
662
|
-
|
|
715
|
+
successOutro("Installed", result.written.length, selection);
|
|
663
716
|
} catch (error) {
|
|
664
717
|
if (!reportConflict(error)) throw error;
|
|
665
718
|
}
|
|
@@ -682,7 +735,7 @@ function performReRun(projectDir, mode, addParts) {
|
|
|
682
735
|
priorManifest: manifest,
|
|
683
736
|
selection: prepared.selection,
|
|
684
737
|
version: prepared.version,
|
|
685
|
-
projectName:
|
|
738
|
+
projectName: basename3(projectDir),
|
|
686
739
|
applyTypes: prepared.applyTypes
|
|
687
740
|
});
|
|
688
741
|
console.log(`${result.written.length} files written. Edited files were kept (use the interactive flow to resolve).`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-engineering-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "An opinionated, agent-agnostic AI-development kit — disciplined skills plus a structured workspace — installed and updated through one npx command.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@ When a project skill in `ai/skills/` and a global skill share the same name or s
|
|
|
8
8
|
|
|
9
9
|
For a freshly scaffolded project, set up the foundations before building:
|
|
10
10
|
|
|
11
|
-
1. `ai/skills/
|
|
11
|
+
1. `ai/skills/brainstorm/SKILL.md` — brainstorm the MVP (writes to `ai/brainstorms/`).
|
|
12
12
|
2. `ai/skills/setup-foundations/SKILL.md` — fill in `docs/foundations/` (vision, technical decisions, code & test guidelines).
|
|
13
13
|
3. `ai/skills/write-prd/SKILL.md` — first PRD.
|
|
14
14
|
4. `ai/skills/plan-feature/SKILL.md` → `ai/skills/implement/SKILL.md` — plan, then build.
|
|
@@ -58,8 +58,8 @@ Development artefacts (ephemeral, under `ai/`):
|
|
|
58
58
|
Project workflows live in `ai/skills/`. Read only the matching `SKILL.md`, not every skill upfront:
|
|
59
59
|
|
|
60
60
|
- `ai/skills/load-context/SKILL.md` — starting or resuming in-flight work, or when continuity matters
|
|
61
|
-
- `ai/skills/
|
|
62
|
-
- `ai/skills/setup-foundations/SKILL.md` — fill in `docs/foundations/` (vision, technical decisions, code & test guidelines) from the
|
|
61
|
+
- `ai/skills/brainstorm/SKILL.md` — stress-test or clarify a plan/design through focused questioning
|
|
62
|
+
- `ai/skills/setup-foundations/SKILL.md` — fill in `docs/foundations/` (vision, technical decisions, code & test guidelines) from the brainstorm doc; run before the first PRD
|
|
63
63
|
- `ai/skills/write-prd/SKILL.md` — turn a feature idea into a PRD saved in `ai/prds/`
|
|
64
64
|
- `ai/skills/plan-feature/SKILL.md` — turn a PRD into a phased implementation plan
|
|
65
65
|
- `ai/skills/implement/SKILL.md` — build features or fix bugs with TDD / red-green-refactor
|
|
@@ -17,7 +17,7 @@ Non-negotiable:
|
|
|
17
17
|
|
|
18
18
|
For a freshly scaffolded project, set up the foundations first:
|
|
19
19
|
|
|
20
|
-
1. `ai/skills/
|
|
20
|
+
1. `ai/skills/brainstorm/SKILL.md` — brainstorm the MVP (writes to `ai/brainstorms/`).
|
|
21
21
|
2. `ai/skills/setup-foundations/SKILL.md` — fill in `docs/foundations/` (vision, technical decisions, code & test guidelines).
|
|
22
22
|
3. `ai/skills/write-prd/SKILL.md` — first PRD, then `plan-feature` and `implement`.
|
|
23
23
|
|
|
@@ -28,8 +28,8 @@ Project workflows live in `ai/skills/`. If a project workflow and a global Codex
|
|
|
28
28
|
Read only the matching `SKILL.md`, not every skill upfront:
|
|
29
29
|
|
|
30
30
|
- `ai/skills/load-context/SKILL.md` — starting or resuming in-flight work, or when continuity matters.
|
|
31
|
-
- `ai/skills/
|
|
32
|
-
- `ai/skills/setup-foundations/SKILL.md` — fill in `docs/foundations/` from the
|
|
31
|
+
- `ai/skills/brainstorm/SKILL.md` — stress-test or clarify a plan/design through focused questioning.
|
|
32
|
+
- `ai/skills/setup-foundations/SKILL.md` — fill in `docs/foundations/` from the brainstorm doc; run before the first PRD.
|
|
33
33
|
- `ai/skills/write-prd/SKILL.md` — turn a feature idea into a PRD saved in `ai/prds/`.
|
|
34
34
|
- `ai/skills/plan-feature/SKILL.md` — turn a PRD into a phased implementation plan.
|
|
35
35
|
- `ai/skills/implement/SKILL.md` — build features or fix bugs with TDD/red-green-refactor.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to start a plan,
|
|
2
|
+
name: brainstorm
|
|
3
|
+
description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to start a plan, brainstorm a feature or refactor, stress-test a design, or mentions "grill me".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: setup-foundations
|
|
3
|
-
description: Define a new project's foundation docs — product vision, seed technical decisions, code guidelines, and testing principles — through a guided interview that reads the
|
|
3
|
+
description: Define a new project's foundation docs — product vision, seed technical decisions, code guidelines, and testing principles — through a guided interview that reads the brainstorm doc. Use right after `brainstorm` and before the first PRD, or when a project's docs/foundations/ are still stubs.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Setup Foundations
|
|
7
7
|
|
|
8
|
-
Run once near the start of a project — after `
|
|
8
|
+
Run once near the start of a project — after `brainstorm` and before `write-prd` —
|
|
9
9
|
to turn the empty `docs/foundations/` stubs into real, project-specific docs.
|
|
10
10
|
Works for any stack; never assume TypeScript/Node.
|
|
11
11
|
|
|
@@ -31,7 +31,7 @@ instead of asking.
|
|
|
31
31
|
### 1. docs/foundations/product-vision.md
|
|
32
32
|
|
|
33
33
|
Confirm and fill: what we're building, users, core surfaces, constraints, out of
|
|
34
|
-
scope. Distil from the
|
|
34
|
+
scope. Distil from the brainstorm doc; ask only where it is silent or ambiguous.
|
|
35
35
|
|
|
36
36
|
### 2. docs/foundations/technical-decisions.md
|
|
37
37
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: discovery
|
|
3
|
+
description: Deep discovery interview that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise. Use at the start of a feature to establish shared understanding, or to stress-test a plan against your project's language and documented decisions.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<what-to-do>
|
|
@@ -75,7 +75,7 @@ Once the user picks a candidate, drop into a grilling conversation. Walk the des
|
|
|
75
75
|
|
|
76
76
|
Side effects happen inline as decisions crystallize:
|
|
77
77
|
|
|
78
|
-
- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md` — same discipline as `/
|
|
78
|
+
- **Naming a deepened module after a concept not in `CONTEXT.md`?** Add the term to `CONTEXT.md` — same discipline as `/discovery` (see [CONTEXT-FORMAT.md](../discovery/CONTEXT-FORMAT.md)). Create the file lazily if it doesn't exist.
|
|
79
79
|
- **Sharpening a fuzzy term during the conversation?** Update `CONTEXT.md` right there.
|
|
80
|
-
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones. See [ADR-FORMAT.md](../
|
|
80
|
+
- **User rejects the candidate with a load-bearing reason?** Offer an ADR, framed as: _"Want me to record this as an ADR so future architecture reviews don't re-suggest it?"_ Only offer when the reason would actually be needed by a future explorer to avoid re-suggesting the same thing — skip ephemeral reasons ("not worth it right now") and self-evident ones. See [ADR-FORMAT.md](../discovery/ADR-FORMAT.md).
|
|
81
81
|
- **Want to explore alternative interfaces for the deepened module?** See [INTERFACE-DESIGN.md](INTERFACE-DESIGN.md).
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: setup-matt-pocock-skills
|
|
3
|
-
description: Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's issue tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-issues`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the issue tracker, triage labels, or domain docs.
|
|
4
|
-
disable-model-invocation: true
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Setup Matt Pocock's Skills
|
|
8
|
-
|
|
9
|
-
Scaffold the per-repo configuration that the engineering skills assume:
|
|
10
|
-
|
|
11
|
-
- **Issue tracker** — where issues live (GitHub by default; local markdown is also supported out of the box)
|
|
12
|
-
- **Triage labels** — the strings used for the five canonical triage roles
|
|
13
|
-
- **Domain docs** — where `CONTEXT.md` and ADRs live, and the consumer rules for reading them
|
|
14
|
-
|
|
15
|
-
This is a prompt-driven skill, not a deterministic script. Explore, present what you found, confirm with the user, then write.
|
|
16
|
-
|
|
17
|
-
## Process
|
|
18
|
-
|
|
19
|
-
### 1. Explore
|
|
20
|
-
|
|
21
|
-
Look at the current repo to understand its starting state. Read whatever exists; don't assume:
|
|
22
|
-
|
|
23
|
-
- `git remote -v` and `.git/config` — is this a GitHub repo? Which one?
|
|
24
|
-
- `AGENTS.md` and `CLAUDE.md` at the repo root — does either exist? Is there already an `## Agent skills` section in either?
|
|
25
|
-
- `CONTEXT.md` and `CONTEXT-MAP.md` at the repo root
|
|
26
|
-
- `docs/adr/` and any `src/*/docs/adr/` directories
|
|
27
|
-
- `docs/agents/` — does this skill's prior output already exist?
|
|
28
|
-
- `.scratch/` — sign that a local-markdown issue tracker convention is already in use
|
|
29
|
-
|
|
30
|
-
### 2. Present findings and ask
|
|
31
|
-
|
|
32
|
-
Summarise what's present and what's missing. Then walk the user through the three decisions **one at a time** — present a section, get the user's answer, then move to the next. Don't dump all three at once.
|
|
33
|
-
|
|
34
|
-
Assume the user does not know what these terms mean. Each section starts with a short explainer (what it is, why these skills need it, what changes if they pick differently). Then show the choices and the default.
|
|
35
|
-
|
|
36
|
-
**Section A — Issue tracker.**
|
|
37
|
-
|
|
38
|
-
> Explainer: The "issue tracker" is where issues live for this repo. Skills like `to-issues`, `triage`, `to-prd`, and `qa` read from and write to it — they need to know whether to call `gh issue create`, write a markdown file under `.scratch/`, or follow some other workflow you describe. Pick the place you actually track work for this repo.
|
|
39
|
-
|
|
40
|
-
Default posture: these skills were designed for GitHub. If a `git remote` points at GitHub, propose that. If a `git remote` points at GitLab (`gitlab.com` or a self-hosted host), propose GitLab. Otherwise (or if the user prefers), offer:
|
|
41
|
-
|
|
42
|
-
- **GitHub** — issues live in the repo's GitHub Issues (uses the `gh` CLI)
|
|
43
|
-
- **GitLab** — issues live in the repo's GitLab Issues (uses the [`glab`](https://gitlab.com/gitlab-org/cli) CLI)
|
|
44
|
-
- **Local markdown** — issues live as files under `.scratch/<feature>/` in this repo (good for solo projects or repos without a remote)
|
|
45
|
-
- **Other** (Jira, Linear, etc.) — ask the user to describe the workflow in one paragraph; the skill will record it as freeform prose
|
|
46
|
-
|
|
47
|
-
**Section B — Triage label vocabulary.**
|
|
48
|
-
|
|
49
|
-
> Explainer: When the `triage` skill processes an incoming issue, it moves it through a state machine — needs evaluation, waiting on reporter, ready for an AFK agent to pick up, ready for a human, or won't fix. To do that, it needs to apply labels (or the equivalent in your issue tracker) that match strings *you've actually configured*. If your repo already uses different label names (e.g. `bug:triage` instead of `needs-triage`), map them here so the skill applies the right ones instead of creating duplicates.
|
|
50
|
-
|
|
51
|
-
The five canonical roles:
|
|
52
|
-
|
|
53
|
-
- `needs-triage` — maintainer needs to evaluate
|
|
54
|
-
- `needs-info` — waiting on reporter
|
|
55
|
-
- `ready-for-agent` — fully specified, AFK-ready (an agent can pick it up with no human context)
|
|
56
|
-
- `ready-for-human` — needs human implementation
|
|
57
|
-
- `wontfix` — will not be actioned
|
|
58
|
-
|
|
59
|
-
Default: each role's string equals its name. Ask the user if they want to override any. If their issue tracker has no existing labels, the defaults are fine.
|
|
60
|
-
|
|
61
|
-
**Section C — Domain docs.**
|
|
62
|
-
|
|
63
|
-
> Explainer: Some skills (`improve-codebase-architecture`, `diagnose`, `tdd`) read a `CONTEXT.md` file to learn the project's domain language, and `docs/adr/` for past architectural decisions. They need to know whether the repo has one global context or multiple (e.g. a monorepo with separate frontend/backend contexts) so they look in the right place.
|
|
64
|
-
|
|
65
|
-
Confirm the layout:
|
|
66
|
-
|
|
67
|
-
- **Single-context** — one `CONTEXT.md` + `docs/adr/` at the repo root. Most repos are this.
|
|
68
|
-
- **Multi-context** — `CONTEXT-MAP.md` at the root pointing to per-context `CONTEXT.md` files (typically a monorepo).
|
|
69
|
-
|
|
70
|
-
### 3. Confirm and edit
|
|
71
|
-
|
|
72
|
-
Show the user a draft of:
|
|
73
|
-
|
|
74
|
-
- The `## Agent skills` block to add to whichever of `CLAUDE.md` / `AGENTS.md` is being edited (see step 4 for selection rules)
|
|
75
|
-
- The contents of `docs/agents/issue-tracker.md`, `docs/agents/triage-labels.md`, `docs/agents/domain.md`
|
|
76
|
-
|
|
77
|
-
Let them edit before writing.
|
|
78
|
-
|
|
79
|
-
### 4. Write
|
|
80
|
-
|
|
81
|
-
**Pick the file to edit:**
|
|
82
|
-
|
|
83
|
-
- If `CLAUDE.md` exists, edit it.
|
|
84
|
-
- Else if `AGENTS.md` exists, edit it.
|
|
85
|
-
- If neither exists, ask the user which one to create — don't pick for them.
|
|
86
|
-
|
|
87
|
-
Never create `AGENTS.md` when `CLAUDE.md` already exists (or vice versa) — always edit the one that's already there.
|
|
88
|
-
|
|
89
|
-
If an `## Agent skills` block already exists in the chosen file, update its contents in-place rather than appending a duplicate. Don't overwrite user edits to the surrounding sections.
|
|
90
|
-
|
|
91
|
-
The block:
|
|
92
|
-
|
|
93
|
-
```markdown
|
|
94
|
-
## Agent skills
|
|
95
|
-
|
|
96
|
-
### Issue tracker
|
|
97
|
-
|
|
98
|
-
[one-line summary of where issues are tracked]. See `docs/agents/issue-tracker.md`.
|
|
99
|
-
|
|
100
|
-
### Triage labels
|
|
101
|
-
|
|
102
|
-
[one-line summary of the label vocabulary]. See `docs/agents/triage-labels.md`.
|
|
103
|
-
|
|
104
|
-
### Domain docs
|
|
105
|
-
|
|
106
|
-
[one-line summary of layout — "single-context" or "multi-context"]. See `docs/agents/domain.md`.
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Then write the three docs files using the seed templates in this skill folder as a starting point:
|
|
110
|
-
|
|
111
|
-
- [issue-tracker-github.md](./issue-tracker-github.md) — GitHub issue tracker
|
|
112
|
-
- [issue-tracker-gitlab.md](./issue-tracker-gitlab.md) — GitLab issue tracker
|
|
113
|
-
- [issue-tracker-local.md](./issue-tracker-local.md) — local-markdown issue tracker
|
|
114
|
-
- [triage-labels.md](./triage-labels.md) — label mapping
|
|
115
|
-
- [domain.md](./domain.md) — domain doc consumer rules + layout
|
|
116
|
-
|
|
117
|
-
For "other" issue trackers, write `docs/agents/issue-tracker.md` from scratch using the user's description.
|
|
118
|
-
|
|
119
|
-
### 5. Done
|
|
120
|
-
|
|
121
|
-
Tell the user the setup is complete and which engineering skills will now read from these files. Mention they can edit `docs/agents/*.md` directly later — re-running this skill is only necessary if they want to switch issue trackers or restart from scratch.
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Domain Docs
|
|
2
|
-
|
|
3
|
-
How the engineering skills should consume this repo's domain documentation when exploring the codebase.
|
|
4
|
-
|
|
5
|
-
## Before exploring, read these
|
|
6
|
-
|
|
7
|
-
- **`CONTEXT.md`** at the repo root, or
|
|
8
|
-
- **`CONTEXT-MAP.md`** at the repo root if it exists — it points at one `CONTEXT.md` per context. Read each one relevant to the topic.
|
|
9
|
-
- **`docs/adr/`** — read ADRs that touch the area you're about to work in. In multi-context repos, also check `src/<context>/docs/adr/` for context-scoped decisions.
|
|
10
|
-
|
|
11
|
-
If any of these files don't exist, **proceed silently**. Don't flag their absence; don't suggest creating them upfront. The producer skill (`/grill-with-docs`) creates them lazily when terms or decisions actually get resolved.
|
|
12
|
-
|
|
13
|
-
## File structure
|
|
14
|
-
|
|
15
|
-
Single-context repo (most repos):
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
/
|
|
19
|
-
├── CONTEXT.md
|
|
20
|
-
├── docs/adr/
|
|
21
|
-
│ ├── 0001-event-sourced-orders.md
|
|
22
|
-
│ └── 0002-postgres-for-write-model.md
|
|
23
|
-
└── src/
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Multi-context repo (presence of `CONTEXT-MAP.md` at the root):
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
/
|
|
30
|
-
├── CONTEXT-MAP.md
|
|
31
|
-
├── docs/adr/ ← system-wide decisions
|
|
32
|
-
└── src/
|
|
33
|
-
├── ordering/
|
|
34
|
-
│ ├── CONTEXT.md
|
|
35
|
-
│ └── docs/adr/ ← context-specific decisions
|
|
36
|
-
└── billing/
|
|
37
|
-
├── CONTEXT.md
|
|
38
|
-
└── docs/adr/
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Use the glossary's vocabulary
|
|
42
|
-
|
|
43
|
-
When your output names a domain concept (in an issue title, a refactor proposal, a hypothesis, a test name), use the term as defined in `CONTEXT.md`. Don't drift to synonyms the glossary explicitly avoids.
|
|
44
|
-
|
|
45
|
-
If the concept you need isn't in the glossary yet, that's a signal — either you're inventing language the project doesn't use (reconsider) or there's a real gap (note it for `/grill-with-docs`).
|
|
46
|
-
|
|
47
|
-
## Flag ADR conflicts
|
|
48
|
-
|
|
49
|
-
If your output contradicts an existing ADR, surface it explicitly rather than silently overriding:
|
|
50
|
-
|
|
51
|
-
> _Contradicts ADR-0007 (event-sourced orders) — but worth reopening because…_
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# Issue tracker: GitHub
|
|
2
|
-
|
|
3
|
-
Issues and PRDs for this repo live as GitHub issues. Use the `gh` CLI for all operations.
|
|
4
|
-
|
|
5
|
-
## Conventions
|
|
6
|
-
|
|
7
|
-
- **Create an issue**: `gh issue create --title "..." --body "..."`. Use a heredoc for multi-line bodies.
|
|
8
|
-
- **Read an issue**: `gh issue view <number> --comments`, filtering comments by `jq` and also fetching labels.
|
|
9
|
-
- **List issues**: `gh issue list --state open --json number,title,body,labels,comments --jq '[.[] | {number, title, body, labels: [.labels[].name], comments: [.comments[].body]}]'` with appropriate `--label` and `--state` filters.
|
|
10
|
-
- **Comment on an issue**: `gh issue comment <number> --body "..."`
|
|
11
|
-
- **Apply / remove labels**: `gh issue edit <number> --add-label "..."` / `--remove-label "..."`
|
|
12
|
-
- **Close**: `gh issue close <number> --comment "..."`
|
|
13
|
-
|
|
14
|
-
Infer the repo from `git remote -v` — `gh` does this automatically when run inside a clone.
|
|
15
|
-
|
|
16
|
-
## When a skill says "publish to the issue tracker"
|
|
17
|
-
|
|
18
|
-
Create a GitHub issue.
|
|
19
|
-
|
|
20
|
-
## When a skill says "fetch the relevant ticket"
|
|
21
|
-
|
|
22
|
-
Run `gh issue view <number> --comments`.
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# Issue tracker: GitLab
|
|
2
|
-
|
|
3
|
-
Issues and PRDs for this repo live as GitLab issues. Use the [`glab`](https://gitlab.com/gitlab-org/cli) CLI for all operations.
|
|
4
|
-
|
|
5
|
-
## Conventions
|
|
6
|
-
|
|
7
|
-
- **Create an issue**: `glab issue create --title "..." --description "..."`. Use a heredoc for multi-line descriptions. Pass `--description -` to open an editor.
|
|
8
|
-
- **Read an issue**: `glab issue view <number> --comments`. Use `-F json` for machine-readable output.
|
|
9
|
-
- **List issues**: `glab issue list -F json` with appropriate `--label` filters.
|
|
10
|
-
- **Comment on an issue**: `glab issue note <number> --message "..."`. GitLab calls comments "notes".
|
|
11
|
-
- **Apply / remove labels**: `glab issue update <number> --label "..."` / `--unlabel "..."`. Multiple labels can be comma-separated or by repeating the flag.
|
|
12
|
-
- **Close**: `glab issue close <number>`. `glab issue close` does not accept a closing comment, so post the explanation first with `glab issue note <number> --message "..."`, then close.
|
|
13
|
-
- **Merge requests**: GitLab calls PRs "merge requests". Use `glab mr create`, `glab mr view`, `glab mr note`, etc. — the same shape as `gh pr ...` with `mr` in place of `pr` and `note`/`--message` in place of `comment`/`--body`.
|
|
14
|
-
|
|
15
|
-
Infer the repo from `git remote -v` — `glab` does this automatically when run inside a clone.
|
|
16
|
-
|
|
17
|
-
## When a skill says "publish to the issue tracker"
|
|
18
|
-
|
|
19
|
-
Create a GitLab issue.
|
|
20
|
-
|
|
21
|
-
## When a skill says "fetch the relevant ticket"
|
|
22
|
-
|
|
23
|
-
Run `glab issue view <number> --comments`.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Issue tracker: Local Markdown
|
|
2
|
-
|
|
3
|
-
Issues and PRDs for this repo live as markdown files in `.scratch/`.
|
|
4
|
-
|
|
5
|
-
## Conventions
|
|
6
|
-
|
|
7
|
-
- One feature per directory: `.scratch/<feature-slug>/`
|
|
8
|
-
- The PRD is `.scratch/<feature-slug>/PRD.md`
|
|
9
|
-
- Implementation issues are `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01`
|
|
10
|
-
- Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)
|
|
11
|
-
- Comments and conversation history append to the bottom of the file under a `## Comments` heading
|
|
12
|
-
|
|
13
|
-
## When a skill says "publish to the issue tracker"
|
|
14
|
-
|
|
15
|
-
Create a new file under `.scratch/<feature-slug>/` (creating the directory if needed).
|
|
16
|
-
|
|
17
|
-
## When a skill says "fetch the relevant ticket"
|
|
18
|
-
|
|
19
|
-
Read the file at the referenced path. The user will normally pass the path or the issue number directly.
|