javi-forge 1.5.0 → 1.6.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.
Files changed (217) hide show
  1. package/README.md +191 -3
  2. package/ci-local/hooks/pre-push +17 -13
  3. package/dist/commands/analyze.d.ts +1 -1
  4. package/dist/commands/analyze.js +15 -15
  5. package/dist/commands/atlassian-mcp.d.ts +42 -0
  6. package/dist/commands/atlassian-mcp.js +98 -0
  7. package/dist/commands/ci.d.ts +3 -3
  8. package/dist/commands/ci.js +185 -147
  9. package/dist/commands/crash-recovery.d.ts +34 -0
  10. package/dist/commands/crash-recovery.js +123 -0
  11. package/dist/commands/doctor.d.ts +2 -2
  12. package/dist/commands/doctor.js +113 -61
  13. package/dist/commands/harness-audit.d.ts +35 -0
  14. package/dist/commands/harness-audit.js +277 -0
  15. package/dist/commands/init.d.ts +1 -1
  16. package/dist/commands/init.js +415 -118
  17. package/dist/commands/llmstxt.d.ts +1 -1
  18. package/dist/commands/llmstxt.js +36 -34
  19. package/dist/commands/parallel-batch.d.ts +42 -0
  20. package/dist/commands/parallel-batch.js +90 -0
  21. package/dist/commands/plugin.d.ts +26 -1
  22. package/dist/commands/plugin.js +138 -24
  23. package/dist/commands/secret-scanner.d.ts +30 -0
  24. package/dist/commands/secret-scanner.js +272 -0
  25. package/dist/commands/security-analysis.d.ts +74 -0
  26. package/dist/commands/security-analysis.js +487 -0
  27. package/dist/commands/security.d.ts +31 -0
  28. package/dist/commands/security.js +445 -0
  29. package/dist/commands/skill-scanner.d.ts +63 -0
  30. package/dist/commands/skill-scanner.js +383 -0
  31. package/dist/commands/skills.d.ts +139 -0
  32. package/dist/commands/skills.js +895 -0
  33. package/dist/commands/supply-chain.d.ts +23 -0
  34. package/dist/commands/supply-chain.js +126 -0
  35. package/dist/commands/tdd-pipeline.d.ts +17 -0
  36. package/dist/commands/tdd-pipeline.js +144 -0
  37. package/dist/commands/tdd.d.ts +21 -0
  38. package/dist/commands/tdd.js +120 -0
  39. package/dist/commands/team-presets.d.ts +53 -0
  40. package/dist/commands/team-presets.js +201 -0
  41. package/dist/commands/workflow.d.ts +23 -0
  42. package/dist/commands/workflow.js +114 -0
  43. package/dist/constants.d.ts +21 -0
  44. package/dist/constants.js +208 -37
  45. package/dist/index.js +400 -54
  46. package/dist/lib/agent-skills.d.ts +73 -0
  47. package/dist/lib/agent-skills.js +260 -0
  48. package/dist/lib/auto-skill-install.d.ts +37 -0
  49. package/dist/lib/auto-skill-install.js +92 -0
  50. package/dist/lib/auto-wire.d.ts +20 -0
  51. package/dist/lib/auto-wire.js +240 -0
  52. package/dist/lib/claudemd.d.ts +20 -0
  53. package/dist/lib/claudemd.js +222 -0
  54. package/dist/lib/codex-export.d.ts +16 -0
  55. package/dist/lib/codex-export.js +109 -0
  56. package/dist/lib/common.d.ts +1 -1
  57. package/dist/lib/common.js +52 -44
  58. package/dist/lib/context.d.ts +27 -0
  59. package/dist/lib/context.js +204 -0
  60. package/dist/lib/docker.d.ts +1 -1
  61. package/dist/lib/docker.js +141 -112
  62. package/dist/lib/frontmatter.d.ts +1 -1
  63. package/dist/lib/frontmatter.js +29 -15
  64. package/dist/lib/plugin.d.ts +19 -1
  65. package/dist/lib/plugin.js +174 -47
  66. package/dist/lib/skill-publish.d.ts +40 -0
  67. package/dist/lib/skill-publish.js +146 -0
  68. package/dist/lib/stack-detector.d.ts +38 -0
  69. package/dist/lib/stack-detector.js +207 -0
  70. package/dist/lib/template.d.ts +16 -1
  71. package/dist/lib/template.js +46 -17
  72. package/dist/lib/workflow/discovery.d.ts +19 -0
  73. package/dist/lib/workflow/discovery.js +68 -0
  74. package/dist/lib/workflow/index.d.ts +5 -0
  75. package/dist/lib/workflow/index.js +5 -0
  76. package/dist/lib/workflow/parser.d.ts +16 -0
  77. package/dist/lib/workflow/parser.js +198 -0
  78. package/dist/lib/workflow/renderer.d.ts +9 -0
  79. package/dist/lib/workflow/renderer.js +152 -0
  80. package/dist/lib/workflow/validator.d.ts +10 -0
  81. package/dist/lib/workflow/validator.js +189 -0
  82. package/dist/tasks/index.d.ts +4 -0
  83. package/dist/tasks/index.js +4 -0
  84. package/dist/tasks/scaffold-tasks.d.ts +3 -0
  85. package/dist/tasks/scaffold-tasks.js +14 -0
  86. package/dist/tasks/task-id.d.ts +30 -0
  87. package/dist/tasks/task-id.js +55 -0
  88. package/dist/tasks/task-tracker.d.ts +15 -0
  89. package/dist/tasks/task-tracker.js +81 -0
  90. package/dist/types/index.d.ts +252 -5
  91. package/dist/types/index.js +11 -1
  92. package/dist/ui/AnalyzeUI.d.ts +1 -1
  93. package/dist/ui/AnalyzeUI.js +38 -39
  94. package/dist/ui/App.d.ts +5 -3
  95. package/dist/ui/App.js +92 -46
  96. package/dist/ui/AutoSkills.d.ts +9 -0
  97. package/dist/ui/AutoSkills.js +124 -0
  98. package/dist/ui/CI.d.ts +2 -2
  99. package/dist/ui/CI.js +24 -26
  100. package/dist/ui/CIContext.d.ts +1 -1
  101. package/dist/ui/CIContext.js +3 -2
  102. package/dist/ui/CISelector.d.ts +2 -2
  103. package/dist/ui/CISelector.js +23 -15
  104. package/dist/ui/Doctor.d.ts +1 -1
  105. package/dist/ui/Doctor.js +35 -29
  106. package/dist/ui/Header.d.ts +1 -1
  107. package/dist/ui/Header.js +14 -14
  108. package/dist/ui/HookProfileSelector.d.ts +9 -0
  109. package/dist/ui/HookProfileSelector.js +54 -0
  110. package/dist/ui/LlmsTxt.d.ts +1 -1
  111. package/dist/ui/LlmsTxt.js +31 -22
  112. package/dist/ui/MemorySelector.d.ts +2 -2
  113. package/dist/ui/MemorySelector.js +28 -16
  114. package/dist/ui/NameInput.d.ts +1 -1
  115. package/dist/ui/NameInput.js +21 -21
  116. package/dist/ui/OptionSelector.d.ts +8 -2
  117. package/dist/ui/OptionSelector.js +83 -26
  118. package/dist/ui/Plugin.d.ts +4 -3
  119. package/dist/ui/Plugin.js +89 -29
  120. package/dist/ui/Progress.d.ts +3 -3
  121. package/dist/ui/Progress.js +23 -22
  122. package/dist/ui/Skills.d.ts +11 -0
  123. package/dist/ui/Skills.js +148 -0
  124. package/dist/ui/StackSelector.d.ts +2 -2
  125. package/dist/ui/StackSelector.js +26 -16
  126. package/dist/ui/Summary.d.ts +3 -3
  127. package/dist/ui/Summary.js +60 -50
  128. package/dist/ui/Welcome.d.ts +1 -1
  129. package/dist/ui/Welcome.js +15 -16
  130. package/dist/ui/theme.d.ts +1 -1
  131. package/dist/ui/theme.js +6 -6
  132. package/package.json +9 -6
  133. package/templates/common/atlassian/mcp-atlassian-snippet.json +16 -0
  134. package/templates/common/repoforge/mcp-repoforge-snippet.json +11 -0
  135. package/templates/common/repoforge/repoforge.yaml +34 -0
  136. package/templates/github/deploy-docker-zero-downtime.yml +140 -0
  137. package/templates/github/repoforge-graph.yml +45 -0
  138. package/templates/gitlab/deploy-docker-zero-downtime.yml +57 -0
  139. package/templates/local-ai/.env.example +17 -0
  140. package/templates/local-ai/docker-compose.yml +95 -0
  141. package/templates/security-hooks/claude-settings-security.json +30 -0
  142. package/templates/security-hooks/commit-msg-signing +29 -0
  143. package/templates/security-hooks/pre-commit-permissions +74 -0
  144. package/templates/security-hooks/pre-commit-secrets +74 -0
  145. package/templates/security-hooks/pre-push-branch-protection +62 -0
  146. package/templates/security-hooks/pre-push-deps +83 -0
  147. package/templates/security-hooks/pre-push-signing +67 -0
  148. package/templates/woodpecker/deploy-docker-zero-downtime.yml +50 -0
  149. package/templates/workflows/ci-pipeline.dot +15 -0
  150. package/templates/workflows/feature-flow.dot +21 -0
  151. package/templates/workflows/release.dot +16 -0
  152. package/dist/__integration__/helpers.d.ts +0 -20
  153. package/dist/__integration__/helpers.d.ts.map +0 -1
  154. package/dist/__integration__/helpers.js +0 -31
  155. package/dist/__integration__/helpers.js.map +0 -1
  156. package/dist/commands/analyze.d.ts.map +0 -1
  157. package/dist/commands/analyze.js.map +0 -1
  158. package/dist/commands/ci.d.ts.map +0 -1
  159. package/dist/commands/ci.js.map +0 -1
  160. package/dist/commands/doctor.d.ts.map +0 -1
  161. package/dist/commands/doctor.js.map +0 -1
  162. package/dist/commands/init.d.ts.map +0 -1
  163. package/dist/commands/init.js.map +0 -1
  164. package/dist/commands/llmstxt.d.ts.map +0 -1
  165. package/dist/commands/llmstxt.js.map +0 -1
  166. package/dist/commands/plugin.d.ts.map +0 -1
  167. package/dist/commands/plugin.js.map +0 -1
  168. package/dist/constants.d.ts.map +0 -1
  169. package/dist/constants.js.map +0 -1
  170. package/dist/index.d.ts.map +0 -1
  171. package/dist/index.js.map +0 -1
  172. package/dist/lib/common.d.ts.map +0 -1
  173. package/dist/lib/common.js.map +0 -1
  174. package/dist/lib/docker.d.ts.map +0 -1
  175. package/dist/lib/docker.js.map +0 -1
  176. package/dist/lib/frontmatter.d.ts.map +0 -1
  177. package/dist/lib/frontmatter.js.map +0 -1
  178. package/dist/lib/plugin.d.ts.map +0 -1
  179. package/dist/lib/plugin.js.map +0 -1
  180. package/dist/lib/template.d.ts.map +0 -1
  181. package/dist/lib/template.js.map +0 -1
  182. package/dist/types/index.d.ts.map +0 -1
  183. package/dist/types/index.js.map +0 -1
  184. package/dist/ui/AnalyzeUI.d.ts.map +0 -1
  185. package/dist/ui/AnalyzeUI.js.map +0 -1
  186. package/dist/ui/App.d.ts.map +0 -1
  187. package/dist/ui/App.js.map +0 -1
  188. package/dist/ui/CI.d.ts.map +0 -1
  189. package/dist/ui/CI.js.map +0 -1
  190. package/dist/ui/CIContext.d.ts.map +0 -1
  191. package/dist/ui/CIContext.js.map +0 -1
  192. package/dist/ui/CISelector.d.ts.map +0 -1
  193. package/dist/ui/CISelector.js.map +0 -1
  194. package/dist/ui/Doctor.d.ts.map +0 -1
  195. package/dist/ui/Doctor.js.map +0 -1
  196. package/dist/ui/Header.d.ts.map +0 -1
  197. package/dist/ui/Header.js.map +0 -1
  198. package/dist/ui/LlmsTxt.d.ts.map +0 -1
  199. package/dist/ui/LlmsTxt.js.map +0 -1
  200. package/dist/ui/MemorySelector.d.ts.map +0 -1
  201. package/dist/ui/MemorySelector.js.map +0 -1
  202. package/dist/ui/NameInput.d.ts.map +0 -1
  203. package/dist/ui/NameInput.js.map +0 -1
  204. package/dist/ui/OptionSelector.d.ts.map +0 -1
  205. package/dist/ui/OptionSelector.js.map +0 -1
  206. package/dist/ui/Plugin.d.ts.map +0 -1
  207. package/dist/ui/Plugin.js.map +0 -1
  208. package/dist/ui/Progress.d.ts.map +0 -1
  209. package/dist/ui/Progress.js.map +0 -1
  210. package/dist/ui/StackSelector.d.ts.map +0 -1
  211. package/dist/ui/StackSelector.js.map +0 -1
  212. package/dist/ui/Summary.d.ts.map +0 -1
  213. package/dist/ui/Summary.js.map +0 -1
  214. package/dist/ui/Welcome.d.ts.map +0 -1
  215. package/dist/ui/Welcome.js.map +0 -1
  216. package/dist/ui/theme.d.ts.map +0 -1
  217. package/dist/ui/theme.js.map +0 -1
