ai-engineering-kit 0.2.0 → 0.3.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/dist/cli.js
CHANGED
|
@@ -22,29 +22,77 @@ function parseManifest(json) {
|
|
|
22
22
|
|
|
23
23
|
// src/catalog/definition.ts
|
|
24
24
|
var CATEGORIES = [
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
{
|
|
26
|
+
id: "core-workflow",
|
|
27
|
+
label: "Core workflow",
|
|
28
|
+
hint: "End-to-end loop: kickoff \u2192 PRD \u2192 plan \u2192 implement \u2192 review \u2192 verify",
|
|
29
|
+
from: "skills/core-workflow",
|
|
30
|
+
to: "ai/skills"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "engineering",
|
|
34
|
+
label: "Engineering",
|
|
35
|
+
hint: "Daily coding skills \u2014 TDD, debugging, triage, architecture (from mattpocock/skills)",
|
|
36
|
+
from: "skills/engineering",
|
|
37
|
+
to: "ai/skills"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: "productivity",
|
|
41
|
+
label: "Productivity",
|
|
42
|
+
hint: "Workflow helpers \u2014 grilling, handoff, teaching, concise mode (from mattpocock/skills)",
|
|
43
|
+
from: "skills/productivity",
|
|
44
|
+
to: "ai/skills"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "misc",
|
|
48
|
+
label: "Misc",
|
|
49
|
+
hint: "Occasional utilities \u2014 git guardrails, pre-commit, scaffolding (from mattpocock/skills)",
|
|
50
|
+
from: "skills/misc",
|
|
51
|
+
to: "ai/skills"
|
|
52
|
+
}
|
|
29
53
|
];
|
|
30
54
|
var TREE_COMPONENTS = [
|
|
31
|
-
{
|
|
32
|
-
|
|
55
|
+
{
|
|
56
|
+
id: "docs-foundations",
|
|
57
|
+
label: "Foundation docs",
|
|
58
|
+
hint: "Starter docs for product vision, guidelines, and technical decisions (docs/foundations/)",
|
|
59
|
+
from: "docs/foundations",
|
|
60
|
+
to: "docs/foundations"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: "ai-workspace",
|
|
64
|
+
label: "Workspace folders",
|
|
65
|
+
hint: "Folders the skills write to: brainstorms, PRDs, plans, reviews (ai/)",
|
|
66
|
+
from: "ai-workspace",
|
|
67
|
+
to: "ai"
|
|
68
|
+
}
|
|
33
69
|
];
|
|
34
70
|
var COMPONENTS = [
|
|
35
|
-
{
|
|
36
|
-
|
|
37
|
-
|
|
71
|
+
{
|
|
72
|
+
id: "skills",
|
|
73
|
+
label: "Skills",
|
|
74
|
+
hint: "Reusable AI playbooks the agent runs on demand (plan, implement, review, debug\u2026)",
|
|
75
|
+
unlocks: "categories"
|
|
76
|
+
},
|
|
77
|
+
...TREE_COMPONENTS.map((t) => ({ id: t.id, label: t.label, hint: t.hint })),
|
|
78
|
+
{
|
|
79
|
+
id: "entry-files",
|
|
80
|
+
label: "Agent entry files",
|
|
81
|
+
hint: "Instruction files that wire your coding agent to the skills (CLAUDE.md / AGENTS.md)",
|
|
82
|
+
unlocks: "agents"
|
|
83
|
+
}
|
|
38
84
|
];
|
|
39
85
|
var AGENTS = [
|
|
40
86
|
{
|
|
41
87
|
id: "claude-code",
|
|
42
88
|
label: "Claude Code",
|
|
89
|
+
hint: "Adds CLAUDE.md + a .claude/skills/ symlink for native skill discovery",
|
|
43
90
|
files: [{ from: "agents/claude-code.CLAUDE.md", to: "CLAUDE.md", substitute: true }]
|
|
44
91
|
},
|
|
45
92
|
{
|
|
46
93
|
id: "codex",
|
|
47
94
|
label: "Codex",
|
|
95
|
+
hint: "Adds AGENTS.md referencing ai/skills/",
|
|
48
96
|
files: [{ from: "agents/codex.AGENTS.md", to: "AGENTS.md", substitute: true }]
|
|
49
97
|
}
|
|
50
98
|
];
|
|
@@ -295,13 +343,13 @@ import { multiselect, text, isCancel, cancel } from "@clack/prompts";
|
|
|
295
343
|
|
|
296
344
|
// src/menu/menu.ts
|
|
297
345
|
function componentOptions() {
|
|
298
|
-
return COMPONENTS.map((c) => ({ value: c.id, label: c.label }));
|
|
346
|
+
return COMPONENTS.map((c) => ({ value: c.id, label: c.label, hint: c.hint }));
|
|
299
347
|
}
|
|
300
348
|
function categoryOptions() {
|
|
301
|
-
return CATEGORIES.map((c) => ({ value: c.id, label: c.label }));
|
|
349
|
+
return CATEGORIES.map((c) => ({ value: c.id, label: c.label, hint: c.hint }));
|
|
302
350
|
}
|
|
303
351
|
function agentOptions() {
|
|
304
|
-
return AGENTS.map((a) => ({ value: a.id, label: a.label }));
|
|
352
|
+
return AGENTS.map((a) => ({ value: a.id, label: a.label, hint: a.hint }));
|
|
305
353
|
}
|
|
306
354
|
function buildSelection(answers) {
|
|
307
355
|
return {
|
|
@@ -319,33 +367,26 @@ function required(value) {
|
|
|
319
367
|
}
|
|
320
368
|
return value;
|
|
321
369
|
}
|
|
322
|
-
|
|
323
|
-
|
|
370
|
+
var allValues = (options) => options.map((o) => o.value);
|
|
371
|
+
async function pickAll(message, options) {
|
|
372
|
+
return required(
|
|
324
373
|
await multiselect({
|
|
325
|
-
message:
|
|
326
|
-
options
|
|
374
|
+
message: `${message} (everything is pre-selected \u2014 toggle off what you don't want)`,
|
|
375
|
+
options,
|
|
376
|
+
initialValues: allValues(options),
|
|
327
377
|
required: true
|
|
328
378
|
})
|
|
329
379
|
);
|
|
380
|
+
}
|
|
381
|
+
async function promptForSelection(projectDir) {
|
|
382
|
+
const components = await pickAll("Which parts do you want to install?", componentOptions());
|
|
330
383
|
let categories = [];
|
|
331
384
|
if (components.includes("skills")) {
|
|
332
|
-
categories =
|
|
333
|
-
await multiselect({
|
|
334
|
-
message: "Which skill categories?",
|
|
335
|
-
options: categoryOptions(),
|
|
336
|
-
required: true
|
|
337
|
-
})
|
|
338
|
-
);
|
|
385
|
+
categories = await pickAll("Which skill categories?", categoryOptions());
|
|
339
386
|
}
|
|
340
387
|
let agents = [];
|
|
341
388
|
if (components.includes("entry-files")) {
|
|
342
|
-
agents =
|
|
343
|
-
await multiselect({
|
|
344
|
-
message: "Which coding agents?",
|
|
345
|
-
options: agentOptions(),
|
|
346
|
-
required: true
|
|
347
|
-
})
|
|
348
|
-
);
|
|
389
|
+
agents = await pickAll("Which coding agents?", agentOptions());
|
|
349
390
|
}
|
|
350
391
|
const projectName = required(
|
|
351
392
|
await text({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-engineering-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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",
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: commit-organizer
|
|
3
|
+
description: Analyze all code changes across one or more repos and organize them into logical, separate conventional commits. Use when you have many unstaged/staged changes and want clean, atomic commits instead of one big commit.
|
|
4
|
+
argument-hint: "[repo-path]"
|
|
5
|
+
allowed-tools: Read, Bash(git *), Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Commit Organizer
|
|
9
|
+
|
|
10
|
+
Analyze all code changes (staged and unstaged) in the current directory. If the directory contains multiple git repos (a workspace root), analyze each repo independently. Organize changes into logical, atomic conventional commits.
|
|
11
|
+
|
|
12
|
+
## How It Works
|
|
13
|
+
|
|
14
|
+
1. Detect whether the current directory is a git repo or a workspace containing multiple repos
|
|
15
|
+
2. For each repo, collect all modified, added, and untracked files
|
|
16
|
+
3. Read the diffs and new file contents to understand what each change does
|
|
17
|
+
4. Group related changes into logical commit units (e.g., a permission change + its test = one commit)
|
|
18
|
+
5. Order commits so dependencies come first
|
|
19
|
+
6. Present the commit plan to the user for approval
|
|
20
|
+
7. Execute the commits one by one
|
|
21
|
+
|
|
22
|
+
## Commit Message Rules
|
|
23
|
+
|
|
24
|
+
- Use conventional commits: `type(scope): description`
|
|
25
|
+
- Types: `feat`, `fix`, `refactor`, `style`, `docs`, `test`, `chore`
|
|
26
|
+
- One line only, max 72 characters
|
|
27
|
+
- Describe WHAT the change does from the user's perspective, not HOW
|
|
28
|
+
- Use imperative mood: "add", "fix", "ensure", "change", not "added", "fixes"
|
|
29
|
+
- Be specific — name the feature, the bug, the thing that changed
|
|
30
|
+
|
|
31
|
+
### Good Examples
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
feat: add per-card CSV export to Insights dashboard cards
|
|
35
|
+
feat: ensure bulk data export is only available to superAdmin users
|
|
36
|
+
fix: use YYYY/MM/DD date format in all CSV exports
|
|
37
|
+
refactor: extract shared RQS value mapping to exportUtils
|
|
38
|
+
feat: add export audit log with search and pagination
|
|
39
|
+
chore: add i18n keys for export and audit log UI
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Bad Examples
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
update code # too vague
|
|
46
|
+
feat: changes to export # what changes?
|
|
47
|
+
fix: fix bug # what bug?
|
|
48
|
+
feat: add new feature # what feature?
|
|
49
|
+
refactor: refactor stuff # what stuff?
|
|
50
|
+
feat: implement export refactoring # describes the task, not the change
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Grouping Strategy
|
|
54
|
+
|
|
55
|
+
Group changes into commits by **logical intent**, not by file type:
|
|
56
|
+
|
|
57
|
+
- A backend permission change + frontend visibility change for the same feature = ONE commit
|
|
58
|
+
- A new utility file + the component that uses it = ONE commit (if tightly coupled)
|
|
59
|
+
- i18n keys can be grouped with the feature that uses them, or in a separate commit if they span multiple features
|
|
60
|
+
- Unrelated changes to different features = SEPARATE commits
|
|
61
|
+
- A new GraphQL schema + resolver + frontend query/mutation for one feature = ONE commit
|
|
62
|
+
|
|
63
|
+
When in doubt, prefer fewer, more meaningful commits over many tiny ones.
|
|
64
|
+
|
|
65
|
+
## Execution
|
|
66
|
+
|
|
67
|
+
### Step 1: Detect Repos
|
|
68
|
+
|
|
69
|
+
If `$ARGUMENTS` is provided, use it as the path. Otherwise use the current working directory.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
# Check if current dir is a git repo
|
|
73
|
+
git rev-parse --git-dir 2>/dev/null
|
|
74
|
+
|
|
75
|
+
# If not, find git repos one level deep (workspace mode)
|
|
76
|
+
for dir in */; do
|
|
77
|
+
if [ -d "$dir/.git" ]; then
|
|
78
|
+
echo "$dir"
|
|
79
|
+
fi
|
|
80
|
+
done
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Step 2: Collect Changes Per Repo
|
|
84
|
+
|
|
85
|
+
For each repo, run:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git status -u # all changes including untracked (never use -uall)
|
|
89
|
+
git diff # unstaged changes
|
|
90
|
+
git diff --cached # staged changes
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
For untracked files, read their contents to understand what they add.
|
|
94
|
+
|
|
95
|
+
### Step 3: Analyze and Group
|
|
96
|
+
|
|
97
|
+
Read all diffs and new files. For each change, determine:
|
|
98
|
+
- What feature or concern does this belong to?
|
|
99
|
+
- Is it a feat, fix, refactor, style, docs, test, or chore?
|
|
100
|
+
- What other changes is it related to?
|
|
101
|
+
|
|
102
|
+
Group into commit units. Each unit has:
|
|
103
|
+
- A list of files to stage
|
|
104
|
+
- A commit message
|
|
105
|
+
- A brief rationale (for the user to review)
|
|
106
|
+
|
|
107
|
+
### Step 4: Present Plan
|
|
108
|
+
|
|
109
|
+
Show the user a numbered list of proposed commits in order:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
Repository: cliezen-graph
|
|
113
|
+
|
|
114
|
+
1. feat: restrict bulk CSV export to superAdmin users
|
|
115
|
+
Files: routes/exportCsv.js
|
|
116
|
+
|
|
117
|
+
2. fix: use YYYY/MM/DD date format in bulk CSV exports
|
|
118
|
+
Files: routes/exports/csv.js
|
|
119
|
+
|
|
120
|
+
Repository: cliezen-dashboard
|
|
121
|
+
|
|
122
|
+
3. feat: add shared export utilities and CSV formatters
|
|
123
|
+
Files: src/utils/exportUtils.js, src/utils/cardExportFormatters.js
|
|
124
|
+
|
|
125
|
+
4. feat: add per-card CSV export to Insights dashboard cards
|
|
126
|
+
Files: src/composables/useCardExport.js, src/components/Insights/DashCard.vue, src/graphql/mutations.js
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Ask the user: "Does this commit plan look good? You can adjust, reorder, merge, or split any commits."
|
|
130
|
+
|
|
131
|
+
Wait for approval before proceeding. If the user says "go" or "yes" or "looks good", execute. If they request changes, adjust and re-present.
|
|
132
|
+
|
|
133
|
+
### Step 5: Execute Commits
|
|
134
|
+
|
|
135
|
+
For each commit unit, in order:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
cd <repo-path>
|
|
139
|
+
git add <file1> <file2> ... # stage only files for this commit
|
|
140
|
+
git commit -m "<message>" # commit with the planned message
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
After each commit, confirm success before moving to the next.
|
|
144
|
+
|
|
145
|
+
If a commit fails (e.g., pre-commit hook), stop and report the error. Do not skip or force.
|
|
146
|
+
|
|
147
|
+
### Step 6: Summary
|
|
148
|
+
|
|
149
|
+
After all commits are done, show a summary:
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Done! Created N commits across M repos:
|
|
153
|
+
|
|
154
|
+
cliezen-graph (2 commits):
|
|
155
|
+
abc1234 feat: restrict bulk CSV export to superAdmin users
|
|
156
|
+
def5678 fix: use YYYY/MM/DD date format in bulk CSV exports
|
|
157
|
+
|
|
158
|
+
cliezen-dashboard (4 commits):
|
|
159
|
+
111aaaa feat: add shared export utilities and CSV formatters
|
|
160
|
+
222bbbb feat: add per-card CSV export to Insights dashboard cards
|
|
161
|
+
...
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Edge Cases
|
|
165
|
+
|
|
166
|
+
- If there are no changes in a repo, skip it silently
|
|
167
|
+
- If all changes belong to one logical unit, make one commit (don't force artificial splits)
|
|
168
|
+
- If a file has changes belonging to two different features, note this and ask the user how to handle it (commit the whole file with the more significant change, or suggest the user manually split it with `git add -p`)
|
|
169
|
+
- Never run `git add .` or `git add -A` — always stage specific files
|
|
170
|
+
- Never amend existing commits
|
|
171
|
+
- Never force push
|
|
172
|
+
- Never use `--no-verify`
|
|
173
|
+
- Never add Co-Authored-By, Signed-off-by, or any AI attribution trailers to commit messages
|
|
174
|
+
- Commit messages are the developer's own — no mention of Claude, AI, or any tool
|