ai-engineering-kit 0.4.0 → 0.6.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 +2 -2
- package/dist/cli.js +107 -42
- package/package.json +1 -1
- package/template/agents/claude-code.CLAUDE.md +3 -3
- package/template/agents/codex.AGENTS.md +3 -3
- package/template/docs/debt/README.md +5 -0
- package/template/docs/operations/README.md +5 -0
- package/template/docs/references/README.md +5 -0
- package/template/docs/system/README.md +5 -0
- 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,9 +7,9 @@
|
|
|
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
|
-
- **A structured workspace** — `ai/` for ephemeral artifacts (brainstorms, PRDs, plans, reviews) and `docs
|
|
12
|
+
- **A structured workspace** — `ai/` for ephemeral artifacts (brainstorms, PRDs, plans, reviews) and `docs/` for durable knowledge: `foundations/` (vision, guidelines, decisions) plus `system/`, `references/`, `operations/`, and `debt/`.
|
|
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.
|
|
14
14
|
|
|
15
15
|
## Quickstart
|
package/dist/cli.js
CHANGED
|
@@ -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
|
},
|
|
@@ -54,10 +54,10 @@ var CATEGORIES = [
|
|
|
54
54
|
var TREE_COMPONENTS = [
|
|
55
55
|
{
|
|
56
56
|
id: "docs-foundations",
|
|
57
|
-
label: "
|
|
58
|
-
hint: "
|
|
59
|
-
from: "docs
|
|
60
|
-
to: "docs
|
|
57
|
+
label: "Project docs",
|
|
58
|
+
hint: "docs/ scaffold: foundations stubs + system, references, operations, debt",
|
|
59
|
+
from: "docs",
|
|
60
|
+
to: "docs"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
id: "ai-workspace",
|
|
@@ -211,7 +211,7 @@ function planUntracked(_file, onDisk) {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
// src/io/project.ts
|
|
214
|
-
import { existsSync, readFileSync as readFileSync2 } from "fs";
|
|
214
|
+
import { existsSync, readFileSync as readFileSync2, writeFileSync } from "fs";
|
|
215
215
|
import { join as join2 } from "path";
|
|
216
216
|
var MANIFEST_FILE = ".ai-kit.json";
|
|
217
217
|
function readManifest(projectDir) {
|
|
@@ -219,6 +219,9 @@ function readManifest(projectDir) {
|
|
|
219
219
|
if (!existsSync(path)) return null;
|
|
220
220
|
return parseManifest(readFileSync2(path, "utf8"));
|
|
221
221
|
}
|
|
222
|
+
function writeManifest(projectDir, manifest) {
|
|
223
|
+
writeFileSync(join2(projectDir, MANIFEST_FILE), serializeManifest(manifest));
|
|
224
|
+
}
|
|
222
225
|
function readOnDiskHashes(projectDir, files) {
|
|
223
226
|
const hashes = /* @__PURE__ */ new Map();
|
|
224
227
|
for (const file of files) {
|
|
@@ -229,11 +232,11 @@ function readOnDiskHashes(projectDir, files) {
|
|
|
229
232
|
}
|
|
230
233
|
|
|
231
234
|
// src/applier/applier.ts
|
|
232
|
-
import { writeFileSync as
|
|
235
|
+
import { writeFileSync as writeFileSync3 } from "fs";
|
|
233
236
|
import { join as join4 } from "path";
|
|
234
237
|
|
|
235
238
|
// src/applier/write.ts
|
|
236
|
-
import { mkdirSync, readFileSync as readFileSync3, writeFileSync } from "fs";
|
|
239
|
+
import { mkdirSync, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "fs";
|
|
237
240
|
import { dirname, join as join3 } from "path";
|
|
238
241
|
function writeTemplateFile(projectDir, templateDir, file, projectName, suffix = "") {
|
|
239
242
|
const raw = readFileSync3(join3(templateDir, file.templatePath), "utf8");
|
|
@@ -241,7 +244,7 @@ function writeTemplateFile(projectDir, templateDir, file, projectName, suffix =
|
|
|
241
244
|
const targetPath = file.targetPath + suffix;
|
|
242
245
|
const dest = join3(projectDir, targetPath);
|
|
243
246
|
mkdirSync(dirname(dest), { recursive: true });
|
|
244
|
-
|
|
247
|
+
writeFileSync2(dest, content);
|
|
245
248
|
return targetPath;
|
|
246
249
|
}
|
|
247
250
|
|
|
@@ -280,7 +283,7 @@ function applyPlan(input) {
|
|
|
280
283
|
categories: input.selection.categories,
|
|
281
284
|
files: entries
|
|
282
285
|
};
|
|
283
|
-
|
|
286
|
+
writeFileSync3(join4(input.projectDir, MANIFEST_FILE), serializeManifest(manifest));
|
|
284
287
|
return { written, manifest };
|
|
285
288
|
}
|
|
286
289
|
|
|
@@ -426,10 +429,6 @@ async function promptForSelection(projectDir) {
|
|
|
426
429
|
return { selection, projectName };
|
|
427
430
|
}
|
|
428
431
|
|
|
429
|
-
// src/applier/update.ts
|
|
430
|
-
import { writeFileSync as writeFileSync3 } from "fs";
|
|
431
|
-
import { join as join7 } from "path";
|
|
432
|
-
|
|
433
432
|
// src/applier/resolve.ts
|
|
434
433
|
function conflictOps(choice) {
|
|
435
434
|
switch (choice) {
|
|
@@ -506,6 +505,10 @@ function applyUpdate(input) {
|
|
|
506
505
|
entries.push(prior);
|
|
507
506
|
}
|
|
508
507
|
}
|
|
508
|
+
const covered = new Set(input.files.map((f) => f.targetPath));
|
|
509
|
+
for (const prior of input.priorManifest.files) {
|
|
510
|
+
if (!covered.has(prior.path)) entries.push(prior);
|
|
511
|
+
}
|
|
509
512
|
const manifest = {
|
|
510
513
|
version: input.version,
|
|
511
514
|
agents: input.selection.agents,
|
|
@@ -513,10 +516,45 @@ function applyUpdate(input) {
|
|
|
513
516
|
categories: input.selection.categories,
|
|
514
517
|
files: entries
|
|
515
518
|
};
|
|
516
|
-
|
|
519
|
+
writeManifest(input.projectDir, manifest);
|
|
517
520
|
return { written, manifest };
|
|
518
521
|
}
|
|
519
522
|
|
|
523
|
+
// src/applier/prune.ts
|
|
524
|
+
import { existsSync as existsSync3, readFileSync as readFileSync5, rmSync, readdirSync as readdirSync2, rmdirSync } from "fs";
|
|
525
|
+
import { dirname as dirname3, join as join7 } from "path";
|
|
526
|
+
function findOrphans(manifest, catalog) {
|
|
527
|
+
const inCatalog = new Set(catalog.files.map((f) => f.targetPath));
|
|
528
|
+
return manifest.files.filter((f) => f.status === "managed" && !inCatalog.has(f.path));
|
|
529
|
+
}
|
|
530
|
+
function pruneOrphans(projectDir, orphans) {
|
|
531
|
+
const result = { deleted: [], keptEdited: [] };
|
|
532
|
+
for (const orphan of orphans) {
|
|
533
|
+
const path = join7(projectDir, orphan.path);
|
|
534
|
+
if (!existsSync3(path)) continue;
|
|
535
|
+
if (hashContent(readFileSync5(path, "utf8")) !== orphan.hash) {
|
|
536
|
+
result.keptEdited.push(orphan.path);
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
539
|
+
rmSync(path);
|
|
540
|
+
removeEmptyDirs(projectDir, dirname3(path));
|
|
541
|
+
result.deleted.push(orphan.path);
|
|
542
|
+
}
|
|
543
|
+
const resolved = new Set(orphans.map((o) => o.path));
|
|
544
|
+
const manifest = readManifest(projectDir);
|
|
545
|
+
if (manifest) {
|
|
546
|
+
writeManifest(projectDir, { ...manifest, files: manifest.files.filter((f) => !resolved.has(f.path)) });
|
|
547
|
+
}
|
|
548
|
+
return result;
|
|
549
|
+
}
|
|
550
|
+
function removeEmptyDirs(root, dir) {
|
|
551
|
+
let current = dir;
|
|
552
|
+
while (current !== root && existsSync3(current) && readdirSync2(current).length === 0) {
|
|
553
|
+
rmdirSync(current);
|
|
554
|
+
current = dirname3(current);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
|
|
520
558
|
// src/cli.ts
|
|
521
559
|
var EMPTY_SELECTION = { components: [], categories: [], agents: [] };
|
|
522
560
|
function fullSelection() {
|
|
@@ -593,7 +631,7 @@ function formatSummary(summary) {
|
|
|
593
631
|
function successOutro(verb, written, selection) {
|
|
594
632
|
if (selection.components.includes("skills")) {
|
|
595
633
|
note(
|
|
596
|
-
"Open your coding agent in this project and run a skill:\n setup-foundations fill in docs/foundations\n
|
|
634
|
+
"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
635
|
"Next steps"
|
|
598
636
|
);
|
|
599
637
|
}
|
|
@@ -657,31 +695,34 @@ async function runReRun(projectDir) {
|
|
|
657
695
|
const applicable = {
|
|
658
696
|
actions: prepared.plan.actions.filter((a) => prepared.applyTypes.has(a.type))
|
|
659
697
|
};
|
|
698
|
+
const orphans = findOrphans(manifest, prepared.catalog);
|
|
660
699
|
const pending = applicable.actions.filter((a) => a.type !== "skip").length;
|
|
661
|
-
if (pending === 0) {
|
|
700
|
+
if (pending === 0 && orphans.length === 0) {
|
|
662
701
|
outro("Already up to date \u2014 nothing to do.");
|
|
663
702
|
return;
|
|
664
703
|
}
|
|
665
|
-
note(formatSummary(summarize(prepared.files, applicable)), mode === "add" ? "This will add" : "This will update");
|
|
666
704
|
const resolutions = /* @__PURE__ */ new Map();
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
705
|
+
if (pending > 0) {
|
|
706
|
+
note(formatSummary(summarize(prepared.files, applicable)), mode === "add" ? "This will add" : "This will update");
|
|
707
|
+
const conflicts = applicable.actions.filter((a) => a.type === "conflict");
|
|
708
|
+
for (const [index, action] of conflicts.entries()) {
|
|
709
|
+
const choice = bail(
|
|
710
|
+
await select2({
|
|
711
|
+
message: `Conflict ${index + 1}/${conflicts.length}: you edited ${action.path}, and a newer version exists.`,
|
|
712
|
+
options: [
|
|
713
|
+
{ value: "keep-mine", label: "Keep mine", hint: "discard the update for this file" },
|
|
714
|
+
{ value: "overwrite", label: "Use the new version", hint: "replace your file" },
|
|
715
|
+
{ value: "keep-theirs", label: "Keep mine + save theirs", hint: `writes ${basename3(action.path)}.new` }
|
|
716
|
+
]
|
|
717
|
+
})
|
|
718
|
+
);
|
|
719
|
+
resolutions.set(action.path, choice);
|
|
720
|
+
}
|
|
721
|
+
const proceed = await confirm({ message: `Apply ${pending} changes in ${projectDir}?` });
|
|
722
|
+
if (isCancel2(proceed) || !proceed) {
|
|
723
|
+
outro("Nothing written.");
|
|
724
|
+
return;
|
|
725
|
+
}
|
|
685
726
|
}
|
|
686
727
|
const result = applyUpdate({
|
|
687
728
|
projectDir,
|
|
@@ -695,6 +736,16 @@ async function runReRun(projectDir) {
|
|
|
695
736
|
projectName,
|
|
696
737
|
applyTypes: prepared.applyTypes
|
|
697
738
|
});
|
|
739
|
+
if (orphans.length > 0) {
|
|
740
|
+
note(orphans.map((o) => ` ${o.path}`).join("\n"), `${orphans.length} file(s) no longer in the kit`);
|
|
741
|
+
const doPrune = await confirm({ message: `Delete ${orphans.length} removed file(s) from disk?` });
|
|
742
|
+
if (!isCancel2(doPrune) && doPrune) {
|
|
743
|
+
const pruned = pruneOrphans(projectDir, orphans);
|
|
744
|
+
if (pruned.keptEdited.length > 0) {
|
|
745
|
+
note(pruned.keptEdited.map((p) => ` ${p}`).join("\n"), "Kept \u2014 you edited these");
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
698
749
|
successOutro(mode === "add" ? "Added" : "Updated", result.written.length, prepared.selection);
|
|
699
750
|
}
|
|
700
751
|
async function runInteractive() {
|
|
@@ -717,7 +768,7 @@ async function runInteractive() {
|
|
|
717
768
|
if (!reportConflict(error)) throw error;
|
|
718
769
|
}
|
|
719
770
|
}
|
|
720
|
-
function performReRun(projectDir, mode, addParts) {
|
|
771
|
+
function performReRun(projectDir, mode, addParts, prune) {
|
|
721
772
|
const manifest = readManifest(projectDir);
|
|
722
773
|
if (!manifest) {
|
|
723
774
|
console.error("Not an ai-engineering-kit project (no .ai-kit.json). Run `ai-engineering-kit init` first.");
|
|
@@ -725,6 +776,7 @@ function performReRun(projectDir, mode, addParts) {
|
|
|
725
776
|
return;
|
|
726
777
|
}
|
|
727
778
|
const prepared = prepareReRun({ projectDir, manifest, mode, addParts });
|
|
779
|
+
const orphans = findOrphans(manifest, prepared.catalog);
|
|
728
780
|
const result = applyUpdate({
|
|
729
781
|
projectDir,
|
|
730
782
|
templateDir: prepared.templateDir,
|
|
@@ -739,9 +791,22 @@ function performReRun(projectDir, mode, addParts) {
|
|
|
739
791
|
applyTypes: prepared.applyTypes
|
|
740
792
|
});
|
|
741
793
|
console.log(`${result.written.length} files written. Edited files were kept (use the interactive flow to resolve).`);
|
|
794
|
+
if (orphans.length === 0) return;
|
|
795
|
+
if (prune) {
|
|
796
|
+
const pruned = pruneOrphans(projectDir, orphans);
|
|
797
|
+
console.log(`Pruned ${pruned.deleted.length} file(s) no longer in the kit.`);
|
|
798
|
+
if (pruned.keptEdited.length > 0) {
|
|
799
|
+
console.log(`Kept ${pruned.keptEdited.length} you edited: ${pruned.keptEdited.join(", ")}`);
|
|
800
|
+
}
|
|
801
|
+
} else {
|
|
802
|
+
console.log(`
|
|
803
|
+
${orphans.length} file(s) are no longer in the kit:`);
|
|
804
|
+
for (const o of orphans) console.log(` ${o.path}`);
|
|
805
|
+
console.log("Run again with --prune to remove them.");
|
|
806
|
+
}
|
|
742
807
|
}
|
|
743
|
-
function update() {
|
|
744
|
-
performReRun(process.cwd(), "update", EMPTY_SELECTION);
|
|
808
|
+
function update(args) {
|
|
809
|
+
performReRun(process.cwd(), "update", EMPTY_SELECTION, args.includes("--prune"));
|
|
745
810
|
}
|
|
746
811
|
function add(args) {
|
|
747
812
|
const addParts = {
|
|
@@ -749,20 +814,20 @@ function add(args) {
|
|
|
749
814
|
categories: parseList(args, "--categories") ?? [],
|
|
750
815
|
agents: parseList(args, "--agents") ?? []
|
|
751
816
|
};
|
|
752
|
-
performReRun(process.cwd(), "add", addParts);
|
|
817
|
+
performReRun(process.cwd(), "add", addParts, false);
|
|
753
818
|
}
|
|
754
819
|
async function main(argv) {
|
|
755
820
|
const args = argv.slice(2);
|
|
756
821
|
if (args.includes("--dry-run")) return dryRun(args);
|
|
757
822
|
if (args[0] === "init") return init(args.slice(1));
|
|
758
|
-
if (args[0] === "update") return update();
|
|
823
|
+
if (args[0] === "update") return update(args.slice(1));
|
|
759
824
|
if (args[0] === "add") return add(args.slice(1));
|
|
760
825
|
if (args.length === 0) return runInteractive();
|
|
761
826
|
console.log("ai-engineering-kit");
|
|
762
827
|
console.log("\nUsage:");
|
|
763
828
|
console.log(" ai-engineering-kit # interactive install or update");
|
|
764
829
|
console.log(" ai-engineering-kit init [--name <project>] [--all | --components a,b --categories x --agents y]");
|
|
765
|
-
console.log(" ai-engineering-kit update
|
|
830
|
+
console.log(" ai-engineering-kit update [--prune] # refresh to latest; --prune removes skills dropped from the kit");
|
|
766
831
|
console.log(" ai-engineering-kit add --components a,b [--categories x] [--agents y]");
|
|
767
832
|
console.log(" ai-engineering-kit --dry-run [--all | --components a,b --categories x --agents y]");
|
|
768
833
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-engineering-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.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.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Debt
|
|
2
|
+
|
|
3
|
+
Structured registries of deferred or known work — shortcuts taken, follow-ups owed, known limitations.
|
|
4
|
+
|
|
5
|
+
Starts empty. Record debt here so it's visible and trackable rather than lost in scattered code comments. Note what was deferred, why, and what would need to change to pay it down.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Operations
|
|
2
|
+
|
|
3
|
+
Runbooks — what a human should do when something needs manual action: incidents, migrations, recovery, routine maintenance.
|
|
4
|
+
|
|
5
|
+
Starts empty. Add a runbook per procedure, written as numbered steps someone can follow under pressure without re-deriving the process.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# References
|
|
2
|
+
|
|
3
|
+
How external systems we integrate with work — vendor APIs, protocols, third-party quirks and gotchas.
|
|
4
|
+
|
|
5
|
+
Starts empty. Add a document per external system as you integrate it, capturing the parts that aren't obvious from the vendor's own docs (auth flows, rate limits, edge cases you hit).
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# System
|
|
2
|
+
|
|
3
|
+
How our own code works — per-flow specs, event/contract conventions, sequence notes.
|
|
4
|
+
|
|
5
|
+
Starts empty. Promote knowledge here as it stabilises: one document per flow or subsystem, so the next agent (or person) can understand a piece of the system without re-reading all the code.
|
|
@@ -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`.
|