package/README.md CHANGED
@@ -15,7 +15,7 @@ An interactive TUI guides you through project setup: pick a stack, CI provider,
15
15
 
16
16
  ## What It Creates
17
17
 
18
- `javi-forge init` bootstraps a complete project with 10 sequential steps:
18
+ `javi-forge init` bootstraps a complete project with 13 sequential steps:
19
19
 
20
20
  ```mermaid
21
21
  flowchart LR
@@ -27,7 +27,10 @@ flowchart LR
27
27
  F --> G["javi-ai sync"]
28
28
  G --> H["openspec/ (SDD)"]
29
29
  H --> I["GHAGGA review"]
30
- I --> J["Manifest"]
30
+ I --> J["Mock mode"]
31
+ J --> K[".context/"]
32
+ K --> L["CLAUDE.md"]
33
+ L --> M["Manifest"]
31
34
  ```
32
35
 
33
36
  ### Step-by-Step
@@ -43,7 +46,10 @@ flowchart LR
43
46
  | 7 | Sync AI config via `javi-ai sync --target all` |
44
47
  | 8 | Set up SDD with `openspec/` directory |
45
48
  | 9 | Install GHAGGA review system (optional) |
46
- | 10 | Write forge manifest to `.javi-forge/manifest.json` |
49
+ | 10 | Configure mock-first mode (optional) |
50
+ | 11 | Generate `.context/` directory with `INDEX.md` and `summary.md` |
51
+ | 12 | Generate project-aware `CLAUDE.md` (stack, conventions, skills) |
52
+ | 13 | Write forge manifest to `.javi-forge/manifest.json` |
47
53
 
