ai-workflow-init 1.2.0 → 1.2.1

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.
@@ -61,12 +61,38 @@ Generate two documents (with template preload):
61
61
  - Test placement and naming conventions
62
62
  - Config/secrets handling summary
63
63
 
64
- ## Step 4: Persist
65
- - Overwrite or create:
64
+ ## Step 4: Persist (Update-in-place, Non-destructive)
65
+ - Target files:
66
66
  - `docs/ai/project/CODE_CONVENTIONS.md`
67
67
  - `docs/ai/project/PROJECT_STRUCTURE.md`
68
68
  - Add header note: "This document is auto-generated from codebase analysis + brief Q&A. Edit manually as needed."
69
- - If template files exist, ensure the generated `CODE_CONVENTIONS.md` starts with their merged content in the preload order above, then append auto-discovered rules.
69
+ - Do NOT blindly overwrite entire files. Update only the managed blocks using markers:
70
+
71
+ ### Managed Block Markers
72
+ Use these exact markers to wrap generated content:
73
+ ```
74
+ <!-- GENERATED: CODE_CONVENTIONS:START -->
75
+ ... generated content ...
76
+ <!-- GENERATED: CODE_CONVENTIONS:END -->
77
+ ```
78
+ ```
79
+ <!-- GENERATED: PROJECT_STRUCTURE:START -->
80
+ ... generated content ...
81
+ <!-- GENERATED: PROJECT_STRUCTURE:END -->
82
+ ```
83
+
84
+ ### Update Rules
85
+ 1) If the target file exists and contains the corresponding markers, replace only the content between START/END with the newly generated content.
86
+ 2) If the file exists but does not contain markers, append a new managed block to the end of the file (preserve all existing manual content).
87
+ 3) If the file does not exist, create it with the header note and a single managed block.
88
+ 4) Never modify content outside the managed blocks.
89
+
90
+ ### Generated Content Order (for CODE_CONVENTIONS)
91
+ - Merge templates in preload order (when present):
92
+ 1) `docs/ai/project/template-convention/common.md`
93
+ 2) `docs/ai/project/template-convention/javascript.md` (when JS/TS repo)
94
+ 3) `docs/ai/project/template-convention/react.md` (when React is detected)
95
+ - After the merged templates, append auto-discovered rules from the codebase analysis.
70
96
 
71
97
  ## Step 5: Next Actions
72
98
  - Suggest running `code-review` to validate new standards are being followed
@@ -0,0 +1,28 @@
1
+ ## Goal
2
+ Initialize a new chat by loading and aligning to `AGENTS.md` so the AI agent consistently follows project rules (workflow, tooling, communication, language mirroring) from the first message.
3
+
4
+ ## What this command does
5
+ 1. Read `AGENTS.md` and extract the actionable rules.
6
+ 2. Summarize responsibilities and constraints the agent must follow in this session.
7
+ 3. Confirm language-mirroring: respond in the user's chat language; default to English if the user's language is unclear or ambiguous.
8
+ 4. Acknowledge the 4-phase workflow and TODO discipline for future commands.
9
+
10
+ ## Steps
11
+ 1) Open and read `AGENTS.md` (project root).
12
+ 2) Produce a short confirmation in the chat including:
13
+ - Workflow alignment: Plan → Implement → Test → Review
14
+ - Tooling strategy: semantic search first; parallelize independent steps
15
+ - Communication: minimal Markdown; status updates; high-signal summaries; mirror user language (default English if unclear)
16
+ - Code presentation: code references for existing code; fenced blocks for new code
17
+ - TODO policy: create/update todos; keep only one `in_progress`
18
+ 3) If any section is missing or unclear, ask a single concise clarification question; otherwise proceed silently in future commands.
19
+
20
+ ## Output format (concise)
21
+ - Use the language of the triggering user message (mirror). If ambiguous, use English.
22
+ - One short paragraph confirming alignment + a 4–6 bullet checklist of the above items.
23
+ - No code unless strictly needed.
24
+
25
+ ## Notes
26
+ - This command is idempotent—safe to re-run at the start of any chat.
27
+ - It does not modify files; it only sets expectations for subsequent commands.
28
+
package/AGENTS.md CHANGED
@@ -13,6 +13,7 @@
13
13
  ## Communication
14
14
  - Use Markdown only when necessary; use backticks for `files/dirs/functions/classes`.
15
15
  - Provide status updates before/after important actions; provide a high-signal summary at completion.
16
+ - Mirror the user's chat language in responses (respond in the user's language); default to English if the user's language is unclear or ambiguous.
16
17
 
17
18
  ## Code presentation
18
19
  - Existing code: cite using a code reference block with `startLine:endLine:filepath` (no language tag).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-workflow-init",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Initialize AI workflow docs & commands into any repo with one command",
5
5
  "bin": {
6
6
  "ai-workflow-init": "./cli.js"