create-agentic-starter 0.1.18 → 0.1.20
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,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{mkdir as
|
|
3
|
-
`);let
|
|
2
|
+
import{mkdir as G,rm as v,writeFile as I}from"fs/promises";import u from"path";import{readFile as A,writeFile as w}from"fs/promises";import M from"path";function E(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function N(e,r,s,a){let n=new RegExp(`${E(s)}[\\s\\S]*?${E(a)}\\n?`,"m");if(n.test(e))return e.replace(n,`${r}
|
|
3
|
+
`);let c=e.endsWith(`
|
|
4
4
|
`)?`
|
|
5
5
|
`:`
|
|
6
6
|
|
|
7
|
-
`;return`${
|
|
8
|
-
`}async function
|
|
9
|
-
`,"utf8")}}import{existsSync as
|
|
10
|
-
${
|
|
11
|
-
${
|
|
12
|
-
`;var
|
|
7
|
+
`;return`${e}${c}${r}
|
|
8
|
+
`}async function T(e,r,s,a,n){let c=M.join(e,r);try{let o=await A(c,"utf8"),h=N(o,s,a,n);await w(c,h,"utf8")}catch(o){if(o.code!=="ENOENT")throw o;await w(c,`${s}
|
|
9
|
+
`,"utf8")}}import{existsSync as b,readFileSync as P,realpathSync as j}from"fs";import i from"path";import{fileURLToPath as B}from"url";function t(e){let r=[i.dirname(j(B(import.meta.url))),process.argv[1]?i.dirname(j(process.argv[1])):null,process.argv[1]?i.dirname(i.resolve(process.argv[1])):null].filter(s=>!!s);for(let s of r){let a=i.join(s,e);if(b(a))return P(a,"utf8")}throw new Error(`Template not found: ${e}. Checked: ${r.join(", ")}`)}var x="AGENTS.md",p="<!-- from create-agentic-starter:agents:start -->",d="<!-- from create-agentic-starter:agents:end -->",D=t("./templates/meta/agents.md").trimEnd(),y=`${p}
|
|
10
|
+
${D}
|
|
11
|
+
${d}
|
|
12
|
+
`;var k={".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"),".agentic/commands/implementation.md":t("./templates/commands/implementation.md")};var _={".agentic/init.md":t("./templates/core/init.md"),".agentic/context.md":t("./templates/core/context.md")};var l=[".agentic"],g=[".agentic",".agentic/commands",".agentic/workspace",".agentic/workspace/project",".agentic/workspace/memory",".agentic/workspace/memory/features",".agentic/workspace/documents",".agentic/workspace/scripts",".docs",".docs/brd",".docs/frd",".docs/estimate",".docs/proposal",".docs/plan",".docs/tasks"];var $={".agentic/workspace/memory/project-state.md":t("./templates/memory/project-state.md"),".agentic/workspace/memory/decisions.md":t("./templates/memory/decisions.md"),".agentic/workspace/memory/next-actions.md":t("./templates/memory/next-actions.md"),".agentic/workspace/memory/handoff.md":t("./templates/memory/handoff.md")};var F={".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 S=()=>({..._,...k,...$,...F});var m={reset:"\x1B[0m",bold:"\x1B[1m",red:"\x1B[31m",green:"\x1B[32m",cyan:"\x1B[36m"};function f(e,r){return process.stdout.isTTY?`${r}${e}${m.reset}`:e}function R(e,r){let s=[e,...r],a=Math.max(...s.map(o=>o.length)),n=`+${"-".repeat(a+2)}+`,c=s.map(o=>`| ${o.padEnd(a)} |`);return[n,...c,n].join(`
|
|
13
|
+
`)}async function O(e){await Promise.all(l.map(r=>v(u.join(e,r),{recursive:!0,force:!0})))}async function C(e){await Promise.all(g.map(r=>G(u.join(e,r),{recursive:!0})))}async function H(e){let r=S();await Promise.all(Object.entries(r).map(([s,a])=>I(u.join(e,s),a,"utf8")))}async function K(){let e=process.cwd();await O(e),await C(e),await H(e),await T(e,x,y,p,d);let r=R(f("create-agentic-starter ready",`${m.bold}${m.green}`),[`Folder: ${e}`,`Next: ${f("@.agentic/init.md",`${m.bold}${m.cyan}`)}`]);console.log(r)}K().catch(e=>{let r=e instanceof Error?e.message:String(e),s=R(f("create-agentic-starter failed",`${m.bold}${m.red}`),[r]);console.error(s),process.exitCode=1});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Implementation
|
|
2
|
+
|
|
3
|
+
Read:
|
|
4
|
+
|
|
5
|
+
- `@.agentic/context.md`
|
|
6
|
+
- `.agentic/workspace/memory/project-state.md`
|
|
7
|
+
- `.agentic/workspace/memory/handoff.md`
|
|
8
|
+
- `.agentic/workspace/memory/decisions.md` if it exists
|
|
9
|
+
- `.agentic/workspace/memory/project-overview.md` if it exists
|
|
10
|
+
- `.agentic/workspace/memory/requirements.md` if it exists
|
|
11
|
+
- `.agentic/workspace/memory/architecture.md` if it exists
|
|
12
|
+
- relevant feature files under `.agentic/workspace/memory/features/` if they exist
|
|
13
|
+
- relevant files under `.agentic/workspace/project/`
|
|
14
|
+
|
|
15
|
+
## Your job
|
|
16
|
+
|
|
17
|
+
1. Handle direct coding, feature, page, flow, or implementation requests.
|
|
18
|
+
2. Identify the affected feature or create a new feature record if needed.
|
|
19
|
+
3. Do the requested implementation work using the existing project context.
|
|
20
|
+
4. If the user asks for a page, route, feature, component, or flow change, treat that as implementation work even if they did not tag a command.
|
|
21
|
+
5. Ask only the minimum blocking questions needed to implement safely.
|
|
22
|
+
6. Memory capture is always on for this step. Update:
|
|
23
|
+
- `.agentic/workspace/memory/project-state.md`
|
|
24
|
+
- `.agentic/workspace/memory/handoff.md`
|
|
25
|
+
- `.agentic/workspace/memory/features/<feature>.md`
|
|
26
|
+
7. Update `.agentic/workspace/memory/decisions.md` only if the work creates a meaningful product or technical decision.
|
|
27
|
+
8. Update `.agentic/workspace/memory/requirements.md` only if the request changes product scope or behavior expectations.
|
|
28
|
+
9. Update `.agentic/workspace/memory/architecture.md` only if the work changes architecture or important technical direction.
|
|
29
|
+
10. Keep `project-state.md` and `handoff.md` short.
|
|
30
|
+
11. Use one file per feature under `.agentic/workspace/memory/features/` with kebab-case naming such as:
|
|
31
|
+
- `landing-page.md`
|
|
32
|
+
- `about-page.md`
|
|
33
|
+
- `checkout.md`
|
|
34
|
+
12. Use this feature file structure:
|
|
35
|
+
- Feature Name
|
|
36
|
+
- Current Status
|
|
37
|
+
- Summary
|
|
38
|
+
- Requirements
|
|
39
|
+
- Implementation Notes
|
|
40
|
+
- Dependencies
|
|
41
|
+
- Blockers
|
|
42
|
+
- Decisions Affecting This Feature
|
|
43
|
+
- Related Outputs or Docs
|
|
44
|
+
- Next Steps
|
|
45
|
+
|
|
46
|
+
When the implementation work is complete enough, tell the user the available next options and make it clear they can also say what they want to do next.
|
|
47
|
+
|
|
48
|
+
- continue implementation work
|
|
49
|
+
- `@.agentic/commands/create-plan.md`
|
|
50
|
+
- `@.agentic/commands/create-tasks.md`
|
|
51
|
+
- `@.agentic/commands/create-brd.md`
|
|
52
|
+
- `@.agentic/commands/create-proposal.md`
|
|
@@ -7,6 +7,7 @@ This repository uses a prompt-based project kick-off system.
|
|
|
7
7
|
- `.agentic/init.md`: session bootstrap prompt
|
|
8
8
|
- `.agentic/context.md`: shared rules and folder semantics
|
|
9
9
|
- `.agentic/commands/`: prompt files for distinct tasks
|
|
10
|
+
- `.agentic/commands/implementation.md`: implementation and feature-work prompt
|
|
10
11
|
- `.agentic/workspace/project/`: raw project materials
|
|
11
12
|
- `.agentic/workspace/memory/`: evolving AI-maintained understanding
|
|
12
13
|
- `.agentic/workspace/documents/`: internal drafts and intermediate artifacts
|
|
@@ -100,8 +101,14 @@ Use `.docs/` for user-facing deliverables:
|
|
|
100
101
|
10. Do not restart basic intake if the workspace already contains strong memory unless the existing information is clearly incomplete or contradictory.
|
|
101
102
|
11. If the user directly asks for a specific deliverable, feature discussion, or implementation task and enough context already exists, do the work and capture the outcome automatically in the relevant memory files.
|
|
102
103
|
12. Update only the memory files affected by the current work instead of rewriting everything.
|
|
103
|
-
13.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
104
|
+
13. For normal coding work, update:
|
|
105
|
+
- the relevant feature file under `.agentic/workspace/memory/features/`
|
|
106
|
+
- `.agentic/workspace/memory/project-state.md`
|
|
107
|
+
- `.agentic/workspace/memory/handoff.md`
|
|
108
|
+
14. Update `.agentic/workspace/memory/decisions.md` only when the work creates a meaningful product or technical decision.
|
|
109
|
+
15. Update `.agentic/workspace/memory/requirements.md` or `.agentic/workspace/memory/architecture.md` only when the current work actually changes them.
|
|
110
|
+
16. Prefer the target project root for Node-based export dependencies when a usable Node setup already exists there.
|
|
111
|
+
17. If root is not suitable, ask the user which path should be used for dependency installation.
|
|
112
|
+
18. Ask the user before running any install command.
|
|
113
|
+
19. Ask only the minimum blocking questions required to continue.
|
|
114
|
+
20. Always end by telling the user the exact next command to run or listing the available next options.
|
|
@@ -44,6 +44,9 @@ You are starting a fresh AI session inside this project. Your job is to quickly
|
|
|
44
44
|
- suggest valid next commands based on the current progress instead of forcing `@.agentic/commands/project-requirements.md`
|
|
45
45
|
7. Memory capture is always on. Do not require a separate memory-capture prompt to store useful project information.
|
|
46
46
|
8. If the user directly asks to create, continue, or implement something and the existing context is sufficient, follow that request instead of routing them back through the recommended sequence.
|
|
47
|
+
- treat page work, feature work, component work, route work, and flow changes as implementation work
|
|
48
|
+
- use the behavior of `@.agentic/commands/implementation.md` even if the user did not explicitly tag it
|
|
49
|
+
- update the relevant feature file, `project-state.md`, and `handoff.md` before finishing
|
|
47
50
|
9. If project context is still thin, ask a small number of targeted questions about:
|
|
48
51
|
- project goal
|
|
49
52
|
- target users
|
|
@@ -68,6 +71,7 @@ You are starting a fresh AI session inside this project. Your job is to quickly
|
|
|
68
71
|
20. If important project basics are still missing, continue asking focused questions and keep updating the memory files instead of routing forward yet.
|
|
69
72
|
21. When suggesting next commands in resumed sessions, use the existing progress:
|
|
70
73
|
- if requirements exist but architecture does not, recommend `@.agentic/commands/architecture.md`
|
|
74
|
+
- if the user is asking for coding or feature work, allow `@.agentic/commands/implementation.md`
|
|
71
75
|
- if architecture exists, suggest `@.agentic/commands/create-brd.md`, `@.agentic/commands/create-proposal.md`, `@.agentic/commands/create-plan.md`, and `@.agentic/commands/create-tasks.md`
|
|
72
76
|
- if BRD work already exists, also allow `@.agentic/commands/create-frd.md`
|
|
73
77
|
- if FRD work already exists, also allow `@.agentic/commands/create-estimate.md`
|
|
@@ -36,6 +36,7 @@ Use this scaffold when you want an AI tool to:
|
|
|
36
36
|
2. `@.agentic/commands/project-requirements.md`
|
|
37
37
|
3. `@.agentic/commands/architecture.md`
|
|
38
38
|
4. Then choose from the available options shown by the current command, such as:
|
|
39
|
+
- `@.agentic/commands/implementation.md`
|
|
39
40
|
- `@.agentic/commands/create-brd.md`
|
|
40
41
|
- `@.agentic/commands/create-frd.md`
|
|
41
42
|
- `@.agentic/commands/create-estimate.md`
|
|
@@ -47,6 +48,8 @@ If a workspace already contains memory and document progress, `@.agentic/init.md
|
|
|
47
48
|
|
|
48
49
|
Memory capture is automatic during normal work. Users do not need to run a separate prompt just to store project context.
|
|
49
50
|
|
|
51
|
+
For direct coding or feature requests, use `@.agentic/commands/implementation.md` or let `@.agentic/init.md` continue with implementation behavior automatically.
|
|
52
|
+
|
|
50
53
|
## Output Conventions
|
|
51
54
|
|
|
52
55
|
Default user-facing outputs live under `.docs/`:
|