48
54
  ## Templates
49
55
 
@@ -79,14 +85,45 @@ flowchart LR
79
85
  | Command | Description |
80
86
  |---------|-------------|
81
87
  | `init` | Bootstrap a new project (default) |
88
+ | `ci` | Run CI simulation (lint + compile + test + security + ghagga) |
89
+ | `ci init` | Install git hooks in `.git/hooks/` (recommended for existing repos) |
90
+ | `tdd init` | Install TDD-enforcing pre-commit hook (auto-detects stack) |
82
91
  | `analyze` | Run repoforge skills analysis on current project |
83
92
  | `doctor` | Show comprehensive health report |
93
+ | `plugin add` | Install a plugin from GitHub (`org/repo`) |
94
+ | `plugin remove` | Remove an installed plugin |
95
+ | `plugin list` | List installed plugins |
96
+ | `plugin search` | Search the plugin registry |
97
+ | `plugin validate` | Validate a local plugin directory |
98
+ | `plugin sync` | Auto-detect and wire installed plugins into manifest |
99
+ | `plugin export` | Export plugin to Agent Skills spec (`skills.json`) |
100
+ | `plugin export --codex` | Export plugin to Codex-compatible TOML subagent files |
101
+ | `plugin import` | Import an Agent Skills spec package as a javi-forge plugin |
102
+ | `skills doctor` | Show skills health report (conflict + duplicate detection) |
103
+ | `skills budget` | Show token cost of loaded skills |
104
+ | `skills score` | Score a skill on quality dimensions (0-100) |
105
+ | `skills benchmark` | Benchmark a skill with structural quality checks |
106
+ | `security baseline` | Create security baseline from current audit findings |
107
+ | `security check` | Check for regressions against baseline (exits non-zero if found) |
108
+ | `security update` | Re-snapshot baseline (acknowledge current vulns) |
109
+ | `llms-txt` | Generate AI-friendly `llms.txt` for current project |
84
110
 
