@jakkrichm/create-nexus-devflow 2.0.11 → 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 (125) hide show
  1. package/bin/create-nexus-devflow.js +15 -3
  2. package/lib/update.js +15 -1
  3. package/package.json +1 -1
  4. package/template/.agents/skills/70-release/SKILL.md +2 -0
  5. package/template/.agents/skills/ci/SKILL.md +25 -78
  6. package/template/.agents/skills/commit/SKILL.md +39 -43
  7. package/template/.agents/skills/debug/SKILL.md +43 -104
  8. package/template/.agents/skills/deploy/SKILL.md +37 -65
  9. package/template/.agents/skills/insight/SKILL.md +27 -116
  10. package/template/.agents/skills/preview/SKILL.md +24 -103
  11. package/template/.agents/skills/review/SKILL.md +53 -37
  12. package/template/.agents/skills/rollback/SKILL.md +1 -0
  13. package/template/.agents/skills/security-review/SKILL.md +44 -147
  14. package/template/.agents/skills/simplify/SKILL.md +48 -57
  15. package/template/.agents/skills/test/SKILL.md +63 -51
  16. package/template/.claude/skills/70-release/SKILL.md +2 -0
  17. package/template/.claude/skills/ci/SKILL.md +25 -78
  18. package/template/.claude/skills/commit/SKILL.md +39 -43
  19. package/template/.claude/skills/debug/SKILL.md +43 -104
  20. package/template/.claude/skills/deploy/SKILL.md +37 -65
  21. package/template/.claude/skills/insight/SKILL.md +27 -116
  22. package/template/.claude/skills/preview/SKILL.md +24 -103
  23. package/template/.claude/skills/review/SKILL.md +53 -37
  24. package/template/.claude/skills/rollback/SKILL.md +1 -0
  25. package/template/.claude/skills/security-review/SKILL.md +44 -147
  26. package/template/.claude/skills/simplify/SKILL.md +48 -57
  27. package/template/.claude/skills/test/SKILL.md +63 -51
  28. package/template/devflow/history/HISTORY.md +27 -0
  29. package/template/devflow/reference/running-id-contract.md +1 -1
  30. package/template/.agents/skills/9arm-skills/README.md +0 -51
  31. package/template/.agents/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
  32. package/template/.agents/skills/9arm-skills/management-talk/SKILL.md +0 -79
  33. package/template/.agents/skills/9arm-skills/post-mortem/SKILL.md +0 -71
  34. package/template/.agents/skills/9arm-skills/scrutinize/SKILL.md +0 -72
  35. package/template/.agents/skills/browser-testing-with-devtools/SKILL.md +0 -302
  36. package/template/.agents/skills/ci-cd-and-automation/SKILL.md +0 -390
  37. package/template/.agents/skills/code-review-and-quality/SKILL.md +0 -392
  38. package/template/.agents/skills/code-simplification/SKILL.md +0 -331
  39. package/template/.agents/skills/debugging-and-error-recovery/SKILL.md +0 -298
  40. package/template/.agents/skills/deployment-procedures/SKILL.md +0 -241
  41. package/template/.agents/skills/deprecation-and-migration/SKILL.md +0 -206
  42. package/template/.agents/skills/diagnosing-bugs/SKILL.md +0 -93
  43. package/template/.agents/skills/git-workflow-and-versioning/SKILL.md +0 -300
  44. package/template/.agents/skills/human-review-decisions/SKILL.md +0 -74
  45. package/template/.agents/skills/idea-refine/SKILL.md +0 -178
  46. package/template/.agents/skills/idea-refine/examples.md +0 -238
  47. package/template/.agents/skills/idea-refine/frameworks.md +0 -99
  48. package/template/.agents/skills/idea-refine/refinement-criteria.md +0 -113
  49. package/template/.agents/skills/idea-refine/scripts/idea-refine.sh +0 -15
  50. package/template/.agents/skills/incremental-implementation/SKILL.md +0 -248
  51. package/template/.agents/skills/insight-capture/SKILL.md +0 -84
  52. package/template/.agents/skills/intelligent-routing/SKILL.md +0 -176
  53. package/template/.agents/skills/md2html/SKILL.md +0 -154
  54. package/template/.agents/skills/md2html/components.md +0 -505
  55. package/template/.agents/skills/md2html/template.html +0 -1152
  56. package/template/.agents/skills/planning-and-task-breakdown/SKILL.md +0 -239
  57. package/template/.agents/skills/pr-review/SKILL.md +0 -143
  58. package/template/.agents/skills/pr-review-analysis/SKILL.md +0 -89
  59. package/template/.agents/skills/preview-local-check/SKILL.md +0 -59
  60. package/template/.agents/skills/release-git-operations/SKILL.md +0 -97
  61. package/template/.agents/skills/review-followup-routing/SKILL.md +0 -98
  62. package/template/.agents/skills/security-and-hardening/SKILL.md +0 -349
  63. package/template/.agents/skills/security-and-hardening/security-checklist.md +0 -134
  64. package/template/.agents/skills/shipping-and-launch/SKILL.md +0 -311
  65. package/template/.agents/skills/silent-failure-audit/SKILL.md +0 -73
  66. package/template/.agents/skills/spec-orchestration/SKILL.md +0 -91
  67. package/template/.agents/skills/specialist-agent-routing/SKILL.md +0 -107
  68. package/template/.agents/skills/test-driven-development/SKILL.md +0 -422
  69. package/template/.agents/skills/test-driven-development/testing-patterns.md +0 -236
  70. package/template/.agents/skills/test-execution-and-coverage/SKILL.md +0 -56
  71. package/template/.agents/skills/using-agent-skills/SKILL.md +0 -171
  72. package/template/.agents/skills/verification-orchestration/SKILL.md +0 -68
  73. package/template/.agents/skills/vulnerability-scanner/SKILL.md +0 -276
  74. package/template/.agents/skills/vulnerability-scanner/checklists.md +0 -121
  75. package/template/.agents/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  76. package/template/.agents/skills/wiki/SKILL.md +0 -149
  77. package/template/.agents/skills/workflow-documentation-sync/SKILL.md +0 -87
  78. package/template/.claude/skills/9arm-skills/README.md +0 -51
  79. package/template/.claude/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
  80. package/template/.claude/skills/9arm-skills/management-talk/SKILL.md +0 -79
  81. package/template/.claude/skills/9arm-skills/post-mortem/SKILL.md +0 -71
  82. package/template/.claude/skills/9arm-skills/scrutinize/SKILL.md +0 -72
  83. package/template/.claude/skills/browser-testing-with-devtools/SKILL.md +0 -302
  84. package/template/.claude/skills/ci-cd-and-automation/SKILL.md +0 -390
  85. package/template/.claude/skills/code-review-and-quality/SKILL.md +0 -392
  86. package/template/.claude/skills/code-simplification/SKILL.md +0 -331
  87. package/template/.claude/skills/debugging-and-error-recovery/SKILL.md +0 -298
  88. package/template/.claude/skills/deployment-procedures/SKILL.md +0 -241
  89. package/template/.claude/skills/deprecation-and-migration/SKILL.md +0 -206
  90. package/template/.claude/skills/diagnosing-bugs/SKILL.md +0 -93
  91. package/template/.claude/skills/git-workflow-and-versioning/SKILL.md +0 -300
  92. package/template/.claude/skills/human-review-decisions/SKILL.md +0 -74
  93. package/template/.claude/skills/idea-refine/SKILL.md +0 -178
  94. package/template/.claude/skills/idea-refine/examples.md +0 -238
  95. package/template/.claude/skills/idea-refine/frameworks.md +0 -99
  96. package/template/.claude/skills/idea-refine/refinement-criteria.md +0 -113
  97. package/template/.claude/skills/idea-refine/scripts/idea-refine.sh +0 -15
  98. package/template/.claude/skills/incremental-implementation/SKILL.md +0 -248
  99. package/template/.claude/skills/insight-capture/SKILL.md +0 -84
  100. package/template/.claude/skills/intelligent-routing/SKILL.md +0 -176
  101. package/template/.claude/skills/md2html/SKILL.md +0 -154
  102. package/template/.claude/skills/md2html/components.md +0 -505
  103. package/template/.claude/skills/md2html/template.html +0 -1152
  104. package/template/.claude/skills/planning-and-task-breakdown/SKILL.md +0 -239
  105. package/template/.claude/skills/pr-review/SKILL.md +0 -143
  106. package/template/.claude/skills/pr-review-analysis/SKILL.md +0 -89
  107. package/template/.claude/skills/preview-local-check/SKILL.md +0 -59
  108. package/template/.claude/skills/release-git-operations/SKILL.md +0 -97
  109. package/template/.claude/skills/review-followup-routing/SKILL.md +0 -98
  110. package/template/.claude/skills/security-and-hardening/SKILL.md +0 -349
  111. package/template/.claude/skills/security-and-hardening/security-checklist.md +0 -134
  112. package/template/.claude/skills/shipping-and-launch/SKILL.md +0 -311
  113. package/template/.claude/skills/silent-failure-audit/SKILL.md +0 -73
  114. package/template/.claude/skills/spec-orchestration/SKILL.md +0 -91
  115. package/template/.claude/skills/specialist-agent-routing/SKILL.md +0 -107
  116. package/template/.claude/skills/test-driven-development/SKILL.md +0 -422
  117. package/template/.claude/skills/test-driven-development/testing-patterns.md +0 -236
  118. package/template/.claude/skills/test-execution-and-coverage/SKILL.md +0 -56
  119. package/template/.claude/skills/using-agent-skills/SKILL.md +0 -171
  120. package/template/.claude/skills/verification-orchestration/SKILL.md +0 -68
  121. package/template/.claude/skills/vulnerability-scanner/SKILL.md +0 -276
  122. package/template/.claude/skills/vulnerability-scanner/checklists.md +0 -121
  123. package/template/.claude/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  124. package/template/.claude/skills/wiki/SKILL.md +0 -149
  125. package/template/.claude/skills/workflow-documentation-sync/SKILL.md +0 -87
