@jakkrichm/create-nexus-devflow 2.0.12 → 2.0.13

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 (124) hide show
  1. package/lib/update.js +15 -1
  2. package/package.json +1 -1
  3. package/template/.agents/skills/70-release/SKILL.md +2 -0
  4. package/template/.agents/skills/ci/SKILL.md +25 -78
  5. package/template/.agents/skills/commit/SKILL.md +39 -43
  6. package/template/.agents/skills/debug/SKILL.md +43 -104
  7. package/template/.agents/skills/deploy/SKILL.md +37 -65
  8. package/template/.agents/skills/insight/SKILL.md +27 -116
  9. package/template/.agents/skills/preview/SKILL.md +24 -103
  10. package/template/.agents/skills/review/SKILL.md +53 -37
  11. package/template/.agents/skills/rollback/SKILL.md +1 -0
  12. package/template/.agents/skills/security-review/SKILL.md +44 -147
  13. package/template/.agents/skills/simplify/SKILL.md +48 -57
  14. package/template/.agents/skills/test/SKILL.md +63 -51
  15. package/template/.claude/skills/70-release/SKILL.md +2 -0
  16. package/template/.claude/skills/ci/SKILL.md +25 -78
  17. package/template/.claude/skills/commit/SKILL.md +39 -43
  18. package/template/.claude/skills/debug/SKILL.md +43 -104
  19. package/template/.claude/skills/deploy/SKILL.md +37 -65
  20. package/template/.claude/skills/insight/SKILL.md +27 -116
  21. package/template/.claude/skills/preview/SKILL.md +24 -103
  22. package/template/.claude/skills/review/SKILL.md +53 -37
  23. package/template/.claude/skills/rollback/SKILL.md +1 -0
  24. package/template/.claude/skills/security-review/SKILL.md +44 -147
  25. package/template/.claude/skills/simplify/SKILL.md +48 -57
  26. package/template/.claude/skills/test/SKILL.md +63 -51
  27. package/template/devflow/history/HISTORY.md +27 -0
  28. package/template/devflow/reference/running-id-contract.md +1 -1
  29. package/template/.agents/skills/9arm-skills/README.md +0 -51
  30. package/template/.agents/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
  31. package/template/.agents/skills/9arm-skills/management-talk/SKILL.md +0 -79
  32. package/template/.agents/skills/9arm-skills/post-mortem/SKILL.md +0 -71
  33. package/template/.agents/skills/9arm-skills/scrutinize/SKILL.md +0 -72
  34. package/template/.agents/skills/browser-testing-with-devtools/SKILL.md +0 -302
  35. package/template/.agents/skills/ci-cd-and-automation/SKILL.md +0 -390
  36. package/template/.agents/skills/code-review-and-quality/SKILL.md +0 -392
  37. package/template/.agents/skills/code-simplification/SKILL.md +0 -331
  38. package/template/.agents/skills/debugging-and-error-recovery/SKILL.md +0 -298
  39. package/template/.agents/skills/deployment-procedures/SKILL.md +0 -241
  40. package/template/.agents/skills/deprecation-and-migration/SKILL.md +0 -206
  41. package/template/.agents/skills/diagnosing-bugs/SKILL.md +0 -93
  42. package/template/.agents/skills/git-workflow-and-versioning/SKILL.md +0 -300
  43. package/template/.agents/skills/human-review-decisions/SKILL.md +0 -74
  44. package/template/.agents/skills/idea-refine/SKILL.md +0 -178
  45. package/template/.agents/skills/idea-refine/examples.md +0 -238
  46. package/template/.agents/skills/idea-refine/frameworks.md +0 -99
  47. package/template/.agents/skills/idea-refine/refinement-criteria.md +0 -113
  48. package/template/.agents/skills/idea-refine/scripts/idea-refine.sh +0 -15
  49. package/template/.agents/skills/incremental-implementation/SKILL.md +0 -248
  50. package/template/.agents/skills/insight-capture/SKILL.md +0 -84
  51. package/template/.agents/skills/intelligent-routing/SKILL.md +0 -176
  52. package/template/.agents/skills/md2html/SKILL.md +0 -154
  53. package/template/.agents/skills/md2html/components.md +0 -505
  54. package/template/.agents/skills/md2html/template.html +0 -1152
  55. package/template/.agents/skills/planning-and-task-breakdown/SKILL.md +0 -239
  56. package/template/.agents/skills/pr-review/SKILL.md +0 -143
  57. package/template/.agents/skills/pr-review-analysis/SKILL.md +0 -89
  58. package/template/.agents/skills/preview-local-check/SKILL.md +0 -59
  59. package/template/.agents/skills/release-git-operations/SKILL.md +0 -97
  60. package/template/.agents/skills/review-followup-routing/SKILL.md +0 -98
  61. package/template/.agents/skills/security-and-hardening/SKILL.md +0 -349
  62. package/template/.agents/skills/security-and-hardening/security-checklist.md +0 -134
  63. package/template/.agents/skills/shipping-and-launch/SKILL.md +0 -311
  64. package/template/.agents/skills/silent-failure-audit/SKILL.md +0 -73
  65. package/template/.agents/skills/spec-orchestration/SKILL.md +0 -91
  66. package/template/.agents/skills/specialist-agent-routing/SKILL.md +0 -107
  67. package/template/.agents/skills/test-driven-development/SKILL.md +0 -422
  68. package/template/.agents/skills/test-driven-development/testing-patterns.md +0 -236
  69. package/template/.agents/skills/test-execution-and-coverage/SKILL.md +0 -56
  70. package/template/.agents/skills/using-agent-skills/SKILL.md +0 -171
  71. package/template/.agents/skills/verification-orchestration/SKILL.md +0 -68
  72. package/template/.agents/skills/vulnerability-scanner/SKILL.md +0 -276
  73. package/template/.agents/skills/vulnerability-scanner/checklists.md +0 -121
  74. package/template/.agents/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  75. package/template/.agents/skills/wiki/SKILL.md +0 -149
  76. package/template/.agents/skills/workflow-documentation-sync/SKILL.md +0 -87
  77. package/template/.claude/skills/9arm-skills/README.md +0 -51
  78. package/template/.claude/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
  79. package/template/.claude/skills/9arm-skills/management-talk/SKILL.md +0 -79
  80. package/template/.claude/skills/9arm-skills/post-mortem/SKILL.md +0 -71
  81. package/template/.claude/skills/9arm-skills/scrutinize/SKILL.md +0 -72
  82. package/template/.claude/skills/browser-testing-with-devtools/SKILL.md +0 -302
  83. package/template/.claude/skills/ci-cd-and-automation/SKILL.md +0 -390
  84. package/template/.claude/skills/code-review-and-quality/SKILL.md +0 -392
  85. package/template/.claude/skills/code-simplification/SKILL.md +0 -331
  86. package/template/.claude/skills/debugging-and-error-recovery/SKILL.md +0 -298
  87. package/template/.claude/skills/deployment-procedures/SKILL.md +0 -241
  88. package/template/.claude/skills/deprecation-and-migration/SKILL.md +0 -206
  89. package/template/.claude/skills/diagnosing-bugs/SKILL.md +0 -93
  90. package/template/.claude/skills/git-workflow-and-versioning/SKILL.md +0 -300
  91. package/template/.claude/skills/human-review-decisions/SKILL.md +0 -74
  92. package/template/.claude/skills/idea-refine/SKILL.md +0 -178
  93. package/template/.claude/skills/idea-refine/examples.md +0 -238
  94. package/template/.claude/skills/idea-refine/frameworks.md +0 -99
  95. package/template/.claude/skills/idea-refine/refinement-criteria.md +0 -113
  96. package/template/.claude/skills/idea-refine/scripts/idea-refine.sh +0 -15
  97. package/template/.claude/skills/incremental-implementation/SKILL.md +0 -248
  98. package/template/.claude/skills/insight-capture/SKILL.md +0 -84
  99. package/template/.claude/skills/intelligent-routing/SKILL.md +0 -176
  100. package/template/.claude/skills/md2html/SKILL.md +0 -154
  101. package/template/.claude/skills/md2html/components.md +0 -505
  102. package/template/.claude/skills/md2html/template.html +0 -1152
  103. package/template/.claude/skills/planning-and-task-breakdown/SKILL.md +0 -239
  104. package/template/.claude/skills/pr-review/SKILL.md +0 -143
  105. package/template/.claude/skills/pr-review-analysis/SKILL.md +0 -89
  106. package/template/.claude/skills/preview-local-check/SKILL.md +0 -59
  107. package/template/.claude/skills/release-git-operations/SKILL.md +0 -97
  108. package/template/.claude/skills/review-followup-routing/SKILL.md +0 -98
  109. package/template/.claude/skills/security-and-hardening/SKILL.md +0 -349
  110. package/template/.claude/skills/security-and-hardening/security-checklist.md +0 -134
  111. package/template/.claude/skills/shipping-and-launch/SKILL.md +0 -311
  112. package/template/.claude/skills/silent-failure-audit/SKILL.md +0 -73
  113. package/template/.claude/skills/spec-orchestration/SKILL.md +0 -91
  114. package/template/.claude/skills/specialist-agent-routing/SKILL.md +0 -107
  115. package/template/.claude/skills/test-driven-development/SKILL.md +0 -422
  116. package/template/.claude/skills/test-driven-development/testing-patterns.md +0 -236
  117. package/template/.claude/skills/test-execution-and-coverage/SKILL.md +0 -56
  118. package/template/.claude/skills/using-agent-skills/SKILL.md +0 -171
  119. package/template/.claude/skills/verification-orchestration/SKILL.md +0 -68
  120. package/template/.claude/skills/vulnerability-scanner/SKILL.md +0 -276
  121. package/template/.claude/skills/vulnerability-scanner/checklists.md +0 -121
  122. package/template/.claude/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  123. package/template/.claude/skills/wiki/SKILL.md +0 -149
  124. package/template/.claude/skills/workflow-documentation-sync/SKILL.md +0 -87
