ai-workflow-init 1.2.3 → 1.2.4

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.
@@ -1,5 +1,9 @@
1
1
  Compare current implementation against planning and implementation notes.
2
2
 
3
+ ## Workflow Alignment
4
+ - Provide brief status updates (1–3 sentences) before/after important actions.
5
+ - Provide a high-signal summary at completion highlighting key mismatches and next steps.
6
+
3
7
  1) Ask me for:
4
8
  - Feature name (if not provided)
5
9
  - Then locate docs by feature name:
@@ -1,5 +1,9 @@
1
1
  You are helping me perform a local code review **before** I push changes. This review is restricted to standards conformance only.
2
2
 
3
+ ## Workflow Alignment
4
+ - Provide brief status updates (1–3 sentences) before/after important actions.
5
+ - Provide a high-signal summary at completion highlighting key findings and impact.
6
+
3
7
  ## Step 1: Gather Context (minimal)
4
8
  - Ask for feature name if not provided (must be kebab-case).
5
9
  - Then locate and read:
@@ -14,6 +18,15 @@ You are helping me perform a local code review **before** I push changes. This r
14
18
  - **Do NOT** provide design opinions, performance guesses, or alternative architectures.
15
19
  - **Do NOT** infer requirements beyond what standards explicitly state.
16
20
 
21
+ ### Automated Checks (recommended)
22
+ - Detect tools from project config and run non-interactive checks:
23
+ - JS/TS: `npx eslint .` (or `pnpm eslint .`), consider `--max-warnings=0`; type checks with `npx tsc --noEmit`
24
+ - Python: `ruff .` or `flake8 .`; type checks with `mypy .` or `pyright`
25
+ - Go: `golangci-lint run` or `go vet ./...`
26
+ - Rust: `cargo clippy -- -D warnings`
27
+ - Java: `./gradlew check` or `mvn -q -DskipTests=false -Dspotbugs.failOnError=true verify`
28
+ - Use results to focus the review; still report only clear violations per standards.
29
+
17
30
  ## Step 3: File-by-File Review (standards violations only)
18
31
  For every relevant file, report ONLY standards violations per the two docs above. Do not assess broader design or run git commands.
19
32
 
@@ -2,6 +2,11 @@
2
2
  ## Goal
3
3
  Generate a planning doc at `docs/ai/planning/feature-{name}.md` using the template, with minimal, actionable content aligned to the 4-phase workflow.
4
4
 
5
+ ## Workflow Alignment
6
+ - Provide brief status updates (1–3 sentences) before/after important actions.
7
+ - For medium/large tasks, create todos (≤14 words, verb-led). Keep only one `in_progress` item.
8
+ - Update todos immediately after progress; mark completed upon finish.
9
+
5
10
  ## Step 1: Clarify Scope (Focused Q&A Guidelines)
6
11
  Purpose: the agent MUST generate a short, numbered Q&A for the user to clarify scope; keep it relevant, avoid off-topic, and do not build a static question bank.
7
12
 
@@ -68,3 +73,7 @@ Produce a Markdown doc following the template structure:
68
73
  ## Step 4: Next Actions
69
74
  Suggest running `execute-plan` to begin task execution.
70
75
  Note: Test documentation will be created separately using the `writing-test` command.
76
+
77
+ ## Notes
78
+ - This command creates planning docs only; does not modify unrelated existing files.
79
+ - Idempotent: safe to re-run; auto-appends numeric suffix if file exists.
@@ -1,6 +1,12 @@
1
1
  ## Goal
2
2
  Execute the feature plan by implementing tasks and persisting notes to docs.
3
3
 
4
+ ## Workflow Alignment
5
+ - Provide brief status updates (1–3 sentences) before each operation.
6
+ - For medium/large tasks, create todos (≤14 words, verb-led). Keep only one `in_progress` item.
7
+ - Update todos immediately after progress; mark completed upon finish.
8
+ - Perform edits via file editing tools, not by printing code for copy-paste.
9
+
4
10
  ### Prerequisites
5
11
  - Feature name (kebab-case, e.g., `user-authentication`)
6
12
  - Planning doc exists: `docs/ai/planning/feature-{name}.md`
@@ -18,25 +24,26 @@ Execute the feature plan by implementing tasks and persisting notes to docs.
18
24
 
