@grvmithas/create-aies-kit 1.0.0 → 1.1.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/lib/scaffold.js DELETED
@@ -1,352 +0,0 @@
1
- import { SITE_URL, STACK_LABELS } from './options.js';
2
-
3
- function stackDocsUrl(stack) {
4
- const map = {
5
- react: `${SITE_URL}/docs/cookbook/react/README`,
6
- nextjs: `${SITE_URL}/docs/cookbook/nextjs/README`,
7
- 'react-native': `${SITE_URL}/docs/cookbook/react-native/README`,
8
- nodejs: `${SITE_URL}/docs/cookbook/node/README`,
9
- python: `${SITE_URL}/docs/cookbook/python/README`,
10
- java: `${SITE_URL}/docs/cookbook/java/README`,
11
- dotnet: `${SITE_URL}/docs/cookbook/dotnet/README`,
12
- };
13
- return map[stack] ?? `${SITE_URL}/docs/cookbook/README`;
14
- }
15
-
16
- function idePlacementGuide(ide) {
17
- switch (ide) {
18
- case 'cursor':
19
- return `### Cursor
20
- - Project rules: \`.cursor/rules/aies.mdc\`
21
- - Attach \`.aies/implementation_plan.md\` before coding`;
22
- case 'claude-code':
23
- return `### Claude Code
24
- - \`CLAUDE.md\` at repo root
25
- - Skills under \`.aies/skills/\``;
26
- case 'copilot':
27
- return `### GitHub Copilot
28
- - \`.github/copilot-instructions.md\`
29
- - Human PR review remains accountable`;
30
- case 'vscode':
31
- return `### VS Code
32
- - \`.vscode/aies-instructions.md\``;
33
- case 'windsurf':
34
- return `### Windsurf
35
- - \`.windsurfrules\``;
36
- case 'continue':
37
- return `### Continue
38
- - See \`.aies/ide/continue-config.snippet.json\``;
39
- default:
40
- return '### IDE\n- Use `.aies/` as the project AI harness folder.';
41
- }
42
- }
43
-
44
- function buildContextFile(profile, label) {
45
- return `# AIES project context
46
-
47
- This repository uses the Open AI Engineering Standard (AIES) harness.
48
-
49
- - Stack: ${label}
50
- - Role profile: ${profile.role}
51
- - Maturity: ${profile.maturity}
52
- - IDE: ${profile.ide}
53
-
54
- ## Non-negotiables
55
-
56
- 1. Plan before multi-file coding (\`.aies/implementation_plan.md\`)
57
- 2. Human review is accountable — AI output is advisory
58
- 3. No secrets in prompts, logs, or MCP tool args
59
- 4. Prefer stack skill + AIDLC prompts over ad-hoc chat
60
-
61
- ## Start here
62
-
63
- 1. Read \`.aies/README.md\`
64
- 2. Fill \`.aies/implementation_plan.md\`
65
- 3. Open the matching workflow: ${SITE_URL}/workflows
66
- 4. Stack cookbook: ${stackDocsUrl(profile.stack)}
67
-
68
- ## Corpus (online)
69
-
70
- - Handbook: ${SITE_URL}/docs/handbook/README
71
- - Hooks: ${SITE_URL}/docs/04-agent-engineering/hooks/README
72
- - MCP: ${SITE_URL}/docs/handbook/mcp-when-and-how
73
- `;
74
- }
75
-
76
- /**
77
- * @param {{ goal: string, role: string, maturity: string, ide: string, stack: string }} profile
78
- * @returns {{ stack: string, generatedAt: string, profile: object, files: Record<string, string> }}
79
- */
80
- export function generateStarterKit(profile) {
81
- const label = STACK_LABELS[profile.stack] ?? profile.stack;
82
- const now = new Date().toISOString();
83
- const flagArgs = [
84
- `--stack ${profile.stack}`,
85
- `--ide ${profile.ide}`,
86
- `--role ${profile.role}`,
87
- `--maturity ${profile.maturity}`,
88
- `--goal ${profile.goal}`,
89
- ].join(' ');
90
-
91
- const readme = `# AIES Starter Kit — ${label}
92
-
93
- **This folder is your project harness.** It is not the full AIES corpus.
94
-
95
- Generated: ${now}
96
- Profile: **${profile.role}** · **${profile.ide}** · **${profile.maturity}** · **${label}**
97
-
98
- ## What got installed
99
-
100
- | Path | Purpose |
101
- |------|---------|
102
- | \`.aies/implementation_plan.md\` | Plan of record before coding |
103
- | \`.aies/prompts/\` | Pasteable AIDLC prompts |
104
- | \`.aies/skills/\` | Procedural skills for agents |
105
- | \`.aies/mcp.json\` | Example MCP config (edit before enabling) |
106
- | \`.aies/agentHooks.json\` | Hook map — wire to real scripts from the corpus |
107
- | IDE context file | Rules/instructions for ${profile.ide} |
108
-
109
- ## How to use (5 minutes)
110
-
111
- 1. Confirm you are in your **app repo root**
112
- 2. Fill \`.aies/implementation_plan.md\`
113
- 3. Attach that plan in IDE chat before generating code
114
- 4. Do not enable MCPs until you read: ${SITE_URL}/docs/handbook/mcp-when-and-how
115
- 5. Continue your lifecycle: ${SITE_URL}/workflows
116
-
117
- ${idePlacementGuide(profile.ide)}
118
-
119
- ## Re-install / upgrade
120
-
121
- \`\`\`bash
122
- npx @grvmithas/create-aies-kit ${flagArgs} --force
123
- \`\`\`
124
-
125
- ## Not enough alone
126
-
127
- For production teams you still need HITL gates, eval/CI gates, and an MCP allowlist.
128
-
129
- Quick start: ${SITE_URL}/quickstart
130
- Cookbook: ${stackDocsUrl(profile.stack)}
131
- `;
132
-
133
- const implementationPlan = `# Implementation Plan
134
-
135
- > AIES plan of record. Approve this before multi-file coding.
136
-
137
- ## Goal
138
-
139
- <!-- One sentence outcome -->
140
-
141
- ## Scope
142
-
143
- ### In scope
144
-
145
- -
146
-
147
- ### Out of scope
148
-
149
- -
150
-
151
- ## Architecture touchpoints
152
-
153
- -
154
-
155
- ## Tasks
156
-
157
- | ID | Task | Verification | Owner |
158
- |----|------|--------------|-------|
159
- | 1 | | | |
160
-
161
- ## Risks
162
-
163
- -
164
-
165
- ## Rollback
166
-
167
- -
168
-
169
- ## Human approval
170
-
171
- - [ ] Plan approved by:
172
- - [ ] Date:
173
- `;
174
-
175
- const storyKickoffSkill = `---
176
- name: story-kickoff
177
- description: Frame a bounded story before implementation
178
- ---
179
-
180
- # Story kickoff
181
-
182
- ## Inputs
183
- - Ticket / user story
184
- - Acceptance criteria
185
- - Non-goals
186
-
187
- ## Procedure
188
- 1. Restate the problem in one paragraph
189
- 2. List constraints (security, perf, compliance)
190
- 3. Propose the smallest verifiable slice
191
- 4. Stop for human approval before writing the plan file
192
-
193
- ## Online prompt
194
- ${SITE_URL}/docs/08-ai-sdlc/prompts/story-kickoff.prompt
195
- `;
196
-
197
- const implementationPrompt = `# Implementation prompt
198
-
199
- Use with the approved \`.aies/implementation_plan.md\` attached.
200
-
201
- 1. Restate the plan boundaries
202
- 2. Implement only in-scope tasks
203
- 3. Add/adjust tests for verification column
204
- 4. Do not invent integrations outside the plan
205
- 5. Summarize files changed and residual risks
206
-
207
- Online: ${SITE_URL}/docs/08-ai-sdlc/prompts/implementation-plan.prompt
208
- Stack cookbook: ${stackDocsUrl(profile.stack)}
209
- `;
210
-
211
- const codeReviewPrompt = `# Code review prompt
212
-
213
- Human reviewer is accountable. AI output is advisory only.
214
-
215
- Review for:
216
- - Correctness vs plan
217
- - Security / secrets / injection
218
- - Missing tests
219
- - Maintainability
220
-
221
- Online: ${SITE_URL}/docs/08-ai-sdlc/prompts/security-review.prompt
222
- `;
223
-
224
- const debugSkill = `---
225
- name: debug
226
- description: Systematic debug for ${label}
227
- ---
228
-
229
- 1. Reproduce with a minimal failing case
230
- 2. Form a hypothesis
231
- 3. Change one variable at a time
232
- 4. Capture evidence before asking for a large rewrite
233
-
234
- Online: ${SITE_URL}/docs/03-skill-engineering/skills/debug.skill
235
- `;
236
-
237
- const devopsSkill = `---
238
- name: devops
239
- description: Release and pipeline discipline
240
- ---
241
-
242
- 1. Prefer automated gates over manual checklists alone
243
- 2. Canary / feature flags for risky paths
244
- 3. Rollback verified before production promote
245
-
246
- Online: ${SITE_URL}/docs/03-skill-engineering/skills/devops.skill
247
- `;
248
-
249
- const mcpJson = JSON.stringify(
250
- {
251
- mcpServers: {},
252
- _aies: {
253
- note: 'Empty by default. Add only org-approved servers after reading MCP when-and-how.',
254
- guide: `${SITE_URL}/docs/handbook/mcp-when-and-how`,
255
- catalog: `${SITE_URL}/docs/mcps/README`,
256
- },
257
- },
258
- null,
259
- 2,
260
- );
261
-
262
- const agentHooksJson = JSON.stringify(
263
- {
264
- version: '1',
265
- hooks: [
266
- {
267
- id: 'pre-planning',
268
- phase: 'before-plan',
269
- requiredEvidence: ['requirements-path', 'risk-tier'],
270
- },
271
- {
272
- id: 'pre-code',
273
- phase: 'before-code',
274
- requiredEvidence: ['approved-plan-path'],
275
- },
276
- ],
277
- _aies: {
278
- note: 'Wire these phases to shell hooks from the AIES corpus when you adopt the full harness.',
279
- hooksGuide: `${SITE_URL}/docs/04-agent-engineering/hooks/README`,
280
- },
281
- },
282
- null,
283
- 2,
284
- );
285
-
286
- const commands = `# Useful next commands
287
-
288
- npx @grvmithas/create-aies-kit ${flagArgs} --force
289
-
290
- # Then open:
291
- # ${SITE_URL}/quickstart
292
- # ${SITE_URL}/workflows
293
- `;
294
-
295
- const context = buildContextFile(profile, label);
296
- /** @type {Record<string, string>} */
297
- const files = {
298
- '.aies/README.md': readme,
299
- '.aies/implementation_plan.md': implementationPlan,
300
- '.aies/skills/story-kickoff.skill.md': storyKickoffSkill,
301
- '.aies/prompts/implementation.prompt.md': implementationPrompt,
302
- '.aies/prompts/code-review.prompt.md': codeReviewPrompt,
303
- '.aies/skills/debug.skill.md': debugSkill,
304
- '.aies/skills/devops.skill.md': devopsSkill,
305
- '.aies/mcp.json': mcpJson,
306
- '.aies/agentHooks.json': agentHooksJson,
307
- '.aies/commands.md': commands,
308
- };
309
-
310
- switch (profile.ide) {
311
- case 'cursor':
312
- files['.cursor/rules/aies.mdc'] = `---
313
- description: AIES project harness rules
314
- globs:
315
- alwaysApply: true
316
- ---
317
-
318
- ${context}
319
- `;
320
- break;
321
- case 'claude-code':
322
- files['CLAUDE.md'] = context;
323
- break;
324
- case 'copilot':
325
- files['.github/copilot-instructions.md'] = context;
326
- break;
327
- case 'vscode':
328
- files['.vscode/aies-instructions.md'] = context;
329
- break;
330
- case 'windsurf':
331
- files['.windsurfrules'] = context;
332
- break;
333
- case 'continue':
334
- files['.aies/ide/continue-context.md'] = context;
335
- files['.aies/ide/continue-config.snippet.json'] = JSON.stringify(
336
- {
337
- comment: 'Merge into your Continue config — do not overwrite blindly',
338
- contextProviders: [{ name: 'file', params: { path: '.aies' } }],
339
- },
340
- null,
341
- 2,
342
- );
343
- break;
344
- }
345
-
346
- return {
347
- stack: profile.stack,
348
- generatedAt: now,
349
- profile: { ...profile },
350
- files,
351
- };
352
- }