create-agentic-starter 0.1.8 → 0.1.10
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 +74 -21
- package/dist/index.js +496 -131
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,42 +1,59 @@
|
|
|
1
1
|
# create-agentic-starter
|
|
2
2
|
|
|
3
|
-
`create-agentic-starter` scaffolds a
|
|
3
|
+
`create-agentic-starter` scaffolds a reusable AI working area inside an existing project.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It is meant for teams who repeatedly do the same early project work:
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
- FRD
|
|
11
|
-
- estimation
|
|
12
|
-
- proposal drafting
|
|
7
|
+
- collect requirements
|
|
8
|
+
- understand screenshots, notes, and references
|
|
9
|
+
- define architecture
|
|
10
|
+
- prepare BRD, FRD, estimate, proposal, plan, and task outputs
|
|
13
11
|
|
|
14
|
-
|
|
12
|
+
Instead of rebuilding prompts, folders, and working conventions for every new project, this package gives the team a standard `.agentic/` setup that works across AI tools such as Codex, Claude, Cursor, Zed, and similar agentic workflows.
|
|
15
13
|
|
|
16
|
-
##
|
|
14
|
+
## What This Project Is Trying To Achieve
|
|
15
|
+
|
|
16
|
+
The package creates a lightweight but structured workflow inside the target project so an AI agent can:
|
|
17
|
+
|
|
18
|
+
- understand the project from the files already present
|
|
19
|
+
- gather missing context from the user
|
|
20
|
+
- keep project memory in one place
|
|
21
|
+
- generate internal drafts
|
|
22
|
+
- create user-facing deliverables under `.docs/`
|
|
23
|
+
- use starter export scripts for `.docx`, `.xlsx`, and `.pptx` outputs
|
|
24
|
+
|
|
25
|
+
The goal is not to generate code for the product itself on day one. The goal is to standardize the project kick-off and delivery-document workflow so any team member can start from the same foundation.
|
|
26
|
+
|
|
27
|
+
## How To Run It
|
|
28
|
+
|
|
29
|
+
Run the command inside an existing project folder.
|
|
17
30
|
|
|
18
31
|
```bash
|
|
19
32
|
npx create-agentic-starter
|
|
20
33
|
```
|
|
21
34
|
|
|
35
|
+
or
|
|
36
|
+
|
|
22
37
|
```bash
|
|
23
38
|
bunx create-agentic-starter
|
|
24
39
|
```
|
|
25
40
|
|
|
26
|
-
|
|
41
|
+
The command is non-interactive. It does not ask setup questions.
|
|
42
|
+
|
|
43
|
+
## What The Command Does
|
|
27
44
|
|
|
28
|
-
|
|
45
|
+
When you run it, it will:
|
|
29
46
|
|
|
30
47
|
- recreate `.agentic/`
|
|
31
48
|
- create `.docs/` for user-facing outputs
|
|
32
|
-
- preserve existing `AGENTS.md
|
|
49
|
+
- preserve an existing `AGENTS.md` and append a marked `create-agentic-starter` section when needed
|
|
33
50
|
- never modify `.gitignore`
|
|
34
51
|
- never modify `README.md`
|
|
35
|
-
- print the next step for the team
|
|
52
|
+
- print the next step for the team: start with `@.agentic/init.md`
|
|
36
53
|
|
|
37
|
-
##
|
|
54
|
+
## What Gets Created
|
|
38
55
|
|
|
39
|
-
The
|
|
56
|
+
The scaffold sets up:
|
|
40
57
|
|
|
41
58
|
- `.agentic/init.md`
|
|
42
59
|
- `.agentic/context.md`
|
|
@@ -48,10 +65,46 @@ The command sets up:
|
|
|
48
65
|
- `.docs/`
|
|
49
66
|
- `AGENTS.md`
|
|
50
67
|
|
|
51
|
-
|
|
68
|
+
This gives you a clear split:
|
|
69
|
+
|
|
70
|
+
- `.agentic/workspace/project/` for raw project materials
|
|
71
|
+
- `.agentic/workspace/memory/` for AI-maintained project understanding
|
|
72
|
+
- `.agentic/workspace/documents/` for internal drafts and structured export input
|
|
73
|
+
- `.agentic/workspace/scripts/` for starter export scripts
|
|
74
|
+
- `.docs/` for final user-facing outputs
|
|
75
|
+
|
|
76
|
+
## Export Scripts
|
|
77
|
+
|
|
78
|
+
The scaffold includes starter export scripts under `.agentic/workspace/scripts/` for:
|
|
79
|
+
|
|
80
|
+
- `.docx` via `docx`
|
|
81
|
+
- `.pptx` via `pptxgenjs`
|
|
82
|
+
- `.xlsx` via `exceljs`
|
|
83
|
+
|
|
84
|
+
These scripts are intentionally starter implementations. They are expected to be adapted by the AI agent when the user provides:
|
|
85
|
+
|
|
86
|
+
- a custom template
|
|
87
|
+
- a preferred document style
|
|
88
|
+
- a specific export structure
|
|
89
|
+
|
|
90
|
+
## Typical Workflow
|
|
91
|
+
|
|
92
|
+
1. Run `npx create-agentic-starter` or `bunx create-agentic-starter` in the target project.
|
|
93
|
+
2. Open that project in your AI tool.
|
|
94
|
+
3. Start a new session with `@.agentic/init.md`.
|
|
95
|
+
4. Let the agent understand the project, ask questions, and update memory files.
|
|
96
|
+
5. Continue with commands in `.agentic/commands/` such as:
|
|
97
|
+
- `@.agentic/commands/project-requirements.md`
|
|
98
|
+
- `@.agentic/commands/architecture.md`
|
|
99
|
+
- `@.agentic/commands/create-brd.md`
|
|
100
|
+
- `@.agentic/commands/create-frd.md`
|
|
101
|
+
- `@.agentic/commands/create-estimate.md`
|
|
102
|
+
- `@.agentic/commands/create-proposal.md`
|
|
103
|
+
- `@.agentic/commands/create-plan.md`
|
|
104
|
+
- `@.agentic/commands/create-tasks.md`
|
|
52
105
|
|
|
53
|
-
|
|
106
|
+
## Notes
|
|
54
107
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
108
|
+
- The scaffold is designed to be lightweight and easy to drop into an existing repo.
|
|
109
|
+
- It is prompt-driven first, with export scripts available when the workflow needs generated Office documents.
|
|
110
|
+
- `AGENTS.md` is used as the human-readable guide inside the target project.
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{mkdir as
|
|
3
|
-
`);let
|
|
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(`
|
|
4
4
|
`)?`
|
|
5
5
|
`:`
|
|
6
6
|
|
|
7
|
-
`;return`${e}${
|
|
8
|
-
`}async function
|
|
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
9
|
`,"utf8")}}var f="AGENTS.md",i="<!-- from create-agentic-starter:agents:start -->",c="<!-- from create-agentic-starter:agents:end -->",g=`${i}
|
|
10
10
|
# Agentic Starter Guide
|
|
11
11
|
|
|
@@ -29,7 +29,7 @@ Use this scaffold when you want an AI tool to:
|
|
|
29
29
|
- \`.agentic/workspace/project/\`: raw project inputs such as screenshots, notes, requirement docs, and references
|
|
30
30
|
- \`.agentic/workspace/memory/\`: evolving AI-maintained project understanding
|
|
31
31
|
- \`.agentic/workspace/documents/\`: internal drafts and intermediate artifacts
|
|
32
|
-
- \`.agentic/workspace/scripts/\`:
|
|
32
|
+
- \`.agentic/workspace/scripts/\`: starter Node export helpers that can be adapted per project
|
|
33
33
|
- \`.docs/\`: user-facing deliverables
|
|
34
34
|
|
|
35
35
|
## How To Use It
|
|
@@ -64,7 +64,9 @@ Default user-facing outputs live under \`.docs/\`:
|
|
|
64
64
|
|
|
65
65
|
## Export Helpers
|
|
66
66
|
|
|
67
|
-
|
|
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.
|
|
68
70
|
|
|
69
71
|
Dependency guidance:
|
|
70
72
|
|
|
@@ -80,7 +82,7 @@ Planned library stack:
|
|
|
80
82
|
|
|
81
83
|
If your tool does not support \`@file\` references, paste the contents of the prompt file into a new chat manually.
|
|
82
84
|
${c}
|
|
83
|
-
`;var
|
|
85
|
+
`;var w={".agentic/commands/project-requirements.md":`# Project Requirements
|
|
84
86
|
|
|
85
87
|
Read:
|
|
86
88
|
|
|
@@ -152,18 +154,19 @@ Read:
|
|
|
152
154
|
|
|
153
155
|
## Your job
|
|
154
156
|
|
|
155
|
-
1. Maintain any internal draft content under \`.agentic/workspace/documents/brd
|
|
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.
|
|
156
158
|
2. Produce the user-facing BRD at \`.docs/brd/brd.docx\`.
|
|
157
|
-
3.
|
|
159
|
+
3. Use or update the starter script at \`.agentic/workspace/scripts/generate_brd.js\` when export automation is needed.
|
|
158
160
|
4. If the user already provided a template file/path/reference, follow it.
|
|
159
161
|
5. Otherwise ask whether they want a specific BRD style or structure.
|
|
160
|
-
6. If neither a template nor a style is provided, use the built-in default structure.
|
|
162
|
+
6. If neither a template nor a style is provided, use the built-in default structure and starter script shape.
|
|
161
163
|
7. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
|
|
162
164
|
8. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
|
|
163
165
|
9. Ask the user before running any \`npm install\`.
|
|
164
166
|
10. Use confirmed facts first and clearly label assumptions where needed.
|
|
165
|
-
11. If
|
|
166
|
-
12. If
|
|
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.
|
|
167
170
|
|
|
168
171
|
When the BRD is solid enough to define functional requirements, tell the user:
|
|
169
172
|
|
|
@@ -181,17 +184,18 @@ Read:
|
|
|
181
184
|
|
|
182
185
|
## Your job
|
|
183
186
|
|
|
184
|
-
1. Maintain any internal draft content under \`.agentic/workspace/documents/frd
|
|
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.
|
|
185
188
|
2. Produce the user-facing FRD at \`.docs/frd/frd.docx\`.
|
|
186
|
-
3.
|
|
189
|
+
3. Use or update the starter script at \`.agentic/workspace/scripts/generate_frd.js\` when export automation is needed.
|
|
187
190
|
4. Keep the content behavior straightforward unless the user explicitly supplies a template or style preference.
|
|
188
191
|
5. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
|
|
189
192
|
6. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
|
|
190
193
|
7. Ask the user before running any \`npm install\`.
|
|
191
|
-
8.
|
|
192
|
-
9.
|
|
193
|
-
10. If
|
|
194
|
-
11.
|
|
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.
|
|
195
199
|
|
|
196
200
|
When the FRD is strong enough for estimation, tell the user:
|
|
197
201
|
|
|
@@ -209,51 +213,25 @@ Read:
|
|
|
209
213
|
|
|
210
214
|
## Your job
|
|
211
215
|
|
|
212
|
-
1. Maintain any internal draft content under \`.agentic/workspace/documents/estimate
|
|
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.
|
|
213
217
|
2. Produce the user-facing estimate at \`.docs/estimate/estimate.xlsx\`.
|
|
214
|
-
3.
|
|
218
|
+
3. Use or update the starter script at \`.agentic/workspace/scripts/generate_estimate.js\` when export automation is needed.
|
|
215
219
|
4. If the user already provided a template file/path/reference, follow it.
|
|
216
220
|
5. Otherwise ask whether they want a specific estimate style or structure.
|
|
217
|
-
6. If neither a template nor a style is provided, use the built-in default structure.
|
|
221
|
+
6. If neither a template nor a style is provided, use the built-in default structure and starter script shape.
|
|
218
222
|
7. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
|
|
219
223
|
8. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
|
|
220
224
|
9. Ask the user before running any \`npm install\`.
|
|
221
|
-
10.
|
|
222
|
-
11.
|
|
223
|
-
12. If
|
|
224
|
-
13.
|
|
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.
|
|
225
230
|
|
|
226
231
|
When the estimate is strong enough for proposal drafting, tell the user:
|
|
227
232
|
|
|
228
233
|
\`Next type @.agentic/commands/create-proposal.md\`
|
|
229
|
-
`,".agentic/commands/create-proposal.md":`# Create
|
|
230
|
-
|
|
231
|
-
Read:
|
|
232
|
-
|
|
233
|
-
- \`@.agentic/context.md\`
|
|
234
|
-
- \`.agentic/workspace/memory/project-overview.md\`
|
|
235
|
-
- \`.agentic/workspace/memory/requirements.md\`
|
|
236
|
-
- \`.agentic/workspace/memory/architecture.md\`
|
|
237
|
-
- \`.agentic/workspace/documents/brd.*\` if it exists
|
|
238
|
-
- \`.agentic/workspace/documents/frd.*\` if it exists
|
|
239
|
-
- \`.agentic/workspace/documents/estimate.*\` if it exists
|
|
240
|
-
|
|
241
|
-
## Your job
|
|
242
|
-
|
|
243
|
-
1. Maintain any internal draft content under \`.agentic/workspace/documents/proposal.*\` if useful.
|
|
244
|
-
2. Produce the user-facing proposal at \`.docs/proposal/proposal.pptx\`.
|
|
245
|
-
3. Assume Node.js export scripts will later convert structured content and templates into the final \`.pptx\`.
|
|
246
|
-
4. Keep the prompt focused on presentation-ready content unless the user explicitly provides a template or style preference.
|
|
247
|
-
5. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
|
|
248
|
-
6. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
|
|
249
|
-
7. Ask the user before running any \`npm install\`.
|
|
250
|
-
8. Make gaps explicit instead of inventing details.
|
|
251
|
-
9. 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.
|
|
252
|
-
10. If key proposal inputs are still missing, ask focused questions and keep improving the proposal instead of prematurely declaring completion.
|
|
253
|
-
11. Ask only the minimum blocking questions.
|
|
254
|
-
|
|
255
|
-
When the proposal is complete enough for handoff, tell the user the workflow is complete and list the generated files.
|
|
256
|
-
`,".agentic/commands/create-plan.md":`# Create Plan
|
|
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
|
|
257
235
|
|
|
258
236
|
Read:
|
|
259
237
|
|
|
@@ -265,23 +243,24 @@ Read:
|
|
|
265
243
|
|
|
266
244
|
## Your job
|
|
267
245
|
|
|
268
|
-
1. Maintain any internal draft content under \`.agentic/workspace/documents/plan
|
|
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.
|
|
269
247
|
2. If the user has not already specified the preferred plan output, ask whether they want:
|
|
270
248
|
- a document-style plan, or
|
|
271
249
|
- a spreadsheet-style plan
|
|
272
250
|
3. If the user already provided a template file/path/reference, follow it.
|
|
273
251
|
4. Otherwise ask whether they want a specific plan style or structure.
|
|
274
|
-
5. If neither a template nor a style is provided, use the built-in default structure.
|
|
252
|
+
5. If neither a template nor a style is provided, use the built-in default structure and starter script shape.
|
|
275
253
|
6. Produce the user-facing output at:
|
|
276
254
|
- \`.docs/plan/plan.docx\` for document-style plan output, or
|
|
277
255
|
- \`.docs/plan/plan.xlsx\` for spreadsheet-style plan output
|
|
278
|
-
7.
|
|
256
|
+
7. Use or update the starter script at \`.agentic/workspace/scripts/generate_plan.js\` when export automation is needed.
|
|
279
257
|
8. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
|
|
280
258
|
9. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
|
|
281
259
|
10. Ask the user before running any \`npm install\`.
|
|
282
|
-
11.
|
|
283
|
-
12.
|
|
284
|
-
13. If
|
|
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.
|
|
285
264
|
|
|
286
265
|
When the plan is complete enough, tell the user the available next options:
|
|
287
266
|
|
|
@@ -289,40 +268,7 @@ When the plan is complete enough, tell the user the available next options:
|
|
|
289
268
|
- \`@.agentic/commands/create-tasks.md\`
|
|
290
269
|
- \`@.agentic/commands/create-brd.md\`
|
|
291
270
|
- \`@.agentic/commands/create-proposal.md\`
|
|
292
|
-
`,".agentic/commands/create-tasks.md"
|
|
293
|
-
|
|
294
|
-
Read:
|
|
295
|
-
|
|
296
|
-
- \`@.agentic/context.md\`
|
|
297
|
-
- \`.agentic/workspace/memory/project-overview.md\`
|
|
298
|
-
- \`.agentic/workspace/memory/requirements.md\`
|
|
299
|
-
- \`.agentic/workspace/memory/architecture.md\` if it exists
|
|
300
|
-
- \`.agentic/workspace/documents/plan.*\` if it exists
|
|
301
|
-
- \`.agentic/workspace/documents/brd.*\` if it exists
|
|
302
|
-
- \`.agentic/workspace/documents/frd.*\` if it exists
|
|
303
|
-
- relevant files under \`.agentic/workspace/project/\`
|
|
304
|
-
|
|
305
|
-
## Your job
|
|
306
|
-
|
|
307
|
-
1. Maintain any internal draft content under \`.agentic/workspace/documents/tasks.*\` if useful.
|
|
308
|
-
2. Produce the user-facing task breakdown at \`.docs/tasks/tasks.xlsx\`.
|
|
309
|
-
3. Assume Node.js export scripts will later convert structured content and templates into the final \`.xlsx\`.
|
|
310
|
-
4. If the user already provided a template file/path/reference, follow it.
|
|
311
|
-
5. Otherwise ask whether they want a specific task breakdown style or structure.
|
|
312
|
-
6. If neither a template nor a style is provided, use the built-in default structure.
|
|
313
|
-
7. If export dependencies are needed, first check whether the target project root already has a usable Node environment.
|
|
314
|
-
8. Prefer the project root if it is suitable; otherwise ask the user which path should receive the install.
|
|
315
|
-
9. Ask the user before running any \`npm install\`.
|
|
316
|
-
10. Produce a practical task breakdown with modules, roles, dependencies, sequencing, and status placeholders.
|
|
317
|
-
11. 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.
|
|
318
|
-
12. If execution detail is missing, ask focused questions and keep refining instead of routing.
|
|
319
|
-
|
|
320
|
-
When the tasks are complete enough, tell the user the available next options:
|
|
321
|
-
|
|
322
|
-
- \`@.agentic/commands/create-plan.md\`
|
|
323
|
-
- \`@.agentic/commands/create-proposal.md\`
|
|
324
|
-
- \`@.agentic/commands/create-brd.md\`
|
|
325
|
-
`};var w={".agentic/init.md":`# Init
|
|
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
|
|
326
272
|
|
|
327
273
|
Read \`@.agentic/context.md\` first.
|
|
328
274
|
|
|
@@ -423,10 +369,13 @@ Use \`.agentic/workspace/documents/\` for internal drafts or intermediate artifa
|
|
|
423
369
|
- draft proposal content
|
|
424
370
|
- draft plan content
|
|
425
371
|
- draft task breakdowns
|
|
372
|
+
- structured export input such as \`brd.json\`, \`frd.json\`, \`estimate.json\`, \`proposal.json\`, \`plan.json\`, and \`tasks.json\`
|
|
426
373
|
|
|
427
374
|
### Scripts
|
|
428
375
|
|
|
429
|
-
Use \`.agentic/workspace/scripts/\` for
|
|
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.
|
|
430
379
|
|
|
431
380
|
Planned library stack:
|
|
432
381
|
|
|
@@ -464,40 +413,456 @@ Use \`.docs/\` for user-facing deliverables:
|
|
|
464
413
|
8. Ask the user before running any install command.
|
|
465
414
|
9. Ask only the minimum blocking questions required to continue.
|
|
466
415
|
10. Always end by telling the user the exact next command to run or listing the available next options.
|
|
467
|
-
`};var d=[".agentic"],
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
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});
|