19
25
  ## Step 3: Implement Iteratively (per task)
20
26
  For each task in queue:
21
- 1. Plan minimal change set:
27
+ 1. **Status update**: Brief note (1–3 sentences) on what will be done.
28
+ 2. Plan minimal change set:
22
29
  - Identify files/regions to modify
23
30
  - Map changes to acceptance criteria from plan
24
- 2. Implement changes:
31
+ 3. Implement changes:
25
32
  - Write/edit code according to the plan
26
33
  - Keep changes minimal and incremental
27
34
  - Avoid speculative changes beyond plan scope
28
- 3. Quick validation:
35
+ 4. Quick validation:
29
36
  - Run build/compile if available
30
37
  - Run fast unit/smoke tests if available
31
38
  - Fix immediate issues before proceeding
32
- 4. Persist notes to implementation doc:
39
+ 5. Persist notes to implementation doc:
33
40
  - File: `docs/ai/implementation/feature-{name}.md`
34
41
  - Append entry per completed task:
35
42
  - Files touched: `path/to/file.ext` (lines: x–y)
36
43
  - Approach/pattern used: brief description
37
44
  - Edge cases handled: list if any
38
45
  - Risks/notes: any concerns
39
- 5. Update planning doc:
46
+ 6. Update planning doc:
40
47
  - Mark completed tasks `[x]` with brief note
41
48
  - Mark blocked tasks with reason
42
49
 
@@ -56,9 +63,19 @@ If creating implementation doc for first task:
56
63
 
57
64
  ## Step 5: Quality Checks
58
65
  After completing Step 4 for each task batch:
59
- - Run linting on changed files (e.g., `eslint` if JavaScript/TypeScript project).
60
- - Run type checks if applicable (e.g., `tsc --noEmit`).
61
- - Fix issues (up to 3 attempts) before proceeding to the next task.
66
+ - Detect available tools from project config (e.g., `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, build files) and run the appropriate non-interactive checks.
67
+ - Linting on changed files (prefer non-interactive):
68
+ - JavaScript/TypeScript: `npx eslint .` or `pnpm eslint .` (add `--max-warnings=0` if desired)
69
+ - Python: `ruff .` or `flake8 .`
70
+ - Go: `golangci-lint run` or `go vet ./...`
71
+ - Rust: `cargo clippy -- -D warnings`
72
+ - Java: `./gradlew check` or `mvn -q -DskipTests=false -Dspotbugs.failOnError=true verify`
73
+ - Scope to changed files when possible for speed
74
+ - Type checks (non-emitting where applicable):
75
+ - TypeScript: `npx tsc --noEmit`
76
+ - Python: `mypy .` (if configured) or `pyright` if present
77
+ - Go/Rust/Java: rely on compiler/type system via build step
78
+ - Parallelize lint and type-check when safe; fix issues (up to 3 attempts) before proceeding.
62
79
 
63
80
  ## Step 6: Next Actions
64
81
  After completing tasks:
@@ -70,3 +87,5 @@ After completing tasks:
70
87
  - Keep code changes minimal and focused on plan tasks
71
88
  - Document all changes in implementation doc for later review/refactor
72
89
  - Avoid implementing features not in the plan
90
+ - Modifies source code per plan scope; updates `docs/ai/implementation/feature-{name}.md` and checkboxes in `docs/ai/planning/feature-{name}.md`. Does not modify unrelated files.
91
+ - Idempotent: safe to re-run; appends entries or updates checkboxes deterministically.
@@ -9,7 +9,7 @@ Initialize a new chat by loading and aligning to `AGENTS.md` so the AI agent con
9
9
 
10
10
  ## Steps
11
11
  1) Open and read `AGENTS.md` (project root).
12
- 2) Detect project languages/frameworks/libraries from repository metadata (e.g., `package.json`, `pyproject.toml`, lockfiles, config files). Update `docs/ai/project/CODE_CONVENTIONS.md` to include any missing key coding conventions (only important items like React, TypeScript, TailwindCSS, etc.).
12
+ 2) Detect project languages/frameworks/libraries from repository metadata (e.g., `package.json`, `pyproject.toml`, lockfiles, config files). If `docs/ai/project/CODE_CONVENTIONS.md` is missing, create a minimal generated stub capturing key conventions (e.g., React, TypeScript, TailwindCSS). If it already exists, do not modify; instead, report any detected gaps and suggest running the standards generator.
13
13
  3) Read files in `docs/ai/project/` to understand project context and standards.
14
14
  4) Produce a short confirmation in the chat including:
15
15
  - Workflow alignment: Plan → Implement → Test → Review
@@ -26,5 +26,5 @@ Initialize a new chat by loading and aligning to `AGENTS.md` so the AI agent con
26
26
 
27
27
  ## Notes
28
28
  - This command is idempotent—safe to re-run at the start of any chat.
29
- - It does not modify files; it only sets expectations for subsequent commands.
29
+ - It does not modify existing files; it only sets expectations for subsequent commands and may create missing metadata files (e.g., initial `CODE_CONVENTIONS.md`) if required.
30
30
 
@@ -1,12 +1,18 @@
1
1
  Use `docs/ai/testing/feature-{name}.md` as the source of truth.
2
2
 
3
+ ## Workflow Alignment
4
+ - Provide brief status updates (1–3 sentences) before/after important actions.
5
+ - For medium/large tasks, create todos (≤14 words, verb-led). Keep only one `in_progress` item.
6
+ - Update todos immediately after progress; mark completed upon finish.
7
+ - Default to parallel execution for independent operations; use sequential steps only when dependencies exist.
8
+
3
9
  ## Step 1: Gather Context (minimal)
4
10
  - Ask for feature name if not provided (must be kebab-case).
5
11
  - **Load template:** Read `docs/ai/testing/feature-template.md` to understand required structure.
6
12
  - Then locate docs by convention:
7
13
  - Planning: `docs/ai/planning/feature-{name}.md`
8
14
  - Implementation (optional): `docs/ai/implementation/feature-{name}.md`
9
- - **Detect test framework:** Check `package.json` and project structure to identify test framework (Vitest, Jest, Mocha, pytest, etc.)
15
+ - **Detect test framework:** Check `package.json` and project structure to identify test framework (Vitest, Jest, Mocha, pytest, etc.). Auto-detect from `package.json` first; if no test runner found, create skeleton test and report missing runner.
10
16
  - **Load standards:** Read `docs/ai/project/PROJECT_STRUCTURE.md` for test file placement rules
11
17
  - **Load conventions:** Read `docs/ai/project/CODE_CONVENTIONS.md` for coding standards
12
18
 
@@ -115,12 +121,12 @@ describe('functionToTest', () => {
115
121
  ## Step 5: Run Tests with Logging (automatic)
116
122
  After generating test code:
117
123
 
118
- 1. **Execute test command** based on detected framework:
119
- - Vitest: `npm test` or `npx vitest run`
120
- - Jest: `npm test` or `npx jest`
121
- - Mocha: `npm test` or `npx mocha`
122
- - pytest: `pytest` or `python -m pytest`
123
- - Other: detect from `package.json` scripts
124
+ 1. **Execute test command** based on detected framework (use non-interactive flags):
125
+ - Vitest: `npm test` or `npx vitest run --run`
126
+ - Jest: `npm test` or `npx jest --ci`
127
+ - Mocha: `npm test` or `npx mocha --reporter spec`
128
+ - pytest: `pytest` or `python -m pytest -v`
129
+ - Other: detect from `package.json` scripts, add `--no-interactive` or equivalent flags
124
130
 
125
131
  2. **Capture and display output** in terminal with detailed logging:
126
132
  - Show test execution progress (which tests are running)
@@ -214,3 +220,5 @@ Ensure all required sections from template are present. Keep the document brief
214
220
  - Test execution must show clear, detailed logging in terminal
215
221
  - AI excels at: edge case generation, parameter combinations, property-based testing, coverage analysis
216
222
  - Keep tests deterministic (avoid external dependencies, random values without seeds, time-dependent logic)
223
+ - Creates test files only; does not edit non-test source files.
224
+ - Idempotent: safe to re-run; appends entries or updates test doc deterministically.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-workflow-init",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Initialize AI workflow docs & commands into any repo with one command",
5
5
  "bin": {
6
6
  "ai-workflow-init": "./cli.js"