ai-factory 2.2.2 → 2.4.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.
Files changed (45) hide show
  1. package/README.md +5 -1
  2. package/dist/cli/commands/extension.js +10 -3
  3. package/dist/cli/commands/extension.js.map +1 -1
  4. package/dist/core/agents.js +2 -2
  5. package/dist/core/agents.js.map +1 -1
  6. package/dist/core/extensions.d.ts +2 -1
  7. package/dist/core/extensions.d.ts.map +1 -1
  8. package/dist/core/extensions.js.map +1 -1
  9. package/dist/core/mcp.d.ts +2 -2
  10. package/dist/core/mcp.d.ts.map +1 -1
  11. package/dist/core/mcp.js +67 -10
  12. package/dist/core/mcp.js.map +1 -1
  13. package/dist/core/transformer.d.ts.map +1 -1
  14. package/dist/core/transformer.js +1 -0
  15. package/dist/core/transformer.js.map +1 -1
  16. package/dist/core/transformers/antigravity.d.ts.map +1 -1
  17. package/dist/core/transformers/antigravity.js +2 -0
  18. package/dist/core/transformers/antigravity.js.map +1 -1
  19. package/package.json +1 -1
  20. package/skills/aif/SKILL.md +29 -0
  21. package/skills/aif-architecture/SKILL.md +26 -0
  22. package/skills/aif-best-practices/SKILL.md +20 -0
  23. package/skills/aif-build-automation/SKILL.md +21 -1
  24. package/skills/aif-ci/SKILL.md +20 -0
  25. package/skills/aif-commit/SKILL.md +42 -12
  26. package/skills/aif-dockerize/SKILL.md +22 -1
  27. package/skills/aif-docs/SKILL.md +23 -1
  28. package/skills/aif-evolve/SKILL.md +352 -139
  29. package/skills/aif-explore/SKILL.md +384 -0
  30. package/skills/aif-fix/SKILL.md +22 -0
  31. package/skills/aif-grounded/SKILL.md +22 -0
  32. package/skills/aif-implement/SKILL.md +62 -1
  33. package/skills/aif-improve/SKILL.md +20 -0
  34. package/skills/aif-loop/SKILL.md +20 -0
  35. package/skills/aif-plan/SKILL.md +65 -1
  36. package/skills/aif-plan/references/EXAMPLES.md +18 -0
  37. package/skills/aif-plan/references/TASK-FORMAT.md +14 -0
  38. package/skills/aif-review/SKILL.md +40 -0
  39. package/skills/aif-roadmap/SKILL.md +21 -0
  40. package/skills/aif-rules/SKILL.md +23 -0
  41. package/skills/aif-security-checklist/SKILL.md +25 -0
  42. package/skills/aif-skill-generator/SKILL.md +23 -0
  43. package/skills/aif-skill-generator/scripts/validate.sh +4 -4
  44. package/skills/aif-verify/SKILL.md +93 -1
  45. package/skills/aif-verify/references/CONTEXT-GATES-AND-OWNERSHIP.md +75 -0
@@ -34,6 +34,26 @@ Read .ai-factory/DESCRIPTION.md
34
34
 
35
35
  Store project context for later steps. If absent, Step 2 detects everything.
36
36
 