@@ -3,77 +3,68 @@ name: simplify
3
3
  description: "[Devflow] Code simplification and refactoring for clarity and maintainability without altering runtime behavior."
4
4
  ---
5
5
 
6
- ---
7
- description: Simplify code for clarity and maintainability while preserving behavior.
8
- ---
9
-
10
- # Simplify - Code Simplification And Refactoring
6
+ # Code Simplification & Refactoring
11
7
 
12
- Invoke the `code-simplification` skill.
8
+ ## Overview
13
9
 
14
- Primary behavior already lives in:
15
-
16
- ```text
17
- .agents/skills/code-simplification/SKILL.md
18
- ```
10
+ This is the comprehensive code simplification master skill for Nexus-DevFlow. It reduces cognitive load, cleans up unnecessary abstractions, flattens deep nesting, and removes dead code while **preserving 100% exact runtime behavior**.
19
11
 
20
- Treat this workflow file as a wrapper around that skill.
12
+ **Core Rule**: Every simplification must pass: *"Would a new team member understand this faster than the original, without any behavioral regression?"*
21
13
 
22
- Use this workflow when the code works but has grown harder to read, harder to change, or more general than necessary.
14
+ ---
23
15
 
24
- In DevFlow 2.0, `Simplify` is a supporting implementation workflow. It usually pairs with `40-implement` and should end in `50-verify`.
16
+ ## 1. The Five Principles of Simplification
25
17
 
