@axis-bootstrap/cli 0.1.0 → 1.0.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/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@axis-bootstrap/cli",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "AXIS — Harness-first scaffolding & SPDD pipeline CLI for AI-augmented projects",
5
5
  "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/jhonymiler/AXIS-Framework.git",
9
+ "directory": "cli"
10
+ },
11
+ "homepage": "https://github.com/jhonymiler/AXIS-Framework#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/jhonymiler/AXIS-Framework/issues"
14
+ },
6
15
  "publishConfig": {
7
16
  "access": "public"
8
17
  },
@@ -39,4 +48,4 @@
39
48
  "@clack/prompts": "^0.7.0",
40
49
  "picocolors": "^1.0.1"
41
50
  }
42
- }
51
+ }
@@ -18,6 +18,7 @@ target-project/
18
18
  │ ├── rules/ (3-7 rules — if applicable)
19
19
  │ │ ├── code-style.md
20
20
  │ │ ├── architecture-patterns.md
21
+ │ │ ├── workflow.md (PM tool + commit/branch/PR standards — if Phase 1 Block 4 produced answers)
21
22
  │ │ └── ...
22
23
  │ └── docs/
23
24
  │ ├── architecture.md (if software)
@@ -58,8 +59,9 @@ Order (consultation frequency, not logical importance):
58
59
  4. Architecture in table (components + responsibility)
59
60
  5. Design principles (3-7 bullets with rationale)
60
61
  6. Code conventions (summary — details in rules)
61
- 7. Available skills (table with when to use)
62
- 8. Links to docs and references
62
+ 7. Workflow & Tools (PM tool, branch/commit/PR standards — details in `rules/workflow.md`)
63
+ 8. Available skills (table with when to use)
64
+ 9. Links to docs and references
63
65
 
64
66
  **Size:** 100-180 lines. Below 100 is superficial; above 200 loses focus.
65
67
 
@@ -118,3 +118,46 @@ Apply principles from [UNIVERSAL-MAP.md](UNIVERSAL-MAP.md) and adapt. Ultimately
118
118
  14. What level of validation is acceptable? (vibe-check, human review, automated gates, all)
119
119
  15. Is there a history of problems the framework should prevent? (e.g., "we lose context whenever the dev changes", "AI responses diverge between IDEs")
120
120
  ```
121
+
122
+ ---
123
+
124
+ ## Block 4 — Collaboration & Governance
125
+
126
+ Apply whenever the project uses version control or any task tracker (most projects). Skip individual questions that visibly don't apply (e.g., solo project with no PR flow).
127
+
128
+ ```text
129
+ 16. Task / project management tool? (Jira, Linear, GitHub Projects, Trello, Asana, ClickUp, Notion, none)
130
+ - If applicable: board / project ID and ticket prefix (e.g., PROJ-123, ENG-456)
131
+ - Workflow states used (To Do → In Progress → Review → Done) or custom?
132
+ - Where to find the board (URL or MCP reference)?
133
+
134
+ 17. Commit message standard?
135
+ - Convention: Conventional Commits (feat:, fix:, chore:, ...), Gitmoji, free-form, other
136
+ - Ticket ID required in subject or trailer? Format example?
137
+ - Sign-off (DCO), GPG signing, or Co-authored-by trailers required?
138
+
139
+ 18. Branch model & naming?
140
+ - Main branch name (main / master / trunk)
141
+ - Naming pattern (feature/, fix/, hotfix/, chore/, release/, <user>/<slug>)
142
+ - Strategy: trunk-based, GitHub Flow, Git Flow, release branches
143
+ - Direct push to main allowed, or PR-only? Branch protection rules?
144
+
145
+ 19. Pull Request rules?
146
+ - PR title format (Conventional, ticket prefix, free)
147
+ - PR template / required sections (summary, test plan, screenshots, rollback)
148
+ - Minimum approvals, CODEOWNERS, required CI checks
149
+ - Merge strategy: squash, merge commit, rebase-and-merge
150
+ - Auto-delete branch after merge? Linear history enforced?
151
+
152
+ 20. Task / story creation standards?
153
+ - Required fields (description, AC, story points, epic, labels, components)
154
+ - Definition of Ready / Definition of Done templates?
155
+ - Estimation system (story points, t-shirt sizes, hours, none)?
156
+
157
+ 21. Release & versioning?
158
+ - Versioning scheme (SemVer, CalVer, none)
159
+ - Changelog (Keep a Changelog, auto-generated from commits, none)
160
+ - Release cadence (continuous, sprint, scheduled)
161
+ ```
162
+
163
+ If the project does not use git or any tracker (rare — usually a solo content or research draft), skip this block entirely and note it in the Project Profile.
@@ -43,8 +43,9 @@ Use the template from [TEMPLATES.md → INSTRUCTIONS.md](TEMPLATES.md#instructio
43
43
  4. **Architecture** (table: component → responsibility → technology → location)
44
44
  5. **Design Principles** (3-7 bullets with short rationale)
45
45
  6. **Conventions** (summary — details in rules)
46
- 7. **Available Skills** (table: skill when to use)
47
- 8. **Links** (to detailed docs)
46
+ 7. **Workflow & Tools** (task tracker, branch model, commit/PR standards — details in `rules/workflow.md`). Skip only if Phase 1 Block 4 was fully skipped.
47
+ 8. **Available Skills** (table: skill → when to use)
48
+ 9. **Links** (to detailed docs)
48
49
 
49
50
  **Target size:** 100-180 lines. Below 100 is superficial; above 200 loses focus.
50
51
 
@@ -133,9 +134,12 @@ For software projects, create 3-7 rules in `.ai/rules/`. Use template [Rule in T
133
134
  ├── architecture-patterns.md (DI, modules, framework patterns)
134
135
  ├── database.md (ORM, migrations, queries)
135
136
  ├── testing.md (test structure, mocks)
136
- └── cli.md (commands and scripts)
137
+ ├── cli.md (commands and scripts)
138
+ └── workflow.md (PM tool, branch model, commit & PR standards — populated from Phase 1 Block 4)
137
139
  ```