37
+ **Read `.ai-factory/skill-context/aif-ci/SKILL.md`** — MANDATORY if the file exists.
38
+
39
+ This file contains project-specific rules accumulated by `/aif-evolve` from patches,
40
+ codebase conventions, and tech-stack analysis. These rules are tailored to the current project.
41
+
42
+ **How to apply skill-context rules:**
43
+ - Treat them as **project-level overrides** for this skill's general instructions
44
+ - When a skill-context rule conflicts with a general rule written in this SKILL.md,
45
+ **the skill-context rule wins** (more specific context takes priority — same principle as nested CLAUDE.md files)
46
+ - When there is no conflict, apply both: general rules from SKILL.md + project rules from skill-context
47
+ - Do NOT ignore skill-context rules even if they seem to contradict this skill's defaults —
48
+ they exist because the project's experience proved the default insufficient
49
+ - **CRITICAL:** skill-context rules apply to ALL outputs of this skill — including generated
50
+ CI workflow files and audit reports. Templates in this skill are **base structures**. If a
51
+ skill-context rule says "CI MUST include step X" or "workflow MUST have job Y" — you MUST augment
52
+ the templates accordingly. Generating CI config that violates skill-context rules is a bug.
53
+
54
+ **Enforcement:** After generating any output artifact, verify it against all skill-context rules.
55
+ If any rule is violated — fix the output before presenting it to the user.
56
+
37
57
  ---
38
58
 
39
59
  ## Step 1: Detect Existing CI & Determine Mode
@@ -2,8 +2,8 @@
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: Bash(git *)
6
- disable-model-invocation: true
5
+ allowed-tools: Read Bash(git *) AskUserQuestion Questions
6
+ disable-model-invocation: false
7
7
  ---
8
8
 
9
9
  # Conventional Commit Generator