85
111
  ```bash
86
112
  npx javi-forge init
87
113
  npx javi-forge init --stack node --ci github
114
+ npx javi-forge ci
115
+ npx javi-forge ci init
116
+ npx javi-forge tdd init
88
117
  npx javi-forge analyze
89
118
  npx javi-forge doctor
119
+ npx javi-forge plugin sync
120
+ npx javi-forge plugin export my-plugin --codex
121
+ npx javi-forge skills doctor --deep
122
+ npx javi-forge skills budget -b 10000
123
+ npx javi-forge skills score react-19
124
+ npx javi-forge security baseline
125
+ npx javi-forge security check
126
+ npx javi-forge llms-txt
90
127
  ```
91
128
 
92
129
  ### CLI Flags
@@ -98,8 +135,20 @@ npx javi-forge doctor
98
135
  | `--ci` | string | — | CI provider |
99
136
  | `--memory` | string | — | Memory module |
100
137
  | `--project-name` | string | — | Project name (skips name prompt) |
138
+ | `--no-docker` | boolean | `false` | Disable Docker in CI hooks |
139
+ | `--no-ci-ghagga` | boolean | `false` | Disable GHAGGA in CI hooks |
140
+ | `--no-security` | boolean | `false` | Skip Semgrep security scan in CI |
101
141
  | `--ghagga` | boolean | `false` | Enable GHAGGA review system |
142
+ | `--mock` | boolean | `false` | Enable mock-first mode (no real API keys) |
102
143
  | `--batch` | boolean | `false` | Non-interactive mode |