package/lib/update.js CHANGED
@@ -71,7 +71,6 @@ function createManifest(version, adapters, templateFiles) {
71
71
  "prd",
72
72
  "issue-triage",
73
73
  "security-review",
74
- "wiki",
75
74
  "check-for-updates",
76
75
  "help"
77
76
  ]
@@ -305,6 +304,21 @@ async function applyPreparedUpdate(prepared, { replaceConflicts = false } = {})
305
304
  try {
306
305
  await fs.unlink(fileToRemove);
307
306
  removedCount++;
307
+
308
+ let parentDir = path.dirname(fileToRemove);
309
+ while (parentDir !== prepared.targetDir && parentDir.startsWith(prepared.targetDir)) {
310
+ try {
311
+ const entries = await fs.readdir(parentDir);
312
+ if (entries.length === 0) {
313
+ await fs.rmdir(parentDir);
314
+ parentDir = path.dirname(parentDir);
315
+ } else {
316
+ break;
317
+ }
318
+ } catch {
319
+ break;
320
+ }
321
+ }
308
322
  } catch (error) {
309
323
  if (error.code !== "ENOENT") {
310
324
  throw error;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jakkrichm/create-nexus-devflow",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Installer package for Nexus-DevFlow agentic workflow layer.",
5
5
  "license": "MIT",
6
6
  "author": "Jakkrich",
@@ -77,6 +77,8 @@ Before packaging, merging, or releasing:
77
77
  - **การ Push ไปยัง Remote หรือ Deploy จะต้องขออนุมัติแยกต่างหากอย่างชัดเจน (Merge approval DOES NOT equal Push approval)**
78
78
  3. **Archive Resolved Findings**:
79
79
  - ย้ายรายการ Findings ที่ปิดแล้ว (`closed`, `accepted`, `invalid`) ไปบันทึกในเอกสาร Release และรีเซ็ต `findings.md` ให้สะอาด
80
+ 4. **Append to Master History Ledger**:
81
+ - บันทึก Entry ใหม่ลงใน `devflow/history/HISTORY.md` พร้อมระบุ Running ID, Title, วันที่, Git Commit Hash / Tag, สถานะ (`Released`), และลิงก์ไปยังรายงานสรุป `60-report.md`
80
82
 
81
83
  ### 1. Load Verified Context
82
84
 
@@ -1,70 +1,36 @@
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] CI/CD pipeline automation and GitHub Actions setup (.github/workflows/verify.yml). Automates quality gates, typechecks, tests, and build checks."
4
4
  ---
5
5
 
6
- # ci - Automated GitHub Actions Pipeline Setup
6
+ # CI/CD Pipeline Automation & Quality Gates
7
7
 
8
- Where this sits in the workflow:
8
+ ## Overview
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.
9
11
 
10
12
  ```text
11
- onboard or adopt -> [ci] -> Verify locally -> GitHub Actions runs Verify on PR & Push
12
- (project setup) (setup) (same command) (automated checks)
13
+ PR / Push Lint & Typecheck Unit & Integration Tests ➔ Build Verification ➔ Security Audit
13
14
  ```
14
15
 
15
- This skill connects local verification with automated GitHub checks using **one shared Verify recipe**:
16
-
17
- - **Verify is the recipe**: Runs the project's real checks (typecheck, tests, build) defined in `AGENTS.md`.
18
- - **GitHub Actions is the worker**: Executes the same recipe automatically on pull requests and pushes.
19
- - **Branch Protection / Ruleset is the gate**: Optionally requires the check to pass before merging.
20
-
21
- This skill configures the workflow file. It **never pushes to remote, changes remote repository rulesets, or publishes releases** without explicit permission.
22
-
23
- ## Input
24
-
25
- No argument is required. A preferred package manager or branch name can be optionally provided.
26
-
27
- ## Step 1 - Inspect Project Setup (Read-Only)
28
-
29
- Inspect the repository without modifying files:
30
-
31
- 1. **Commands in `AGENTS.md`**: Look for existing `Verify`, `Test`, `Build`, and `Dev` commands.
32
- 2. **Project Manifests**: `package.json`, `requirements.txt`, `pyproject.toml`, `go.mod`, `Cargo.toml`, etc.
33
- 3. **Lockfiles & Package Manager**: `pnpm-lock.yaml` (pnpm), `package-lock.json` (npm), `yarn.lock` (yarn), `bun.lockb` (bun), `poetry.lock` (poetry), `Cargo.lock` (cargo).
34
- 4. **Runtime Versions**: `.node-version`, `.nvmrc`, `package.json` engines, `.python-version`.
35
- 5. **Existing Workflows**: Inspect `.github/workflows/` to check if a CI workflow already exists.
36
- 6. **Git Default Branch**: Detect `main` or `master`.
37
-
38
- If a healthy and matching workflow already exists, report that CI is already in place and stop.
39
-
40
- ## Step 2 - Define The Single Verify Command
41
-
42
- Build one combined Verify command from actual checks that exist in the project, in this standard order:
43
-
44
- 1. **Typecheck** (e.g. `tsc --noEmit`, `mypy`, `pyright`, `go vet`)
45
- 2. **Tests** (e.g. `npm test`, `pytest`, `go test ./...`, `cargo test`) - only if real tests exist
46
- 3. **Build** (e.g. `npm run build`, `cargo build`)
47
-
48
- For JavaScript/TypeScript projects, ensure a `verify` or `check` script exists in `package.json` (or combine existing scripts: e.g. `npm run check:static && npm test && npm run build`).
49
-
50
- Record the exact command in the Commands section of `AGENTS.md`:
16
+ ---
51
17
 
52
- ```markdown
53
- ## Commands
54
- - Verify: `npm run check` (or detected verify command)
55
- ```
18
+ ## 1. Shift-Left Quality Gate Pipeline
56
19
 
57
- ## Step 3 - Generate `.github/workflows/verify.yml`
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).
58
24
 
