@jakkrichm/create-nexus-devflow 2.0.12 → 2.0.14

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 (171) hide show
  1. package/dist/bin/create-nexus-devflow.d.ts +2 -0
  2. package/dist/bin/create-nexus-devflow.js +233 -0
  3. package/dist/bin/create-nexus-devflow.js.map +1 -0
  4. package/dist/lib/starter-templates.d.ts +6 -0
  5. package/dist/lib/starter-templates.js +8 -0
  6. package/dist/lib/starter-templates.js.map +1 -0
  7. package/dist/lib/update.d.ts +68 -0
  8. package/dist/lib/update.js +325 -0
  9. package/dist/lib/update.js.map +1 -0
  10. package/dist/scripts/clean-template.d.ts +1 -0
  11. package/dist/scripts/clean-template.js +14 -0
  12. package/dist/scripts/clean-template.js.map +1 -0
  13. package/dist/scripts/prepare-template.d.ts +1 -0
  14. package/dist/scripts/prepare-template.js +89 -0
  15. package/dist/scripts/prepare-template.js.map +1 -0
  16. package/package.json +11 -9
  17. package/template/.agents/skills/00-discover/SKILL.md +2 -0
  18. package/template/.agents/skills/60-report/SKILL.md +21 -75
  19. package/template/.agents/skills/70-release/SKILL.md +7 -4
  20. package/template/.agents/skills/check/SKILL.md +68 -0
  21. package/template/.agents/skills/ci/SKILL.md +25 -78
  22. package/template/.agents/skills/commit/SKILL.md +39 -43
  23. package/template/.agents/skills/complete/SKILL.md +73 -0
  24. package/template/.agents/skills/debug/SKILL.md +43 -104
  25. package/template/.agents/skills/deploy/SKILL.md +37 -65
  26. package/template/.agents/skills/devflow/SKILL.md +89 -80
  27. package/template/.agents/skills/idea/SKILL.md +57 -0
  28. package/template/.agents/skills/implement/SKILL.md +64 -0
  29. package/template/.agents/skills/insight/SKILL.md +27 -116
  30. package/template/.agents/skills/overview/SKILL.md +114 -0
  31. package/template/.agents/skills/preview/SKILL.md +24 -103
  32. package/template/.agents/skills/report-html/SKILL.md +45 -0
  33. package/template/.agents/skills/review/SKILL.md +53 -37
  34. package/template/.agents/skills/rollback/SKILL.md +1 -0
  35. package/template/.agents/skills/security-review/SKILL.md +44 -147
  36. package/template/.agents/skills/simplify/SKILL.md +48 -57
  37. package/template/.agents/skills/spec/SKILL.md +105 -0
  38. package/template/.agents/skills/test/SKILL.md +63 -51
  39. package/template/.claude/skills/00-discover/SKILL.md +2 -0
  40. package/template/.claude/skills/60-report/SKILL.md +21 -75
  41. package/template/.claude/skills/70-release/SKILL.md +7 -4
  42. package/template/.claude/skills/check/SKILL.md +68 -0
  43. package/template/.claude/skills/ci/SKILL.md +25 -78
  44. package/template/.claude/skills/commit/SKILL.md +39 -43
  45. package/template/.claude/skills/complete/SKILL.md +73 -0
  46. package/template/.claude/skills/debug/SKILL.md +43 -104
  47. package/template/.claude/skills/deploy/SKILL.md +37 -65
  48. package/template/.claude/skills/devflow/SKILL.md +89 -80
  49. package/template/.claude/skills/idea/SKILL.md +57 -0
  50. package/template/.claude/skills/implement/SKILL.md +64 -0
  51. package/template/.claude/skills/insight/SKILL.md +27 -116
  52. package/template/.claude/skills/overview/SKILL.md +114 -0
  53. package/template/.claude/skills/preview/SKILL.md +24 -103
  54. package/template/.claude/skills/report-html/SKILL.md +45 -0
  55. package/template/.claude/skills/review/SKILL.md +53 -37
  56. package/template/.claude/skills/rollback/SKILL.md +1 -0
  57. package/template/.claude/skills/security-review/SKILL.md +44 -147
  58. package/template/.claude/skills/simplify/SKILL.md +48 -57
  59. package/template/.claude/skills/spec/SKILL.md +105 -0
  60. package/template/.claude/skills/test/SKILL.md +63 -51
  61. package/template/AGENTS.md +71 -74
  62. package/template/devflow/context/ai-interaction.md +1 -0
  63. package/template/devflow/context/coding-standards.md +31 -18
  64. package/template/devflow/context/current-stage.md +3 -3
  65. package/template/devflow/context/findings.md +10 -6
  66. package/template/devflow/context/project-overview.md +29 -11
  67. package/template/devflow/discoveries/.gitkeep +0 -0
  68. package/template/devflow/history/HISTORY.md +31 -0
  69. package/template/devflow/ideas.md +15 -0
  70. package/template/devflow/reference/running-id-contract.md +1 -1
  71. package/template/devflow/runs/.gitkeep +0 -0
  72. package/bin/create-nexus-devflow.js +0 -287
  73. package/lib/starter-templates.js +0 -111
  74. package/lib/update.js +0 -379
  75. package/template/.agents/skills/9arm-skills/README.md +0 -51
  76. package/template/.agents/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
  77. package/template/.agents/skills/9arm-skills/management-talk/SKILL.md +0 -79
  78. package/template/.agents/skills/9arm-skills/post-mortem/SKILL.md +0 -71
  79. package/template/.agents/skills/9arm-skills/scrutinize/SKILL.md +0 -72
  80. package/template/.agents/skills/browser-testing-with-devtools/SKILL.md +0 -302
  81. package/template/.agents/skills/ci-cd-and-automation/SKILL.md +0 -390
  82. package/template/.agents/skills/code-review-and-quality/SKILL.md +0 -392
  83. package/template/.agents/skills/code-simplification/SKILL.md +0 -331
  84. package/template/.agents/skills/debugging-and-error-recovery/SKILL.md +0 -298
  85. package/template/.agents/skills/deployment-procedures/SKILL.md +0 -241
  86. package/template/.agents/skills/deprecation-and-migration/SKILL.md +0 -206
  87. package/template/.agents/skills/diagnosing-bugs/SKILL.md +0 -93
  88. package/template/.agents/skills/git-workflow-and-versioning/SKILL.md +0 -300
  89. package/template/.agents/skills/human-review-decisions/SKILL.md +0 -74
  90. package/template/.agents/skills/idea-refine/SKILL.md +0 -178
  91. package/template/.agents/skills/idea-refine/examples.md +0 -238
  92. package/template/.agents/skills/idea-refine/frameworks.md +0 -99
  93. package/template/.agents/skills/idea-refine/refinement-criteria.md +0 -113
  94. package/template/.agents/skills/idea-refine/scripts/idea-refine.sh +0 -15
  95. package/template/.agents/skills/incremental-implementation/SKILL.md +0 -248
  96. package/template/.agents/skills/insight-capture/SKILL.md +0 -84
  97. package/template/.agents/skills/intelligent-routing/SKILL.md +0 -176
  98. package/template/.agents/skills/md2html/SKILL.md +0 -154
  99. package/template/.agents/skills/md2html/components.md +0 -505
  100. package/template/.agents/skills/md2html/template.html +0 -1152
  101. package/template/.agents/skills/planning-and-task-breakdown/SKILL.md +0 -239
  102. package/template/.agents/skills/pr-review/SKILL.md +0 -143
  103. package/template/.agents/skills/pr-review-analysis/SKILL.md +0 -89
  104. package/template/.agents/skills/preview-local-check/SKILL.md +0 -59
  105. package/template/.agents/skills/release-git-operations/SKILL.md +0 -97
  106. package/template/.agents/skills/review-followup-routing/SKILL.md +0 -98
  107. package/template/.agents/skills/security-and-hardening/SKILL.md +0 -349
  108. package/template/.agents/skills/security-and-hardening/security-checklist.md +0 -134
  109. package/template/.agents/skills/shipping-and-launch/SKILL.md +0 -311
  110. package/template/.agents/skills/silent-failure-audit/SKILL.md +0 -73
  111. package/template/.agents/skills/spec-orchestration/SKILL.md +0 -91
  112. package/template/.agents/skills/specialist-agent-routing/SKILL.md +0 -107
  113. package/template/.agents/skills/test-driven-development/SKILL.md +0 -422
  114. package/template/.agents/skills/test-driven-development/testing-patterns.md +0 -236
  115. package/template/.agents/skills/test-execution-and-coverage/SKILL.md +0 -56
  116. package/template/.agents/skills/using-agent-skills/SKILL.md +0 -171
  117. package/template/.agents/skills/verification-orchestration/SKILL.md +0 -68
  118. package/template/.agents/skills/vulnerability-scanner/SKILL.md +0 -276
  119. package/template/.agents/skills/vulnerability-scanner/checklists.md +0 -121
  120. package/template/.agents/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  121. package/template/.agents/skills/wiki/SKILL.md +0 -149
  122. package/template/.agents/skills/workflow-documentation-sync/SKILL.md +0 -87
  123. package/template/.claude/skills/9arm-skills/README.md +0 -51
  124. package/template/.claude/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
  125. package/template/.claude/skills/9arm-skills/management-talk/SKILL.md +0 -79
  126. package/template/.claude/skills/9arm-skills/post-mortem/SKILL.md +0 -71
  127. package/template/.claude/skills/9arm-skills/scrutinize/SKILL.md +0 -72
  128. package/template/.claude/skills/browser-testing-with-devtools/SKILL.md +0 -302
  129. package/template/.claude/skills/ci-cd-and-automation/SKILL.md +0 -390
  130. package/template/.claude/skills/code-review-and-quality/SKILL.md +0 -392
  131. package/template/.claude/skills/code-simplification/SKILL.md +0 -331
  132. package/template/.claude/skills/debugging-and-error-recovery/SKILL.md +0 -298
  133. package/template/.claude/skills/deployment-procedures/SKILL.md +0 -241
  134. package/template/.claude/skills/deprecation-and-migration/SKILL.md +0 -206
  135. package/template/.claude/skills/diagnosing-bugs/SKILL.md +0 -93
  136. package/template/.claude/skills/git-workflow-and-versioning/SKILL.md +0 -300
  137. package/template/.claude/skills/human-review-decisions/SKILL.md +0 -74
  138. package/template/.claude/skills/idea-refine/SKILL.md +0 -178
  139. package/template/.claude/skills/idea-refine/examples.md +0 -238
  140. package/template/.claude/skills/idea-refine/frameworks.md +0 -99
  141. package/template/.claude/skills/idea-refine/refinement-criteria.md +0 -113
  142. package/template/.claude/skills/idea-refine/scripts/idea-refine.sh +0 -15
  143. package/template/.claude/skills/incremental-implementation/SKILL.md +0 -248
  144. package/template/.claude/skills/insight-capture/SKILL.md +0 -84
  145. package/template/.claude/skills/intelligent-routing/SKILL.md +0 -176
  146. package/template/.claude/skills/md2html/SKILL.md +0 -154
  147. package/template/.claude/skills/md2html/components.md +0 -505
  148. package/template/.claude/skills/md2html/template.html +0 -1152
  149. package/template/.claude/skills/planning-and-task-breakdown/SKILL.md +0 -239
  150. package/template/.claude/skills/pr-review/SKILL.md +0 -143
  151. package/template/.claude/skills/pr-review-analysis/SKILL.md +0 -89
  152. package/template/.claude/skills/preview-local-check/SKILL.md +0 -59
  153. package/template/.claude/skills/release-git-operations/SKILL.md +0 -97
  154. package/template/.claude/skills/review-followup-routing/SKILL.md +0 -98
  155. package/template/.claude/skills/security-and-hardening/SKILL.md +0 -349
  156. package/template/.claude/skills/security-and-hardening/security-checklist.md +0 -134
  157. package/template/.claude/skills/shipping-and-launch/SKILL.md +0 -311
  158. package/template/.claude/skills/silent-failure-audit/SKILL.md +0 -73
  159. package/template/.claude/skills/spec-orchestration/SKILL.md +0 -91
  160. package/template/.claude/skills/specialist-agent-routing/SKILL.md +0 -107
  161. package/template/.claude/skills/test-driven-development/SKILL.md +0 -422
  162. package/template/.claude/skills/test-driven-development/testing-patterns.md +0 -236
  163. package/template/.claude/skills/test-execution-and-coverage/SKILL.md +0 -56
  164. package/template/.claude/skills/using-agent-skills/SKILL.md +0 -171
  165. package/template/.claude/skills/verification-orchestration/SKILL.md +0 -68
  166. package/template/.claude/skills/vulnerability-scanner/SKILL.md +0 -276
  167. package/template/.claude/skills/vulnerability-scanner/checklists.md +0 -121
  168. package/template/.claude/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  169. package/template/.claude/skills/wiki/SKILL.md +0 -149
  170. package/template/.claude/skills/workflow-documentation-sync/SKILL.md +0 -87
  171. package/template/.nexus/nexus-devflow.json +0 -44