26
- ## Process
18
+ 1. **Preserve Behavior Exactly**: Same inputs, outputs, error conditions, side effects, and ordering.
19
+ 2. **Follow Project Conventions**: Consistency with neighboring files beats personal style preferences.
20
+ 3. **Delete Dead & Unused Code**: Remove abandoned helpers, dead branch paths, and leftover debugging code.
21
+ 4. **Flatten Control Flow**: Replace nested conditionals and callback pyramids with guard clauses and early returns.
22
+ 5. **Eliminate Speculative Generalization**: Replace single-use abstractions with clear, direct implementations.
27
23
 
28
- 1. Read project instructions and study local conventions.
29
- 2. Identify the target code: recent changes unless a broader scope is specified.
30
- 3. Understand purpose, callers, edge cases, and test coverage before touching it.
31
- 4. Scan for simplification opportunities:
32
- - deep nesting to guard clauses or extracted helpers
33
- - long functions to responsibility-based splits
34
- - nested ternaries to clearer control flow
35
- - vague names to descriptive names
36
- - duplicated logic to shared helpers
37
- - dead code to removal after confirmation
38
- - speculative abstraction to simpler concrete flow
39
- 5. Inspect `.agent/resources/schemas/refactoring.template.md` before generating a report.
40
- 6. Apply each simplification incrementally and run verification after each meaningful change.
41
- 7. Save the refactoring report to:
24
+ ---
42
25
 