59
- Create `.github/workflows/verify.yml` with security and stability best practices:
25
+ ---
60
26
 
61
- - **Trigger**: Pull requests to default branch + Pushes to default branch.
62
- - **Permissions**: Set least privilege `permissions: contents: read`.
63
- - **Concurrency**: Cancel in-progress runs on the same PR branch.
64
- - **Lockfile-Safe Install**: Use `npm ci`, `pnpm install --frozen-lockfile`, `yarn install --immutable`, or `cargo --locked`.
65
- - **Exact Verify Step**: Run the exact Verify command from `AGENTS.md`.
27
+ ## 2. GitHub Actions Setup (`.github/workflows/verify.yml`)
66
28
 
67
- ### Standard GitHub Actions Template (Node.js Example):
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`.
68
34
 
69
35
  ```yaml
70
36
  name: Verify
@@ -90,7 +56,7 @@ jobs:
90
56
  - name: Checkout Code
91
57
  uses: actions/checkout@v4
92
58
 
93
- - name: Setup Runtime
59
+ - name: Setup Node
94
60
  uses: actions/setup-node@v4
95
61
  with:
96
62
  node-version: 20
@@ -103,29 +69,10 @@ jobs:
103
69
  run: npm run check
104
70
  ```
105
71
 
106
- ## Step 4 - Verify Locally
107
-
108
- Execute the Verify command locally to confirm that it succeeds on clean code before recommending it:
109
-
110
- ```bash
111
- npm run check
112
- ```
113
-
114
- If local verification fails, report the failing check and assist in resolving it before claiming CI readiness.
115
-
116
- ## Step 5 - Summary & Handoff
117
-
118
- Output a concise summary:
119
-
120
- - **Verify Command**: Documented command in `AGENTS.md`.
121
- - **Workflow File**: `.github/workflows/verify.yml` (created/updated).
122
- - **Trigger Events**: `pull_request` & `push`.
123
- - **Local Test**: Result of local execution.
124
- - **Next Steps**: Advise user to commit and push the workflow to activate GitHub Actions.
72
+ ---
125
73
 
126
- ## Rules
74
+ ## Relationship To DevFlow 2.0
127
75
 
128
- - **Preserve Existing CI**: Never overwrite existing custom workflows without explicit user consent.
129
- - **No Dummy Tests**: Do not invent fake test commands or install unrequested test runners.
130
- - **Least Privilege Security**: Always specify `permissions: contents: read`.
131
- - **No Auto-Push**: Stop at local file creation; do not push to remote automatically.
76
+ - **Classification**: Companion command & Automated testing infrastructure
77
+ - **Mainline integration**: Invoked via `/ci` during `onboard` or `adopt`.
78
+ - **Handoff**: `50-verify`, `70-release`
@@ -1,63 +1,59 @@
1
- ---name: commit
2
-
3
- description: "[Devflow] Smart Commit (Git Orchestration) - Stage files intelligently and write a concise, imperative commit message according to project standards."
4
1
  ---
5
- # ๐Ÿ’พ Smart Commit (Git Orchestration)
2
+ name: commit
3
+ description: "[Devflow] Smart Commit (Git Orchestration) - Stage files intelligently, write conventional imperative commit messages, and manage trunk-based versioning."
4
+ ---
6
5
 
7
- ## Target: $ARGUMENTS
6
+ # Smart Commit & Git Workflow Versioning
8
7
 
9
- Stage files intelligently and write a concise, imperative commit message according to project standards.
8
+ ## Overview
10
9
 
11
- Primary behavior now lives in:
12
-
13
- ```text
14
- .agents/skills/release-git-operations/SKILL.md
15
- ```
16
-
17
- Treat this workflow file as a compatibility wrapper around that skill in `commit` mode.
10
+ This is the Git orchestration and versioning master skill for Nexus-DevFlow. It enforces atomic commits, conventional commit formatting, intelligent staging, and safe trunk-based workflows. Commits are save points, branches are sandboxes, and Git history is durable documentation.
18
11
 
19
12
  ---
20
13
 
21
- ## ๐Ÿ› ๏ธ Internal Process
14
+ ## 1. Commit Discipline & The Conventional Commits Standard
15
+
16
+ Each commit should represent one atomic, self-contained change:
22
17
 
23
- You are an orchestrator. Your goal is to call the specialized Git Committer agent to perform a high-quality commit.
18
+ ```text
19
+ <type>(<scope>): <short imperative summary>
24
20
 