144
+ | `--quick` | boolean | `false` | Lint + compile only (CI mode) |
145
+ | `--shell` | boolean | `false` | Open interactive shell in CI container |
146
+ | `--detect` | boolean | `false` | Show detected stack and exit (CI mode) |
147
+ | `--timeout` | number | `600` | Per-step timeout in seconds (CI mode) |
148
+ | `--deep` | boolean | `false` | Enable deep analysis (skills conflict detection) |
149
+ | `--budget, -b` | number | `8000` | Token budget limit for skills |
150
+ | `--skills-dir` | string | — | Custom skills directory path |
151
+ | `--codex` | boolean | `false` | Export plugin as Codex TOML (plugin export) |
103
152
 
104
153
  ## AI Config
105
154
 
@@ -114,6 +163,145 @@ npx javi-forge doctor
114
163
 
115
164
  The AI config is synced into your project via `javi-ai sync` during init.
116
165
 
166
+ ## Context Directory Generation
167
+
168
+ During `init`, javi-forge generates a `.context/` directory with two files:
169
+
170
+ | File | Purpose |
171
+ |------|---------|
172
+ | `.context/INDEX.md` | File index with directory structure, entry point, and conventions |
173
+ | `.context/summary.md` | Project summary for AI agents |
174
+
175
+ The content is stack-aware: it uses the detected stack (node, python, go, etc.) to generate relevant directory trees, entry points, and convention hints. AI tools can read `.context/` for instant project understanding.
176
+
177
+ ## CLAUDE.md Generation
178
+
179
+ `init` generates a project-level `CLAUDE.md` tailored to your stack. It includes:
180
+
181
+ - Stack and runtime information
182
+ - Coding conventions and test framework
183
+ - Relevant skills to load (e.g., `react-19`, `typescript`, `tailwind-4`)
184
+ - Installed modules (memory, SDD, GHAGGA)
185
+ - Reference to `.context/` directory if enabled
186
+
187
+ This gives Claude Code immediate project awareness without manual configuration.
188
+
189
+ ## Plugin System
190
+
191
+ Manage javi-forge plugins (skills, hooks, agents):
192
+
193
+ ```bash
194
+ npx javi-forge plugin add mapbox/agent-skills # install from GitHub
195
+ npx javi-forge plugin remove agent-skills # remove by name
196
+ npx javi-forge plugin list # list installed
197
+ npx javi-forge plugin search "react" # search registry
198
+ npx javi-forge plugin validate ./my-plugin # validate local plugin
199
+ npx javi-forge plugin sync # auto-detect and wire plugins
200
+ ```
201
+
202
+ ### Plugin Sync
203
+
204
+ `plugin sync` scans the project for installed plugins and updates the forge manifest. It detects additions, removals, and unchanged plugins:
205
+
206
+ ```bash
207
+ npx javi-forge plugin sync
208
+ # added: my-plugin | unchanged: core-skills
209
+ ```
210
+
211
+ ### Agent Skills Interop
212
+
213
+ Export javi-forge plugins to the Agent Skills spec or Codex TOML format for cross-tool compatibility:
214
+
215
+ ```bash
216
+ npx javi-forge plugin export my-plugin # exports skills.json (Agent Skills spec)
217
+ npx javi-forge plugin export my-plugin --codex # exports .toml subagent files (Codex)
218
+ npx javi-forge plugin import ./agent-skills-pkg # import Agent Skills package as plugin
219
+ ```
220
+
221
+ ## Security Baseline
222
+
223
+ Track and detect security regressions with baseline snapshots:
224
+
225
+ ```bash
226
+ npx javi-forge security baseline # create baseline from current audit
227
+ npx javi-forge security check # check for regressions (non-zero exit if found)
228
+ npx javi-forge security update # re-snapshot baseline (acknowledge current vulns)
229
+ ```
230
+
231
+ Supports **node** (npm/pnpm/yarn audit), **python** (pip-audit), **go** (govulncheck), and **rust** (cargo audit). The baseline is stored in `.javi-forge/security-baseline.json`.
232
+
233
+ `security check` compares current findings against the baseline and reports regressions (new vulnerabilities) and resolutions. It exits non-zero when regressions are found, making it suitable for CI pipelines.
234
+
235
+ ## TDD Hook
236
+
237
+ Install a test-driven development pre-commit hook that enforces tests must pass before any commit:
238
+
239
+ ```bash
240
+ npx javi-forge tdd init
241
+ ```
242
+
243
+ Auto-detects your stack and wires the correct test command (`npm test`, `pytest`, `go test ./...`). To bypass: `git commit --no-verify`.
244
+
245
+ ## Skills Management
246
+
247
+ ### Skills Doctor
248
+
249
+ Analyze installed skills for health, conflicts, and duplicates:
250
+
251
+ ```bash
252
+ npx javi-forge skills doctor # basic health + token budget
253
+ npx javi-forge skills doctor --deep # + conflict detection + duplicate detection
254
+ ```
255
+
256
+ With `--deep`, the doctor scans all SKILL.md critical rules for contradictions (e.g., "use semicolons" vs "no semicolons") and detects overlapping trigger keywords between skills.
257
+
258
+ ### Skills Budget
259
+
260
+ Show token cost of all loaded skills and check against a budget:
261
+
262
+ ```bash
263
+ npx javi-forge skills budget # default budget: 8000 tokens
264
+ npx javi-forge skills budget -b 12000 # custom budget
265
+ ```
266
+
267
+ Lists skills sorted by token consumption and suggests which to disable if over budget.
268
+
269
+ ### Skills Score
270
+
271
+ Score a skill on four quality dimensions (0-100 each):
272
+
273
+ ```bash
274
+ npx javi-forge skills score react-19
275
+ ```
276
+
277
+ | Dimension | Weight | What it measures |
278
+ |-----------|--------|-----------------|
279
+ | Completeness | 30% | Frontmatter, critical rules, content depth |
280
+ | Clarity | 25% | Actionable rules, no vague terms, structured sections |
281
+ | Testability | 25% | Given/When/Then scenarios, code examples, specificity |
282
+ | Token Efficiency | 20% | Rules-per-1000-tokens ratio, total size |
283
+
284
+ Exits non-zero if overall score is below threshold (default: 50).
285
+
286
+ ### Skills Benchmark
287
+
288
+ Run structural quality checks against a skill:
289
+
290
+ ```bash
291
+ npx javi-forge skills benchmark react-19
292
+ ```
293
+
294
+ Checks: frontmatter name, triggers, critical rules (>= 3), actionable verbs, code examples, section headings, token budget (<= 3000), no vague terms. Reports pass rate as a percentage.
295
+
296
+ ## LLMs.txt
297
+
298
+ Generate an AI-friendly `llms.txt` file with compact project notation (~75% fewer tokens than full docs):
299
+
300
+ ```bash
301
+ npx javi-forge llms-txt
302
+ npx javi-forge llms-txt --dry-run
303
+ ```
304
+
117
305
  ## RepoForge Integration
