ai-factory 2.4.0 → 2.5.0
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 +1 -1
- package/package.json +1 -1
- package/skills/aif/SKILL.md +1 -1
- package/skills/aif-architecture/SKILL.md +1 -1
- package/skills/aif-build-automation/SKILL.md +1 -1
- package/skills/aif-ci/SKILL.md +1 -1
- package/skills/aif-commit/SKILL.md +1 -1
- package/skills/aif-dockerize/SKILL.md +1 -1
- package/skills/aif-docs/SKILL.md +1 -1
- package/skills/aif-evolve/SKILL.md +1 -1
- package/skills/aif-explore/SKILL.md +1 -1
- package/skills/aif-fix/SKILL.md +1 -1
- package/skills/aif-grounded/SKILL.md +1 -1
- package/skills/aif-implement/SKILL.md +104 -19
- package/skills/aif-implement/references/IMPLEMENTATION-GUIDE.md +51 -1
- package/skills/aif-improve/SKILL.md +82 -11
- package/skills/aif-loop/SKILL.md +1 -1
- package/skills/aif-plan/SKILL.md +9 -5
- package/skills/aif-plan/references/TASK-FORMAT.md +1 -1
- package/skills/aif-roadmap/SKILL.md +1 -1
- package/skills/aif-rules/SKILL.md +1 -1
- package/skills/aif-verify/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ AI Factory can generate and maintain your project docs with a single command:
|
|
|
131
131
|
|
|
132
132
|
- **Generates docs from scratch** — analyzes your codebase and creates a lean README + detailed `docs/` pages by topic
|
|
133
133
|
- **Cleans up scattered files** — finds loose CONTRIBUTING.md, ARCHITECTURE.md, SETUP.md in your root and consolidates them into a structured `docs/` directory
|
|
134
|
-
- **Keeps docs in sync** — integrates with `/aif-implement`
|
|
134
|
+
- **Keeps docs in sync** — integrates with `/aif-implement` docs policy (`Docs: yes` = mandatory docs checkpoint routed to `/aif-docs`, `Docs: no` = visible `WARN [docs]`)
|
|
135
135
|
- **Builds a docs website** — `--web` generates a static HTML site with navigation and dark mode, ready to host
|
|
136
136
|
|
|
137
137
|
---
|
package/package.json
CHANGED
package/skills/aif/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif
|
|
3
3
|
description: Set up agent context for a project. Analyzes tech stack, installs relevant skills from skills.sh, generates custom skills, and configures MCP servers. Use when starting new project, setting up AI context, or asking "set up project", "configure AI", "what skills do I need".
|
|
4
4
|
argument-hint: "[project description]"
|
|
5
|
-
allowed-tools: Read Glob Grep Write Bash(mkdir *) Bash(npx skills *) Bash(python *security-scan*) Bash(rm -rf *) Skill WebFetch
|
|
5
|
+
allowed-tools: Read Glob Grep Write Bash(mkdir *) Bash(npx skills *) Bash(python *security-scan*) Bash(rm -rf *) Skill WebFetch Questions
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# AI Factory - Project Setup
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-architecture
|
|
3
3
|
description: Generate architecture guidelines for the project. Analyzes tech stack from DESCRIPTION.md, recommends an architecture pattern, and creates .ai-factory/ARCHITECTURE.md. Use when setting up project architecture, asking "which architecture", or after /aif setup.
|
|
4
4
|
argument-hint: "[clean|ddd|microservices|monolith|layers]"
|
|
5
|
-
allowed-tools: Read Write Glob Grep Bash(mkdir *)
|
|
5
|
+
allowed-tools: Read Write Glob Grep Bash(mkdir *) Questions
|
|
6
6
|
disable-model-invocation: false
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -5,7 +5,7 @@ description: >-
|
|
|
5
5
|
If a build file already exists, improves it by adding missing targets and best practices.
|
|
6
6
|
Use when user says "generate makefile", "create taskfile", "add justfile", "setup mage", or "build automation".
|
|
7
7
|
argument-hint: "[makefile|taskfile|justfile|mage]"
|
|
8
|
-
allowed-tools: Read Edit Glob Grep Write Bash(git *)
|
|
8
|
+
allowed-tools: Read Edit Glob Grep Write Bash(git *) Questions
|
|
9
9
|
disable-model-invocation: false
|
|
10
10
|
metadata:
|
|
11
11
|
author: AI Factory
|
package/skills/aif-ci/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-ci
|
|
3
3
|
description: Generate CI/CD pipeline (GitHub Actions / GitLab CI) with linting, static analysis, tests, security. Use when user says "ci", "setup ci", "github actions", "gitlab ci", "pipeline".
|
|
4
4
|
argument-hint: "[github|gitlab] [--enhance]"
|
|
5
|
-
allowed-tools: Read Edit Glob Grep Write Bash(git *)
|
|
5
|
+
allowed-tools: Read Edit Glob Grep Write Bash(git *) Questions
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
metadata:
|
|
8
8
|
author: AI Factory
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-commit
|
|
3
3
|
description: Create conventional commit messages by analyzing staged changes. Generates semantic commit messages following the Conventional Commits specification. Use when user says "commit", "save changes", or "create commit".
|
|
4
4
|
argument-hint: "[scope or context]"
|
|
5
|
-
allowed-tools: Read Bash(git *)
|
|
5
|
+
allowed-tools: Read Bash(git *) Questions
|
|
6
6
|
disable-model-invocation: false
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -6,7 +6,7 @@ description: >-
|
|
|
6
6
|
Includes production security audit. Use when user says "dockerize", "add docker", "docker compose",
|
|
7
7
|
"containerize", or "setup docker".
|
|
8
8
|
argument-hint: "[--audit]"
|
|
9
|
-
allowed-tools: Read Edit Glob Grep Write Bash(git *) Bash(docker *)
|
|
9
|
+
allowed-tools: Read Edit Glob Grep Write Bash(git *) Bash(docker *) Questions WebSearch WebFetch
|
|
10
10
|
disable-model-invocation: false
|
|
11
11
|
metadata:
|
|
12
12
|
author: AI Factory
|
package/skills/aif-docs/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-docs
|
|
3
3
|
description: Generate and maintain project documentation. Creates a lean README as a landing page with detailed docs/ directory split by topic. Use when user says "create docs", "write documentation", "update docs", "generate readme", or "document project".
|
|
4
4
|
argument-hint: "[--web]"
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash(mkdir, npx, python)
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash(mkdir, npx, python) Questions WebFetch WebSearch
|
|
6
6
|
disable-model-invocation: false
|
|
7
7
|
metadata:
|
|
8
8
|
author: AI Factory
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-evolve
|
|
3
3
|
description: Self-improve AI Factory skills based on project context, accumulated patches, and codebase patterns. Analyzes what went wrong, what works, and enhances skills to prevent future issues. Use when you want to make AI smarter for your project.
|
|
4
4
|
argument-hint: '[skill-name or "all"]'
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash(git *)
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash(git *) Questions
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-explore
|
|
3
3
|
description: Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.
|
|
4
4
|
argument-hint: "[topic or plan name]"
|
|
5
|
-
allowed-tools: Read Glob Grep Write Edit Bash
|
|
5
|
+
allowed-tools: Read Glob Grep Write Edit Bash Questions
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
---
|
|
8
8
|
|
package/skills/aif-fix/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-fix
|
|
3
3
|
description: Fix a specific bug or problem in the codebase. Supports two modes - immediate fix or plan-first. Without arguments executes existing FIX_PLAN.md. Always suggests test coverage and adds logging. Use when user says "fix bug", "debug this", "something is broken", or pastes an error message.
|
|
4
4
|
argument-hint: <bug description or error message>
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash Questions Task
|
|
6
6
|
disable-model-invocation: false
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-grounded
|
|
3
3
|
description: Reliability gate for answers. Forces evidence-based reasoning, explicit uncertainty, and “insufficient information” instead of guesses. Use when user says “be 100% sure”, “no hallucinations”, “only if verified”, “grounded answer”, or when stakes are high.
|
|
4
4
|
argument-hint: "[question or task]"
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash Questions
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aif-implement
|
|
3
3
|
description: Execute implementation tasks from the current plan. Works through tasks sequentially, marks completion, and preserves progress for continuation across sessions. Use when user says "implement", "start coding", "execute plan", or "continue implementation".
|
|
4
|
-
argument-hint: '[task-id or "status"]'
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash TaskList TaskGet TaskUpdate
|
|
4
|
+
argument-hint: '[--list] [@plan-file] [task-id or "status"]'
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash TaskList TaskGet TaskUpdate Questions
|
|
6
6
|
disable-model-invocation: false
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -17,11 +17,39 @@ Execute tasks from the plan, track progress, and enable session continuation.
|
|
|
17
17
|
**FIRST:** Determine what state we're in:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
1.
|
|
21
|
-
|
|
20
|
+
1. Parse arguments:
|
|
21
|
+
- --list → list available plans only (no implementation; STOP)
|
|
22
|
+
- @<path> → explicit plan file override (highest priority)
|
|
23
|
+
- <number> → start from specific task
|
|
24
|
+
- status → status-only mode
|
|
25
|
+
2. Check for uncommitted changes (git status)
|
|
22
26
|
3. Check current branch
|
|
23
27
|
```
|
|
24
28
|
|
|
29
|
+
### Step 0.list: List Available Plans (`--list`)
|
|
30
|
+
|
|
31
|
+
If `$ARGUMENTS` contains `--list`, run read-only plan discovery and stop.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
1. Get current branch:
|
|
35
|
+
git branch --show-current
|
|
36
|
+
2. Convert branch to filename: replace "/" with "-", add ".md"
|
|
37
|
+
3. Check existence of:
|
|
38
|
+
- .ai-factory/plans/<branch-name>.md
|
|
39
|
+
- .ai-factory/PLAN.md
|
|
40
|
+
- .ai-factory/FIX_PLAN.md
|
|
41
|
+
4. Print plan availability summary and usage hints
|
|
42
|
+
5. STOP.
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Important:** In `--list` mode:
|
|
46
|
+
- Do not execute tasks
|
|
47
|
+
- Do not modify files
|
|
48
|
+
- Do not update TaskList statuses
|
|
49
|
+
|
|
50
|
+
For detailed output format and examples, see:
|
|
51
|
+
- `skills/aif-implement/references/IMPLEMENTATION-GUIDE.md` → "List Available Plans (`--list`)"
|
|
52
|
+
|
|
25
53
|
### Step 0.0: Resume / Recovery (after a break or after /clear)
|
|
26
54
|
|
|
27
55
|
If the user is resuming **the next day**, says the session was **abandoned**, or you suspect context was lost (e.g. after `/clear`), rebuild local context from the repo **before** continuing tasks:
|
|
@@ -35,7 +63,7 @@ If the user is resuming **the next day**, says the session was **abandoned**, or
|
|
|
35
63
|
```
|
|
36
64
|
|
|
37
65
|
Then reconcile plan/task state:
|
|
38
|
-
- Ensure the current plan file matches the current branch (
|
|
66
|
+
- Ensure the current plan file matches the current branch (`@plan-file` override wins; otherwise branch-named plan takes priority over `PLAN.md`).
|
|
39
67
|
- Compare `TaskList` statuses vs plan checkboxes.
|
|
40
68
|
- If code changes for a task appear already implemented but the task is not marked completed, verify quickly and then `TaskUpdate(..., status: "completed")` and update the plan checkbox.
|
|
41
69
|
- If a task is marked completed but the corresponding code is missing (rebase/reset happened), mark it back to pending and discuss with the user.
|
|
@@ -137,26 +165,51 @@ If any rule is violated — fix the output before presenting it to the user.
|
|
|
137
165
|
|
|
138
166
|
### Step 0.1: Find Plan File
|
|
139
167
|
|
|
168
|
+
**If `$ARGUMENTS` contains `@<path>`:**
|
|
169
|
+
|
|
170
|
+
Use this explicit plan file and skip automatic plan discovery.
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
1. Extract path after "@"
|
|
174
|
+
2. Resolve relative to project root (absolute paths are also valid)
|
|
175
|
+
3. If file does not exist:
|
|
176
|
+
"Plan file not found: <path>
|
|
177
|
+
Provide an existing markdown plan file, for example:
|
|
178
|
+
- /aif-implement @.ai-factory/PLAN.md
|
|
179
|
+
- /aif-implement @.ai-factory/plans/feature-user-auth.md"
|
|
180
|
+
→ STOP
|
|
181
|
+
4. If file is .ai-factory/FIX_PLAN.md:
|
|
182
|
+
→ invoke /aif-fix (ownership + cleanup workflow) and STOP
|
|
183
|
+
5. Otherwise use this file as the active plan
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Then continue with normal execution using the selected plan file.
|
|
187
|
+
|
|
188
|
+
**If no `@<path>` override is provided, check plan files in this order:**
|
|
189
|
+
|
|
140
190
|
**Check for plan files in this order:**
|
|
141
191
|
|
|
142
192
|
```
|
|
143
|
-
1.
|
|
144
|
-
2. No .ai-factory/PLAN.md → Check current git branch:
|
|
193
|
+
1. Check current git branch:
|
|
145
194
|
git branch --show-current
|
|
146
|
-
→
|
|
147
|
-
|
|
195
|
+
→ Convert branch name to filename: replace "/" with "-", add ".md"
|
|
196
|
+
→ Look for .ai-factory/plans/<branch-name>.md (e.g., feature/user-auth → .ai-factory/plans/feature-user-auth.md)
|
|
197
|
+
2. No branch-based plan → Check .ai-factory/PLAN.md
|
|
198
|
+
3. No branch-based plan and no .ai-factory/PLAN.md → Check .ai-factory/FIX_PLAN.md
|
|
148
199
|
→ If exists: invoke /aif-fix (handles its own workflow with patches) and STOP
|
|
149
200
|
```
|
|
150
201
|
|
|
151
202
|
**Priority:**
|
|
152
|
-
1.
|
|
153
|
-
2. Branch-named file
|
|
154
|
-
3. `.ai-factory/
|
|
203
|
+
1. `@<path>` argument - explicit user-selected plan file
|
|
204
|
+
2. Branch-named file (from `/aif-plan full`) - if it matches current branch
|
|
205
|
+
3. `.ai-factory/PLAN.md` (from `/aif-plan fast`) - fallback when no branch-based plan exists
|
|
206
|
+
4. `.ai-factory/FIX_PLAN.md` - redirect to `/aif-fix` (from `/aif-fix` plan mode)
|
|
155
207
|
|
|
156
208
|
**Read the plan file** to understand:
|
|
157
209
|
- Context and settings (testing, logging preferences)
|
|
158
210
|
- Commit checkpoints (when to commit)
|
|
159
211
|
- Task dependencies
|
|
212
|
+
- Task checklist format (`- [ ]` / `- [x]`) to keep progress synced
|
|
160
213
|
|
|
161
214
|
### Step 1: Load Current State
|
|
162
215
|
|
|
@@ -311,6 +364,7 @@ Files modified:
|
|
|
311
364
|
- src/services/search.ts (created)
|
|
312
365
|
- src/api/products/search.ts (created)
|
|
313
366
|
- src/types/search.ts (created)
|
|
367
|
+
Documentation: updated existing docs | created docs/<feature-slug>.md | skipped by user | warn-only (Docs: no/unset)
|
|
314
368
|
|
|
315
369
|
What's next?
|
|
316
370
|
|
|
@@ -386,17 +440,35 @@ Options:
|
|
|
386
440
|
If user chooses "Verify first" → suggest invoking `/aif-verify`.
|
|
387
441
|
If user chooses "Skip to commit" → suggest invoking `/aif-commit`.
|
|
388
442
|
|
|
389
|
-
**
|
|
390
|
-
|
|
391
|
-
Read the plan file settings. If documentation preference is set to "yes" (from `/aif-plan full` questions), run `/aif-docs` to update documentation.
|
|
443
|
+
**Documentation policy checkpoint (after completion, before plan cleanup):**
|
|
392
444
|
|
|
393
|
-
|
|
445
|
+
Read the plan file setting `Docs: yes/no`.
|
|
394
446
|
|
|
395
|
-
If
|
|
447
|
+
If plan setting is `Docs: yes`:
|
|
396
448
|
```
|
|
397
|
-
|
|
449
|
+
AskUserQuestion: Documentation checkpoint — how should we document this feature?
|
|
450
|
+
|
|
451
|
+
Options:
|
|
452
|
+
1. Update existing docs (recommended) — invoke /aif-docs
|
|
453
|
+
2. Create a new feature doc page — invoke /aif-docs with feature-page context
|
|
454
|
+
3. Skip documentation
|
|
398
455
|
```
|
|
399
|
-
|
|
456
|
+
|
|
457
|
+
Handling:
|
|
458
|
+
- Option 1 → invoke `/aif-docs` to update README/docs based on completed work
|
|
459
|
+
- Option 2 → invoke `/aif-docs` with context to create `docs/<feature-slug>.md`, include sections (Summary, Usage/user-facing behavior, Configuration, API/CLI changes, Examples, Troubleshooting, See Also), and add a README docs-table link
|
|
460
|
+
- Option 3 → do not invoke `/aif-docs`; emit `WARN [docs] Documentation skipped by user`
|
|
461
|
+
|
|
462
|
+
If plan setting is `Docs: no` or setting is unset:
|
|
463
|
+
- Do **not** show a mandatory docs checkpoint prompt
|
|
464
|
+
- Do **not** invoke `/aif-docs` automatically
|
|
465
|
+
- Emit `WARN [docs] Docs policy is no/unset; skipping documentation checkpoint`
|
|
466
|
+
|
|
467
|
+
**Always include documentation outcome in the final completion output:**
|
|
468
|
+
- `Documentation: updated existing docs`
|
|
469
|
+
- `Documentation: created docs/<feature-slug>.md`
|
|
470
|
+
- `Documentation: skipped by user`
|
|
471
|
+
- `Documentation: warn-only (Docs: no/unset)`
|
|
400
472
|
|
|
401
473
|
**Handle plan file after completion:**
|
|
402
474
|
|
|
@@ -498,6 +570,19 @@ To merge and clean up later:
|
|
|
498
570
|
```
|
|
499
571
|
Continues from next incomplete task.
|
|
500
572
|
|
|
573
|
+
### List Available Plans
|
|
574
|
+
```
|
|
575
|
+
/aif-implement --list
|
|
576
|
+
```
|
|
577
|
+
Lists `.ai-factory/PLAN.md`, `.ai-factory/FIX_PLAN.md`, and current-branch `.ai-factory/plans/<branch>.md` (if present), then exits without implementation.
|
|
578
|
+
|
|
579
|
+
### Use Explicit Plan File
|
|
580
|
+
```
|
|
581
|
+
/aif-implement @my-custom-plan.md
|
|
582
|
+
/aif-implement @.ai-factory/plans/feature-user-auth.md status
|
|
583
|
+
```
|
|
584
|
+
Uses the provided plan file instead of auto-detecting by branch/default files.
|
|
585
|
+
|
|
501
586
|
### Start from Specific Task
|
|
502
587
|
```
|
|
503
588
|
/aif-implement 5
|
|
@@ -38,6 +38,56 @@ What would you like to do?
|
|
|
38
38
|
|
|
39
39
|
Tasks are persisted in the conversation/project state.
|
|
40
40
|
|
|
41
|
+
## List Available Plans (`--list`)
|
|
42
|
+
|
|
43
|
+
When the user runs:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
/aif-implement --list
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Use read-only discovery and stop without executing any tasks.
|
|
50
|
+
|
|
51
|
+
### Discovery steps
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
git branch --show-current
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Then derive:
|
|
58
|
+
- `branchPlan = .ai-factory/plans/<branch-with-slashes-replaced-by-hyphens>.md`
|
|
59
|
+
- `fastPlan = .ai-factory/PLAN.md`
|
|
60
|
+
- `fixPlan = .ai-factory/FIX_PLAN.md`
|
|
61
|
+
|
|
62
|
+
Check which files exist and print:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
## Available Plans
|
|
66
|
+
Current branch: <branch>
|
|
67
|
+
- [x| ] <branchPlan> (current-branch plan)
|
|
68
|
+
- [x| ] <fastPlan> (fast plan)
|
|
69
|
+
- [x| ] <fixPlan> (fix plan)
|
|
70
|
+
|
|
71
|
+
Use:
|
|
72
|
+
- /aif-implement @<path> to execute a specific plan
|
|
73
|
+
- /aif-implement to use automatic priority
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
If no plans exist, print:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
No plan files found. Create one with:
|
|
80
|
+
- /aif-plan full <description>
|
|
81
|
+
- /aif-plan fast <description>
|
|
82
|
+
- /aif-fix <bug description>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Constraints
|
|
86
|
+
|
|
87
|
+
- Do not execute implementation tasks
|
|
88
|
+
- Do not modify files
|
|
89
|
+
- Do not call `TaskUpdate`
|
|
90
|
+
|
|
41
91
|
### Recovery after a break or after /clear
|
|
42
92
|
|
|
43
93
|
If the user is resuming later and you don't have prior conversational context, rebuild context from git + the plan file before continuing:
|
|
@@ -50,7 +100,7 @@ git diff --stat
|
|
|
50
100
|
```
|
|
51
101
|
|
|
52
102
|
Then:
|
|
53
|
-
- Re-open the active plan file
|
|
103
|
+
- Re-open the active plan file (`@plan-file` override if provided; otherwise branch plan first, then `PLAN.md`, then `FIX_PLAN.md` redirect to `/aif-fix`).
|
|
54
104
|
- Use `TaskList` to find `in_progress` first, otherwise the next pending task.
|
|
55
105
|
- If `TaskList` and plan checkboxes disagree, reconcile (verify code, then update `TaskUpdate` + plan checkbox).
|
|
56
106
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: aif-improve
|
|
3
|
-
description: Refine and enhance an existing implementation plan with a second iteration. Re-analyzes the codebase, checks for gaps, missing tasks, wrong dependencies, and improves the plan quality. Use after /aif-plan to polish the plan before implementation.
|
|
4
|
-
argument-hint: "[improvement prompt or empty for auto-review]"
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash(git *) TaskCreate TaskUpdate TaskList TaskGet
|
|
3
|
+
description: Refine and enhance an existing implementation plan with a second iteration. Re-analyzes the codebase, checks for gaps, missing tasks, wrong dependencies, and improves the plan quality. Use after /aif-plan to polish the plan before implementation, or to improve an existing /aif-fix plan.
|
|
4
|
+
argument-hint: "[--list] [@plan-file] [improvement prompt or empty for auto-review]"
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash(git *) TaskCreate TaskUpdate TaskList TaskGet Questions
|
|
6
6
|
disable-model-invocation: false
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -24,18 +24,57 @@ enhanced plan with better tasks, correct dependencies, more detail
|
|
|
24
24
|
|
|
25
25
|
### Step 0: Find the Plan
|
|
26
26
|
|
|
27
|
+
**First parse arguments:**
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
- --list → list available plans only (read-only, then STOP)
|
|
31
|
+
- @<path> → explicit plan file override (highest priority)
|
|
32
|
+
- remaining argument text → optional improvement prompt
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
When both are present, `--list` wins and no refinement is executed.
|
|
36
|
+
|
|
37
|
+
### Step 0.list: List Available Plans (`--list`)
|
|
38
|
+
|
|
39
|
+
If `$ARGUMENTS` contains `--list`, run read-only discovery and stop.
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
1. Get current branch:
|
|
43
|
+
git branch --show-current
|
|
44
|
+
2. Convert branch to filename: replace "/" with "-", add ".md"
|
|
45
|
+
3. Check existence of:
|
|
46
|
+
- .ai-factory/plans/<branch-name>.md
|
|
47
|
+
- .ai-factory/PLAN.md
|
|
48
|
+
- .ai-factory/FIX_PLAN.md
|
|
49
|
+
4. Print availability summary and usage hints:
|
|
50
|
+
- /aif-improve @<path> <optional prompt>
|
|
51
|
+
- /aif-improve <optional prompt> # automatic priority
|
|
52
|
+
5. If none found, suggest creating a plan via /aif-plan or /aif-fix
|
|
53
|
+
6. STOP.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Important:** In `--list` mode:
|
|
57
|
+
- Do not execute refinement
|
|
58
|
+
- Do not modify files
|
|
59
|
+
- Do not update TaskList/plan content
|
|
60
|
+
|
|
27
61
|
**Locate the active plan file using this priority:**
|
|
28
62
|
|
|
29
63
|
```
|
|
30
|
-
1.
|
|
31
|
-
|
|
64
|
+
1. If `$ARGUMENTS` contains `@<path>`:
|
|
65
|
+
- Resolve the path (relative to project root; absolute paths allowed)
|
|
66
|
+
- If file exists → use it
|
|
67
|
+
- If missing → show "Plan file not found: <path>" and STOP
|
|
68
|
+
2. No explicit `@<path>` override → Check current git branch:
|
|
32
69
|
git branch --show-current
|
|
33
70
|
→ Convert branch name to filename: replace "/" with "-", add ".md"
|
|
34
|
-
→ Look for .ai-factory/plans/<branch-name>.md
|
|
71
|
+
→ Look for .ai-factory/plans/<branch-name>.md (from /aif-plan full)
|
|
35
72
|
Example: feature/user-auth → .ai-factory/plans/feature-user-auth.md
|
|
73
|
+
3. No branch-based plan → Check .ai-factory/PLAN.md (from /aif-plan fast)
|
|
74
|
+
4. No branch-based plan and no .ai-factory/PLAN.md → Check .ai-factory/FIX_PLAN.md (from /aif-fix plan mode)
|
|
36
75
|
```
|
|
37
76
|
|
|
38
|
-
**If NO plan file found at
|
|
77
|
+
**If NO plan file found at any location:**
|
|
39
78
|
|
|
40
79
|
```
|
|
41
80
|
No active plan found.
|
|
@@ -43,6 +82,7 @@ No active plan found.
|
|
|
43
82
|
To create a plan first, use:
|
|
44
83
|
- /aif-plan full <description> — for a new feature (creates branch + plan)
|
|
45
84
|
- /aif-plan fast <description> — for a quick task plan
|
|
85
|
+
- /aif-fix <bug description> — for a bugfix plan (.ai-factory/FIX_PLAN.md)
|
|
46
86
|
```
|
|
47
87
|
|
|
48
88
|
→ **STOP here.** Do not proceed without a plan file.
|
|
@@ -175,7 +215,7 @@ Compare the plan against what you found. Categorize issues:
|
|
|
175
215
|
|
|
176
216
|
**3.6: User-prompted improvements (if $ARGUMENTS provided)**
|
|
177
217
|
|
|
178
|
-
If the user provided specific improvement instructions in `$ARGUMENTS
|
|
218
|
+
If the user provided specific improvement instructions in `$ARGUMENTS` (excluding `--list` and `@<path>` tokens):
|
|
179
219
|
- Apply the user's feedback to the plan
|
|
180
220
|
- Look for tasks that need modification based on the prompt
|
|
181
221
|
- Add new tasks if the user's prompt requires them
|
|
@@ -377,16 +417,47 @@ Apply? → Yes → Changes applied
|
|
|
377
417
|
```
|
|
378
418
|
User: /aif-improve
|
|
379
419
|
|
|
420
|
+
→ Branch: main
|
|
421
|
+
→ No .ai-factory/plans/main.md found
|
|
380
422
|
→ No .ai-factory/PLAN.md found
|
|
381
|
-
→
|
|
423
|
+
→ No .ai-factory/FIX_PLAN.md found
|
|
382
424
|
→ No plan file found
|
|
383
425
|
|
|
384
426
|
"No active plan found. Create one first:
|
|
385
427
|
- /aif-plan full <description>
|
|
386
|
-
- /aif-plan fast <description>
|
|
428
|
+
- /aif-plan fast <description>
|
|
429
|
+
- /aif-fix <bug description>"
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Example 4: Explicit plan file
|
|
433
|
+
|
|
434
|
+
```
|
|
435
|
+
User: /aif-improve @my-custom-plan.md add rollback and edge-case handling
|
|
436
|
+
|
|
437
|
+
→ Explicit plan override: my-custom-plan.md
|
|
438
|
+
→ Found plan: my-custom-plan.md
|
|
439
|
+
→ User wants: rollback + edge-case handling
|
|
440
|
+
→ Deep codebase analysis...
|
|
441
|
+
→ Report prepared
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
### Example 5: List mode
|
|
445
|
+
|
|
446
|
+
```
|
|
447
|
+
User: /aif-improve --list
|
|
448
|
+
|
|
449
|
+
## Available Plans
|
|
450
|
+
Current branch: feature/user-auth
|
|
451
|
+
- [x] .ai-factory/plans/feature-user-auth.md
|
|
452
|
+
- [ ] .ai-factory/PLAN.md
|
|
453
|
+
- [x] .ai-factory/FIX_PLAN.md
|
|
454
|
+
|
|
455
|
+
Use:
|
|
456
|
+
- /aif-improve @.ai-factory/plans/feature-user-auth.md
|
|
457
|
+
- /aif-improve add validation and retries
|
|
387
458
|
```
|
|
388
459
|
|
|
389
|
-
### Example
|
|
460
|
+
### Example 6: Plan already looks good
|
|
390
461
|
|
|
391
462
|
```
|
|
392
463
|
User: /aif-improve
|
package/skills/aif-loop/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-loop
|
|
3
3
|
description: Run a strict multi-iteration Reflex Loop with phases (PLAN, PRODUCE||PREPARE, EVALUATE, CRITIQUE, REFINE) to improve an artifact until quality gates pass or iteration limits are reached. Use when user asks for iterative refinement, quality-gated generation, or "generate -> critique -> refine" loops.
|
|
4
4
|
argument-hint: "[new|resume|status|stop|list|history|clean] [task or alias]"
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash Task
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash Task Questions
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
---
|
|
8
8
|
|
package/skills/aif-plan/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-plan
|
|
3
3
|
description: Plan implementation for a feature or task. Two modes — fast (no branch) or full (git branch + plan). Use when user says "plan", "new feature", "start feature", "create tasks".
|
|
4
4
|
argument-hint: "[fast | full] [--parallel | --list | --cleanup <branch>] <description>"
|
|
5
|
-
allowed-tools: Read Write Glob Grep Bash(git *) Bash(cd *) Bash(cp *) Bash(mkdir *) Bash(basename *) TaskCreate TaskUpdate TaskList
|
|
5
|
+
allowed-tools: Read Write Glob Grep Bash(git *) Bash(cd *) Bash(cp *) Bash(mkdir *) Bash(basename *) TaskCreate TaskUpdate TaskList Questions Task
|
|
6
6
|
disable-model-invocation: false
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -174,9 +174,9 @@ AskUserQuestion: Before we start, a few questions:
|
|
|
174
174
|
- [ ] Standard - INFO level, key events only
|
|
175
175
|
- [ ] Minimal - only WARN/ERROR
|
|
176
176
|
|
|
177
|
-
3.
|
|
178
|
-
- [ ] Yes
|
|
179
|
-
- [ ] No,
|
|
177
|
+
3. Documentation policy after implementation?
|
|
178
|
+
- [ ] Yes — mandatory docs checkpoint at completion (recommended)
|
|
179
|
+
- [ ] No — warn-only (`WARN [docs]`), no mandatory checkpoint
|
|
180
180
|
|
|
181
181
|
4. Roadmap milestone linkage (only if `.ai-factory/ROADMAP.md` exists):
|
|
182
182
|
- [ ] Link this plan to a milestone
|
|
@@ -192,6 +192,10 @@ AskUserQuestion: Before we start, a few questions:
|
|
|
192
192
|
|
|
193
193
|
Store all preferences — they will be used in the plan file and passed to `/aif-implement`.
|
|
194
194
|
|
|
195
|
+
Docs policy semantics:
|
|
196
|
+
- `Docs: yes` → `/aif-implement` MUST show a mandatory documentation checkpoint and route docs changes through `/aif-docs`
|
|
197
|
+
- `Docs: no` (or unset) → `/aif-implement` emits `WARN [docs]` and continues without a mandatory docs checkpoint
|
|
198
|
+
|
|
195
199
|
**If `.ai-factory/ROADMAP.md` exists and the user chose milestone linkage:**
|
|
196
200
|
- Read `.ai-factory/ROADMAP.md` and list candidate milestones (prefer unchecked items)
|
|
197
201
|
- Ask the user to pick one milestone (or type a custom one)
|
|
@@ -414,7 +418,7 @@ CONTEXT FROM /aif-plan:
|
|
|
414
418
|
- Plan file: .ai-factory/plans/<branch-name>.md
|
|
415
419
|
- Testing: yes/no
|
|
416
420
|
- Logging: verbose/standard/minimal
|
|
417
|
-
- Docs: yes/no
|
|
421
|
+
- Docs: yes/no # yes => mandatory docs checkpoint, no => warn-only
|
|
418
422
|
```
|
|
419
423
|
|
|
420
424
|
**Full mode normal:** STOP after planning. The user reviews the plan and decides when to implement.
|
|
@@ -11,7 +11,7 @@ Created: [date]
|
|
|
11
11
|
## Settings
|
|
12
12
|
- Testing: yes/no
|
|
13
13
|
- Logging: verbose/standard/minimal
|
|
14
|
-
- Docs: yes/no
|
|
14
|
+
- Docs: yes/no # yes => mandatory docs checkpoint in /aif-implement, no/unset => WARN [docs] only
|
|
15
15
|
|
|
16
16
|
## Roadmap Linkage (optional)
|
|
17
17
|
<!-- Only when .ai-factory/ROADMAP.md exists -->
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-roadmap
|
|
3
3
|
description: Create or update a project roadmap with major milestones. Generates .ai-factory/ROADMAP.md — a strategic checklist of high-level goals. Use when user says "roadmap", "project plan", "milestones", or "what to build next".
|
|
4
4
|
argument-hint: "[check | project vision or requirements]"
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep Bash(git *)
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Bash(git *) Questions
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: aif-rules
|
|
3
3
|
description: Add project-specific rules and conventions to .ai-factory/RULES.md. Each invocation appends new rules. These rules are automatically loaded by /aif-implement before execution. Use when user says "add rule", "remember this", "convention", or "always do X".
|
|
4
4
|
argument-hint: "[rule text or topic]"
|
|
5
|
-
allowed-tools: Read Write Edit Glob Grep
|
|
5
|
+
allowed-tools: Read Write Edit Glob Grep Questions
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -5,7 +5,7 @@ description: >-
|
|
|
5
5
|
nothing was forgotten, code compiles, tests pass, and quality standards are met.
|
|
6
6
|
Use after "/aif-implement" completes, or when user says "verify", "check work", "did we miss anything".
|
|
7
7
|
argument-hint: "[--strict]"
|
|
8
|
-
allowed-tools: Read Edit Glob Grep Bash(git *) Bash(npm *) Bash(npx *) Bash(yarn *) Bash(pnpm *) Bash(bun *) Bash(go *) Bash(python *) Bash(php *) Bash(composer *) Bash(cargo *) Bash(make *) Bash(task *) Bash(just *) Bash(mage *) TaskList TaskGet
|
|
8
|
+
allowed-tools: Read Edit Glob Grep Bash(git *) Bash(npm *) Bash(npx *) Bash(yarn *) Bash(pnpm *) Bash(bun *) Bash(go *) Bash(python *) Bash(php *) Bash(composer *) Bash(cargo *) Bash(make *) Bash(task *) Bash(just *) Bash(mage *) TaskList TaskGet Questions
|
|
9
9
|
disable-model-invocation: false
|
|
10
10
|
metadata:
|
|
11
11
|
author: AI Factory
|