25
- ### Phase 1: Assessment & Staging
26
- **Call Agent**: `prp-core-git-committer`
27
- - Provide the target description (e.g., "all", "backend only", "staged").
28
- - The agent will:
29
- - Check the current Git status and branch.
30
- - **MANDATORY BRANCH RULE:** Use the user's current branch as-is. Do not create, switch, or checkout a branch automatically. Only create or switch branches when the user explicitly asks for that exact branch action in the current request.
31
- - If the current branch appears risky for the intended commit (for example `main`/`master` or a protected branch), warn the user and ask whether they want to continue on the current branch or explicitly create/switch to another branch.
32
- - Interpret your description to stage the correct files.
33
- - Review the staged changes to understand the context.
21
+ [optional detailed body explaining WHY, not WHAT]
22
+ ```
34
23
 
35
- ### Phase 2: Message Generation & Commit
36
- - Ensure the agent generates an imperative commit message (e.g., `feat: Add user auth`).
37
- - The agent will execute the commit and capture the result.
24
+ ### Commit Types:
25
+ - `feat`: A new user-facing feature or capability
26
+ - `fix`: A bug fix
27
+ - `docs`: Documentation only changes
28
+ - `refactor`: A code change that neither fixes a bug nor adds a feature
29
+ - `test`: Adding missing tests or correcting existing tests
30
+ - `chore`: Maintenance, build tasks, package updates
38
31
 
39
- ### Phase 3: Result Summary
40
- - Verify the agent reports:
41
- - Commit Hash.
42
- - Final Commit Message.
43
- - Statistics (Files changed, additions, deletions).
32
+ ### Formatting Rules:
33
+ - Use the imperative mood: `"feat(auth): add password reset flow"` (NOT `"added"` or `"adds"`).
34
+ - Never mix formatting/refactoring with behavioral feature changes in the same commit.
44
35
 
45
36
  ---
46
37
 
47
- ๐Ÿ“Œ **Next Step**: Run `PR` to create a Pull Request.
38
+ ## 2. Trunk-Based Branching & Safety
48
39
 
49
- ## Relationship To DevFlow 2.0
40
+ - **Keep `main` deployable**: Feature branches (`feature/{slug}-{running-id}`) must be short-lived.
41
+ - **Never commit directly to `main` without review**: Use feature/fix branches during development.
42
+ - **Small, verified increments**: Test and verify before committing each checkpoint.
50
43
 
51
- - Classification: Companion command
52
- - Mainline status: Release support command, not a numbered stage
53
- - Typical entry points: `70-release` after the report is aligned and release execution is ready
54
- - Typical handoff targets: `PR`, `Deploy`, `70-release`
44
+ ---
55
45
 
56
- ## Sources
46
+ ## 3. Execution Flow
57
47
 
58
- - `AGENTS.md`
59
- - `.agents/skills/release-git-operations/SKILL.md`
60
- - `.agents/skills/git-workflow-and-versioning/SKILL.md`
61
- - Related commands: `70-release`, `PR`, `Deploy`, `Merge`
48
+ 1. Check `git status` and verify current branch.
49
+ 2. Stage relevant files explicitly (`git add <files>` — avoid blindly running `git add .` if untracked temporary files exist).
50
+ 3. Generate concise conventional commit message.
51
+ 4. Execute `git commit` and capture commit hash.
62
52
 
53
+ ---
54
+
55
+ ## Relationship To DevFlow 2.0
63
56
 
57
+ - **Classification**: Companion command & Version control support
58
+ - **Mainline integration**: Used during `40-implement` (checkpoint commits), `70-release` (final release commit).
59
+ - **Handoff**: `pr`, `merge`, `70-release`
@@ -3,129 +3,68 @@ name: debug
3
3
  description: "[Devflow] Root cause investigation and diagnostic loop before or during implementation without editing code. Use when encountering broken behavior, test failures, or bugs."
4
4
  ---
5
5
 
6
- ---
7
- description: Root cause analysis and debugging. Transitional compatibility path for the Debug companion command in DevFlow 2.0.
8
- ---
9
-
10
- # Debug - Root Cause Analysis
11
-
12
- ## Issue: $ARGUMENTS
13
-
14
- This file keeps its old numeric path for migration compatibility.
15
-
16
- In DevFlow 2.0, `Debug` is a companion command, not a numbered mainline workflow. Its investigative depth should remain comparable to the original debug workflow.
17
-
18
- ## Purpose
19
-
20
- Use `Debug` to find the actual origin of an issue, not just the visible symptom.
21
-
22
- Use it when:
23
-
24
- - implementation work is blocked by a defect
25
- - verification reveals a failure that needs root-cause analysis
26
- - the team needs RCA before deciding the next implementation step
6
+ # Debug & Root Cause Analysis (RCA)
27
7
 
28
- Preferred DevFlow 2.0 pairing:
8
+ ## Overview
29
9
 
30
- - from `00-discover` when a new request begins with a failure whose root cause is unknown
31
- - from `40-implement`
32
- - from `50-verify`
10
+ This is the comprehensive debugging master skill for Nexus-DevFlow. It guides systematic root-cause investigation without blindly editing code. The goal is to find the actual origin of an issue, not merely suppress visible symptoms.
33
11
 
34
- When invoked with a Discovery ID, link the RCA report to that discovery and return to `00-discover {discovery_id}` for the delivery decision. Do not allocate a Running ID for an unapproved fix during Debug.
35
-
36
- ## Source Discipline
37
-
38
- Apply the local skill pack at `.agents/skills/9arm-skills/debug-mantra/SKILL.md`.
39
-
40
- - Source pack: `9arm-skills`
41
- - Credit: `thananon/9arm-skills`
42
- - Upstream: https://github.com/thananon/9arm-skills
43
- - Mantra: `Reproduce -> Trace fail path -> Falsify hypothesis -> Cross-reference breadcrumbs`
12
+ **The Debug Mantra (9arm Pattern)**:
13
+ ```text
14
+ Reproduce Trace Fail Path ➔ Falsify Hypotheses ➔ Cross-reference Breadcrumbs ➔ RCA Proof
15
+ ```
44
16
 
45
17
  ---
46
18
 
47
- ## Internal Process
48
-
49
- You are doing Root Cause Analysis, not just symptom triage. Keep the richer original debugging discipline and map the next step back into DevFlow 2.0.
50
-
51
- ### Phase 1: Reproduce And Classify
52
-
53
- - restate the symptom clearly
54
- - capture expected vs actual behavior
55
- - determine whether the issue is reproducible
56
- - do not recommend a fix before the reproduction story is credible
19
+ ## 1. The 4-Phase Diagnostic Loop
57
20
 
58
- ### Phase 2: Isolate And Hypothesize
21
+ ### Phase 1: Reproduce & Classify
22
+ - Restate the observed symptom vs. expected behavior with exact steps.
23
+ - Create a minimal reproduction script, test case, or curl command.
24
+ - Rule: **Do not propose a code fix before the reproduction story is verified.**
59
25
 
60
- - identify likely components, recent changes, or conditions
61
- - generate 2-4 hypotheses ordered by likelihood
62
- - define what evidence would falsify each hypothesis
26
+ ### Phase 2: Isolate & Hypothesize
27
+ - Generate 24 distinct hypotheses ranked by probability.
28
+ - Formulate specific criteria and evidence that would *falsify* each hypothesis.
63
29
 
64
- ### Phase 3: Investigate With Evidence
30
+ ### Phase 3: Non-Destructive Investigation
31
+ - Trace code execution paths end-to-end (stack traces, logs, variable states, async boundaries).
32
+ - Inspect recent commits or configuration changes that touch the affected boundary.
33
+ - Test hypotheses methodically using tests and logging without altering business logic.
65
34
 
66
- - trace the real fail path end-to-end
67
- - test hypotheses methodically
68
- - record evidence with file:line or command output
69
- - maintain a breadcrumb trail of observations and conclusions
35
+ ### Phase 4: Root Cause Conclusion (RCA)
36
+ - State precisely *why* the bug occurred (underlying invariant violation).
37
+ - Define the minimal, robust architectural fix direction.
38
+ - Propose regression prevention measures (unit test, type guard, linter rule).
70
39
 
71
- ### Phase 4: Conclude With RCA
72
-
73
- - name the root cause
74
- - explain why it is the root cause
75
- - describe the fix direction
76
- - capture prevention or follow-up measures
77
-
78
- This command supports the active stage. It does not replace the mainline stage itself.
79
-
80
- ## Output Format
81
-
82
- Save the RCA report to `devflow/debug/rca-{slug}.md`.
83
-
84
- Before generating the report:
40
+ ---
85
41
 
86
- 1. Inspect `.agent/resources/schemas/rca.template.md`
87
- 2. Preserve its required headings and structure
88
- 3. Replace placeholder text with concrete evidence
89
- 4. Re-check the output against `rca.template.md`, ensure required headings remain, and remove all placeholders before completion
42
+ ## 2. Output Format (RCA Report)
90
43
 
91
- Present the summary in this shape:
44
+ Save substantial RCA investigations under:
45
+ ```text
46
+ devflow/debug/rca-{slug}.md
47
+ ```
92
48
 
49
+ Structure:
93
50
  ```markdown
