@jakkrichm/create-nexus-devflow 2.1.0 → 2.2.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 (56) hide show
  1. package/dist/bin/create-nexus-devflow.js +28 -4
  2. package/dist/bin/create-nexus-devflow.js.map +1 -1
  3. package/dist/lib/project-metadata.d.ts +1 -1
  4. package/dist/lib/project-metadata.js +3 -2
  5. package/dist/lib/project-metadata.js.map +1 -1
  6. package/dist/lib/update.js +7 -3
  7. package/dist/lib/update.js.map +1 -1
  8. package/package.json +1 -1
  9. package/template/.agents/skills/adopt/SKILL.md +58 -5
  10. package/template/.agents/skills/doctor/SKILL.md +23 -16
  11. package/template/.agents/skills/implement/SKILL.md +2 -2
  12. package/template/.agents/skills/onboard/SKILL.md +18 -17
  13. package/template/.agents/skills/rollback/SKILL.md +1 -1
  14. package/template/.claude/skills/00-explore/SKILL.md +2 -2
  15. package/template/.claude/skills/10-define/SKILL.md +2 -2
  16. package/template/.claude/skills/20-spec/SKILL.md +1 -2
  17. package/template/.claude/skills/30-plan/SKILL.md +1 -2
  18. package/template/.claude/skills/40-execute/SKILL.md +2 -2
  19. package/template/.claude/skills/50-verify/SKILL.md +2 -2
  20. package/template/.claude/skills/60-report/SKILL.md +2 -2
  21. package/template/.claude/skills/70-deliver/SKILL.md +2 -2
  22. package/template/.claude/skills/adopt/SKILL.md +191 -75
  23. package/template/.claude/skills/audit/SKILL.md +267 -133
  24. package/template/.claude/skills/autopilot/SKILL.md +226 -167
  25. package/template/.claude/skills/brainstorm/SKILL.md +62 -0
  26. package/template/.claude/skills/brief/SKILL.md +93 -92
  27. package/template/.claude/skills/check/SKILL.md +96 -76
  28. package/template/.claude/skills/ci/SKILL.md +140 -61
  29. package/template/.claude/skills/complete/SKILL.md +156 -101
  30. package/template/.claude/skills/convert-any-to-md/SKILL.md +2 -2
  31. package/template/.claude/skills/convert-any-to-md/references/setup.md +29 -0
  32. package/template/.claude/skills/convert-any-to-md/scripts/convert_any_to_md.py +487 -0
  33. package/template/.claude/skills/convert-any-to-md/scripts/requirements.txt +3 -0
  34. package/template/.claude/skills/debug/SKILL.md +124 -49
  35. package/template/.claude/skills/devflow/SKILL.md +9 -3
  36. package/template/.claude/skills/discovery/SKILL.md +150 -129
  37. package/template/.claude/skills/doctor/SKILL.md +195 -72
  38. package/template/.claude/skills/feature/SKILL.md +195 -151
  39. package/template/.claude/skills/fix/SKILL.md +41 -90
  40. package/template/.claude/skills/idea/SKILL.md +2 -2
  41. package/template/.claude/skills/implement/SKILL.md +189 -46
  42. package/template/.claude/skills/onboard/SKILL.md +216 -85
  43. package/template/.claude/skills/overview/SKILL.md +44 -29
  44. package/template/.claude/skills/prototype/SKILL.md +82 -27
  45. package/template/.claude/skills/release/SKILL.md +119 -130
  46. package/template/.claude/skills/report-html/SKILL.md +2 -2
  47. package/template/.claude/skills/rollback/SKILL.md +123 -77
  48. package/template/.claude/skills/status/SKILL.md +109 -0
  49. package/template/.claude/skills/test/SKILL.md +2 -2
  50. package/template/.claude/skills/tests/SKILL.md +126 -0
  51. package/template/.claude/skills/try/SKILL.md +77 -65
  52. package/template/AGENTS.md +2 -1
  53. package/template/devflow/build-plan.md +8 -0
  54. package/template/devflow/history/features/README.md +5 -0
  55. package/template/devflow/history/fixes/README.md +5 -0
  56. package/template/devflow/history/rollbacks/README.md +5 -0
@@ -1,99 +1,100 @@
1
1
  ---
2
2
  name: brief
