create-agentic-starter 0.1.5 → 0.1.7
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 +85 -70
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{mkdir as
|
|
2
|
+
import{mkdir as I,rm as A,writeFile as E}from"fs/promises";import u from"path";import{readFile as R,writeFile as l}from"fs/promises";import b from"path";function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(e,t,o,r){let n=new RegExp(`${g(o)}[\\s\\S]*?${g(r)}\\n?`,"m");if(n.test(e))return e.replace(n,`${t}
|
|
3
|
+
`);let s=e.endsWith(`
|
|
4
|
+
`)?`
|
|
5
|
+
`:`
|
|
6
|
+
|
|
7
|
+
`;return`${e}${s}${t}
|
|
8
|
+
`}async function a(e,t,o,r,n){let s=b.join(e,t);try{let i=await R(s,"utf8"),j=q(i,o,r,n);await l(s,j,"utf8")}catch(i){if(i.code!=="ENOENT")throw i;await l(s,`${o}
|
|
9
|
+
`,"utf8")}}var f="AGENTS.md",h=".gitignore",c="<!-- from create-agentic-starter:agents:start -->",m="<!-- from create-agentic-starter:agents:end -->",d="# from create-agentic-starter:start",p="# from create-agentic-starter:end",w=`${c}
|
|
10
|
+
# Agentic Starter Guide
|
|
11
|
+
|
|
12
|
+
This project includes a reusable AI working area under \`.agentic/\` for project kick-off and pre-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
|
+
- generate markdown deliverables such as BRD, FRD, estimate, and proposal
|
|
21
|
+
|
|
22
|
+
## Folder Purpose
|
|
23
|
+
|
|
24
|
+
- \`.agentic/init.md\`: first prompt for every new AI session
|
|
25
|
+
- \`.agentic/context.md\`: shared rules and folder map
|
|
26
|
+
- \`.agentic/commands/\`: task-specific prompt files you reference in your AI tool
|
|
27
|
+
- \`.agentic/workspace/project/\`: raw project inputs such as screenshots, notes, requirement docs, and reference links
|
|
28
|
+
- \`.agentic/workspace/memory/\`: evolving AI-maintained project understanding
|
|
29
|
+
- \`.agentic/workspace/documents/\`: polished markdown deliverables
|
|
30
|
+
|
|
31
|
+
## How To Use It
|
|
32
|
+
|
|
33
|
+
1. Open your AI tool in this project.
|
|
34
|
+
2. Start every new session with \`@.agentic/init.md\`.
|
|
35
|
+
3. Follow the command sequence below.
|
|
36
|
+
|
|
37
|
+
## V1 Command Sequence
|
|
38
|
+
|
|
39
|
+
1. \`@.agentic/init.md\`
|
|
40
|
+
2. \`@.agentic/commands/project-requirements.md\`
|
|
41
|
+
3. \`@.agentic/commands/architecture.md\`
|
|
42
|
+
4. \`@.agentic/commands/create-brd.md\`
|
|
43
|
+
5. \`@.agentic/commands/create-frd.md\`
|
|
44
|
+
6. \`@.agentic/commands/create-estimate.md\`
|
|
45
|
+
7. \`@.agentic/commands/create-proposal.md\`
|
|
46
|
+
|
|
47
|
+
If your tool does not support \`@file\` references, paste the contents of the prompt file into a new chat manually.
|
|
48
|
+
${m}
|
|
49
|
+
`,k=`${d}
|
|
50
|
+
.agentic/workspace/documents/
|
|
51
|
+
.agentic/workspace/memory/
|
|
52
|
+
${p}
|
|
53
|
+
`;var y=[".agentic"],x=[".agentic",".agentic/commands",".agentic/workspace",".agentic/workspace/project",".agentic/workspace/memory",".agentic/workspace/documents"],v=()=>({".agentic/init.md":`# Init
|
|
3
54
|
|
|
4
55
|
Read \`@.agentic/context.md\` first.
|
|
5
56
|
|
|
@@ -39,7 +90,7 @@ You are starting a fresh AI session inside this project. Your job is to quickly
|
|
|
39
90
|
- available references such as screenshots, docs, notes, links, or file paths
|
|
40
91
|
- desired outputs
|
|
41
92
|
5. If enough context exists, give a short summary of the project and the most important missing pieces.
|
|
42
|
-
6. If the user mentions screenshots, notes, requirement docs, links, or file paths,
|
|
93
|
+
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.
|
|
43
94
|
7. After the first useful exchange, create or update:
|
|
44
95
|
- \`.agentic/workspace/memory/project-overview.md\`
|
|
45
96
|
- \`.agentic/workspace/memory/requirements.md\`
|
|
@@ -47,7 +98,8 @@ You are starting a fresh AI session inside this project. Your job is to quickly
|
|
|
47
98
|
8. Write drafts even from partial information.
|
|
48
99
|
9. Clearly separate confirmed facts, assumptions, and open questions.
|
|
49
100
|
10. Do not route immediately just because the workspace is empty. Do useful synthesis or ask focused questions first.
|
|
50
|
-
11.
|
|
101
|
+
11. If important project basics are still missing, continue asking focused questions and keep updating the memory files instead of routing forward yet.
|
|
102
|
+
12. Only when you have done enough useful intake work to create a solid initial understanding, end with:
|
|
51
103
|
|
|
52
104
|
\`Next type @.agentic/commands/project-requirements.md\`
|
|
53
105
|
`,".agentic/context.md":`# Context
|
|
@@ -75,6 +127,8 @@ Use \`.agentic/workspace/project/\` for:
|
|
|
75
127
|
- links captured into markdown files
|
|
76
128
|
- user-supplied project references
|
|
77
129
|
|
|
130
|
+
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.
|
|
131
|
+
|
|
78
132
|
### Memory
|
|
79
133
|
|
|
80
134
|
Use \`.agentic/workspace/memory/\` for:
|
|
@@ -98,8 +152,10 @@ Use \`.agentic/workspace/documents/\` for polished outputs:
|
|
|
98
152
|
|
|
99
153
|
1. Reuse and improve existing workspace files when they already exist.
|
|
100
154
|
2. Do not scan the whole repository unless the user explicitly asks.
|
|
101
|
-
3.
|
|
102
|
-
4.
|
|
155
|
+
3. If relevant project assets are outside \`.agentic/workspace/project/\`, move them into the workspace by default and then use the workspace copy.
|
|
156
|
+
4. Only avoid moving files when the user explicitly asks to keep them in place.
|
|
157
|
+
5. Ask only the minimum blocking questions required to continue.
|
|
158
|
+
6. Always end by telling the user the exact next command to run.
|
|
103
159
|
`,".agentic/commands/project-requirements.md":`# Project Requirements
|
|
104
160
|
|
|
105
161
|
Read:
|
|
@@ -117,7 +173,7 @@ Read:
|
|
|
117
173
|
3. Accept either:
|
|
118
174
|
- existing file paths already shared by the user, or
|
|
119
175
|
- fresh explanation typed in chat
|
|
120
|
-
4.
|
|
176
|
+
4. Move or organize project inputs into \`.agentic/workspace/project/\` by default unless the user explicitly says not to.
|
|
121
177
|
5. Organize and normalize the project context so the later architecture and document steps can rely on it.
|
|
122
178
|
6. Create or update:
|
|
123
179
|
- \`.agentic/workspace/memory/project-overview.md\`
|
|
@@ -125,9 +181,10 @@ Read:
|
|
|
125
181
|
- \`.agentic/workspace/memory/open-questions.md\`
|
|
126
182
|
7. Capture assumptions separately from confirmed facts.
|
|
127
183
|
8. Reduce open questions where possible before handing off to architecture.
|
|
128
|
-
9.
|
|
184
|
+
9. If the requirement understanding is still weak or important gaps remain, continue asking focused project questions and keep updating the memory files.
|
|
185
|
+
10. Only ask for missing details that block useful requirement understanding.
|
|
129
186
|
|
|
130
|
-
When
|
|
187
|
+
When the requirements are strong enough for architecture work, tell the user:
|
|
131
188
|
|
|
132
189
|
\`Next type @.agentic/commands/architecture.md\`
|
|
133
190
|
`,".agentic/commands/architecture.md":`# Architecture
|
|
@@ -147,9 +204,11 @@ Read:
|
|
|
147
204
|
3. Cover frontend, backend, data, integrations, authentication, deployment, and key risks when relevant.
|
|
148
205
|
4. Add a diagram description or mermaid diagram when supported.
|
|
149
206
|
5. Mention draw.io MCP only as an optional tool if available in the user's environment.
|
|
150
|
-
6.
|
|
207
|
+
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.
|
|
208
|
+
7. If architecture-critical information is still missing, ask architecture-specific questions and keep updating \`.agentic/workspace/memory/architecture.md\` instead of routing yet.
|
|
209
|
+
8. Ask only the minimum blocking questions.
|
|
151
210
|
|
|
152
|
-
When
|
|
211
|
+
When the architecture is strong enough for BRD drafting, tell the user:
|
|
153
212
|
|
|
154
213
|
\`Next type @.agentic/commands/create-brd.md\`
|
|
155
214
|
`,".agentic/commands/create-brd.md":`# Create BRD
|
|
@@ -167,9 +226,10 @@ Read:
|
|
|
167
226
|
1. Create or update \`.agentic/workspace/documents/brd.md\`.
|
|
168
227
|
2. Produce a polished markdown Business Requirements Document.
|
|
169
228
|
3. Use confirmed facts first and clearly label assumptions where needed.
|
|
170
|
-
4. If
|
|
229
|
+
4. 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.
|
|
230
|
+
5. If critical information is missing, ask only the minimum blocking questions and keep improving the BRD draft instead of routing yet.
|
|
171
231
|
|
|
172
|
-
When
|
|
232
|
+
When the BRD is solid enough to define functional requirements, tell the user:
|
|
173
233
|
|
|
174
234
|
\`Next type @.agentic/commands/create-frd.md\`
|
|
175
235
|
`,".agentic/commands/create-frd.md":`# Create FRD
|
|
@@ -188,9 +248,11 @@ Read:
|
|
|
188
248
|
1. Create or update \`.agentic/workspace/documents/frd.md\`.
|
|
189
249
|
2. Produce a polished markdown Functional Requirements Document.
|
|
190
250
|
3. Cover modules, flows, validations, roles, and edge cases where relevant.
|
|
191
|
-
4.
|
|
251
|
+
4. 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.
|
|
252
|
+
5. If important functional details are still missing, ask focused follow-up questions and keep improving the FRD instead of routing yet.
|
|
253
|
+
6. Ask only the minimum blocking questions.
|
|
192
254
|
|
|
193
|
-
When
|
|
255
|
+
When the FRD is strong enough for estimation, tell the user:
|
|
194
256
|
|
|
195
257
|
\`Next type @.agentic/commands/create-estimate.md\`
|
|
196
258
|
`,".agentic/commands/create-estimate.md":`# Create Estimate
|
|
@@ -209,9 +271,11 @@ Read:
|
|
|
209
271
|
1. Create or update \`.agentic/workspace/documents/estimate.md\`.
|
|
210
272
|
2. Produce a markdown estimate with effort breakdown, assumptions, dependencies, and risks.
|
|
211
273
|
3. Keep the estimate aligned with the known scope and clearly state uncertainty.
|
|
212
|
-
4.
|
|
274
|
+
4. 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.
|
|
275
|
+
5. 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.
|
|
276
|
+
6. Ask only the minimum blocking questions.
|
|
213
277
|
|
|
214
|
-
When
|
|
278
|
+
When the estimate is strong enough for proposal drafting, tell the user:
|
|
215
279
|
|
|
216
280
|
\`Next type @.agentic/commands/create-proposal.md\`
|
|
217
281
|
`,".agentic/commands/create-proposal.md":`# Create Proposal
|
|
@@ -231,58 +295,9 @@ Read:
|
|
|
231
295
|
1. Create or update \`.agentic/workspace/documents/proposal.md\`.
|
|
232
296
|
2. Produce a polished markdown proposal using the known scope, architecture direction, and estimate.
|
|
233
297
|
3. Make gaps explicit instead of inventing details.
|
|
234
|
-
4.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
`}),b=`${p}
|
|
238
|
-
# Agentic Starter Guide
|
|
239
|
-
|
|
240
|
-
This project includes a reusable AI working area under \`.agentic/\` for project kick-off and pre-delivery documentation.
|
|
241
|
-
|
|
242
|
-
## What This Is For
|
|
243
|
-
|
|
244
|
-
Use this scaffold when you want an AI tool to:
|
|
245
|
-
|
|
246
|
-
- understand a project from files, notes, screenshots, and links
|
|
247
|
-
- maintain structured project memory
|
|
248
|
-
- generate markdown deliverables such as BRD, FRD, estimate, and proposal
|
|
249
|
-
|
|
250
|
-
## Folder Purpose
|
|
251
|
-
|
|
252
|
-
- \`.agentic/init.md\`: first prompt for every new AI session
|
|
253
|
-
- \`.agentic/context.md\`: shared rules and folder map
|
|
254
|
-
- \`.agentic/commands/\`: task-specific prompt files you reference in your AI tool
|
|
255
|
-
- \`.agentic/workspace/project/\`: raw project inputs such as screenshots, notes, requirement docs, and reference links
|
|
256
|
-
- \`.agentic/workspace/memory/\`: evolving AI-maintained project understanding
|
|
257
|
-
- \`.agentic/workspace/documents/\`: polished markdown deliverables
|
|
258
|
-
|
|
259
|
-
## How To Use It
|
|
260
|
-
|
|
261
|
-
1. Open your AI tool in this project.
|
|
262
|
-
2. Start every new session with \`@.agentic/init.md\`.
|
|
263
|
-
3. Follow the command sequence below.
|
|
264
|
-
|
|
265
|
-
## V1 Command Sequence
|
|
266
|
-
|
|
267
|
-
1. \`@.agentic/init.md\`
|
|
268
|
-
2. \`@.agentic/commands/project-requirements.md\`
|
|
269
|
-
3. \`@.agentic/commands/architecture.md\`
|
|
270
|
-
4. \`@.agentic/commands/create-brd.md\`
|
|
271
|
-
5. \`@.agentic/commands/create-frd.md\`
|
|
272
|
-
6. \`@.agentic/commands/create-estimate.md\`
|
|
273
|
-
7. \`@.agentic/commands/create-proposal.md\`
|
|
274
|
-
|
|
275
|
-
If your tool does not support \`@file\` references, paste the contents of the prompt file into a new chat manually.
|
|
276
|
-
${u}
|
|
277
|
-
`,q=`${l}
|
|
278
|
-
.agentic/workspace/documents/
|
|
279
|
-
.agentic/workspace/memory/
|
|
280
|
-
${g}
|
|
281
|
-
`,R=[".agentic",".agentic/commands",".agentic/workspace",".agentic/workspace/project",".agentic/workspace/memory",".agentic/workspace/documents"];async function A(e){await Promise.all(x.map(t=>k(i.join(e,t),{recursive:!0,force:!0})))}async function E(e){await Promise.all(R.map(t=>f(i.join(e,t),{recursive:!0})))}async function I(e){let t=v();await Promise.all(Object.entries(t).map(([o,n])=>c(i.join(e,o),n,"utf8")))}function T(e,t,o,n){let s=new RegExp(`${m(o)}[\\s\\S]*?${m(n)}\\n?`,"m");if(s.test(e))return e.replace(s,`${t}
|
|
282
|
-
`);let r=e.endsWith(`
|
|
283
|
-
`)?`
|
|
284
|
-
`:`
|
|
298
|
+
4. 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.
|
|
299
|
+
5. If key proposal inputs are still missing, ask focused questions and keep improving the proposal instead of prematurely declaring completion.
|
|
300
|
+
6. Ask only the minimum blocking questions.
|
|
285
301
|
|
|
286
|
-
|
|
287
|
-
`}function
|
|
288
|
-
`,"utf8")}}async function N(){let e=process.cwd();await A(e),await E(e),await I(e),await d(e,y,b,p,u),await d(e,j,q,l,g),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("")}N().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`create-agentic-starter: failed to scaffold project. ${t}`),process.exitCode=1});
|
|
302
|
+
When the proposal is complete enough for handoff, tell the user the v1 workflow is complete and list the generated files.
|
|
303
|
+
`});async function T(e){await Promise.all(y.map(t=>A(u.join(e,t),{recursive:!0,force:!0})))}async function S(e){await Promise.all(x.map(t=>I(u.join(e,t),{recursive:!0})))}async function N(e){let t=v();await Promise.all(Object.entries(t).map(([o,r])=>E(u.join(e,o),r,"utf8")))}async function D(){let e=process.cwd();await T(e),await S(e),await N(e),await a(e,f,w,c,m),await a(e,h,k,d,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("")}D().catch(e=>{let t=e instanceof Error?e.message:String(e);console.error(`create-agentic-starter: failed to scaffold project. ${t}`),process.exitCode=1});
|