94
51
  ## Debug Summary
95
52
 
96
- 1. **Symptom**: [What is happening]
97
- 2. **Evidence**: [error log, file, line, failing command]
98
- 3. **Investigation Path**: [what was tested and what happened]
99
- 4. **Root Cause**: [why this happened]
100
- 5. **Fix Direction**: [what should be changed]
101
- 6. **Prevention**: [how to avoid recurrence]
53
+ 1. **Symptom**: [What is happening vs expected]
54
+ 2. **Evidence**: [Error logs, stack trace, file:line references]
55
+ 3. **Investigation Path**: [Hypotheses tested and falsification proof]
56
+ 4. **Root Cause**: [The exact mechanism causing the failure]
57
+ 5. **Fix Direction**: [Recommended scoped change]
58
+ 6. **Regression Guard**: [Reproduction test to add before fixing]
102
59
  ```
103
60
 
104
- ## Examples
105
-
106
- ```text
107
- Debug flaky login redirect
108
- Debug failing migration in CI
109
- Debug why webhook verification breaks in staging
110
- Debug unexpected duplicate records
111
- ```
61
+ ---
112
62
 
113
63
  ## Relationship To DevFlow 2.0
114
64
 
115
- - Classification: Companion command
116
- - Mainline status: Not a numbered stage
117
- - Typical entry points: `00-discover`, `40-implement`, `50-verify`, `Issue-Triage`, production failure analysis
118
- - Typical handoff targets: `00-discover {discovery_id}` for discovery-owned RCA, `40-implement`, `50-verify`, `Insight`, `Wiki`
119
-
120
- ## Sources
121
-
122
- - `AGENTS.md`
123
- - `.agent/resources/schemas/rca.template.md`
124
- - Related commands: `40-implement`, `50-verify`, `Test`, `Insight`, `Wiki`, `Agent`
125
-
126
- ## Next Workflow Recommendation
127
-
128
- - Default: return to `00-discover {discovery_id}` when the failure entered through discovery; otherwise return to `40-implement` when a tracked fix already exists
129
- - Alternate: `30-plan` if the fix needs planning changes
130
- - Alternate: `50-verify` when the issue is resolved and needs re-checking
131
-
65
+ - **Classification**: Companion command & Investigation lane
66
+ - **Mainline integration**:
67
+ - During `00-discover`: Unclear failure intake before allocation
68
+ - During `40-implement`: Hard test failure or unexpected runtime exception
69
+ - During `50-verify`: Defect found during QA inspection
70
+ - **Handoff**: `test` (write repro test), `40-implement` (execute fix), `50-verify` (re-check)
@@ -1,91 +1,63 @@
1
- ---name: deploy
2
-
3
- description: "[Devflow] Production deployment pre-flight checks, smoke validation, and deployment execution."
4
1
  ---
5
- # ๐Ÿš€ Phase 52: Production Deployment (Auto-Deploy)
2
+ name: deploy
3
+ description: "[Devflow] Production deployment pre-flight checks, launch readiness, smoke validation, and deployment execution."
4
+ ---
6
5
 
7
- ## Usage: `Deploy [subcommand]`
6
+ # Production Deployment & Launch Readiness
8
7
 
9
- Perform pre-flight checks, deployment execution, and verification for production releases.
8
+ ## Overview
10
9
 
11
- Primary behavior now lives in:
10
+ This is the comprehensive deployment master skill for Nexus-DevFlow. It handles pre-flight validation, multi-platform deployment execution (Vercel, Render, Railway, Fly.io, Docker), health checks, smoke verification, and safe rollback readiness.
12
11
 
13
12
  ```text