138
140
 
141
+ **`workflow.md`** is created whenever Phase 1 Block 4 produced answers (PM tool, commit convention, branch model, PR rules, task/release standards). Even non-software projects that use git benefit from it — keep only the sections that apply. Template in [TEMPLATES.md → workflow.md](TEMPLATES.md#workflowmd-rule).
142
+
139
143
  **Frontmatter for scope:**
140
144
 
141
145
  ```yaml
@@ -231,6 +231,36 @@ Symlinks on Windows require administrator permission or Developer Mode enabled.
231
231
 
232
232
  ---
233
233
 
234
+ ## Step 4.5 — Copilot Code Review (conditional)
235
+
236
+ **Apply only if the user declared GitHub Copilot in Phase 1.** Skip otherwise.
237
+
238
+ GitHub Copilot Code Review reads two file shapes (both with a **4000-char hard limit per file**):
239
+
240
+ 1. `.github/copilot-instructions.md` — repo-wide. Already a symlink to `.ai/INSTRUCTIONS.md` created by `setup-ide-links.sh`. Ensure the project purpose and accept/reject criteria appear in the first 4000 chars of INSTRUCTIONS (i.e., near the top — don't bury them past the truncation point).
241
+ 2. `.github/instructions/*.instructions.md` — path-targeted. Each file must end in `.instructions.md` and carry an `applyTo:` frontmatter glob.
242
+
243
+ **Scaffold:**
244
+
245
+ ```bash
246
+ mkdir -p .ai/instructions
247
+ # Copy the .instructions.md template from references/TEMPLATES.md
248
+ # into .ai/instructions/code-review.instructions.md and fill placeholders.
249
+ ```
250
+
251
+ Run `setup-ide-links.sh` — it now symlinks `.github/instructions` → `.ai/instructions/` when the latter exists, so the path-targeted files become visible to Copilot Code Review automatically.
252
+
253
+ **Validate after scaffolding:**
254
+
255
+ ```bash
256
+ wc -c .ai/instructions/*.instructions.md # each must be < 4000
257
+ readlink .github/instructions # must resolve to ../.ai/instructions
258
+ ```
259
+
260
+ **For non-Copilot teams:** skip this step entirely. The `.ai/instructions/` directory is not created, `setup-ide-links.sh`'s conditional skips the symlink, and Copilot configuration is absent — no harm, no noise.
261
+
262
+ ---
263
+
234
264
  ## Step 5 — Smoke Test and Gate
235
265
 
236
266
  ```bash
@@ -29,6 +29,8 @@ This phase also runs in standalone mode when the user asks to **audit an existin
29
29
  [ ] Each SKILL.md has frontmatter with `name` and `description`
30
30
  [ ] Each `description` has 2-4 lines and mentions trigger terms
31
31
  [ ] For software projects: at least 3 rules in .ai/rules/ with `applyTo`
32
+ [ ] If Phase 1 Block 4 was answered: .ai/rules/workflow.md exists with the populated sections (PM tool, commits, branches, PRs)
33
+ [ ] INSTRUCTIONS.md has a "Workflow & Tools" section pointing to rules/workflow.md (or block 4 was explicitly skipped)
32
34
  [ ] At least 1 stub in .ai/docs/ (architecture.md, glossary.md, or equivalent)
33
35
  [ ] .ai/CONVENTIONS.md exists and contains symlink map
34
36
  [ ] .ai/docs/STATE.md exists with the 6 mandatory sections
@@ -24,6 +24,7 @@ Answer mentally or paste the answers to the agent:
24
24
  2. **Main stack/tools?** (or "non-technical" if content/research)
25
25
  3. **Which IDE(s) do you use?** (Claude Code / Cursor / Windsurf / Copilot — mark all)
26
26
  4. **Is there anything the agent should NEVER do?** (e.g., push directly to main, delete production data)
27
+ 5. **Workflow basics** (1 line each — skip what doesn't apply): task tracker (Jira/Linear/GitHub/none) + ticket prefix; commit standard (Conventional / free); branch pattern (e.g., `feature/<ticket>-<slug>`); PR rules (approvals, CI, merge strategy). For the full version, see Block 4 of [PHASE-1-DISCOVERY.md](PHASE-1-DISCOVERY.md#block-4--collaboration--governance).
27
28
 
28
29
  ---
29
30
 
@@ -50,6 +50,16 @@ Summary here; details in [.ai/rules/](rules/):
50
50
  - Error handling: <rule>
51
51
  - Tests: <rule>
52
52
 
53
+ ## Workflow & Tools
54
+
55
+ Summary here; full standards in [.ai/rules/workflow.md](rules/workflow.md):
56
+
57
+ - **Task tracker:** <e.g., Jira board ENG, tickets ENG-XXX>
58
+ - **Commits:** <e.g., Conventional Commits with ticket trailer>
59
+ - **Branches:** <e.g., feature/<ticket>-<slug>, PR-only into main>
60
+ - **PRs:** <e.g., 1 approval + green CI, squash merge>
61
+ - **Versioning:** <e.g., SemVer, changelog auto-generated>
62
+
53
63
  ## Available Skills
54
64
 
55
65
  | Skill | When to use |
@@ -137,6 +147,136 @@ paths:
137
147
 
138
148
  ---
139
149
 
150
+ ## Copilot Code Review — path-targeted (`.instructions.md`)
151
+
152
+ Create only if the user declared **GitHub Copilot** in Phase 1. Lives in `.ai/instructions/` (single source of truth) and is exposed to Copilot via `.github/instructions/` symlink (handled by `setup-ide-links.sh`).
153
+
154
+ **Hard constraint:** Copilot Code Review reads only the first **4000 chars** of each file. Stay under it. Verify with `wc -c .ai/instructions/*.instructions.md`.
155
+
156
+ ```markdown
157
+ ---
158
+ applyTo: "src/**,lib/**"
159
+ ---
160
+
161
+ # Code Review — <Project Name>
162
+
163
+ > Copilot Code Review reads this file when a PR touches a path matching `applyTo`. Keep it under 4000 chars.
164
+
165
+ ## Project purpose
166
+
167
+ <1-2 sentences from .ai/INSTRUCTIONS.md describing what the project does and for whom.>
168
+
169
+ A PR is in scope when it serves this purpose. Reject changes that drift.
170
+
171
+ ## Accept when
172
+
173
+ - It advances the project's stated purpose.
174
+ - It respects the conventions in `.ai/INSTRUCTIONS.md` and `.ai/rules/`.
175
+ - Tests cover new behavior (if `.ai/rules/testing.md` exists).
176
+ - Naming, error handling, and dependencies match the project's rules.
177
+
178
+ ## Reject when
179
+
180
+ - Runtime features outside the project's domain.
181
+ - Commits secrets, tokens, or `.env*`.
182
+ - Removes tests without justification.
183
+ - Adds dependencies without explanation in the PR description.
184
+
185
+ ## Security checks
186
+
187
+ - External inputs sanitized before queries / shell / paths.
188
+ - Auth checks before data access / mutation.
189
+ - No secrets in logs.
190
+ - Error messages don't expose internals.
191
+
192
+ ## Output format
193
+
194
+ Group findings: **blocker** / **warning** / **suggestion**. Each: location · what · why · suggested fix.
195
+ ```
196
+
197
+ **Recommended split for medium/large projects:**
198
+
199
+ | File | `applyTo:` | Focus |
200
+ | ---- | ---------- | ----- |
201
+ | `code-review.instructions.md` | `src/**,lib/**` (or equivalent) | Project purpose, code quality, security |
202
+ | `tests.instructions.md` | `**/*.test.*,**/*_test.*,tests/**` | Test coverage rules, fixture conventions |
203
+ | `infra.instructions.md` | `.github/**,infra/**,Dockerfile*` | Workflow permissions, secret handling, image hardening |
204
+
205
+ Stop at 2-3 files. More fragmentation reduces signal.
206
+
207
+ ---
208
+
209
+ ## workflow.md (rule)
210
+
211
+ Populated from Phase 1 Block 4. Keep only the sections that apply — empty sections add noise.
212
+
213
+ ```markdown
214
+ ---
215
+ applyTo: "**"
216
+ ---
217
+
218
+ # Workflow & Governance
219
+
220
+ > Source of truth for branch, commit, PR, task, and release standards. The agent must follow this without being reminded.
221
+
222
+ ## Task / Project Management
223
+
224
+ - **Tool:** <Jira | Linear | GitHub Projects | Trello | Asana | ClickUp | Notion | none>
225
+ - **Board / project:** <e.g., Jira board ENG, URL or MCP reference>
226
+ - **Ticket prefix:** <e.g., ENG-XXX, PROJ-XXX>
227
+ - **Workflow states:** <e.g., Backlog → Ready → In Progress → Review → Done>
228
+ - **Required fields when creating a task:** <description, AC, story points, epic, labels>
229
+ - **Definition of Ready / Done:** <link or inline checklist>
230
+
231
+ ## Commit Messages
232
+
233
+ - **Convention:** <Conventional Commits | Gitmoji | free-form | other>
234
+ - **Format example:**
235
+ ```
236
+ feat(api): add idempotency key validation [ENG-1234]
237
+ ```
238
+ - **Ticket ID:** <required in subject | required as trailer | optional>
239
+ - **Sign-off / GPG / Co-authored-by:** <DCO sign-off required | GPG required | Co-authored-by trailers for pairing>
240
+ - **Length:** subject ≤ 72 chars; body wrapped at 100; imperative mood.
241
+
242
+ ## Branches
243
+
244
+ - **Main branch:** <main | master | trunk>
245
+ - **Naming pattern:** `<type>/<ticket>-<slug>` — examples:
246
+ - `feature/ENG-1234-add-webhook`
247
+ - `fix/ENG-1310-null-pointer-checkout`
248
+ - `chore/upgrade-node-20`
249
+ - **Allowed prefixes:** <feature/, fix/, hotfix/, chore/, release/, docs/>
250
+ - **Strategy:** <trunk-based | GitHub Flow | Git Flow | release branches>
251
+ - **Branch protection:** <PR-only into main | required status checks | linear history | no force-push>
252
+
253
+ ## Pull Requests
254
+
255
+ - **Title format:** <Conventional, ticket prefix in title, free>
256
+ - **Template / required sections:** Summary, Changes, Test Plan, Screenshots, Rollback, Linked Issues
257
+ - **Approvals required:** <N approvals, CODEOWNERS for paths X/Y>
258
+ - **Required CI checks:** <build, unit tests, integration tests, lint, type-check>
259
+ - **Merge strategy:** <squash | merge commit | rebase-and-merge>
260
+ - **Post-merge:** <auto-delete branch | auto-deploy to staging>
261
+
262
+ ## Releases & Versioning
263
+
264
+ - **Scheme:** <SemVer (MAJOR.MINOR.PATCH) | CalVer | none>
265
+ - **Changelog:** <Keep a Changelog | auto-generated from Conventional Commits | none>
266
+ - **Cadence:** <continuous | weekly | sprint | scheduled>
267
+ - **Tagging:** <v1.2.3 | release/2026-05 | none>
268
+
269
+ ## Agent Behavior Rules
270
+
271
+ - Never push directly to `<main>` — always open a PR.
272
+ - Always include the ticket ID in the commit subject/trailer when the change traces to a ticket.
273
+ - Branch name must match the pattern above before the first commit; fix it locally before pushing.
274
+ - PR description must reference the ticket and include a test plan; do not request review without these.
275
+ - Do not merge a PR without the required approvals and green CI — even if "obviously safe".
276
+ ```
277
+
278
+ ---
279
+
140
280
  ## STATE.md
141
281
 
142
282
  ```markdown
@@ -1,5 +1,9 @@
1
1
  #!/usr/bin/env bash
2
2
  # setup-ide-links.sh — Idempotent multi-IDE symlink installer for AXIS.
3
+ #
4
+ # Uses `ln -sfn` for directory targets so re-running this script repoints
5
+ # existing symlinks-to-directories instead of nesting a new link inside
6
+ # the old target.
3
7
  set -euo pipefail
4
8
  cd "$(dirname "$0")"
5
9
 
@@ -8,26 +12,31 @@ if [ ! -d .ai ]; then
8
12
  exit 1
9
13
  fi
10
14
 
11
- ln -sf .ai/INSTRUCTIONS.md AGENTS.md
12
- ln -sf .ai/INSTRUCTIONS.md CLAUDE.md
15
+ ln -sf .ai/INSTRUCTIONS.md AGENTS.md
16
+ ln -sf .ai/INSTRUCTIONS.md CLAUDE.md
13
17
 
14
18
  mkdir -p .claude
15
- ln -sf ../.ai/INSTRUCTIONS.md .claude/CLAUDE.md
16
- ln -sf ../.ai/skills .claude/skills
17
- [ -d .ai/rules ] && ln -sf ../.ai/rules .claude/rules || true
19
+ ln -sf ../.ai/INSTRUCTIONS.md .claude/CLAUDE.md
20
+ ln -sfn ../.ai/skills .claude/skills
21
+ [ -d .ai/rules ] && ln -sfn ../.ai/rules .claude/rules || true
18
22
 
19
23
  mkdir -p .cursor
20
- ln -sf ../.ai/skills .cursor/skills
21
- [ -d .ai/rules ] && ln -sf ../.ai/rules .cursor/rules || true
24
+ ln -sfn ../.ai/skills .cursor/skills
25
+ [ -d .ai/rules ] && ln -sfn ../.ai/rules .cursor/rules || true
22
26
 
23
27
  mkdir -p .agents
24
- ln -sf ../.ai/INSTRUCTIONS.md .agents/AGENTS.md
25
- ln -sf ../.ai/skills .agents/skills
26
- [ -d .ai/rules ] && ln -sf ../.ai/rules .agents/rules || true
28
+ ln -sf ../.ai/INSTRUCTIONS.md .agents/AGENTS.md
29
+ ln -sfn ../.ai/skills .agents/skills
30
+ [ -d .ai/rules ] && ln -sfn ../.ai/rules .agents/rules || true
27
31
 
28
32
  mkdir -p .github
29
- ln -sf ../.ai/INSTRUCTIONS.md .github/copilot-instructions.md
30
- ln -sf ../.ai/skills .github/skills
31
- [ -d .ai/rules ] && ln -sf ../.ai/rules .github/instructions || true
33
+ ln -sf ../.ai/INSTRUCTIONS.md .github/copilot-instructions.md
34
+ ln -sfn ../.ai/skills .github/skills
35
+ # .github/instructions is Copilot Code Review's path-targeted instructions
36
+ # directory. It needs *.instructions.md files with `applyTo:` frontmatter —
37
+ # different format from .ai/rules/. If your project uses Copilot Code Review,
38
+ # axis-bootstrap Phase 3 creates .ai/instructions/ with starter files; this
39
+ # symlink then exposes them. Otherwise the line is a no-op.
40
+ [ -d .ai/instructions ] && ln -sfn ../.ai/instructions .github/instructions || true
32
41
 
33
42
  echo "✓ symlinks installed"