@@ -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`
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: complete
3
+ description: "[Devflow] Fast-Track Complete stage in DevFlow (Blueprint Mode) - perform final safety pass, record release digest in spec.md, git merge, and close run without auto HTML generation."
4
+ argument-hint: "{running-id or workspace path}"
5
+ ---
6
+
7
+ # Fast-Track: Complete (Blueprint Mode)
8
+
9
+ $ARGUMENTS
10
+
11
+ Final delivery, safety pass, and run closure stage in Fast-Track. Validates verification status, records the Release Digest into `spec.md`, performs git merge, and marks the run as completed **without auto-generating HTML reports**.
12
+
13
+ ## Invocations & Aliases
14
+
15
+ - `/complete`: Complete current active run
16
+ - `/complete {running-id}`: Complete specified running ID
17
+ - `$complete`: Codex CLI invocation
18
+
19
+ ## Fast-Track Mainline Workflow
20
+
21
+ ```text
22
+ /spec ──▶ /implement ──▶ /check ──▶ /complete
23
+ ```
24
+
25
+ ## Behavior & Contract
26
+
27
+ When invoked:
28
+
29
+ ### 1. Validate Delivery Pre-conditions
30
+ 1. Identify active Running ID from `devflow/context/current-stage.md` or argument.
31
+ 2. Read `devflow/runs/{RUNNING_ID}/spec.md`.
32
+ 3. Confirm:
33
+ - All checklist items in `## 3. Implementation Checklist` are marked `- [x]`.
34
+ - `## 5. Verification Evidence` contains passing verification results.
35
+
36
+ ### 2. Final Safety Pass & Changelog
37
+ 1. Verify working directory hygiene (no accidental leftover test files or debug statements).
38
+ 2. Update `CHANGELOG.md` with release summary under the current version if applicable.
39
+
40
+ ### 3. Update Living Spec (`spec.md`)
41
+ Append or update `## 6. Release & Handoff` in `spec.md` in **Thai (`th`)**:
42
+
43
+ ```markdown
44
+ ## 6. Release & Handoff
45
+ - **Release Digest**: สรุปสิ่งที่ส่งมอบในรอบนี้
46
+ - **Git Branch**: `{branch_name}`
47
+ - **Merge Status**: Merged into `main` (Commit `{commit_hash}`)
48
+ - **Artifact Contract**: Fast-Track Single Living Spec completed.
49
+ ```
50
+ Update header status in `spec.md`: `> **Status**: Completed`.
51
+
52
+ ### 4. Policy on HTML Reports (Strict Rule)
53
+ > [!IMPORTANT]
54
+ > **No Auto-Generated HTML**: ห้ามสร้างไฟล์ `report.html` หรือ `60-report.html` แบบอัตโนมัติในขั้นตอนนี้โดยเด็ดขาด!
55
+ > หากผู้ใช้ต้องการดู HTML Dashboard สวยงาม ให้แจ้งผู้ใช้ว่าสามารถเรียกคำสั่งแยกได้: `/report:html`
56
+
57
+ ### 5. Git Merge & Branch Cleanup
58
+ 1. Commit all modified tracking files (including `spec.md` and `current-stage.md`).
59
+ 2. Merge feature branch into target base branch (`main` / `master`).
60
+
61
+ ### 6. Close Active Run
62
+ Update `devflow/context/current-stage.md`:
63
+ - `Active Running ID`: `None (Idle)`
64
+ - `Current Stage`: `Idle (Ready for new /spec, /feature, /fix, or /00-discover)`
65
+ - `Last Completed Run`: `{RUNNING_ID} ({YYYY-MM-DD})`
66
+ - `Last Updated`: `{YYYY-MM-DD}`
67
+
68
+ ### 7. Output Completion Report
69
+ Report to the user:
70
+ - Run successfully completed and merged
71
+ - Living Spec path: `devflow/runs/{RUNNING_ID}/spec.md`
72
+ - Standalone HTML command tip: `/report:html` (if HTML view is desired)
73
+ - Workspace is now Idle and ready for the next task.
@@ -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`