14
- .agents/skills/release-git-operations/SKILL.md
13
+ Pre-Flight Checks ➔ Build & Smoke Test ➔ Deployment Execution ➔ Health Verification ➔ Release Logging
15
14
  ```
16
15
 
17
- Treat this workflow file as a compatibility wrapper around that skill in `deploy` mode.
18
-
19
16
  ---
20
17
 
21
- ## ๐Ÿ› ๏ธ Sub-commands
18
+ ## 1. Pre-Flight Verification Checklist
22
19
 
23
- - `Deploy` - Interactive deployment wizard
24
- - `Deploy check` - Run pre-deployment checks only
25
- - `Deploy preview` - Deploy to preview/staging
26
- - `Deploy production` - Deploy to production
27
- - `Deploy rollback` - Rollback to previous version
20
+ Before initiating any deployment, verify:
21
+ 1. **Code & Quality**: Zero syntax/type errors, linters clean, unit & integration tests passing (`npm test`).
22
+ 2. **Security**: No secrets in source code, environment variables documented in `.env.example`, `npm audit` checked.
23
+ 3. **Database & Migrations**: Schema migrations verified backwards-compatible and applied.
24
+ 4. **Performance & Assets**: Production bundles compiled, assets compressed, Core Web Vitals considered.
25
+ 5. **Observability**: Healthcheck endpoint (`/api/health`) responsive, error tracking configured.
28
26
 
29
27
  ---
30
28
 
31
- ## ๐Ÿšฆ Internal Process
29
+ ## 2. Platform Deployment Matrix
32
30
 
33
- ### Phase 1: Pre-Flight Checks
34
- Before any deployment, the AI MUST verify the following Checklist:
35
- 1. **Code Quality**: No syntax errors, Linters passing, Tests passing.
36
- 2. **Security**: No hardcoded secrets, Environment variables documented, Dependencies audited.
37
- 3. **Performance**: Bundle size acceptable, Images optimized, No N+1 queries.
38
- 4. **Accessibility**: Keyboard nav works, screen reader compatible, contrast adequate.
39
- 5. **Infrastructure**: Env vars set, migrations ready, monitoring configured.
40
- 6. **Documentation**: README / ADRs / CHANGELOG updated.
31
+ | Target Platform | Deploy Method / Command | Verification Method |
32
+ | :--- | :--- | :--- |
33
+ | **Vercel** | `vercel --prod` or Git push | Inspect deployment URL & build logs |
34
+ | **Render / Railway** | `railway up` or Git integration | Check service status & container logs |
35
+ | **Fly.io** | `fly deploy` | Check `fly status` and HTTP response |
36
+ | **Docker / VPS** | `docker compose up -d --build` | Check container health & PM2 logs |
41
37
 
42
- *You MUST run appropriate validation commands to systematically audit the codebase before giving the green light.*
38
+ ---
43
39
 
44
- ### Phase 2: Deployment Execution
45
- Determine the project's platform (Vercel, Railway, Docker, Fly.io, etc.) and execute the appropriate build & deploy commands.
46
- - Vercel: `vercel --prod`
47
- - Railway: `railway up`
48
- - Docker: `docker compose up -d`
49
- - Fly.io: `fly deploy`
40
+ ## 3. Post-Deployment Smoke Verification & Health Check
50
41
 
51
- ### Phase 3: Health Check, Verify & Report
52
- - **Template Verification**: **MANDATORY:** Before final deployment, inspect `.agent/resources/schemas/deploy_report.template.md`, preserve its required layout, and replace placeholder text with concrete environment, commands, checks, rollback notes, and deployment result.
53
- - Save the final deployment and pre-flight check report to `devflow/reports/{date}-deploy-report-{timestamp}.md` (where `{date}` is today's date in `YYYY-MM-DD` format and `{timestamp}` is a clean date/time slug).
54
- - Verify that the deployed application is responding (HTTP 200 OK) and all services (Database, API) are healthy.
42
+ 1. Send an HTTP request to the deployed domain: verify HTTP 200 OK.
43
+ 2. Test critical paths (Authentication, API endpoints, core database transactions).
44
+ 3. Confirm telemetry and error log stream are free of unhandled exceptions.
55
45
 
56
46
  ---
57
47
 
58
- ## ๐Ÿ“ Output Formats
48
+ ## 4. Rollback Readiness
59
49
 
60
- ### Successful Deploy
61
- Generate a summary indicating:
62
- - **Summary**: Version, Environment, Duration, Platform
63
- - **URLs**: Production, Dashboard
64
- - **Report Location**: Confirm the deploy checklist and validation report has been written to the specified workspace path.
65
- - **What Changed**: Bullet points of new features or fixes
66
- - **Health Check**: Status of API and Database
50
+ Always have an immediate rollback plan before triggering production releases:
51
+ - Pin the previous stable build artifact, Docker image tag, or Git commit hash.
52
+ - If post-deployment smoke tests fail, trigger rollback immediately:
53
+ ```text
54
+ deploy rollback
55
+ ```
67
56
 
68
- ### Failed Deploy
69
- Generate an Error summary detailing:
70
- - **Error**: Step where it failed (e.g., Build failed at TypeScript compilation)
71
- - **Details**: Exact error snippet
72
- - **Resolution**: Step-by-step fix recommendation
73
- - **Rollback Available**: Suggest running `Deploy rollback` if needed.
57
+ ---
74
58
 
75
59
  ## Relationship To DevFlow 2.0
76
60
 
77
- - Classification: Companion command
78
- - Mainline status: Release support command, not a numbered stage
79
- - Typical entry points: `70-release` after the report is aligned and packaging is ready to execute
80
- - Typical handoff targets: `60-report`, `Changelog`, `Wiki`
81
-
82
- ## Sources
83
-
84
- - `AGENTS.md`
85
- - `.agents/skills/release-git-operations/SKILL.md`
86
- - `.agents/skills/shipping-and-launch/SKILL.md`
87
- - `.agents/skills/deployment-procedures/SKILL.md`
88
- - `.agent/resources/schemas/deploy_report.template.md`
89
- - Related commands: `70-release`, `Commit`, `PR`, `Changelog`, `60-report`
90
-
91
-
61
+ - **Classification**: Companion command & Delivery support
62
+ - **Mainline integration**: Invoked after `70-release` when ready to deploy.
63
+ - **Handoff**: `60-report`, `changelog`, `rollback`