create-agentic-starter 0.1.10 → 0.1.11

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/index.js CHANGED
@@ -1,868 +1,12 @@
1
1
  #!/usr/bin/env node
2
- import{mkdir as F,rm as T,writeFile as _}from"fs/promises";import l from"path";import{readFile as v,writeFile as u}from"fs/promises";import j from"path";function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function P(e,t,s,r){let o=new RegExp(`${h(s)}[\\s\\S]*?${h(r)}\\n?`,"m");if(o.test(e))return e.replace(o,`${t}
3
- `);let a=e.endsWith(`
2
+ import{mkdir as $,rm as N,writeFile as P}from"fs/promises";import g from"path";import{readFile as k,writeFile as f}from"fs/promises";import A from"path";function u(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function F(e,r,s,a){let c=new RegExp(`${u(s)}[\\s\\S]*?${u(a)}\\n?`,"m");if(c.test(e))return e.replace(c,`${r}
3
+ `);let o=e.endsWith(`
4
4
  `)?`
5
5
  `:`
6
6
 
7
- `;return`${e}${a}${t}
8
- `}async function m(e,t,s,r,o){let a=j.join(e,t);try{let n=await v(a,"utf8"),b=P(n,s,r,o);await u(a,b,"utf8")}catch(n){if(n.code!=="ENOENT")throw n;await u(a,`${s}
9
- `,"utf8")}}var f="AGENTS.md",i="<!-- from create-agentic-starter:agents:start -->",c="<!-- from create-agentic-starter:agents:end -->",g=`${i}
10
- # Agentic Starter Guide
11
-
12
- This project includes a reusable AI working area under \`.agentic/\` for project kick-off and delivery documentation.
13
-
14
- ## What This Is For
15
-
16
- Use this scaffold when you want an AI tool to:
17
-
18
- - understand a project from files, notes, screenshots, and links
19
- - maintain structured project memory
20
- - prepare internal drafts in \`.agentic/workspace/\`
21
- - create user-facing deliverables in \`.docs/\`
22
- - optionally use Node.js export helpers from \`.agentic/workspace/scripts/\`
23
-
24
- ## Folder Purpose
25
-
26
- - \`.agentic/init.md\`: first prompt for every new AI session
27
- - \`.agentic/context.md\`: shared rules and folder map
28
- - \`.agentic/commands/\`: task-specific prompt files you reference in your AI tool
29
- - \`.agentic/workspace/project/\`: raw project inputs such as screenshots, notes, requirement docs, and references
30
- - \`.agentic/workspace/memory/\`: evolving AI-maintained project understanding
31
- - \`.agentic/workspace/documents/\`: internal drafts and intermediate artifacts
32
- - \`.agentic/workspace/scripts/\`: starter Node export helpers that can be adapted per project
33
- - \`.docs/\`: user-facing deliverables
34
-
35
- ## How To Use It
36
-
37
- 1. Open your AI tool in this project.
38
- 2. Start every new session with \`@.agentic/init.md\`.
39
- 3. Follow the command flow below.
40
-
41
- ## Command Flow
42
-
43
- 1. \`@.agentic/init.md\`
44
- 2. \`@.agentic/commands/project-requirements.md\`
45
- 3. \`@.agentic/commands/architecture.md\`
46
- 4. Then choose from the available options shown by the current command, such as:
47
- - \`@.agentic/commands/create-brd.md\`
48
- - \`@.agentic/commands/create-frd.md\`
49
- - \`@.agentic/commands/create-estimate.md\`
50
- - \`@.agentic/commands/create-proposal.md\`
51
- - \`@.agentic/commands/create-plan.md\`
52
- - \`@.agentic/commands/create-tasks.md\`
53
-
54
- ## Output Conventions
55
-
56
- Default user-facing outputs live under \`.docs/\`:
57
-
58
- - BRD: \`.docs/brd/brd.docx\`
59
- - FRD: \`.docs/frd/frd.docx\`
60
- - Estimate: \`.docs/estimate/estimate.xlsx\`
61
- - Proposal: \`.docs/proposal/proposal.pptx\`
62
- - Plan: \`.docs/plan/plan.docx\` or \`.docs/plan/plan.xlsx\`
63
- - Tasks: \`.docs/tasks/tasks.xlsx\`
64
-
65
- ## Export Helpers
66
-
67
- Starter export scripts live under \`.agentic/workspace/scripts/\`.
68
-
69
- Adapt the relevant script when the project needs a custom template or style. Keep the script path stable by default instead of inventing a separate export path.
70
-
71
- Dependency guidance:
72
-
73
- 1. Prefer the target project root if it already has a usable Node environment.
74
- 2. If root is not suitable, ask the user which path should receive the install.
75
- 3. Ask the user before running any \`npm install\`.
76
-
77
- Planned library stack:
78
-
79
- - \`docx\`
80
- - \`pptxgenjs\`
81
- - \`exceljs\`
82
-
83
- If your tool does not support \`@file\` references, paste the contents of the prompt file into a new chat manually.
84
- ${c}
85
- `;var w={".agentic/commands/project-requirements.md":`# Project Requirements
86
-
87
- Read:
88
-
89
- - \`@.agentic/context.md\`
90
- - relevant existing files inside \`.agentic/workspace/project/\`
91
- - \`.agentic/workspace/memory/project-overview.md\` if it exists
92
- - \`.agentic/workspace/memory/requirements.md\` if it exists
93
- - \`.agentic/workspace/memory/open-questions.md\` if it exists
94
-
95
- ## Your job
96
-
97
- 1. Refine and deepen the initial understanding created during \`@.agentic/init.md\`.
98
- 2. Collect any missing project explanation, goals, users, scope, screenshots, references, and known deliverables.
99
- 3. Accept either:
100
- - existing file paths already shared by the user, or
101
- - fresh explanation typed in chat
102
- 4. Move or organize project inputs into \`.agentic/workspace/project/\` by default unless the user explicitly says not to.
103
- 5. Organize and normalize the project context so later architecture and deliverable steps can rely on it.
104
- 6. Create or update:
105
- - \`.agentic/workspace/memory/project-overview.md\`
106
- - \`.agentic/workspace/memory/requirements.md\`
107
- - \`.agentic/workspace/memory/open-questions.md\`
108
- 7. Capture assumptions separately from confirmed facts.
109
- 8. Reduce open questions where possible before handing off.
110
- 9. If the requirement understanding is still weak or important gaps remain, continue asking focused project questions and keep updating the memory files.
111
- 10. Only ask for missing details that block useful requirement understanding.
112
-
113
- When the requirements are strong enough, tell the user the available next options:
114
-
115
- - \`@.agentic/commands/architecture.md\` (recommended)
116
- - \`@.agentic/commands/create-plan.md\`
117
- - \`@.agentic/commands/create-proposal.md\`
118
- `,".agentic/commands/architecture.md":`# Architecture
119
-
120
- Read:
121
-
122
- - \`@.agentic/context.md\`
123
- - \`.agentic/workspace/memory/project-overview.md\`
124
- - \`.agentic/workspace/memory/requirements.md\`
125
- - relevant files under \`.agentic/workspace/project/\`
126
- - \`.agentic/workspace/memory/open-questions.md\` if it exists
127
-
128
- ## Your job
129
-
130
- 1. Produce or update \`.agentic/workspace/memory/architecture.md\`.
131
- 2. Explain the recommended system architecture based on the known requirements.
132
- 3. Cover frontend, backend, data, integrations, authentication, deployment, and key risks when relevant.
133
- 4. Add a diagram description or mermaid diagram when supported.
134
- 5. Mention draw.io MCP only as an optional tool if available in the user's environment.
135
- 6. If relevant screenshots, notes, or references are found outside \`.agentic/workspace/project/\`, move or organize them into the workspace by default unless the user explicitly says not to.
136
- 7. If architecture-critical information is still missing, ask architecture-specific questions and keep updating \`.agentic/workspace/memory/architecture.md\` instead of routing yet.
137
- 8. Ask only the minimum blocking questions.
138
-
139
- When the architecture is strong enough, tell the user the available next options:
140
-
141
- - \`@.agentic/commands/create-brd.md\`
142
- - \`@.agentic/commands/create-proposal.md\`
143
- - \`@.agentic/commands/create-plan.md\`
144
- - \`@.agentic/commands/create-tasks.md\`
145
- `,".agentic/commands/create-brd.md":`# Create BRD
146
-
147
- Read:
148
-
149
- - \`@.agentic/context.md\`
150
- - \`.agentic/workspace/memory/project-overview.md\`
151
- - \`.agentic/workspace/memory/requirements.md\`
152
- - \`.agentic/workspace/memory/architecture.md\`
153
- - relevant files under \`.agentic/workspace/project/\`
154
-
155
- ## Your job
156
-
157
- 1. Maintain any internal draft content under \`.agentic/workspace/documents/brd.md\` and structured export input under \`.agentic/workspace/documents/brd.json\` if useful.
158
- 2. Produce the user-facing BRD at \`.docs/brd/brd.docx\`.
159
- 3. Use or update the starter script at \`.agentic/workspace/scripts/generate_brd.js\` when export automation is needed.
160
- 4. If the user already provided a template file/path/reference, follow it.
161
- 5. Otherwise ask whether they want a specific BRD style or structure.
162
- 6. If neither a template nor a style is provided, use the built-in default structure and starter script shape.
163
- 7. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
164
- 8. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
165
- 9. Ask the user before running any \`npm install\`.
166
- 10. Use confirmed facts first and clearly label assumptions where needed.
167
- 11. If the project's template or style requires different export logic, update \`.agentic/workspace/scripts/generate_brd.js\` instead of inventing a separate export path by default.
168
- 12. If relevant source material is outside \`.agentic/workspace/project/\`, move or organize it into the workspace by default unless the user explicitly says not to.
169
- 13. If critical information is missing, ask only the minimum blocking questions and keep improving the BRD draft instead of routing yet.
170
-
171
- When the BRD is solid enough to define functional requirements, tell the user:
172
-
173
- \`Next type @.agentic/commands/create-frd.md\`
174
- `,".agentic/commands/create-frd.md":`# Create FRD
175
-
176
- Read:
177
-
178
- - \`@.agentic/context.md\`
179
- - \`.agentic/workspace/memory/project-overview.md\`
180
- - \`.agentic/workspace/memory/requirements.md\`
181
- - \`.agentic/workspace/memory/architecture.md\`
182
- - \`.agentic/workspace/documents/brd.*\` if it exists
183
- - relevant files under \`.agentic/workspace/project/\`
184
-
185
- ## Your job
186
-
187
- 1. Maintain any internal draft content under \`.agentic/workspace/documents/frd.md\` and structured export input under \`.agentic/workspace/documents/frd.json\` if useful.
188
- 2. Produce the user-facing FRD at \`.docs/frd/frd.docx\`.
189
- 3. Use or update the starter script at \`.agentic/workspace/scripts/generate_frd.js\` when export automation is needed.
190
- 4. Keep the content behavior straightforward unless the user explicitly supplies a template or style preference.
191
- 5. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
192
- 6. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
193
- 7. Ask the user before running any \`npm install\`.
194
- 8. If the project's template or style requires different export logic, update \`.agentic/workspace/scripts/generate_frd.js\` instead of inventing a separate export path by default.
195
- 9. Cover modules, flows, validations, roles, and edge cases where relevant.
196
- 10. If relevant source material is outside \`.agentic/workspace/project/\`, move or organize it into the workspace by default unless the user explicitly says not to.
197
- 11. If important functional details are still missing, ask focused follow-up questions and keep improving the FRD instead of routing yet.
198
- 12. Ask only the minimum blocking questions.
199
-
200
- When the FRD is strong enough for estimation, tell the user:
201
-
202
- \`Next type @.agentic/commands/create-estimate.md\`
203
- `,".agentic/commands/create-estimate.md":`# Create Estimate
204
-
205
- Read:
206
-
207
- - \`@.agentic/context.md\`
208
- - \`.agentic/workspace/memory/project-overview.md\`
209
- - \`.agentic/workspace/memory/requirements.md\`
210
- - \`.agentic/workspace/memory/architecture.md\`
211
- - \`.agentic/workspace/documents/brd.*\` if it exists
212
- - \`.agentic/workspace/documents/frd.*\` if it exists
213
-
214
- ## Your job
215
-
216
- 1. Maintain any internal draft content under \`.agentic/workspace/documents/estimate.md\` and structured export input under \`.agentic/workspace/documents/estimate.json\` if useful.
217
- 2. Produce the user-facing estimate at \`.docs/estimate/estimate.xlsx\`.
218
- 3. Use or update the starter script at \`.agentic/workspace/scripts/generate_estimate.js\` when export automation is needed.
219
- 4. If the user already provided a template file/path/reference, follow it.
220
- 5. Otherwise ask whether they want a specific estimate style or structure.
221
- 6. If neither a template nor a style is provided, use the built-in default structure and starter script shape.
222
- 7. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
223
- 8. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
224
- 9. Ask the user before running any \`npm install\`.
225
- 10. If the project's template or style requires different export logic, update \`.agentic/workspace/scripts/generate_estimate.js\` instead of inventing a separate export path by default.
226
- 11. Keep the estimate aligned with the known scope and clearly state uncertainty.
227
- 12. If relevant source material is outside \`.agentic/workspace/project/\`, move or organize it into the workspace by default unless the user explicitly says not to.
228
- 13. If the estimate is too uncertain because key delivery information is missing, ask focused follow-up questions and keep refining the estimate instead of routing yet.
229
- 14. Ask only the minimum blocking questions.
230
-
231
- When the estimate is strong enough for proposal drafting, tell the user:
232
-
233
- \`Next type @.agentic/commands/create-proposal.md\`
234
- `,".agentic/commands/create-proposal.md":"# Create Proposal\n\nRead:\n\n- `@.agentic/context.md`\n- `.agentic/workspace/memory/project-overview.md`\n- `.agentic/workspace/memory/requirements.md`\n- `.agentic/workspace/memory/architecture.md`\n- `.agentic/workspace/documents/brd.*` if it exists\n- `.agentic/workspace/documents/frd.*` if it exists\n- `.agentic/workspace/documents/estimate.*` if it exists\n\n## Your job\n\n1. Maintain any internal draft content under `.agentic/workspace/documents/proposal.md` and structured export input under `.agentic/workspace/documents/proposal.json` if useful.\n2. Produce the user-facing proposal at `.docs/proposal/proposal.pptx`.\n3. Use or update the starter script at `.agentic/workspace/scripts/generate_proposal.js` when export automation is needed.\n4. Keep the prompt focused on presentation-ready content unless the user explicitly provides a template or style preference.\n5. If export dependencies are needed, first check whether the target project root already has a usable Node environment.\n6. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.\n7. Ask the user before running any `npm install`.\n8. If the project's template or style requires different export logic, update `.agentic/workspace/scripts/generate_proposal.js` instead of inventing a separate export path by default.\n9. Make gaps explicit instead of inventing details.\n10. If relevant screenshots, decks, notes, or references are found outside `.agentic/workspace/project/`, move or organize them into the workspace by default unless the user explicitly says not to.\n11. If key proposal inputs are still missing, ask focused questions and keep improving the proposal instead of prematurely declaring completion.\n12. Ask only the minimum blocking questions.\n\nWhen the proposal is complete enough for handoff, tell the user the workflow is complete and list the generated files.\n",".agentic/commands/create-plan.md":`# Create Plan
235
-
236
- Read:
237
-
238
- - \`@.agentic/context.md\`
239
- - \`.agentic/workspace/memory/project-overview.md\`
240
- - \`.agentic/workspace/memory/requirements.md\`
241
- - \`.agentic/workspace/memory/architecture.md\` if it exists
242
- - relevant files under \`.agentic/workspace/project/\`
243
-
244
- ## Your job
245
-
246
- 1. Maintain any internal draft content under \`.agentic/workspace/documents/plan.md\` and structured export input under \`.agentic/workspace/documents/plan.json\` if useful.
247
- 2. If the user has not already specified the preferred plan output, ask whether they want:
248
- - a document-style plan, or
249
- - a spreadsheet-style plan
250
- 3. If the user already provided a template file/path/reference, follow it.
251
- 4. Otherwise ask whether they want a specific plan style or structure.
252
- 5. If neither a template nor a style is provided, use the built-in default structure and starter script shape.
253
- 6. Produce the user-facing output at:
254
- - \`.docs/plan/plan.docx\` for document-style plan output, or
255
- - \`.docs/plan/plan.xlsx\` for spreadsheet-style plan output
256
- 7. Use or update the starter script at \`.agentic/workspace/scripts/generate_plan.js\` when export automation is needed.
257
- 8. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
258
- 9. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
259
- 10. Ask the user before running any \`npm install\`.
260
- 11. If the project's template or style requires different export logic, update \`.agentic/workspace/scripts/generate_plan.js\` instead of inventing a separate export path by default.
261
- 12. Include phases, milestones, dependencies, assumptions, risks, and sequencing.
262
- 13. If relevant source material is outside \`.agentic/workspace/project/\`, move or organize it into the workspace by default unless the user explicitly says not to.
263
- 14. If planning inputs are missing, ask focused questions and keep refining instead of routing.
264
-
265
- When the plan is complete enough, tell the user the available next options:
266
-
267
- - \`@.agentic/commands/architecture.md\`
268
- - \`@.agentic/commands/create-tasks.md\`
269
- - \`@.agentic/commands/create-brd.md\`
270
- - \`@.agentic/commands/create-proposal.md\`
271
- `,".agentic/commands/create-tasks.md":"# Create Tasks\n\nRead:\n\n- `@.agentic/context.md`\n- `.agentic/workspace/memory/project-overview.md`\n- `.agentic/workspace/memory/requirements.md`\n- `.agentic/workspace/memory/architecture.md` if it exists\n- `.agentic/workspace/documents/plan.*` if it exists\n- `.agentic/workspace/documents/brd.*` if it exists\n- `.agentic/workspace/documents/frd.*` if it exists\n- relevant files under `.agentic/workspace/project/`\n\n## Your job\n\n1. Maintain any internal draft content under `.agentic/workspace/documents/tasks.md` and structured export input under `.agentic/workspace/documents/tasks.json` if useful.\n2. Produce the user-facing task breakdown at `.docs/tasks/tasks.xlsx`.\n3. Use or update the starter script at `.agentic/workspace/scripts/generate_tasks.js` when export automation is needed.\n4. If the user already provided a template file/path/reference, follow it.\n5. Otherwise ask whether they want a specific task breakdown style or structure.\n6. If neither a template nor a style is provided, use the built-in default structure and starter script shape.\n7. If export dependencies are needed, first check whether the target project root already has a usable Node environment.\n8. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.\n9. Ask the user before running any `npm install`.\n10. If the project's template or style requires different export logic, update `.agentic/workspace/scripts/generate_tasks.js` instead of inventing a separate export path by default.\n11. Produce a practical task breakdown with modules, roles, dependencies, sequencing, and status placeholders.\n12. If relevant source material is outside `.agentic/workspace/project/`, move or organize it into the workspace by default unless the user explicitly says not to.\n13. If execution detail is missing, ask focused questions and keep refining instead of routing.\n\nWhen the tasks are complete enough, tell the user the available next options:\n\n- `@.agentic/commands/create-plan.md`\n- `@.agentic/commands/create-proposal.md`\n- `@.agentic/commands/create-brd.md`\n"};var k={".agentic/init.md":`# Init
272
-
273
- Read \`@.agentic/context.md\` first.
274
-
275
- You are starting a fresh AI session inside this project. Your job is to quickly understand what this project is, what context already exists, and what the user still needs to provide.
276
-
277
- ## Read Scope
278
-
279
- 1. Read only root-level files and folders in the current project.
280
- 2. Do not recursively inspect the full repository.
281
- 3. Treat \`.agentic/\` as the exception:
282
- - inspect \`.agentic/workspace/project/\`
283
- - inspect \`.agentic/workspace/memory/\`
284
- - inspect \`.agentic/workspace/documents/\`
285
- 4. Use existing workspace context if it is already present.
286
-
287
- ## Response Style
288
-
289
- 1. Be concise and synthesis-first.
290
- 2. Do not dump a full file inventory unless the user explicitly asks.
291
- 3. Do not mirror the prompt structure back to the user.
292
- 4. Respond with either:
293
- - a short synthesized summary of what you understand, or
294
- - a few focused questions if important context is still missing
295
-
296
- ## What To Do
297
-
298
- 1. Infer what kind of project this is from the root-level signals.
299
- 2. Check whether \`.agentic/workspace/project/\`, \`.agentic/workspace/memory/\`, and \`.agentic/workspace/documents/\` already contain useful context.
300
- 3. Build the best current understanding from:
301
- - root-level signals
302
- - existing workspace files
303
- - the user's message in this chat
304
- 4. If project context is thin, ask a small number of targeted questions about:
305
- - project goal
306
- - target users
307
- - scope or modules
308
- - available references such as screenshots, docs, notes, links, or file paths
309
- - desired outputs
310
- 5. If enough context exists, give a short summary of the project and the most important missing pieces.
311
- 6. If the user mentions screenshots, notes, requirement docs, links, or file paths, move or organize them into \`.agentic/workspace/project/\` by default unless the user explicitly says not to.
312
- 7. After the first useful exchange, create or update:
313
- - \`.agentic/workspace/memory/project-overview.md\`
314
- - \`.agentic/workspace/memory/requirements.md\`
315
- - \`.agentic/workspace/memory/open-questions.md\`
316
- 8. Write drafts even from partial information.
317
- 9. Clearly separate confirmed facts, assumptions, and open questions.
318
- 10. Do not route immediately just because the workspace is empty. Do useful synthesis or ask focused questions first.
319
- 11. If important project basics are still missing, continue asking focused questions and keep updating the memory files instead of routing forward yet.
320
- 12. Only when you have done enough useful intake work to create a solid initial understanding, end with:
321
-
322
- \`Next type @.agentic/commands/project-requirements.md\`
323
- `,".agentic/context.md":`# Context
324
-
325
- This repository uses a prompt-based project kick-off system.
326
-
327
- ## Folder Map
328
-
329
- - \`.agentic/init.md\`: session bootstrap prompt
330
- - \`.agentic/context.md\`: shared rules and folder semantics
331
- - \`.agentic/commands/\`: prompt files for distinct tasks
332
- - \`.agentic/workspace/project/\`: raw project materials
333
- - \`.agentic/workspace/memory/\`: evolving AI-maintained understanding
334
- - \`.agentic/workspace/documents/\`: internal drafts and intermediate artifacts
335
- - \`.agentic/workspace/scripts/\`: optional Node export helpers
336
- - \`.docs/\`: user-facing deliverables
337
-
338
- ## Workspace Semantics
339
-
340
- ### Project
341
-
342
- Use \`.agentic/workspace/project/\` for:
343
-
344
- - Figma screenshots
345
- - requirement notes
346
- - requirement documents
347
- - links captured into markdown files
348
- - user-supplied project references
349
-
350
- If relevant project materials are found outside this folder, move or organize them into \`.agentic/workspace/project/\` by default. Only leave them in place if the user explicitly says not to move them.
351
-
352
- ### Memory
353
-
354
- Use \`.agentic/workspace/memory/\` for:
355
-
356
- - \`project-overview.md\`
357
- - \`requirements.md\`
358
- - \`open-questions.md\`
359
- - \`architecture.md\`
360
- - assumptions and structured working memory
361
-
362
- ### Internal Documents
363
-
364
- Use \`.agentic/workspace/documents/\` for internal drafts or intermediate artifacts such as:
365
-
366
- - draft BRD content
367
- - draft FRD content
368
- - draft estimate content
369
- - draft proposal content
370
- - draft plan content
371
- - draft task breakdowns
372
- - structured export input such as \`brd.json\`, \`frd.json\`, \`estimate.json\`, \`proposal.json\`, \`plan.json\`, and \`tasks.json\`
373
-
374
- ### Scripts
375
-
376
- Use \`.agentic/workspace/scripts/\` for Node.js export helpers.
377
-
378
- Starter scripts are scaffolded there by default. Update the relevant script for the current project when the user provides a custom template, layout, or style requirement.
379
-
380
- Planned library stack:
381
-
382
- - \`docx\` for \`.docx\`
383
- - \`pptxgenjs\` for \`.pptx\`
384
- - \`exceljs\` for \`.xlsx\`
385
-
386
- Install behavior:
387
-
388
- 1. Check whether the target project root already has a usable Node environment.
389
- 2. Prefer installing there if suitable.
390
- 3. If root is not suitable or is ambiguous, ask the user which path should receive the install.
391
- 4. Ask the user before running any \`npm install\`.
392
-
393
- ### User Outputs
394
-
395
- Use \`.docs/\` for user-facing deliverables:
396
-
397
- - \`.docs/brd/brd.docx\`
398
- - \`.docs/frd/frd.docx\`
399
- - \`.docs/estimate/estimate.xlsx\`
400
- - \`.docs/proposal/proposal.pptx\`
401
- - \`.docs/plan/plan.docx\` or \`.docs/plan/plan.xlsx\`
402
- - \`.docs/tasks/tasks.xlsx\`
403
-
404
- ## Working Rules
405
-
406
- 1. Reuse and improve existing workspace files when they already exist.
407
- 2. Do not scan the whole repository unless the user explicitly asks.
408
- 3. If relevant project assets are outside \`.agentic/workspace/project/\`, move them into the workspace by default and then use the workspace copy.
409
- 4. Only avoid moving files when the user explicitly asks to keep them in place.
410
- 5. Keep internal working material in \`.agentic/workspace/\` and user-facing deliverables in \`.docs/\`.
411
- 6. Prefer the target project root for Node-based export dependencies when a usable Node setup already exists there.
412
- 7. If root is not suitable, ask the user which path should be used for dependency installation.
413
- 8. Ask the user before running any install command.
414
- 9. Ask only the minimum blocking questions required to continue.
415
- 10. Always end by telling the user the exact next command to run or listing the available next options.
416
- `};var d=[".agentic"],p=[".agentic",".agentic/commands",".agentic/workspace",".agentic/workspace/project",".agentic/workspace/memory",".agentic/workspace/documents",".agentic/workspace/scripts",".docs",".docs/brd",".docs/frd",".docs/estimate",".docs/proposal",".docs/plan",".docs/tasks"];var I=`#!/usr/bin/env node
417
-
418
- const fs = require("node:fs");
419
- const path = require("node:path");
420
-
421
- function parseArgs(argv) {
422
- const args = {};
423
-
424
- for (let index = 0; index < argv.length; index += 1) {
425
- const token = argv[index];
426
-
427
- if (!token.startsWith("--")) {
428
- continue;
429
- }
430
-
431
- const key = token.slice(2);
432
- const next = argv[index + 1];
433
-
434
- if (!next || next.startsWith("--")) {
435
- args[key] = true;
436
- continue;
437
- }
438
-
439
- args[key] = next;
440
- index += 1;
441
- }
442
-
443
- return args;
444
- }
445
-
446
- function resolveFromRoot(targetPath) {
447
- return path.resolve(process.cwd(), targetPath);
448
- }
449
-
450
- function ensureParentDir(filePath) {
451
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
452
- }
453
-
454
- function readJsonFile(relativePath) {
455
- const absolutePath = resolveFromRoot(relativePath);
456
-
457
- if (!fs.existsSync(absolutePath)) {
458
- throw new Error(
459
- "Input file not found: " +
460
- relativePath +
461
- "\\nCreate it first under .agentic/workspace/documents/ or pass --input."
462
- );
463
- }
464
-
465
- return JSON.parse(fs.readFileSync(absolutePath, "utf8"));
466
- }
467
-
468
- function loadPackage(packageName) {
469
- try {
470
- return require(packageName);
471
- } catch (error) {
472
- console.error("Missing dependency:", packageName);
473
- console.error(
474
- "Install it in the target project's chosen Node environment before running this script."
475
- );
476
- console.error("Current working directory:", process.cwd());
477
- process.exit(1);
478
- }
479
- }
480
-
481
- function writeBuffer(relativePath, buffer) {
482
- const absolutePath = resolveFromRoot(relativePath);
483
- ensureParentDir(absolutePath);
484
- fs.writeFileSync(absolutePath, buffer);
485
- return absolutePath;
486
- }
487
-
488
- function writeSuccess(label, absolutePath) {
489
- console.log(label + " written to " + absolutePath);
490
- }
491
-
492
- function toParagraphs(docx, lines, options = {}) {
493
- if (!Array.isArray(lines) || lines.length === 0) {
494
- return [];
495
- }
496
-
497
- return lines.map((line) =>
498
- new docx.Paragraph({
499
- text: String(line),
500
- bullet: options.bullet ? { level: 0 } : undefined,
501
- spacing: { after: options.bullet ? 80 : 160 },
502
- })
503
- );
504
- }
505
-
506
- function deriveColumns(rows) {
507
- const firstRow = Array.isArray(rows) && rows.length > 0 ? rows[0] : null;
508
-
509
- if (!firstRow || Array.isArray(firstRow)) {
510
- return [];
511
- }
512
-
513
- return Object.keys(firstRow).map((key) => ({
514
- header: key,
515
- key,
516
- width: Math.max(String(key).length + 4, 18),
517
- }));
518
- }
519
-
520
- module.exports = {
521
- parseArgs,
522
- resolveFromRoot,
523
- readJsonFile,
524
- loadPackage,
525
- writeBuffer,
526
- writeSuccess,
527
- toParagraphs,
528
- deriveColumns,
529
- };
530
- `,S=`#!/usr/bin/env node
531
-
532
- const shared = require("./_shared.js");
533
- const docx = shared.loadPackage("docx");
534
-
535
- const args = shared.parseArgs(process.argv.slice(2));
536
- const inputPath = args.input || ".agentic/workspace/documents/brd.json";
537
- const outputPath = args.output || ".docs/brd/brd.docx";
538
- const data = shared.readJsonFile(inputPath);
539
-
540
- const children = [
541
- new docx.Paragraph({
542
- text: data.title || "Business Requirements Document",
543
- heading: docx.HeadingLevel.TITLE,
544
- }),
545
- ];
546
-
547
- if (data.subtitle) {
548
- children.push(
549
- new docx.Paragraph({
550
- text: String(data.subtitle),
551
- spacing: { after: 240 },
552
- })
553
- );
554
- }
555
-
556
- for (const section of data.sections || []) {
557
- if (section.heading) {
558
- children.push(
559
- new docx.Paragraph({
560
- text: String(section.heading),
561
- heading: docx.HeadingLevel.HEADING_1,
562
- })
563
- );
564
- }
565
-
566
- children.push(...shared.toParagraphs(docx, section.paragraphs));
567
- children.push(...shared.toParagraphs(docx, section.bullets, { bullet: true }));
568
- }
569
-
570
- const document = new docx.Document({
571
- sections: [{ children }],
572
- });
573
-
574
- docx.Packer.toBuffer(document).then((buffer) => {
575
- const absolutePath = shared.writeBuffer(outputPath, buffer);
576
- shared.writeSuccess("BRD", absolutePath);
577
- });
578
- `,A=`#!/usr/bin/env node
579
-
580
- const shared = require("./_shared.js");
581
- const docx = shared.loadPackage("docx");
582
-
583
- const args = shared.parseArgs(process.argv.slice(2));
584
- const inputPath = args.input || ".agentic/workspace/documents/frd.json";
585
- const outputPath = args.output || ".docs/frd/frd.docx";
586
- const data = shared.readJsonFile(inputPath);
587
-
588
- const children = [
589
- new docx.Paragraph({
590
- text: data.title || "Functional Requirements Document",
591
- heading: docx.HeadingLevel.TITLE,
592
- }),
593
- ];
594
-
595
- for (const moduleItem of data.modules || []) {
596
- children.push(
597
- new docx.Paragraph({
598
- text: String(moduleItem.name || "Module"),
599
- heading: docx.HeadingLevel.HEADING_1,
600
- })
601
- );
602
-
603
- children.push(...shared.toParagraphs(docx, moduleItem.summary ? [moduleItem.summary] : []));
604
- children.push(...shared.toParagraphs(docx, moduleItem.features, { bullet: true }));
605
- children.push(...shared.toParagraphs(docx, moduleItem.validations, { bullet: true }));
606
- children.push(...shared.toParagraphs(docx, moduleItem.edgeCases, { bullet: true }));
607
- }
608
-
609
- const document = new docx.Document({
610
- sections: [{ children }],
611
- });
612
-
613
- docx.Packer.toBuffer(document).then((buffer) => {
614
- const absolutePath = shared.writeBuffer(outputPath, buffer);
615
- shared.writeSuccess("FRD", absolutePath);
616
- });
617
- `,R=`#!/usr/bin/env node
618
-
619
- const shared = require("./_shared.js");
620
- const ExcelJS = shared.loadPackage("exceljs");
621
-
622
- const args = shared.parseArgs(process.argv.slice(2));
623
- const inputPath = args.input || ".agentic/workspace/documents/estimate.json";
624
- const outputPath = args.output || ".docs/estimate/estimate.xlsx";
625
- const data = shared.readJsonFile(inputPath);
626
-
627
- const workbook = new ExcelJS.Workbook();
628
- const worksheet = workbook.addWorksheet(data.sheetName || "Estimate");
629
- const rows = Array.isArray(data.rows) ? data.rows : [];
630
-
631
- worksheet.columns = Array.isArray(data.columns) && data.columns.length > 0
632
- ? data.columns
633
- : shared.deriveColumns(rows);
634
-
635
- for (const row of rows) {
636
- worksheet.addRow(row);
637
- }
638
-
639
- worksheet.views = [{ state: "frozen", ySplit: 1 }];
640
-
641
- workbook.xlsx.writeBuffer().then((buffer) => {
642
- const absolutePath = shared.writeBuffer(outputPath, buffer);
643
- shared.writeSuccess("Estimate", absolutePath);
644
- });
645
- `,q=`#!/usr/bin/env node
646
-
647
- const shared = require("./_shared.js");
648
- const PptxGenJS = shared.loadPackage("pptxgenjs");
649
-
650
- const args = shared.parseArgs(process.argv.slice(2));
651
- const inputPath = args.input || ".agentic/workspace/documents/proposal.json";
652
- const outputPath = args.output || ".docs/proposal/proposal.pptx";
653
- const data = shared.readJsonFile(inputPath);
654
-
655
- const pptx = new PptxGenJS();
656
- pptx.layout = "LAYOUT_WIDE";
657
- pptx.author = "create-agentic-starter";
658
-
659
- const titleSlide = pptx.addSlide();
660
- titleSlide.addText(data.title || "Project Proposal", {
661
- x: 0.7,
662
- y: 1.0,
663
- w: 11.0,
664
- h: 0.8,
665
- fontSize: 24,
666
- bold: true,
667
- });
668
-
669
- if (data.subtitle) {
670
- titleSlide.addText(String(data.subtitle), {
671
- x: 0.7,
672
- y: 2.0,
673
- w: 10.5,
674
- h: 0.5,
675
- fontSize: 14,
676
- color: "666666",
677
- });
678
- }
679
-
680
- for (const slideData of data.slides || []) {
681
- const slide = pptx.addSlide();
682
-
683
- slide.addText(String(slideData.title || "Slide"), {
684
- x: 0.7,
685
- y: 0.5,
686
- w: 11,
687
- h: 0.6,
688
- fontSize: 20,
689
- bold: true,
690
- });
691
-
692
- const bullets = Array.isArray(slideData.bullets)
693
- ? slideData.bullets.map((item) => ({ text: String(item), options: { bullet: { indent: 18 } } }))
694
- : [];
695
-
696
- if (bullets.length > 0) {
697
- slide.addText(bullets, {
698
- x: 0.9,
699
- y: 1.5,
700
- w: 10.6,
701
- h: 4.5,
702
- fontSize: 16,
703
- breakLine: true,
704
- });
705
- } else if (slideData.body) {
706
- slide.addText(String(slideData.body), {
707
- x: 0.9,
708
- y: 1.5,
709
- w: 10.6,
710
- h: 4.5,
711
- fontSize: 16,
712
- breakLine: true,
713
- });
714
- }
715
- }
716
-
717
- pptx.writeFile({ fileName: shared.resolveFromRoot(outputPath) }).then(() => {
718
- shared.writeSuccess("Proposal", shared.resolveFromRoot(outputPath));
719
- });
720
- `,D=`#!/usr/bin/env node
721
-
722
- const shared = require("./_shared.js");
723
-
724
- const args = shared.parseArgs(process.argv.slice(2));
725
- const inputPath = args.input || ".agentic/workspace/documents/plan.json";
726
- const data = shared.readJsonFile(inputPath);
727
- const format = args.format || data.format || "docx";
728
-
729
- if (format === "xlsx") {
730
- const ExcelJS = shared.loadPackage("exceljs");
731
- const outputPath = args.output || ".docs/plan/plan.xlsx";
732
- const workbook = new ExcelJS.Workbook();
733
- const worksheet = workbook.addWorksheet(data.sheetName || "Plan");
734
- const rows = Array.isArray(data.rows) ? data.rows : [];
735
-
736
- worksheet.columns = Array.isArray(data.columns) && data.columns.length > 0
737
- ? data.columns
738
- : shared.deriveColumns(rows);
739
-
740
- for (const row of rows) {
741
- worksheet.addRow(row);
742
- }
743
-
744
- worksheet.views = [{ state: "frozen", ySplit: 1 }];
745
-
746
- workbook.xlsx.writeBuffer().then((buffer) => {
747
- const absolutePath = shared.writeBuffer(outputPath, buffer);
748
- shared.writeSuccess("Plan", absolutePath);
749
- });
750
- } else {
751
- const docx = shared.loadPackage("docx");
752
- const outputPath = args.output || ".docs/plan/plan.docx";
753
- const children = [
754
- new docx.Paragraph({
755
- text: data.title || "Project Plan",
756
- heading: docx.HeadingLevel.TITLE,
757
- }),
758
- ];
759
-
760
- for (const phase of data.phases || []) {
761
- children.push(
762
- new docx.Paragraph({
763
- text: String(phase.name || "Phase"),
764
- heading: docx.HeadingLevel.HEADING_1,
765
- })
766
- );
767
-
768
- children.push(...shared.toParagraphs(docx, phase.summary ? [phase.summary] : []));
769
- children.push(...shared.toParagraphs(docx, phase.tasks, { bullet: true }));
770
- children.push(...shared.toParagraphs(docx, phase.risks, { bullet: true }));
771
- }
772
-
773
- const document = new docx.Document({
774
- sections: [{ children }],
775
- });
776
-
777
- docx.Packer.toBuffer(document).then((buffer) => {
778
- const absolutePath = shared.writeBuffer(outputPath, buffer);
779
- shared.writeSuccess("Plan", absolutePath);
780
- });
781
- }
782
- `,E=`#!/usr/bin/env node
783
-
784
- const shared = require("./_shared.js");
785
- const ExcelJS = shared.loadPackage("exceljs");
786
-
787
- const args = shared.parseArgs(process.argv.slice(2));
788
- const inputPath = args.input || ".agentic/workspace/documents/tasks.json";
789
- const outputPath = args.output || ".docs/tasks/tasks.xlsx";
790
- const data = shared.readJsonFile(inputPath);
791
-
792
- const workbook = new ExcelJS.Workbook();
793
- const worksheet = workbook.addWorksheet(data.sheetName || "Tasks");
794
- const rows = Array.isArray(data.rows) ? data.rows : [];
795
-
796
- worksheet.columns = Array.isArray(data.columns) && data.columns.length > 0
797
- ? data.columns
798
- : shared.deriveColumns(rows);
799
-
800
- for (const row of rows) {
801
- worksheet.addRow(row);
802
- }
803
-
804
- worksheet.views = [{ state: "frozen", ySplit: 1 }];
805
-
806
- workbook.xlsx.writeBuffer().then((buffer) => {
807
- const absolutePath = shared.writeBuffer(outputPath, buffer);
808
- shared.writeSuccess("Tasks", absolutePath);
809
- });
810
- `,x={".agentic/workspace/scripts/README.md":`# Export Scripts
811
-
812
- This folder contains starter Node.js export helpers for deliverables in \`.docs/\`.
813
-
814
- These scripts are meant to be a starting point. The AI agent should update the relevant script for the current project when the user provides a template, a preferred structure, or custom formatting rules.
815
-
816
- ## Included Starter Scripts
817
-
818
- - \`generate_brd.js\`
819
- - \`generate_frd.js\`
820
- - \`generate_estimate.js\`
821
- - \`generate_proposal.js\`
822
- - \`generate_plan.js\`
823
- - \`generate_tasks.js\`
824
- - \`_shared.js\`
825
-
826
- ## Planned Libraries
827
-
828
- - \`docx\` for BRD, FRD, and document-style plan output
829
- - \`pptxgenjs\` for proposal decks
830
- - \`exceljs\` for estimate, tasks, and spreadsheet-style plan output
831
-
832
- ## Install Strategy
833
-
834
- 1. Check whether the target project root already has a usable Node environment.
835
- 2. Prefer installing export dependencies there if suitable.
836
- 3. If root is not suitable or is ambiguous, ask the user which path should receive the install.
837
- 4. Ask the user before running any \`npm install\`.
838
-
839
- ## Default Input Files
840
-
841
- The starter scripts read structured input from \`.agentic/workspace/documents/\` by default:
842
-
843
- - BRD: \`brd.json\`
844
- - FRD: \`frd.json\`
845
- - Estimate: \`estimate.json\`
846
- - Proposal: \`proposal.json\`
847
- - Plan: \`plan.json\`
848
- - Tasks: \`tasks.json\`
849
-
850
- The agent may also keep matching \`.md\` drafts beside these files for human-readable working content.
851
-
852
- ## Default Outputs
853
-
854
- - BRD: \`.docs/brd/brd.docx\`
855
- - FRD: \`.docs/frd/frd.docx\`
856
- - Estimate: \`.docs/estimate/estimate.xlsx\`
857
- - Proposal: \`.docs/proposal/proposal.pptx\`
858
- - Plan: \`.docs/plan/plan.docx\` or \`.docs/plan/plan.xlsx\`
859
- - Tasks: \`.docs/tasks/tasks.xlsx\`
860
-
861
- ## Usage Pattern
862
-
863
- 1. Use the current prompt command to build the deliverable content.
864
- 2. Save or update structured export input under \`.agentic/workspace/documents/\`.
865
- 3. Adapt the relevant script if the project requires a custom template or style.
866
- 4. Install the needed package only after user approval.
867
- 5. Run the script from the project root.
868
- `,".agentic/workspace/scripts/_shared.js":I,".agentic/workspace/scripts/generate_brd.js":S,".agentic/workspace/scripts/generate_frd.js":A,".agentic/workspace/scripts/generate_estimate.js":R,".agentic/workspace/scripts/generate_proposal.js":q,".agentic/workspace/scripts/generate_plan.js":D,".agentic/workspace/scripts/generate_tasks.js":E};var y=()=>({...k,...w,...x});async function N(e){await Promise.all(d.map(t=>T(l.join(e,t),{recursive:!0,force:!0})))}async function B(e){await Promise.all(p.map(t=>F(l.join(e,t),{recursive:!0})))}async function C(e){let t=y();await Promise.all(Object.entries(t).map(([s,r])=>_(l.join(e,s),r,"utf8")))}async function M(){let e=process.cwd();await N(e),await B(e),await C(e),await m(e,f,g,i,c),console.log(""),console.log("create-agentic-starter: scaffold created successfully."),console.log(`Project folder: ${e}`),console.log(""),console.log("Next steps:"),console.log("1. Open your AI tool in this folder."),console.log("2. Start a new chat with @.agentic/init.md"),console.log("")}M().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`create-agentic-starter: failed to scaffold project. ${t}`),process.exitCode=1});
7
+ `;return`${e}${o}${r}
8
+ `}async function E(e,r,s,a,c){let o=A.join(e,r);try{let n=await k(o,"utf8"),S=F(n,s,a,c);await f(o,S,"utf8")}catch(n){if(n.code!=="ENOENT")throw n;await f(o,`${s}
9
+ `,"utf8")}}import{readFileSync as h}from"fs";import i from"path";import{fileURLToPath as y}from"url";function t(e){let r=process.argv[1]?i.dirname(i.resolve(process.argv[1])):i.dirname(y(import.meta.url));return h(i.join(r,e),"utf8")}var w="AGENTS.md",m="<!-- from create-agentic-starter:agents:start -->",p="<!-- from create-agentic-starter:agents:end -->",M=t("./templates/meta/agents.md").trimEnd(),T=`${m}
10
+ ${M}
11
+ ${p}
12
+ `;var j={".agentic/commands/project-requirements.md":t("./templates/commands/project-requirements.md"),".agentic/commands/architecture.md":t("./templates/commands/architecture.md"),".agentic/commands/create-brd.md":t("./templates/commands/create-brd.md"),".agentic/commands/create-frd.md":t("./templates/commands/create-frd.md"),".agentic/commands/create-estimate.md":t("./templates/commands/create-estimate.md"),".agentic/commands/create-proposal.md":t("./templates/commands/create-proposal.md"),".agentic/commands/create-plan.md":t("./templates/commands/create-plan.md"),".agentic/commands/create-tasks.md":t("./templates/commands/create-tasks.md")};var _={".agentic/init.md":t("./templates/core/init.md"),".agentic/context.md":t("./templates/core/context.md")};var l=[".agentic"],d=[".agentic",".agentic/commands",".agentic/workspace",".agentic/workspace/project",".agentic/workspace/memory",".agentic/workspace/documents",".agentic/workspace/scripts",".docs",".docs/brd",".docs/frd",".docs/estimate",".docs/proposal",".docs/plan",".docs/tasks"];var x={".agentic/workspace/scripts/README.md":t("./templates/scripts/README.md"),".agentic/workspace/scripts/_shared.js":t("./templates/scripts/_shared.js"),".agentic/workspace/scripts/generate_brd.js":t("./templates/scripts/generate_brd.js"),".agentic/workspace/scripts/generate_frd.js":t("./templates/scripts/generate_frd.js"),".agentic/workspace/scripts/generate_estimate.js":t("./templates/scripts/generate_estimate.js"),".agentic/workspace/scripts/generate_proposal.js":t("./templates/scripts/generate_proposal.js"),".agentic/workspace/scripts/generate_plan.js":t("./templates/scripts/generate_plan.js"),".agentic/workspace/scripts/generate_tasks.js":t("./templates/scripts/generate_tasks.js")};var R=()=>({..._,...j,...x});async function D(e){await Promise.all(l.map(r=>N(g.join(e,r),{recursive:!0,force:!0})))}async function G(e){await Promise.all(d.map(r=>$(g.join(e,r),{recursive:!0})))}async function O(e){let r=R();await Promise.all(Object.entries(r).map(([s,a])=>P(g.join(e,s),a,"utf8")))}async function I(){let e=process.cwd();await D(e),await G(e),await O(e),await E(e,w,T,m,p),console.log(""),console.log("create-agentic-starter: scaffold created successfully."),console.log(`Project folder: ${e}`),console.log(""),console.log("Next steps:"),console.log("1. Open your AI tool in this folder."),console.log("2. Start a new chat with @.agentic/init.md"),console.log("")}I().catch(e=>{let r=e instanceof Error?e.message:String(e);console.error(`create-agentic-starter: failed to scaffold project. ${r}`),process.exitCode=1});