@@ -12,12 +12,38 @@ Generate commit messages following the [Conventional Commits](https://www.conven
12
12
 
13
13
  ## Workflow
14
14
 
15
+ **Read `.ai-factory/skill-context/aif-commit/SKILL.md`** — MANDATORY if the file exists.
16
+
17
+ This file contains project-specific rules accumulated by `/aif-evolve` from patches,
18
+ codebase conventions, and tech-stack analysis. These rules are tailored to the current project.
19
+
20
+ **How to apply skill-context rules:**
21
+ - Treat them as **project-level overrides** for this skill's general instructions
22
+ - When a skill-context rule conflicts with a general rule written in this SKILL.md,
23
+ **the skill-context rule wins** (more specific context takes priority — same principle as nested CLAUDE.md files)
24
+ - When there is no conflict, apply both: general rules from SKILL.md + project rules from skill-context
25
+ - Do NOT ignore skill-context rules even if they seem to contradict this skill's defaults —
26
+ they exist because the project's experience proved the default insufficient
27
+ - **CRITICAL:** skill-context rules apply to ALL outputs of this skill — including the commit
28
+ message format and conventions. If a skill-context rule says "commits MUST follow format X"
29
+ or "message MUST include Y" — you MUST comply. Generating a commit message that violates
30
+ skill-context rules is a bug.
31
+
32
+ **Enforcement:** After generating any output artifact, verify it against all skill-context rules.
33
+ If any rule is violated — fix the output before presenting it to the user.
34
+
15
35
  1. **Analyze Changes**
16
36
  - Run `git status` to see staged files
17
37
  - Run `git diff --cached` to see staged changes
18
38
  - If nothing staged, show warning and suggest staging
19
39
 
20
- 2. **Determine Commit Type**
40
+ 2. **Run Context Gates (Read-Only)**
41
+ - Check `.ai-factory/ARCHITECTURE.md` and `.ai-factory/DESCRIPTION.md` (if present) to catch obvious scope/boundary drift
42
+ - Check `.ai-factory/RULES.md` and `.ai-factory/ROADMAP.md` (if present) to catch rule and milestone alignment issues
43
+ - Missing optional files (`ROADMAP.md`, `RULES.md`) are `WARN`, not blockers
44
+ - Never modify context artifacts from this command
45
+
46
+ 3. **Determine Commit Type**
21
47
  - `feat`: New feature
22
48
  - `fix`: Bug fix
23
49
  - `docs`: Documentation only
@@ -29,12 +55,12 @@ Generate commit messages following the [Conventional Commits](https://www.conven
29
55
  - `ci`: CI configuration
30
56
  - `chore`: Maintenance tasks
31
57
 
32
- 3. **Identify Scope**
58
+ 4. **Identify Scope**
33
59
  - From file paths (e.g., `src/auth/` → `auth`)
34
60
  - From argument if provided
35
61
  - Optional - omit if changes span multiple areas
36
62
 
37
- 4. **Generate Message**
63
+ 5. **Generate Message**
38
64
  - Keep subject line under 72 characters
39
65
  - Use imperative mood ("add" not "added")
40
66
  - Don't capitalize first letter after type
@@ -80,16 +106,18 @@ When invoked:
80
106
 
81
107
  1. Check for staged changes
82
108
  2. Analyze the diff content
83
- 3. Propose a commit message
84
- 4. Ask for confirmation or modifications
85
- 5. Execute `git commit` with the message
86
- 6. After a successful commit, offer to push:
109
+ 3. Run read-only context gates and summarize findings as `WARN`/`ERROR`
110
+ 4. If commit type is `feat`/`fix`/`perf` and roadmap exists, check milestone linkage; if missing, warn and suggest adding linkage in commit body/footer
111
+ 5. Propose a commit message
112
+ 6. Ask for confirmation or modifications
113
+ 7. Execute `git commit` with the message
114
+ 8. After a successful commit, offer to push:
87
115
  - Show branch/ahead status: `git status -sb`
88
116
  - If the branch has no upstream, use: `git push -u origin <branch>`
89
117
  - Otherwise: `git push`
90
118
  - User choice:
91
- - [ ] Push now
92
- - [ ] Skip push
119
+ - [ ] Push now
120
+ - [ ] Skip push
93
121
 
94
122
  If argument provided (e.g., `/aif-commit auth`):
95
123
  - Use it as the scope
@@ -99,10 +127,12 @@ If argument provided (e.g., `/aif-commit auth`):
99
127
 
100
128
  - Never commit secrets or credentials
101
129
  - Review large diffs carefully before committing
130
+ - `/aif-commit` has no implicit strict mode — context gates are warning-first unless user explicitly requests blocking behavior
131
+ - Treat `.ai-factory/ARCHITECTURE.md`, `.ai-factory/ROADMAP.md`, `.ai-factory/RULES.md`, and `.ai-factory/DESCRIPTION.md` as read-only context in this command
102
132
  - If staged changes contain unrelated work (e.g., a feature + a bugfix, or changes to independent modules), suggest splitting into separate commits:
103
133
  1. Show which files/hunks belong to which commit
104
134
  2. Ask for confirmation
105
135
  3. Unstage all: `git reset HEAD`
106
136
  4. Stage and commit each group separately using `git add <files>` + `git commit`
107
137
  5. Offer to push only after all commits are done
108
- - Add Co-Authored-By for pair programming if mentioned
138
+ - NEVER add `Co-Authored-By` or any other trailer attributing authorship to the AI. Commits must not contain AI co-author lines
@@ -7,7 +7,7 @@ description: >-
7
7
  "containerize", or "setup docker".
8
8
  argument-hint: "[--audit]"
9
9
  allowed-tools: Read Edit Glob Grep Write Bash(git *) Bash(docker *) AskUserQuestion Questions WebSearch WebFetch
10
- disable-model-invocation: true
10
+ disable-model-invocation: false
11
11
  metadata:
12
12
  author: AI Factory
13
13
  version: "1.0"
@@ -38,6 +38,27 @@ Read .ai-factory/DESCRIPTION.md
38
38
 
39
39
  Store project context for later steps. If absent, Step 2 detects everything.
40
40
 
41
+ **Read `.ai-factory/skill-context/aif-dockerize/SKILL.md`** — MANDATORY if the file exists.
42
+
43
+ This file contains project-specific rules accumulated by `/aif-evolve` from patches,
44
+ codebase conventions, and tech-stack analysis. These rules are tailored to the current project.
45
+
46
+ **How to apply skill-context rules:**
47
+ - Treat them as **project-level overrides** for this skill's general instructions
48
+ - When a skill-context rule conflicts with a general rule written in this SKILL.md,
49
+ **the skill-context rule wins** (more specific context takes priority — same principle as nested CLAUDE.md files)
50
+ - When there is no conflict, apply both: general rules from SKILL.md + project rules from skill-context
51
+ - Do NOT ignore skill-context rules even if they seem to contradict this skill's defaults —
52
+ they exist because the project's experience proved the default insufficient
53
+ - **CRITICAL:** skill-context rules apply to ALL outputs of this skill — including Dockerfile,
54
+ compose files, .dockerignore, and deploy scripts. Templates in this skill are **base structures**.
55
+ If a skill-context rule says "Dockerfile MUST include X" or "compose MUST have service Y" —
56
+ you MUST augment the templates accordingly. Generating Docker config that violates skill-context
57
+ rules is a bug.
58
+
59
+ **Enforcement:** After generating any output artifact, verify it against all skill-context rules.
60
+ If any rule is violated — fix the output before presenting it to the user.
61
+
41
62
  ---
42
63
 
43
64
  ## Step 1: Detect Existing Docker Files & Determine Mode
@@ -3,7 +3,7 @@ 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
5
  allowed-tools: Read Write Edit Glob Grep Bash(mkdir, npx, python) AskUserQuestion Questions WebFetch WebSearch
6
- disable-model-invocation: true
6
+ disable-model-invocation: false
7
7
  metadata:
8
8
  author: AI Factory
9
9
  version: "1.0"
@@ -38,6 +38,27 @@ Generate, maintain, and improve project documentation following a landing-page R
38
38
  - Look for existing docs, comments, API endpoints, CLI commands
39
39
  - Check for existing README.md and docs/ directory
40
40
 
41
+ **Read `.ai-factory/skill-context/aif-docs/SKILL.md`** — MANDATORY if the file exists.
42
+
43
+ This file contains project-specific rules accumulated by `/aif-evolve` from patches,
44
+ codebase conventions, and tech-stack analysis. These rules are tailored to the current project.
45
+
46
+ **How to apply skill-context rules:**
47
+ - Treat them as **project-level overrides** for this skill's general instructions
48
+ - When a skill-context rule conflicts with a general rule written in this SKILL.md,
49
+ **the skill-context rule wins** (more specific context takes priority — same principle as nested CLAUDE.md files)
50
+ - When there is no conflict, apply both: general rules from SKILL.md + project rules from skill-context
51
+ - Do NOT ignore skill-context rules even if they seem to contradict this skill's defaults —
52
+ they exist because the project's experience proved the default insufficient
53
+ - **CRITICAL:** skill-context rules apply to ALL outputs of this skill — including README.md,
54
+ documentation pages, and their templates. The templates in this SKILL.md are **base structures**.
55
+ If a skill-context rule says "docs MUST include X" or "README MUST have section Y" — you MUST
56
+ augment the templates accordingly. Generating documentation that violates skill-context rules
57
+ is a bug.
58
+
59
+ **Enforcement:** After generating any output artifact, verify it against all skill-context rules.
60
+ If any rule is violated — fix the output before presenting it to the user.
61
+
41
62
  **Scan for scattered markdown files in project root:**
42
63
 
43
64
  Use `Glob` to find all `*.md` files in the project root (exclude `node_modules/`, `.ai-factory/`, agent dirs):
@@ -496,3 +517,4 @@ Options:
496
517
  4. **Use the project's language** — if project README is in Russian, write docs in Russian
497
518
  5. **Preserve existing badges/logos** — don't remove them during restructuring
498
519
  6. **Add to .gitignore** if generating HTML: add `docs-html/` to .gitignore
520
+ 7. **Ownership boundary** — this command owns documentation artifacts (`README.md`, `docs/*`, and the Documentation section in `AGENTS.md`), not `.ai-factory/ROADMAP.md`, `.ai-factory/RULES.md`, or `.ai-factory/RESEARCH.md`