3
- description: "[Devflow] Deep read-only scope, codebase impact, dependency, and sub-feature split briefing before speccing a run (reads build-plan.md or ideas.md)."
4
- argument-hint: "[feature-number | 'feature-name' | IDEA-xxx]"
3
+ description: "[devflow][B] Read-only briefing on an upcoming build-plan feature before you spec it. With no argument, briefs the next unchecked item; given a number or name, briefs that one. Reads build-plan.md and project-overview.md and explains what the feature is, what it depends on, what it will touch, how big it is, and whether it will split - without writing anything. Use when the user runs /brief, asks what the next feature involves, wants to understand or preview a feature before /feature, or is deciding what to build or reorder next."
5
4
  ---
6
5
 
7
- # brief - Deep Scope, Dependency & Codebase Impact Briefing
6
+ # brief - understand a feature before you spec it
8
7
 
9
8
  Where this sits in the workflow:
10
9
 
11
- ```text
12
- devflow/build-plan.md (or ideas.md) ──▶ [brief] ──▶ feature / 20-spec ──▶ implement / 40-execute
13
- (feature queue & context) (deep read-only (write spec) (build it)
14
- explainer)
15
- ```
16
-
17
- This skill answers one essential question: ***"What does this upcoming feature actually touch and involve in the real codebase before I commit to writing a full specification?"***
18
-
19
- It inspects `devflow/build-plan.md` (or `devflow/ideas.md` / `project-overview.md`) and conducts a **Deep Static Codebase Analysis** to provide a concise briefing — calculating files touched, dependency chains, estimated size (`XS`..`XL`), and actionable sub-feature split proposals before any work begins.
20
-
21
- It is **strictly read-only 100%**. It never writes specs, creates directories, branches, or commits code.
22
-
23
- ---
24
-
25
- ## Usage & Invocations
26
-
27
- ```text
28
- brief # Briefs the next unchecked feature in build-plan.md
29
- brief 2 # Briefs feature #2 in build-plan.md
30
- brief "OAuth Login" # Briefs a specific feature by name
31
- brief IDEA-003 # Briefs a pending idea from ideas.md
32
- ```
33
-
34
- If there is no build plan or pending idea, plainly report that context is needed and recommend `/discovery` or `/overview`.
35
-
36
- ---
37
-
38
- ## 3-Step Briefing Protocol
39
-
40
- ### Step 1 - Read Context & Target Resolution (Read-Only)
41
-
42
- 1. **Target Item Resolution**:
43
- - If argument provided (`2`, `"OAuth Login"`, `IDEA-003`): find matching item in `devflow/build-plan.md` or `devflow/ideas.md`.
44
- - If no argument: locate the first unchecked item (`- [ ]`) in `devflow/build-plan.md`. If build plan is empty, locate the first pending item in `devflow/ideas.md`.
45
- 2. **Project Architecture**: Read `devflow/context/project-overview.md` and `devflow/context/coding-standards.md`.
46
- 3. **Deep Codebase Inspection**:
47
- - Inspect existing directory structures, routing files, data models/schemas, database migrations, API handlers, and UI component trees.
48
- - Trace existing modules related to the target feature.
49
-
50
- ---
51
-
52
- ### Step 2 - Analyze Scope, Dependencies & Sizing
53
-
54
- Evaluate with concrete facts:
55
-
56
- 1. **What It Is**: Core capability and user-visible or system-visible outcome.
57
- 2. **Dependencies & Prerequisites**: Upstream database models, authentication layers, environment variables, or sibling features that must be complete first.
58
- 3. **Unblocks**: Downstream features or workflows enabled once this item ships.
59
- 4. **Files & Modules Touched**: List predicted files and folders likely to be created or modified (e.g. `lib/`, `routes/`, `components/`, `test/`).
60
- 5. **Estimated Size**:
61
- - `XS`: Small tweak / config (~15-30 mins, 1-2 files)
62
- - `S`: Single component or route (~1-2 hours, 2-4 files)
63
- - `M`: Full CRUD feature or service integration (~half day, 4-7 files)
64
- - `L`: Complex multi-component subsystem (~1 day, 7-12 files)
65
- - `XL`: Major epic (>12 files or heavy cross-cutting concerns)
66
- 6. **Sub-Feature Split Engine (for L and XL)**:
67
- - If the feature is `L` or `XL`, draft a concrete 2-3 sub-feature breakdown (e.g. `4a: Backend Schema & Core APIs`, `4b: Frontend UI & Client State`) with individual sizing and sequential dependencies.
68
- 7. **Key Risks & Open Questions**: Unsettled API contracts, performance bottlenecks, migration risks, or design decisions.
69
-
70
- ---
71
-
72
- ### Step 3 - Output Structured Briefing Card
73
-
74
- Produce a clean, scannable briefing directly in the chat in **Thai (`th`)**:
75
-
76
- ```markdown
77
- ### 📋 Feature Briefing: [หมายเลขหรือรหัส - ชื่อฟีเจอร์]
78
-
79
- - **🎯 What**: [สรุปเป้าหมายและความสามารถหลักสั้นๆ]
80
- - **🔗 Dependencies**: [ฟีเจอร์หรือโมดูลก่อนหน้าที่ต้องมี หรือ 'None']
81
- - **🔓 Unlocks**: [ฟีเจอร์ถัดไปในแผนงานที่จะถูกปลดล็อก]
82
- - **📁 Files Touched**: [รายชื่อไฟล์และโมดูลที่คาดว่าจะต้องแก้ไขหรือสร้างใหม่]
83
- - **⚖️ Estimated Scope & Size**: `[XS | S | M | L | XL]`
84
- - **✂️ Sub-Feature Split Proposal** *(กรณีขนาด L หรือ XL)*:
85
- - `[ID]a: [ขอบเขตย่อยส่วนที่ 1]` (Size: M, Dependencies: None)
86
- - `[ID]b: [ขอบเขตย่อยส่วนที่ 2]` (Size: M, Dependencies: [ID]a)
87
- - **⚠️ Key Risks & Open Questions**: [ความเสี่ยงทางเทคนิคหรือคำถามที่ต้องตอบใน Spec]
88
-
89
- ---
90
- 👉 **Next Recommended Action**: `/feature {target}` (หรือเริ่มทำ sub-feature แรก เช่น `/feature 4a`)
91
- ```
92
-
93
- ---
94
-
95
- ## Strict Rules & Guardrails
96
-
97
- 1. **Always Read-Only**: Never edit workspace files, allocate running IDs, switch branches, or commit code during `/brief`.
98
- 2. **Explain, Don't Spec**: Focus on scope, architectural dependencies, and size estimation. The formal delivery contract belongs to `/feature` or `20-spec`.
99
- 3. **Ground In Reality**: Trace all assertions back to `project-overview.md` and active codebase inspection. Do not hallucinate non-existent files or packages.
10
+ build-plan + overview -> [brief] -> /feature -> /implement
11
+ (what exists) (read-only (spec it) (build it)
12
+ explainer)
13
+
14
+ This skill answers one question: *what does this feature actually involve, before
15
+ I commit to spec'ing it?* It reads the two files that describe the work and prints
16
+ a short briefing so you can decide whether to spec it now, reorder it, split it,
17
+ or clear a blocker first. It is the read-only precursor to `/feature`.
18
+
19
+ It never writes anything: no spec, no edits to `build-plan.md`, no branch, no
20
+ commit. `/feature` is the mutating step that turns a briefing into a spec; this
21
+ one just explains.
22
+
23
+ How it differs from its neighbors:
24
+
25
+ - `/status` reports the *whole project*: progress, current work, git, next action.
26
+ `/brief` zooms into *one feature* and explains it in depth.
27
+ - `/feature` *writes* the spec (and may split the item in `build-plan.md`).
28
+ `/brief` previews what `/feature` would tackle, changing nothing.
29
+
30
+ ## Input
31
+
32
+ A feature from `build-plan.md`, by number or name - e.g. `/brief 4` or
33
+ `/brief "validator"`.
34
+
35
+ **With no argument, brief the next one** - the first unchecked leaf in
36
+ `build-plan.md`, the same target `/feature` would pick.
37
+
38
+ If `build-plan.md` is still a placeholder stub or the overview is missing, say so
39
+ plainly and point at `/overview` (or filling the plans) rather than inventing a
40
+ briefing.
41
+
42
+ ## What it reads
43
+
44
+ Gather these, then synthesize. Don't dump file contents; explain.
45
+
46
+ 1. **The target** - the feature's line in `devflow/build-plan.md`, plus whether
47
+ a parent was already split into sub-items (`4a`, `4b`, ...).
48
+ 2. **Full context** - `devflow/context/project-overview.md`: the data model,
49
+ routes/endpoints, stack, UI/UX, conventions, and open questions that touch this
50
+ feature.
51
+ 3. **What already exists** - earlier checked build-plan items and, if useful, git
52
+ history, to ground the dependency read (what must be in place first, what this
53
+ unblocks later).
54
+ 4. **Design reference** - if `prototypes/` exists and the feature is UI-facing,
55
+ note which mockups apply (that `/feature` will link them and port `theme.css`).
56
+
57
+ ## Output
58
+
59
+ A short, scannable briefing, not a wall of text. Aim for something like:
60
+
61
+ Feature 5 - Submission draft flow
62
+ What: maintainers submit a skill by GitHub URL (primary) or zip (fallback);
63
+ drafts are saved before validation runs.
64
+ Depends on: apps/api must be stood up first (this is the first feature that
65
+ needs the backend); builds on the Skill / SkillVersion shapes from feature 3.
66
+ Unblocks: queue-backed validation (6) and the publishable flow (7).
67
+ Touches: new User, Submission, SkillVersion tables (Drizzle); GitHub OAuth;
68
+ POST /submissions; R2 snapshot upload; a React upload island (client).
69
+ Size: large - likely splits into 5a (OAuth + maintainer profile), 5b
70
+ (GitHub-URL submission + draft record), 5c (zip upload + R2).
71
+ Reference: no prototype for this flow; upload.html covers the later validation
72
+ panel, not this form.
73
+ Open questions: apps/api (Hono) is not scaffolded yet - resolve before spec'ing.
74
+
75
+ Next: run /feature 5 to spec 5a, or clear the apps/api blocker first.
76
+
77
+ Adapt the lines to the feature; drop any that don't apply. Always end with a
78
+ single **Next** action - usually `/feature N` to spec it, but `/overview` if the
79
+ plans aren't ready, `/prototype` if it's UI-facing and the look isn't locked, or
80
+ "clear X first" when a dependency blocks it.
81
+
82
+ ## Rules
83
+
84
+ - **Read-only, always.** Never write a file, never edit `build-plan.md` or
85
+ `current-feature.md`, never branch, commit, install, or build. To act on the
86
+ briefing, the user runs `/feature` next.
87
+ - **Explain, don't spec.** Size, dependencies, and a likely sub-split are the
88
+ value here; the actual build steps are `/feature`'s job. Don't write step lists.
89
+ - **Trace to the plans.** Everything in the briefing comes from `build-plan.md`
90
+ and `project-overview.md`. Don't invent scope; if something is underspecified,
91
+ say so and flag it as a question for `/feature` or `/overview`.
92
+ - **Be honest about gaps.** If the plans are a stub, the overview is stale, or a
93
+ dependency isn't built yet, say that plainly - catching a blocker before
94
+ spec'ing is half the value.
95
+
96
+ ## Formatting
97
+
98
+ Format the output to match the project's conventions in
99
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
100
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -1,80 +1,100 @@
1
1
  ---