43
- ```text
44
- devflow/reports/{date}-refactoring-{slug}.md
26
+ ## 2. High-Impact Simplification Techniques
27
+
28
+ ### A. Guard Clauses Over Nested Conditionals
29
+ ```typescript
30
+ // Before: Deep indentation
31
+ function processOrder(order) {
32
+ if (order) {
33
+ if (order.isValid) {
34
+ if (order.isPaid) {
35
+ return fulfill(order);
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ // After: Early returns
42
+ function processOrder(order) {
43
+ if (!order || !order.isValid) return;
44
+ if (!order.isPaid) return;
45
+ return fulfill(order);
46
+ }
45
47
  ```
46
48
 
47
- 8. Verify tests pass, the build succeeds, and the diff stays behavior-preserving.
48
-
49
- If tests fail after a simplification, revert that specific change and reconsider.
49
+ ### B. Inline Single-Use Helpers & Dead Shims
50
+ If a helper function is only called once and adds indirection without semantic clarity, inline it directly.
50
51
 
51
- ## Output
52
+ ### C. Remove Dead Code & Leftover Comments
53
+ Delete commented-out code blocks, `// removed` notes, and unused variables (`_unused`). Version control (Git) remembers the history.
52
54
 
53
- Return:
54
-
55
- - what was simplified
56
- - what was intentionally left alone
57
- - validation evidence
58
- - remaining risks or debt
59
-
60
- ## Relationship To DevFlow 2.0
61
-
62
- - Classification: Companion command
63
- - Mainline status: Not a numbered stage
64
- - Typical entry points: `40-implement`, `50-verify`, `PR-Review`, `Agent`
65
- - Typical handoff targets: `40-implement`, `50-verify`, `PR-Review`
55
+ ---
66
56
 
67
- ## Sources
57
+ ## 3. Verification & Safety Loop
68
58
 
69
- - `AGENTS.md`
70
- - `.agents/skills/code-simplification/SKILL.md`
71
- - `.agent/resources/schemas/refactoring.template.md`
72
- - Related commands: `40-implement`, `50-verify`, `PR-Review`, `Agent`
59
+ 1. Run unit tests before touching code (`npm test` -> GREEN).
60
+ 2. Apply one small refactoring step at a time.
61
+ 3. Rerun tests immediately after each step. If tests break, revert and reconsider.
62
+ 4. Verify overall build and linter checks.
73
63
 
74
- ## Next Workflow Recommendation
64
+ ---
75
65
 
76
- - **Primary**: `50-verify`
77
- - **Why**: simplification should finish with explicit proof that behavior did not regress
78
- - **Alternative**: `40-implement` when simplification exposed a deeper implementation change rather than a pure refactor
66
+ ## Relationship To DevFlow 2.0
79
67
 
68
+ - **Classification**: Companion command & Refactoring support
69
+ - **Mainline integration**: Used during `40-implement` (Refactor step of TDD) or `50-verify`.
70
+ - **Handoff**: `50-verify` (proves zero regressions).
@@ -1,82 +1,94 @@
1
1
  ---
2
2
  name: test
3
- description: "[Devflow] Test execution, missing test generation, and coverage analysis across unit, integration, and smoke test suites."
3
+ description: "[Devflow] Test-driven development, test generation, test execution, and coverage analysis across unit, integration, and smoke test suites."
4
4
  ---
5
5
 
6
- ---
7
- description: Test Generation and Execution - Generates missing tests, runs existing test suites, or checks test coverage for the project.
8
- ---
9
- # ๐Ÿงช Test Generation and Execution
10
-
11
- ## Usage: `/13-Test [target]`
6
+ # Test-Driven Development, Generation & Execution
12
7
 
13
- Generates missing tests, runs existing test suites, or checks test coverage for the project.
8
+ ## Overview
14
9
 
15
- Primary behavior now lives in:
10
+ This is the comprehensive testing master skill for Nexus-DevFlow. It drives development with tests (TDD), handles test generation, execution, coverage analysis, and bug reproduction. Tests are proof — "seems right" is not done.
16
11
 
17
12
  ```text
18
- .agents/skills/test-execution-and-coverage/SKILL.md
13
+ RED GREEN REFACTOR
14
+ Write a test Write minimal code Clean up the
15
+ that fails ──→ to make it pass ──→ implementation ──→ (repeat)
16
+ │ │ │
17
+ ▼ ▼ ▼
18
+ Test FAILS Test PASSES Tests still PASS
19
19
  ```
20
20
 
21
- Treat this workflow file as a compatibility wrapper around that skill.
21
+ ## Usage & Sub-Commands
22
+
23
+ - `/test` - Run all project test suites
24
+ - `/test [file/feature]` - Generate tests for a specific target
25
+ - `/test coverage` - Show test coverage report
26
+ - `/test watch` - Run tests in watch mode
22
27
 
23
28
  ---
24
29
 
25
- ## ๐Ÿ› ๏ธ Sub-commands
30
+ ## 1. The TDD Cycle
31
+
32
+ ### Step 1: RED — Write a Failing Test
33
+ Write the test first. It must fail. A test that passes immediately proves nothing.
34
+
35
+ ### Step 2: GREEN — Make It Pass
36
+ Write the minimum code to make the test pass. Avoid premature over-engineering.
26
37
 
27
- - `/13-Test` - Run all tests
28
- - `/13-Test [file/feature]` - Generate tests for a specific target
29
- - `/13-Test coverage` - Show test coverage report
30
- - `/13-Test watch` - Run tests in watch mode
38
+ ### Step 3: REFACTOR — Clean Up
39
+ Improve code readability, naming, structure, and eliminate duplication while keeping tests green.
31
40
 
32
41
  ---
33
42
 
34
- ## ๐Ÿšฆ Internal Process
43
+ ## 2. The Prove-It Pattern (Bug Reproduction)
35
44
 
36
- ### Scenario A: Generate Tests
37
- If the user requests tests for a target:
38
- 1. **Analyze**: Identify functions, edge cases, and external dependencies.
39
- 2. **Template Verification**: **MANDATORY:** Before generating the test plan, inspect `.agent/resources/schemas/test_report.template.md`, preserve its required layout, and replace placeholder text with concrete coverage, command output, failures, and gaps.
40
- 3. **Generate Cases**: Develop Happy path, Error cases, Edge cases.
41
- 4. **Write**: Implement the tests using the project's testing framework (Pytest, Jest, Vitest, etc.). Follow the `Arrange-Act-Assert` pattern and mock external dependencies.
42
- 5. **Save Test Report**: Save the test plan and results to `devflow/reports/{date}-test-report-{target}.md` (where `{date}` is today's date in `YYYY-MM-DD` format and `{target}` is a slugified version of the file or feature name).
45
+ When fixing any defect, **do not attempt a fix without proving the bug exists first**:
43
46
 
44
- ### Scenario B: Execute Tests
45
- Use the project's native command (e.g., `npm test`, `pytest`) to run the tests and format the output clearly for the user. Highlight any failed tests with expected vs received values. Save the execution summary report matching the template to `devflow/reports/{date}-test-report-run.md` (where `{date}` is today's date in `YYYY-MM-DD` format).
47
+ ```text
48
+ Bug report arrives Write reproduction test (FAILS) Implement fix Test PASSES Guard regression
49
+ ```
46
50
 
47
51
  ---
48
52
 
49
- ## ๐Ÿ›ก๏ธ Key Principles
50
- - **Test behavior, not implementation.**
51
- - **One assertion per test** (when practical).
52
- - **Descriptive test names.**
53
- - **Arrange-Act-Assert pattern.**
54
- - **Save Report**: Always save the test plan or results to disk for persistent logging.
53
+ ## 3. The Test Pyramid & Resource Sizes
55
54
 
56
- ## ๐Ÿ“ Output Formats
55
+ | Level | Size | Target % | Scope & Characteristics |
56
+ | :--- | :--- | :--- | :--- |
57
+ | **Unit** | Small | ~80% | Pure logic, in-memory, single process, milliseconds each |
58
+ | **Integration** | Medium | ~15% | API boundaries, database interaction, component seams |
59
+ | **E2E** | Large | ~5% | Critical user journeys, full workflows, browser automation |
57
60
 
58
- ### For Test Generation
59
- Generate a summary indicating:
60
- - **Test Plan**: Table of Test Case, Type, Coverage (Happy path, error case, validation)
61
- - **Generated Tests**: File path and the code block
62
- - **Report Location**: Confirm the report has been written to the specified workspace path.
63
- - **Run command**: e.g. `npm test`
61
+ ---
64
62
 
65
- ### For Test Execution
66
- Display an organized output listing Passed/Failed files, and explicitly show the expectation vs received outcome for failed assertions.
63
+ ## 4. Key Testing Principles & Best Practices
67
64
 
68
- ## Relationship To DevFlow 2.0
65
+ 1. **Test behavior, not implementation details**: Assert on output and state changes, not private method call sequences.
66
+ 2. **DAMP over DRY in tests**: Descriptive and meaningful test setup beats overly abstract shared helpers.
67
+ 3. **Arrange-Act-Assert**: Distinct setup, action, and verification phases in every test case.
68
+ 4. **Prefer real implementations & fakes over heavy mocks**: Mock only at boundaries where real dependencies are slow or non-deterministic.
69
+ 5. **One assertion concept per test**: Isolate test failure reasons clearly.
69
70
 
70
- - Classification: Companion command
71
- - Mainline status: Verification support command, not a numbered stage
72
- - Typical entry points: `40-implement`, `50-verify`, `Debug`
73
- - Typical handoff targets: `50-verify`, `Debug`, `QA-Orchestrate`
71
+ ---
72
+
73
+ ## 5. Browser Testing & Runtime Verification
74
+
75
+ For browser and UI features, unit tests alone are insufficient:
76
+ - **Console**: Zero errors and unhandled exceptions in production code.
77
+ - **Network**: Accurate status codes, payload shapes, and CORS handling.
78
+ - **DOM & Styles**: Verified layout rendering, accessibility tree, and responsive behaviors.
79
+
80
+ ---
81
+
82
+ ## 6. Test Generation & Persistent Execution Reports
74
83
 
75
- ## Sources
84
+ When generating or logging test runs during `40-implement` or `50-verify`:
85
+ - Save summary reports to `devflow/reports/{date}-test-report-{slug}.md`
86
+ - Include: Target, Test Cases (Happy Path, Error, Edge Cases), Pass/Fail statistics, and gaps/risks.
76
87
 
77
- - `AGENTS.md`
78
- - `.agents/skills/test-execution-and-coverage/SKILL.md`
79
- - `.agent/resources/schemas/test_report.template.md`
80
- - Related commands: `40-implement`, `50-verify`, `Debug`, `QA-Orchestrate`
88
+ ---
81
89
 
90
+ ## Relationship To DevFlow 2.0
82
91
 
92
+ - **Classification**: Companion command & Engineering standard
93
+ - **Mainline stages**: `30-plan` (TDD decisions), `40-implement` (TDD execution), `50-verify` (QA gate)
94
+ - **Handoff**: `50-verify`, `Debug`, `autopilot`
@@ -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`