118
306
 
119
307
  The `analyze` command wraps [repoforge](https://github.com/Gentleman-Programming/repoforge) to run skills analysis on your project:
@@ -8,17 +8,21 @@
8
8
 
9
9
  set -e
10
10
 
11
- # Verify Docker is running
12
- if ! docker info &>/dev/null; then
13
- echo "PRE-PUSH: Docker is not running."
14
- echo " Start Docker or use: git push --no-verify"
15
- exit 1
11
+ if docker info &>/dev/null; then
12
+ echo "PRE-PUSH: Running full CI simulation..."
13
+ javi-forge ci || {
14
+ echo ""
15
+ echo "CI FAILED — Push aborted. Fix the issues above before pushing."
16
+ echo "To skip: git push --no-verify"
17
+ exit 1
18
+ }
19
+ else
20
+ echo "PRE-PUSH: ⚠ Docker not running — running quick checks only (lint + typecheck)"
21
+ echo " Start Docker for full CI (security scan, Docker tests)"
22
+ javi-forge ci --quick --no-docker --no-security --no-ci-ghagga || {
23
+ echo ""
24
+ echo "Quick checks FAILED — Push aborted. Fix the issues above before pushing."
25
+ echo "To skip: git push --no-verify"
26
+ exit 1
27
+ }
16
28
  fi
17
-
18
- echo "PRE-PUSH: Running CI simulation..."
19
- javi-forge ci || {
20
- echo ""
21
- echo "CI FAILED — Push aborted. Fix the issues above before pushing."
22
- echo "To skip: git push --no-verify"
23
- exit 1
24
- }
@@ -1,4 +1,4 @@
1
- import type { InitStep } from '../types/index.js';
1
+ import type { InitStep } from "../types/index.js";
2
2
  type StepCallback = (step: InitStep) => void;
3
3
  /**
4
4
  * Run repoforge skills analysis on a project directory.
@@ -1,5 +1,5 @@
1
- import { execFile } from 'child_process';
2
- import { promisify } from 'util';
1
+ import { execFile } from "child_process";
2
+ import { promisify } from "util";
3
3
  const execFileAsync = promisify(execFile);
4
4
  function report(onStep, id, label, status, detail) {
5
5
  onStep({ id, label, status, detail });
@@ -7,7 +7,7 @@ function report(onStep, id, label, status, detail) {
7
7
  /** Check if a binary is available in PATH */
8
8
  async function which(bin) {
9
9
  try {
10
- await execFileAsync('which', [bin]);
10
+ await execFileAsync("which", [bin]);
11
11
  return true;
12
12
  }
13
13
  catch {
@@ -19,37 +19,37 @@ async function which(bin) {
19
19
  * This is a thin wrapper that delegates to the repoforge CLI.
20
20
  */
21
21
  export async function runAnalyze(projectDir, dryRun, onStep) {
22
- const stepId = 'analyze-repoforge';
23
- report(onStep, stepId, 'Run repoforge skills analysis', 'running');
22
+ const stepId = "analyze-repoforge";
23
+ report(onStep, stepId, "Run repoforge skills analysis", "running");
24
24
  try {
25
25
  // Check if repoforge is installed
26
- const hasRepoforge = await which('repoforge');
26
+ const hasRepoforge = await which("repoforge");
27
27
  if (!hasRepoforge) {
28
- report(onStep, stepId, 'Run repoforge skills analysis', 'error', 'repoforge not found. Install with: pip install repoforge');
28
+ report(onStep, stepId, "Run repoforge skills analysis", "error", "repoforge not found. Install with: pip install repoforge");
29
29
  return;
30
30
  }
31
- const args = ['skills', '-w', projectDir];
31
+ const args = ["skills", "-w", projectDir];
32
32
  if (dryRun) {
33
- args.push('--dry-run');
33
+ args.push("--dry-run");
34
34
  }
35
- const { stdout, stderr } = await execFileAsync('repoforge', args, {
35
+ const { stdout, stderr } = await execFileAsync("repoforge", args, {
36
36
  cwd: projectDir,
37
37
  timeout: 300_000, // 5 min — analysis can take a while on large repos
38
38
  });
39
39
  if (stdout) {
40
- report(onStep, stepId, 'Run repoforge skills analysis', 'done', stdout.trim().split('\n').pop() ?? 'complete');
40
+ report(onStep, stepId, "Run repoforge skills analysis", "done", stdout.trim().split("\n").pop() ?? "complete");
41
41
  }
42
42
  else {
43
- report(onStep, stepId, 'Run repoforge skills analysis', 'done', dryRun ? 'dry-run complete' : 'complete');
43
+ report(onStep, stepId, "Run repoforge skills analysis", "done", dryRun ? "dry-run complete" : "complete");
44
44
  }
45
45
  if (stderr) {
46
- const warnId = 'analyze-warnings';
47
- report(onStep, warnId, 'Analysis warnings', 'skipped', stderr.trim().split('\n').pop() ?? '');
46
+ const warnId = "analyze-warnings";
47
+ report(onStep, warnId, "Analysis warnings", "skipped", stderr.trim().split("\n").pop() ?? "");
48
48
  }
49
49
  }
50
50
  catch (e) {
51
51
  const msg = e instanceof Error ? e.message : String(e);
52
- report(onStep, stepId, 'Run repoforge skills analysis', 'error', msg);
52
+ report(onStep, stepId, "Run repoforge skills analysis", "error", msg);
53
53
  }
54
54
  }
55
55
  //# sourceMappingURL=analyze.js.map
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Atlassian MCP pre-config — generates MCP server configuration
3
+ * for Jira and Confluence integration in scaffolded projects.
4
+ *
5
+ * Produces a config snippet that can be merged into .claude/settings.json
6
+ * or any AI agent's MCP configuration.
7
+ */
8
+ export interface AtlassianConfig {
9
+ confluenceUrl: string;
10
+ confluenceUsername: string;
11
+ jiraUrl: string;
12
+ jiraUsername: string;
13
+ }
14
+ export interface McpSnippet {
15
+ mcpServers: Record<string, {
16
+ command: string;
17
+ args: string[];
18
+ env: Record<string, string>;
19
+ }>;
20
+ }
21
+ /**
22
+ * Generate Atlassian MCP config snippet with user-provided values.
23
+ * Token placeholders remain as env vars for security.
24
+ */
25
+ export declare function generateAtlassianMcpConfig(config: AtlassianConfig): McpSnippet;
26
+ /**
27
+ * Generate a template snippet with placeholders (no user input needed).
28
+ */
29
+ export declare function generateTemplateMcpConfig(): McpSnippet;
30
+ /**
31
+ * Write the Atlassian MCP snippet to a project directory.
32
+ */
33
+ export declare function writeAtlassianMcpSnippet(projectDir: string, config?: AtlassianConfig): Promise<string>;
34
+ /**
35
+ * Merge Atlassian MCP config into an existing settings.json or MCP config file.
36
+ */
37
+ export declare function mergeIntoSettings(settingsPath: string, config: AtlassianConfig): Promise<void>;
38
+ /**
39
+ * Copy the template snippet from templates/common/atlassian/.
40
+ */
41
+ export declare function copyTemplateSnippet(projectDir: string): Promise<string | null>;
42
+ //# sourceMappingURL=atlassian-mcp.d.ts.map
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Atlassian MCP pre-config — generates MCP server configuration
3
+ * for Jira and Confluence integration in scaffolded projects.
4
+ *
5
+ * Produces a config snippet that can be merged into .claude/settings.json
6
+ * or any AI agent's MCP configuration.
7
+ */
8
+ import fs from "fs-extra";
9
+ import path from "path";
10
+ import { fileURLToPath } from "url";
11
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
12
+ const TEMPLATES_DIR = path.resolve(__dirname, "../../templates");
13
+ /**
14
+ * Generate Atlassian MCP config snippet with user-provided values.
15
+ * Token placeholders remain as env vars for security.
16
+ */
17
+ export function generateAtlassianMcpConfig(config) {
18
+ return {
19
+ mcpServers: {
20
+ atlassian: {
21
+ command: "uvx",
22
+ args: ["mcp-atlassian"],
23
+ env: {
24
+ CONFLUENCE_URL: config.confluenceUrl,
25
+ CONFLUENCE_USERNAME: config.confluenceUsername,
26
+ CONFLUENCE_API_TOKEN: "${CONFLUENCE_API_TOKEN}",
27
+ JIRA_URL: config.jiraUrl,
28
+ JIRA_USERNAME: config.jiraUsername,
29
+ JIRA_API_TOKEN: "${JIRA_API_TOKEN}",
30
+ },
31
+ },
32
+ },
33
+ };
34
+ }
35
+ /**
36
+ * Generate a template snippet with placeholders (no user input needed).
37
+ */
38
+ export function generateTemplateMcpConfig() {
39
+ return {
40
+ mcpServers: {
41
+ atlassian: {
42
+ command: "uvx",
43
+ args: ["mcp-atlassian"],
44
+ env: {
45
+ CONFLUENCE_URL: "__CONFLUENCE_URL__",
46
+ CONFLUENCE_USERNAME: "__CONFLUENCE_USERNAME__",
47
+ CONFLUENCE_API_TOKEN: "__CONFLUENCE_API_TOKEN__",
48
+ JIRA_URL: "__JIRA_URL__",
49
+ JIRA_USERNAME: "__JIRA_USERNAME__",
50
+ JIRA_API_TOKEN: "__JIRA_API_TOKEN__",
51
+ },
52
+ },
53
+ },
54
+ };
55
+ }
56
+ /**
57
+ * Write the Atlassian MCP snippet to a project directory.
58
+ */
59
+ export async function writeAtlassianMcpSnippet(projectDir, config) {
60
+ const snippet = config
61
+ ? generateAtlassianMcpConfig(config)
62
+ : generateTemplateMcpConfig();
63
+ const destDir = path.join(projectDir, ".atlassian");
64
+ await fs.ensureDir(destDir);
65
+ const destFile = path.join(destDir, "mcp-config-snippet.json");
66
+ await fs.writeJson(destFile, snippet, { spaces: 2 });
67
+ return destFile;
68
+ }
69
+ /**
70
+ * Merge Atlassian MCP config into an existing settings.json or MCP config file.
71
+ */
72
+ export async function mergeIntoSettings(settingsPath, config) {
73
+ const snippet = generateAtlassianMcpConfig(config);
74
+ let existing = {};
75
+ if (await fs.pathExists(settingsPath)) {
76
+ existing = await fs.readJson(settingsPath);
77
+ }
78
+ const existingServers = existing.mcpServers ?? {};
79
+ existing.mcpServers = {
80
+ ...existingServers,
81
+ ...snippet.mcpServers,
82
+ };
83
+ await fs.writeJson(settingsPath, existing, { spaces: 2 });
84
+ }
85
+ /**
86
+ * Copy the template snippet from templates/common/atlassian/.
87
+ */
88
+ export async function copyTemplateSnippet(projectDir) {
89
+ const srcFile = path.join(TEMPLATES_DIR, "common", "atlassian", "mcp-atlassian-snippet.json");
90
+ if (!(await fs.pathExists(srcFile)))
91
+ return null;
92
+ const destDir = path.join(projectDir, ".atlassian");
93
+ await fs.ensureDir(destDir);
94
+ const destFile = path.join(destDir, "mcp-config-snippet.json");
95
+ await fs.copy(srcFile, destFile, { overwrite: true });
96
+ return destFile;
97
+ }
98
+ //# sourceMappingURL=atlassian-mcp.js.map
@@ -1,5 +1,5 @@
1
- import type { Stack } from '../types/index.js';
2
- export type CIMode = 'full' | 'quick' | 'shell' | 'detect';
1
+ import type { Stack } from "../types/index.js";
2
+ export type CIMode = "full" | "quick" | "shell" | "detect";
3
3
  export interface CIOptions {
4
4
  projectDir?: string;
5
5
  mode?: CIMode;
@@ -12,7 +12,7 @@ export interface CIOptions {
12
12
  /** Timeout in seconds for each Docker step (default: 600) */
13
13
  timeout?: number;
14
14
  }
15
- export type CIStepStatus = 'pending' | 'running' | 'done' | 'error' | 'skipped';
15
+ export type CIStepStatus = "pending" | "running" | "done" | "error" | "skipped";
16
16
  export interface CIStep {
17
17
  id: string;
18
18
  label: string;