2
2
  name: check
3
- description: "[Devflow] Fast-Track Check stage in DevFlow (Blueprint Mode) - perform senior QA review, run multi-lane verification, and record evidence in current-feature.md in context."
4
- argument-hint: "{running-id or workspace path}"
3
+ description: "[devflow][F] Prove the current work actually does what its spec says by running the real app and observing behavior against the \"done when\" criteria in current-feature.md. Drives the app (browser, CLI, or server), captures evidence (screenshots, output, console/network errors), and reports pass/fail per criterion. Does not edit source or commit - it observes; fixing stays /implement's job. Use when the user runs /check, asks to confirm a step or feature works, wants proof before /complete, or wants to check a change in the running app rather than just the build. (Supersedes the built-in /verify with a spec-aware version inside blueprint projects.)"
5
4
  ---
6
5
 
7
- # Fast-Track: Check (Blueprint Mode)
8
-
9
- $ARGUMENTS
10
-
11
- Quality assurance and multi-lane verification stage in Fast-Track. Validates implementation against Acceptance Criteria, executes Scrutinize QA & Security checks, runs test suites, checks for regressions, and records evidence in the Single Living Spec (`devflow/context/current-feature.md`).
12
-
13
- ## Invocations & Aliases
14
-
15
- - `/check`: Run verification on current active run
16
- - `/check {id}`: Run verification on specified ID
17
- - `$check`: Codex CLI invocation
18
-
19
- ## Fast-Track Mainline Workflow
20
-
21
- ```text
22
- /feature (หรือ /fix) ──▶ /implement ──▶ /check ──▶ /complete
23
- ```
24
-
25
- ## Behavior & Contract
26
-
27
- When invoked:
28
-
29
- ### 1. Load Active Context
30
- 1. Identify active Running ID from `devflow/context/current-stage.md` or `devflow/context/current-feature.md`.
31
- 2. Read `devflow/context/current-feature.md`.
32
- 3. Locate `## 1. Specification & Scope` (Acceptance Criteria) and `## 3. Implementation Checklist`.
33
-
34
- ### 2. Multi-lane Verification & Scrutinize QA
35
-
36
- Execute verification gates across all lanes:
37
-
38
- 1. **Lane 1: Typecheck & Static Code Quality**:
39
- - Run typecheck and linting (e.g. `npm run typecheck`, `npm run lint`).
40
- - Confirm 0 type errors, 0 lint warnings.
41
- 2. **Lane 2: Automated Test Suites (TDD Gate)**:
42
- - Run automated unit and integration tests (e.g. `npm test`).
43
- - Confirm 100% tests pass with no disabled/skipped tests.
44
- 3. **Lane 3: Scrutinize & Edge Cases Review**:
45
- - **Boundary Conditions**: Check empty collections, 0/1 limits, off-by-one errors.
46
- - **Null / Undefined Safety**: Verify optional chaining and nullish coalescing.
47
- - **Error Handling & Propagation**: Verify errors are logged and handled without swallow.
48
- 4. **Lane 4: Security & Hygiene Audit**:
49
- - **Secrets Check**: No hardcoded API keys, passwords, or tokens in source code.
50
- - **Injection & Sanitization**: Ensure inputs are validated and parameterized.
51
- 5. **Lane 5: Manual Scenario Proof**:
52
- - Verify specific scenarios against Acceptance Criteria (`AC-1`, `AC-2`).
53
- - Provide concrete walkthrough: "Where to go", "What to run/click", "What to expect".
54
-
55
- ### 3. Update Living Spec (`current-feature.md`)
56
- Append or update `## 5. Verification Evidence` in `devflow/context/current-feature.md` in **Thai (`th`)**:
57
-
58
- ```markdown
59
- ## 5. Verification Evidence
60
- - **Typecheck & Linter**: Passed (0 errors, 0 warnings)
61
- - **Automated Test Suites**: All tests passed (e.g. 12/12 passed, 0 failed)
62
- - **Scrutinize & Security Audit**: Clean (No boundary issues, 0 secrets, safe inputs)
63
- - **Acceptance Criteria Verification**:
64
- - [x] AC-1: {ผลการตรวจสอบเงื่อนไขที่ 1 ผ่าน 100%}
65
- - [x] AC-2: {ผลการตรวจสอบเงื่อนไขที่ 2 ผ่าน 100%}
66
- - **Manual Verification Guide**:
67
- - *Where to go*: `http://localhost:3000/api/auth`
68
- - *Action*: Send POST request with test credentials
69
- - *Expected Result*: Received HTTP 200 with valid JWT token
70
- ```
71
-
72
- ### 4. Update Workspace Status
73
- Update `devflow/context/current-stage.md`:
74
- - `Current Stage`: `check (Fast-Track -> Verification Passed -> Ready for /complete)`
75
-
76
- ### 5. Output Summary & Next Step
77
- Report to the user:
78
- - Summary of verification results across all lanes
79
- - Evidence recorded in `devflow/context/current-feature.md`
80
- - **Next Command**: `/complete` (or `/complete {ID}`)
6
+ # check - prove it works against the spec, with evidence
7
+
8
+ Where this sits in the workflow:
9
+
10
+ /implement -> [check] -> /complete
11
+ (built a (run the app, (only once the
12
+ step or prove each done-whens are
13
+ the feature) done-when) proven)
14
+
15
+ `/implement` builds and does a quick build-plus-screenshot check inline. `/check`
16
+ is the deeper, repeatable gate for when a "done when" needs the *real running app*,
17
+ not just a green build: a click that triggers a download, a route that returns a
18
+ file, a flow across screens. Run it on a single step whose done-when is
19
+ behavioral, or on the whole feature as the acceptance check before `/complete`.
20
+
21
+ The point is evidence. A passing build proves the code compiles; `/check` proves
22
+ the thing the spec promised actually happens. It changes no source and commits
23
+ nothing - it runs the app and reports what it saw.
24
+
25
+ ## Input
26
+
27
+ Optional: a specific thing to check (a step, a flow, a URL). With no argument,
28
+ verify the whole current feature against every "done when" in
29
+ `devflow/context/current-feature.md`.
30
+
31
+ ## Step 1 - build the checklist
32
+
33
+ Read `devflow/context/current-feature.md`. Pull the observable "done when"
34
+ criteria from the build steps (and any acceptance notes in the Testing section).
35
+ Turn them into a concrete checklist of claims to prove - each one a specific,
36
+ observable behavior, not "it works". If the user named one thing, scope to that.
37
+
38
+ If there's no current feature spec, ask what to verify rather than guessing.
39
+
40
+ ## Step 2 - get the app running
41
+
42
+ Use the project's real commands (see Commands in `AGENTS.md`). Match the project
43
+ type:
44
+
45
+ - **Web app** - start (or reuse) the dev/preview server, then drive a real browser
46
+ to the relevant routes. Prefer reusing an already-running server over starting a
47
+ duplicate. If Playwright is already installed or declared in `AGENTS.md`, prefer
48
+ it for browser driving, screenshots, console errors, and failed request checks.
49
+ If it is not installed, do not add it from `/check`; use another real-browser
50
+ evidence path and report what you used.
51
+ - **CLI** - run the actual command(s) with representative inputs.
52
+ - **Server/API** - start it and hit the endpoints.
53
+ - **Library** - exercise the public API through an example or the test command.
54
+
55
+ If a `test` command is declared in `AGENTS.md`, you may run it as *one* input, but
56
+ `/check` is broader than unit tests: it checks real behavior, which is exactly the
57
+ evidence UI and integration steps ride on instead of unit tests.
58
+
59
+ ## Step 3 - exercise each claim
60
+
61
+ Drive the app to each checklist item and capture evidence as you go:
62
+
63
+ - Navigate and interact for real (click, type, submit, download) - don't assert
64
+ from the code what the running app would do.
65
+ - Capture **screenshots** for visual/UI claims, **output** for CLI/API claims.
66
+ - Watch for **console errors and failed network requests**; a clean-looking screen
67
+ with errors in the console is not a pass.
68
+
69
+ ## Step 4 - report
70
+
71
+ Give a short, honest verdict, one line per checklist item:
72
+
73
+ [pass] Download PDF saves certificate-<slug>.pdf - file downloaded, opened to the cert
74
+ [pass] Both buttons show a loading state - screenshot: loading-state.png
75
+ [fail] PDF border missing - printBackground not set; screenshot: pdf-no-border.png
76
+ [skip] Vercel render - can't verify locally (feature 9)
77
+
78
+ Then state the bottom line: are all the feature's done-whens proven, or not yet.
79
+
80
+ - All proven -> say it's ready for `/complete`.
81
+ - Anything failed -> hand back to `/implement` to fix; name what to fix. Don't fix
82
+ it here.
83
+ - Anything unverifiable -> say so plainly and why; never report it as a pass.
84
+
85
+ ## Rules
86
+
87
+ - **Observe, don't change.** `/check` runs the app and reports. It never edits
88
+ source, never commits, never merges. Fixing is `/implement`'s job.
89
+ - **Evidence or it didn't happen.** Every `pass` is backed by something observed -
90
+ a screenshot, output, a response. No assumed passes from reading the code.
91
+ - **Honest over green.** "Couldn't verify" and "failed" are valid, useful results.
92
+ Faking a pass defeats the entire gate.
93
+ - **Check the spec, not vibes.** Verify against the done-whens in
94
+ `current-feature.md`, so "works" means what the spec said it would do.
95
+
96
+ ## Formatting
97
+
98
+ Format the output to match the project's conventions in
99
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
100
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -1,78 +1,157 @@
1
1
  ---
2
2
  name: ci
3
- description: "[Devflow] Set up automated GitHub Actions CI workflow (.github/workflows/verify.yml) aligned with project verify command."
3
+ description: "[devflow][B] Set up or normalize automatic GitHub checks for a Blueprint project around one documented Verify command. Detects the real stack, package manager, existing checks, default branch, and workflows; preserves existing CI; combines only configured typecheck, test, and build commands; runs the command locally; and stops before push or remote ruleset changes. Use when the user runs /ci, invokes $ci, asks to add CI, set up GitHub Actions, add pull-request checks, or create automatic GitHub checks."
4
4
  ---
5
5
 
6
- # CI/CD Pipeline Automation & Quality Gates
6
+ # ci - set up automatic GitHub checks
7
7
 
8
- ## Overview
8
+ Where this sits in the workflow:
9
9
 
10
- This is the CI/CD and automation master skill for Nexus-DevFlow. It automates quality gates so that no change reaches production without passing static analysis, typechecking, tests, security audits, and builds.
10
+ /onboard or /adopt -> [ci] -> Verify locally -> GitHub runs Verify
11
+ (project commands) (setup) (same recipe) (pull requests)
12
+
13
+ This skill gives local work and GitHub one shared automated command. It is an
14
+ optional setup task, not a requirement for using the Blueprint.
15
+
16
+ Keep the beginner explanation simple:
17
+
18
+ - **Verify is the recipe.** It runs checks the project already has.
19
+ - **GitHub Actions is the worker.** It runs the same recipe automatically.
20
+ - **A GitHub ruleset is the lock.** That optional remote setting can require the
21
+ worker to report green before merge.
22
+
23
+ This skill configures the recipe and worker. It never changes the remote ruleset,
24
+ pushes, publishes, deploys, or adds local git hooks.
25
+
26
+ ## Input
27
+
28
+ No argument is required. A named provider or workflow preference is a request to
29
+ review, not permission to replace existing CI. This skill's default provider is
30
+ GitHub Actions because it creates GitHub pull-request checks.
31
+
32
+ ## Step 1 - inspect without changing files
33
+
34
+ Read enough to identify the real project setup:
35
+
36
+ - `AGENTS.md`, especially Commands and any documented `Verify` command
37
+ - package or language manifests and task-runner files
38
+ - lockfiles and the package manager they imply
39
+ - existing typecheck, test, build, lint, and other quality commands
40
+ - test configuration and actual test files
41
+ - runtime version files such as `.nvmrc`, `.node-version`, `.python-version`,
42
+ `go.mod`, or `rust-toolchain.toml`
43
+ - `.github/workflows/` and any documented external CI
44
+ - git's current branch, configured default branch, and remotes when available
45
+
46
+ Do not assume npm, Node.js, `main`, or GitHub from the Blueprint template. Do not
47
+ run installs or edit files during inspection.
48
+
49
+ If an existing workflow already provides equivalent pull-request checks, explain
50
+ what it runs. If it is healthy and aligned with a documented Verify command,
51
+ report that no setup is needed. If normalization would change existing CI, show
52
+ the proposed change and get explicit approval before editing it.
53
+
54
+ ## Step 2 - define one Verify command
55
+
56
+ Build one command from meaningful checks that actually exist, in this order:
57
+
58
+ 1. typecheck
59
+ 2. tests, only when a runner and real test command are configured
60
+ 3. build
61
+
62
+ Omit missing checks. Do not install a test runner, invent an empty test suite, or
63
+ add a placeholder command. Lint, formatting, coverage, browser tests, security
64
+ scans, dependency audits, and version matrices are not part of the beginner
65
+ default. Preserve them when existing CI already requires them, and discuss any
66
+ normalization before changing that behavior.
67
+
68
+ For JavaScript and TypeScript, add or reuse a package script named `verify` and
69
+ invoke it with the detected package manager. For other stacks, use the existing
70
+ native task runner or the smallest clear combined command. Document the exact
71
+ invocation as `Verify` in the Commands section of `AGENTS.md`.
72
+
73
+ Examples are explanatory only. Never copy them without detecting the project:
11
74
 
12
75
  ```text
