@axis-bootstrap/cli 0.1.2 → 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,6 +1,6 @@
1
1
  {
2
2
  "name": "@axis-bootstrap/cli",
3
- "version": "0.1.2",
3
+ "version": "1.0.0",
4
4
  "description": "AXIS — Harness-first scaffolding & SPDD pipeline CLI for AI-augmented projects",
5
5
  "type": "module",
6
6
  "repository": {
@@ -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
@@ -147,6 +147,65 @@ paths:
147
147
 
148
148
  ---
149
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
+
150
209
  ## workflow.md (rule)
151
210
 
152
211
  Populated from Phase 1 Block 4. Keep only the sections that apply — empty sections add noise.
@@ -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"