13
- PR / Push ➔ Lint & Typecheck ➔ Unit & Integration Tests ➔ Build Verification ➔ Security Audit
76
+ Verify: npm run verify
77
+ Verify: make verify
78
+ Verify: cargo test && cargo build --locked
14
79
  ```
15
80
 
16
- ---
81
+ If no meaningful check exists, stop and explain what is missing. Do not create a
82
+ workflow that always passes.
17
83
 
18
- ## 1. Shift-Left Quality Gate Pipeline
84
+ ## Step 3 - create or align the workflow
19
85
 
20
- 1. **Static Analysis & Typecheck**: `tsc --noEmit`, `eslint`, `biome` (Catches syntax & type flaws in seconds).
21
- 2. **Automated Tests**: Unit & Integration tests (`npm test`, `pytest`, `go test`).
22
- 3. **Build Integrity**: `npm run build` (Ensures bundle compiles cleanly without warnings).
23
- 4. **Security Hygiene**: `npm audit --audit-level=high` (Flags vulnerable dependencies).
86
+ Create `.github/workflows/verify.yml` only when that path is free. If it already
87
+ exists, never overwrite it silently. Show the exact proposed diff and ask before
88
+ changing it.
24
89
 
25
- ---
90
+ The workflow should contain only what the detected project needs:
26
91
 
27
- ## 2. GitHub Actions Setup (`.github/workflows/verify.yml`)
28
-
29
- When setting up or updating CI:
30
- - **Trigger**: Pull requests and pushes to `main` / `master`.
31
- - **Permissions**: Enforce least privilege (`permissions: contents: read`).
32
- - **Concurrency**: Cancel stale in-progress runs on the same PR.
33
- - **Deterministic Install**: Use `npm ci` or `--frozen-lockfile`.
34
-
35
- ```yaml
36
- name: Verify
37
-
38
- on:
39
- push:
40
- branches: [main, master]
41
- pull_request:
42
- branches: [main, master]
43
-
44
- concurrency:
45
- group: ${{ github.workflow }}-${{ github.ref }}
46
- cancel-in-progress: true
47
-
48
- permissions:
49
- contents: read
50
-
51
- jobs:
52
- verify:
53
- name: Run Verification Checks
54
- runs-on: ubuntu-latest
55
- steps:
56
- - name: Checkout Code
57
- uses: actions/checkout@v4
58
-
59
- - name: Setup Node
60
- uses: actions/setup-node@v4
61
- with:
62
- node-version: 20
63
- cache: npm
64
-
65
- - name: Install Dependencies
66
- run: npm ci
67
-
68
- - name: Run Verify Checks
69
- run: npm run check
70
- ```
92
+ - a clear workflow name such as `Verify`
93
+ - `pull_request`
94
+ - pushes to the detected default branch
95
+ - `permissions: contents: read`
96
+ - the real runtime version
97
+ - checkout and the appropriate runtime setup action
98
+ - the lockfile-safe dependency install command
99
+ - one final step that runs the exact `Verify` command from `AGENTS.md`
71
100
 
72
- ---
101
+ If the default branch cannot be identified from git or project context, ask
102
+ before writing the push trigger instead of guessing. Preserve all other workflow
103
+ files. When another workflow overlaps, report the overlap and ask whether to
104
+ reuse, align, or leave it alone.
105
+
106
+ ## Step 4 - prove the setup locally
107
+
108
+ Run the exact documented `Verify` command locally. The individual build, test,
109
+ or typecheck commands may still be run separately for diagnosis, but the final
110
+ proof must use Verify because that is what GitHub will run.
111
+
112
+ If Verify fails, report the failing subcommand and stop. Do not weaken the
113
+ command, remove a legitimate check, or describe CI as ready.
114
+
115
+ Do not push the workflow. A local workflow file does nothing on GitHub until the
116
+ user later approves a push.
117
+
118
+ ## Step 5 - report
119
+
120
+ Finish with a concise setup report:
121
+
122
+ - existing CI found and whether it was preserved or changed
123
+ - exact `Verify` command
124
+ - checks included and checks omitted
125
+ - test gate status
126
+ - workflow path and triggers
127
+ - local Verify result
128
+ - files changed
129
+ - any overlap, uncertainty, or follow-up
130
+
131
+ Explain that making the GitHub check required is a separate remote ruleset choice
132
+ after the workflow is pushed. Do not change repository settings or treat that as
133
+ part of this skill.
134
+
135
+ ## Interaction with other skills
136
+
137
+ - `/tests` adds the real test command to an existing Verify command, but never
138
+ creates CI by itself.
139
+ - `/implement`, `/complete`, and `/autopilot` run Verify when it is documented,
140
+ with their existing fallback behavior when it is absent.
141
+ - `/doctor` diagnoses drift between `AGENTS.md`, the project command, and the
142
+ workflow. Missing CI remains informational.
143
+
144
+ ## Rules
145
+
146
+ - Preserve existing CI and custom checks.
147
+ - Never invent tests or install a runner as part of CI setup.
148
+ - Never add git hooks, coverage, browser tests, security scans, or matrices by
149
+ default.
150
+ - Never push or change a remote ruleset without separate explicit approval.
151
+ - Keep one exact Verify command shared by local work and GitHub.
73
152
 
74
- ## Relationship To DevFlow 2.0
153
+ ## Formatting
75
154
 
76
- - **Classification**: Companion command & Automated testing infrastructure
77
- - **Mainline integration**: Invoked via `/ci` during `onboard` or `adopt`.
78
- - **Handoff**: `50-verify`, `70-deliver`
155
+ Format the output to match the project's conventions in
156
+ `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
157
+ enumerations and tables for matrices rather than dense paragraphs.