@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.
- package/lib/update.js +15 -1
- package/package.json +1 -1
- package/template/.agents/skills/70-release/SKILL.md +2 -0
- package/template/.agents/skills/ci/SKILL.md +25 -78
- package/template/.agents/skills/commit/SKILL.md +39 -43
- package/template/.agents/skills/debug/SKILL.md +43 -104
- package/template/.agents/skills/deploy/SKILL.md +37 -65
- package/template/.agents/skills/insight/SKILL.md +27 -116
- package/template/.agents/skills/preview/SKILL.md +24 -103
- package/template/.agents/skills/review/SKILL.md +53 -37
- package/template/.agents/skills/rollback/SKILL.md +1 -0
- package/template/.agents/skills/security-review/SKILL.md +44 -147
- package/template/.agents/skills/simplify/SKILL.md +48 -57
- package/template/.agents/skills/test/SKILL.md +63 -51
- package/template/.claude/skills/70-release/SKILL.md +2 -0
- package/template/.claude/skills/ci/SKILL.md +25 -78
- package/template/.claude/skills/commit/SKILL.md +39 -43
- package/template/.claude/skills/debug/SKILL.md +43 -104
- package/template/.claude/skills/deploy/SKILL.md +37 -65
- package/template/.claude/skills/insight/SKILL.md +27 -116
- package/template/.claude/skills/preview/SKILL.md +24 -103
- package/template/.claude/skills/review/SKILL.md +53 -37
- package/template/.claude/skills/rollback/SKILL.md +1 -0
- package/template/.claude/skills/security-review/SKILL.md +44 -147
- package/template/.claude/skills/simplify/SKILL.md +48 -57
- package/template/.claude/skills/test/SKILL.md +63 -51
- package/template/devflow/history/HISTORY.md +27 -0
- package/template/devflow/reference/running-id-contract.md +1 -1
- package/template/.agents/skills/9arm-skills/README.md +0 -51
- package/template/.agents/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
- package/template/.agents/skills/9arm-skills/management-talk/SKILL.md +0 -79
- package/template/.agents/skills/9arm-skills/post-mortem/SKILL.md +0 -71
- package/template/.agents/skills/9arm-skills/scrutinize/SKILL.md +0 -72
- package/template/.agents/skills/browser-testing-with-devtools/SKILL.md +0 -302
- package/template/.agents/skills/ci-cd-and-automation/SKILL.md +0 -390
- package/template/.agents/skills/code-review-and-quality/SKILL.md +0 -392
- package/template/.agents/skills/code-simplification/SKILL.md +0 -331
- package/template/.agents/skills/debugging-and-error-recovery/SKILL.md +0 -298
- package/template/.agents/skills/deployment-procedures/SKILL.md +0 -241
- package/template/.agents/skills/deprecation-and-migration/SKILL.md +0 -206
- package/template/.agents/skills/diagnosing-bugs/SKILL.md +0 -93
- package/template/.agents/skills/git-workflow-and-versioning/SKILL.md +0 -300
- package/template/.agents/skills/human-review-decisions/SKILL.md +0 -74
- package/template/.agents/skills/idea-refine/SKILL.md +0 -178
- package/template/.agents/skills/idea-refine/examples.md +0 -238
- package/template/.agents/skills/idea-refine/frameworks.md +0 -99
- package/template/.agents/skills/idea-refine/refinement-criteria.md +0 -113
- package/template/.agents/skills/idea-refine/scripts/idea-refine.sh +0 -15
- package/template/.agents/skills/incremental-implementation/SKILL.md +0 -248
- package/template/.agents/skills/insight-capture/SKILL.md +0 -84
- package/template/.agents/skills/intelligent-routing/SKILL.md +0 -176
- package/template/.agents/skills/md2html/SKILL.md +0 -154
- package/template/.agents/skills/md2html/components.md +0 -505
- package/template/.agents/skills/md2html/template.html +0 -1152
- package/template/.agents/skills/planning-and-task-breakdown/SKILL.md +0 -239
- package/template/.agents/skills/pr-review/SKILL.md +0 -143
- package/template/.agents/skills/pr-review-analysis/SKILL.md +0 -89
- package/template/.agents/skills/preview-local-check/SKILL.md +0 -59
- package/template/.agents/skills/release-git-operations/SKILL.md +0 -97
- package/template/.agents/skills/review-followup-routing/SKILL.md +0 -98
- package/template/.agents/skills/security-and-hardening/SKILL.md +0 -349
- package/template/.agents/skills/security-and-hardening/security-checklist.md +0 -134
- package/template/.agents/skills/shipping-and-launch/SKILL.md +0 -311
- package/template/.agents/skills/silent-failure-audit/SKILL.md +0 -73
- package/template/.agents/skills/spec-orchestration/SKILL.md +0 -91
- package/template/.agents/skills/specialist-agent-routing/SKILL.md +0 -107
- package/template/.agents/skills/test-driven-development/SKILL.md +0 -422
- package/template/.agents/skills/test-driven-development/testing-patterns.md +0 -236
- package/template/.agents/skills/test-execution-and-coverage/SKILL.md +0 -56
- package/template/.agents/skills/using-agent-skills/SKILL.md +0 -171
- package/template/.agents/skills/verification-orchestration/SKILL.md +0 -68
- package/template/.agents/skills/vulnerability-scanner/SKILL.md +0 -276
- package/template/.agents/skills/vulnerability-scanner/checklists.md +0 -121
- package/template/.agents/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
- package/template/.agents/skills/wiki/SKILL.md +0 -149
- package/template/.agents/skills/workflow-documentation-sync/SKILL.md +0 -87
- package/template/.claude/skills/9arm-skills/README.md +0 -51
- package/template/.claude/skills/9arm-skills/debug-mantra/SKILL.md +0 -86
- package/template/.claude/skills/9arm-skills/management-talk/SKILL.md +0 -79
- package/template/.claude/skills/9arm-skills/post-mortem/SKILL.md +0 -71
- package/template/.claude/skills/9arm-skills/scrutinize/SKILL.md +0 -72
- package/template/.claude/skills/browser-testing-with-devtools/SKILL.md +0 -302
- package/template/.claude/skills/ci-cd-and-automation/SKILL.md +0 -390
- package/template/.claude/skills/code-review-and-quality/SKILL.md +0 -392
- package/template/.claude/skills/code-simplification/SKILL.md +0 -331
- package/template/.claude/skills/debugging-and-error-recovery/SKILL.md +0 -298
- package/template/.claude/skills/deployment-procedures/SKILL.md +0 -241
- package/template/.claude/skills/deprecation-and-migration/SKILL.md +0 -206
- package/template/.claude/skills/diagnosing-bugs/SKILL.md +0 -93
- package/template/.claude/skills/git-workflow-and-versioning/SKILL.md +0 -300
- package/template/.claude/skills/human-review-decisions/SKILL.md +0 -74
- package/template/.claude/skills/idea-refine/SKILL.md +0 -178
- package/template/.claude/skills/idea-refine/examples.md +0 -238
- package/template/.claude/skills/idea-refine/frameworks.md +0 -99
- package/template/.claude/skills/idea-refine/refinement-criteria.md +0 -113
- package/template/.claude/skills/idea-refine/scripts/idea-refine.sh +0 -15
- package/template/.claude/skills/incremental-implementation/SKILL.md +0 -248
- package/template/.claude/skills/insight-capture/SKILL.md +0 -84
- package/template/.claude/skills/intelligent-routing/SKILL.md +0 -176
- package/template/.claude/skills/md2html/SKILL.md +0 -154
- package/template/.claude/skills/md2html/components.md +0 -505
- package/template/.claude/skills/md2html/template.html +0 -1152
- package/template/.claude/skills/planning-and-task-breakdown/SKILL.md +0 -239
- package/template/.claude/skills/pr-review/SKILL.md +0 -143
- package/template/.claude/skills/pr-review-analysis/SKILL.md +0 -89
- package/template/.claude/skills/preview-local-check/SKILL.md +0 -59
- package/template/.claude/skills/release-git-operations/SKILL.md +0 -97
- package/template/.claude/skills/review-followup-routing/SKILL.md +0 -98
- package/template/.claude/skills/security-and-hardening/SKILL.md +0 -349
- package/template/.claude/skills/security-and-hardening/security-checklist.md +0 -134
- package/template/.claude/skills/shipping-and-launch/SKILL.md +0 -311
- package/template/.claude/skills/silent-failure-audit/SKILL.md +0 -73
- package/template/.claude/skills/spec-orchestration/SKILL.md +0 -91
- package/template/.claude/skills/specialist-agent-routing/SKILL.md +0 -107
- package/template/.claude/skills/test-driven-development/SKILL.md +0 -422
- package/template/.claude/skills/test-driven-development/testing-patterns.md +0 -236
- package/template/.claude/skills/test-execution-and-coverage/SKILL.md +0 -56
- package/template/.claude/skills/using-agent-skills/SKILL.md +0 -171
- package/template/.claude/skills/verification-orchestration/SKILL.md +0 -68
- package/template/.claude/skills/vulnerability-scanner/SKILL.md +0 -276
- package/template/.claude/skills/vulnerability-scanner/checklists.md +0 -121
- package/template/.claude/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
- package/template/.claude/skills/wiki/SKILL.md +0 -149
- package/template/.claude/skills/workflow-documentation-sync/SKILL.md +0 -87
|
@@ -1,131 +1,42 @@
|
|
|
1
|
-
---
|
|
2
|
-
|
|
3
|
-
description: "[Devflow] Extract reusable lessons, patterns,
|
|
1
|
+
---
|
|
2
|
+
name: insight
|
|
3
|
+
description: "[Devflow] Extract reusable lessons, architectural patterns, post-mortem incident learning, and token optimizations from completed work."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
## Target: $ARGUMENTS
|
|
9
|
-
|
|
10
|
-
Use this workflow after implementation, QA, human approval, PR review, or a debugging session to preserve useful knowledge for future work.
|
|
11
|
-
|
|
12
|
-
Primary behavior now lives in the `insight-capture` skill. Keep this workflow as the compatibility wrapper and knowledge-capture entry point.
|
|
13
|
-
|
|
14
|
-
## Prompt Source
|
|
15
|
-
|
|
16
|
-
Adapted from:
|
|
17
|
-
|
|
18
|
-
- `insight_extractor.md`
|
|
19
|
-
|
|
20
|
-
Additional credited discipline when the source work is a bug, regression, or incident:
|
|
21
|
-
|
|
22
|
-
- `.agents/skills/9arm-skills/post-mortem/SKILL.md`
|
|
23
|
-
- Source pack: `9arm-skills`
|
|
24
|
-
- Credit: `thananon/9arm-skills`
|
|
25
|
-
- Upstream: https://github.com/thananon/9arm-skills
|
|
26
|
-
- Adapted for: Antigravity IDE / Nexus-DevFlow
|
|
27
|
-
|
|
28
|
-
## Process
|
|
29
|
-
|
|
30
|
-
### 1. Load Evidence
|
|
31
|
-
|
|
32
|
-
Inspect the available evidence:
|
|
33
|
-
|
|
34
|
-
- git diff or recent commits
|
|
35
|
-
- `40-implement.md`
|
|
36
|
-
- `50-verify.md`
|
|
37
|
-
- `70-release.md`
|
|
38
|
-
- `60-report.md`
|
|
39
|
-
- modified files
|
|
40
|
-
- human feedback or PR comments
|
|
41
|
-
|
|
42
|
-
### 2. Extract Reusable Knowledge
|
|
43
|
-
|
|
44
|
-
Capture only actionable knowledge:
|
|
45
|
-
|
|
46
|
-
- file purpose and important changes
|
|
47
|
-
- reusable patterns
|
|
48
|
-
- gotchas and triggers
|
|
49
|
-
- approach outcome
|
|
50
|
-
- alternatives tried
|
|
51
|
-
- context or token usage notes that explain avoidable overhead
|
|
52
|
-
- recommendations for future sessions
|
|
53
|
-
|
|
54
|
-
Avoid generic notes that do not help future work.
|
|
55
|
-
|
|
56
|
-
For bug, regression, or incident work, apply the `post-mortem` lens only after fix and validation evidence exist:
|
|
57
|
-
|
|
58
|
-
- what broke
|
|
59
|
-
- impact
|
|
60
|
-
- reliable repro or timeline
|
|
61
|
-
- root cause
|
|
62
|
-
- fix
|
|
63
|
-
- validation evidence
|
|
64
|
-
- why it slipped through
|
|
65
|
-
- prevention or follow-up
|
|
66
|
-
|
|
67
|
-
### 3. Save Or Route Insights
|
|
68
|
-
|
|
69
|
-
Use the smallest durable destination:
|
|
6
|
+
# Insight Extraction & Post-Mortem Learning
|
|
70
7
|
|
|
71
|
-
|
|
72
|
-
- `devflow/lessons.md` for project-wide lessons
|
|
73
|
-
- `60-report` for final narrative communication before release
|
|
74
|
-
- `70-release` for release-facing notes and execution details
|
|
8
|
+
## Overview
|
|
75
9
|
|
|
76
|
-
|
|
10
|
+
This is the insight and knowledge extraction master skill for Nexus-DevFlow. It captures reusable engineering lessons, architectural patterns, gotchas, post-mortem incident analyses, and token-efficiency notes from completed implementation and verification work.
|
|
77
11
|
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
12
|
+
**9arm Post-Mortem Pattern**:
|
|
13
|
+
```text
|
|
14
|
+
What Broke ➔ Business Impact ➔ Root Cause ➔ Fix Evidence ➔ Prevention & Guardrails
|
|
15
|
+
```
|
|
82
16
|
|
|
83
|
-
|
|
17
|
+
---
|
|
84
18
|
|
|
85
|
-
|
|
19
|
+
## 1. Types of Knowledge Extracted
|
|
86
20
|
|
|
87
|
-
|
|
21
|
+
1. **Architectural Patterns**: Reusable structural patterns, data transformations, or component designs.
|
|
22
|
+
2. **Gotchas & Hidden Invariants**: Subtle platform bugs, async timing issues, ORM quirks, or browser edge cases.
|
|
23
|
+
3. **Incident Post-Mortems**: Rigorous root cause analysis and why tests/checks failed to catch the bug initially.
|
|
24
|
+
4. **Context & Token Optimization**: Notes on avoidable context reading or redundant artifact parsing.
|
|
88
25
|
|
|
89
|
-
|
|
26
|
+
---
|
|
90
27
|
|
|
91
|
-
|
|
28
|
+
## 2. Process & Recording Destinations
|
|
92
29
|
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
- recommendations
|
|
99
|
-
- where the insight was recorded or should be recorded
|
|
30
|
+
1. **Load Evidence**: Review `git diff`, `40-implement.md`, `50-verify.md`, or test logs.
|
|
31
|
+
2. **Distill Insights**: Formulate clear, actionable, non-generic takeaways.
|
|
32
|
+
3. **Save to Persistent Memory**:
|
|
33
|
+
- Save project-wide engineering lessons to `devflow/context/lessons.md` (or `knowledge/lessons.md`).
|
|
34
|
+
- Feed run-specific learnings into `60-report.md` and `70-release.md`.
|
|
100
35
|
|
|
101
|
-
|
|
36
|
+
---
|
|
102
37
|
|
|
103
38
|
## Relationship To DevFlow 2.0
|
|
104
39
|
|
|
105
|
-
- Classification
|
|
106
|
-
- Mainline
|
|
107
|
-
-
|
|
108
|
-
- Typical handoff targets: `Wiki`, `60-report`, `Help`
|
|
109
|
-
|
|
110
|
-
## Sources
|
|
111
|
-
|
|
112
|
-
- `AGENTS.md`
|
|
113
|
-
- `.agent/resources/schemas/lessons.template.md`
|
|
114
|
-
- Related commands: `Debug`, `50-verify`, `Wiki`, `60-report`, `Help`
|
|
115
|
-
|
|
116
|
-
## Next Workflow Recommendation
|
|
117
|
-
|
|
118
|
-
- **Primary**: `Wiki project ingest {source}` when the insight is reusable project knowledge.
|
|
119
|
-
- **Why**: `Insight` extracts lessons; `Wiki` compiles selected lessons into navigable knowledge pages.
|
|
120
|
-
- **Alternatives**:
|
|
121
|
-
- `60-report {ID}` - choose this when the insight should become the final communication summary before release.
|
|
122
|
-
- `70-release {ID}` - choose this when the insight should shape release packaging or execution details.
|
|
123
|
-
- `Help {ID}` - choose this when the next route is unclear.
|
|
124
|
-
|
|
125
|
-
## Wiki Update Recommendation
|
|
126
|
-
|
|
127
|
-
- **Needed**: `yes` for reusable lessons, gotchas, decisions, validated root causes, or token/context optimizations.
|
|
128
|
-
- **Scope**: `project` for target-project lessons, `framework` for DevFlow workflow lessons.
|
|
129
|
-
- **Reason**: Insight extraction is the safest handoff point for wiki compilation.
|
|
130
|
-
- **Suggested Command**: `Wiki project ingest {source}`
|
|
131
|
-
|
|
40
|
+
- **Classification**: Companion command & Continuous learning
|
|
41
|
+
- **Mainline integration**: Invoked after `50-verify` or `60-report`.
|
|
42
|
+
- **Handoff**: `60-report`, `70-release`
|
|
@@ -3,119 +3,40 @@ name: preview
|
|
|
3
3
|
description: "[Devflow] Local preview server management, smoke-check, and temporary runtime inspection before formal verification."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
description: Preview management and temporary runtime checks. Transitional compatibility path for the Preview companion command in DevFlow 2.0.
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Preview Management
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
|
|
14
|
-
```text
|
|
15
|
-
Preview
|
|
16
|
-
Preview start
|
|
17
|
-
Preview stop
|
|
18
|
-
Preview restart
|
|
19
|
-
Preview check
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
This file keeps its old numeric path for migration compatibility.
|
|
23
|
-
|
|
24
|
-
In DevFlow 2.0, `Preview` is a companion command, not a numbered mainline workflow.
|
|
25
|
-
|
|
26
|
-
Primary behavior now lives in:
|
|
27
|
-
|
|
28
|
-
```text
|
|
29
|
-
.agents/skills/preview-local-check/SKILL.md
|
|
30
|
-
```
|
|
6
|
+
# Preview Management & Local Runtime Inspection
|
|
31
7
|
|
|
32
|
-
|
|
8
|
+
## Overview
|
|
33
9
|
|
|
34
|
-
|
|
10
|
+
This is the preview master skill for Nexus-DevFlow. It manages local development/preview servers (`npm run dev`, `npm run preview`, `vite`, `next dev`), handles port conflicts, and executes smoke checks before formal verification.
|
|
35
11
|
|
|
36
|
-
|
|
12
|
+
## Usage & Sub-Commands
|
|
37
13
|
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
Preferred DevFlow 2.0 pairing:
|
|
44
|
-
|
|
45
|
-
- from `40-implement`
|
|
46
|
-
- from `50-verify`
|
|
14
|
+
- `/preview` - Inspect current preview status and health
|
|
15
|
+
- `/preview start` - Start the local preview/dev server
|
|
16
|
+
- `/preview stop` - Stop the running server process
|
|
17
|
+
- `/preview restart` - Restart the preview server
|
|
18
|
+
- `/preview check` - Perform runtime smoke check against `http://localhost:<port>`
|
|
47
19
|
|
|
48
20
|
---
|
|
49
21
|
|
|
50
|
-
##
|
|
22
|
+
## 1. Process & Runtime Management
|
|
51
23
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
24
|
+
1. **Detect Framework & Command**: Identify the project runtime (`npm run dev`, `vite preview`, `pnpm start`, `python -m http.server`).
|
|
25
|
+
2. **Handle Port Conflicts**: Check if the standard port (3000, 5173, 8080) is occupied; auto-select fallback port or terminate stale background processes.
|
|
26
|
+
3. **Health & Smoke Check**: Query local endpoint via HTTP GET to verify HTTP 200 OK and asset loading.
|
|
27
|
+
4. **Report Status**:
|
|
28
|
+
```markdown
|
|
29
|
+
## Preview Status
|
|
30
|
+
- **URL**: `http://localhost:3000`
|
|
31
|
+
- **App Type**: Next.js / Vite / Node.js
|
|
32
|
+
- **Health Status**: `OK` (200 OK)
|
|
33
|
+
- **Console / Network**: Zero fatal runtime errors
|
|
34
|
+
```
|
|
57
35
|
|
|
58
36
|
---
|
|
59
37
|
|
|
60
|
-
## Internal Process
|
|
61
|
-
|
|
62
|
-
`Preview` manages the local preview workflow using the `preview-local-check` skill plus any available preview automation or equivalent project-local commands.
|
|
63
|
-
|
|
64
|
-
When handling preview operations:
|
|
65
|
-
|
|
66
|
-
1. detect the correct project or server command path
|
|
67
|
-
2. report the current state clearly
|
|
68
|
-
3. handle port conflicts gracefully
|
|
69
|
-
4. keep the action scoped to preview management, not broader deployment
|
|
70
|
-
5. distinguish between preview success and full verification success
|
|
71
|
-
|
|
72
|
-
Commands should use the nearest equivalent project-local preview command for the project, such as `npm run dev`, `npm run preview`, framework-specific local servers, or other runtime helpers that already exist in the target project.
|
|
73
|
-
|
|
74
|
-
### Resolving Port Conflicts
|
|
75
|
-
|
|
76
|
-
If the port is in use, offer options:
|
|
77
|
-
|
|
78
|
-
1. start on a different port
|
|
79
|
-
2. terminate the process on the existing port
|
|
80
|
-
3. specify a custom port
|
|
81
|
-
|
|
82
|
-
### Status Format
|
|
83
|
-
|
|
84
|
-
When displaying status, clearly state:
|
|
85
|
-
|
|
86
|
-
- URL
|
|
87
|
-
- project path
|
|
88
|
-
- app type
|
|
89
|
-
- health status
|
|
90
|
-
- notes about blockers, missing dependencies, or startup warnings
|
|
91
|
-
|
|
92
|
-
Example summary:
|
|
93
|
-
|
|
94
|
-
```markdown
|
|
95
|
-
## Preview Status
|
|
96
|
-
|
|
97
|
-
- **URL**: `http://localhost:3000`
|
|
98
|
-
- **Project Path**: `[absolute path]`
|
|
99
|
-
- **App Type**: `Next.js | FastAPI | Odoo | PHP | Other`
|
|
100
|
-
- **Health Status**: `OK | Warning | Failed`
|
|
101
|
-
- **Notes**: [port conflict, startup issue, missing dependency, or none]
|
|
102
|
-
```
|
|
103
|
-
|
|
104
38
|
## Relationship To DevFlow 2.0
|
|
105
39
|
|
|
106
|
-
- Classification
|
|
107
|
-
- Mainline
|
|
108
|
-
-
|
|
109
|
-
- Typical handoff targets: `50-verify`, `Debug`, `40-implement`
|
|
110
|
-
|
|
111
|
-
## Sources
|
|
112
|
-
|
|
113
|
-
- `AGENTS.md`
|
|
114
|
-
- `.agents/skills/preview-local-check/SKILL.md`
|
|
115
|
-
- Related commands: `40-implement`, `50-verify`, `Debug`
|
|
116
|
-
|
|
117
|
-
## Next Workflow Recommendation
|
|
118
|
-
|
|
119
|
-
- **Primary**: `50-verify` when preview confirms the change is ready for formal checks
|
|
120
|
-
- **Alternative**: `40-implement` when preview exposed implementation work
|
|
121
|
-
|
|
40
|
+
- **Classification**: Companion command & Runtime support
|
|
41
|
+
- **Mainline stages**: `40-implement` (interactive visual check), `50-verify` (smoke test check)
|
|
42
|
+
- **Handoff**: `50-verify`
|
|
@@ -1,55 +1,71 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: review
|
|
3
|
-
description: "[Devflow]
|
|
3
|
+
description: "[Devflow] Multi-axis code and PR review. Reviews diffs against standards, specs, correctness, security, performance, and 9arm scrutinize discipline."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Review
|
|
6
|
+
# Code Review, Quality & PR Analysis
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Overview
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
This is the comprehensive review master skill for Nexus-DevFlow. It evaluates code modifications, local diffs, branches, and pull requests across multiple dimensions before merging or releasing. Every change gets reviewed before merge — no exceptions.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
- **Spec**: does the change implement the originating issue, PRD, spec, or stage artifact?
|
|
12
|
+
**The approval standard**: Approve a change when it definitely improves overall code health and satisfies the specification, even if it isn't perfect.
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 1. The Scrutinize Discipline (9arm Review Pattern)
|
|
17
|
+
|
|
18
|
+
Before jumping into line-by-line comments, apply the 4-step Scrutiny check:
|
|
19
|
+
1. **Intent Check**: What problem is this change truly trying to solve? Is this the right problem?
|
|
20
|
+
2. **Safer / Smaller Alternative**: Could this be achieved with fewer lines, zero new dependencies, or less complexity?
|
|
21
|
+
3. **Runtime Path Trace**: Trace the execution path through inputs, error handling, async boundaries, and state mutations.
|
|
22
|
+
4. **Precision & Evidence**: Does the code contain unproven assumptions or missing test evidence?
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. The Five-Axis Review Framework
|
|
18
27
|
|
|
19
|
-
|
|
20
|
-
- Use the user-supplied commit, branch, tag, or merge-base.
|
|
21
|
-
- If none is supplied, default to the active branch merge-base with `main` when available.
|
|
22
|
-
- Confirm the diff is non-empty.
|
|
28
|
+
Every review evaluates code across these 5 core axes:
|
|
23
29
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
```text
|
|
31
|
+
┌──────────────────────────────────────────────────────────┐
|
|
32
|
+
│ FIVE-AXIS CODE REVIEW │
|
|
33
|
+
├──────────────┬───────────────────────────────────────────┤
|
|
34
|
+
│ 1. Correctness│ Logic, edge cases, error paths, races │
|
|
35
|
+
│ 2. Simplicity │ Readable, concise, no dead code, DAMP/DRY │
|
|
36
|
+
│ 3. Architecture│ Boundaries, dependencies, design patterns │
|
|
37
|
+
│ 4. Security │ Input validation, auth, no secrets/XSS │
|
|
38
|
+
│ 5. Performance│ No N+1 queries, async I/O, memoization │
|
|
39
|
+
└──────────────┴───────────────────────────────────────────┘
|
|
40
|
+
```
|
|
27
41
|
|
|
28
|
-
|
|
29
|
-
- Look for repo docs such as `AGENTS.md`, `CONTRIBUTING.md`, coding standards, workflow docs, or stage contracts.
|
|
42
|
+
---
|
|
30
43
|
|
|
31
|
-
|
|
32
|
-
- Cite the violated standard.
|
|
33
|
-
- Distinguish hard violations from judgment calls.
|
|
34
|
-
- Skip issues that tooling already enforces unless tooling is missing.
|
|
44
|
+
## 3. Review Lenses & Finding Severities
|
|
35
45
|
|
|
36
|
-
|
|
37
|
-
- Report missing or partial requirements.
|
|
38
|
-
- Report scope creep.
|
|
39
|
-
- Report implemented behavior that appears wrong against the spec.
|
|
46
|
+
Categorize all findings into actionable severities:
|
|
40
47
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
48
|
+
- **P0 (Critical Blocker)**: Security vulnerability, data loss, runtime crash, broken main functionality. (Blocks `70-release`)
|
|
49
|
+
- **P1 (Major Blocker)**: Spec mismatch, broken error handling, severe regression risk. (Blocks `70-release`)
|
|
50
|
+
- **P2 (Normal Improvement)**: Readability, missing edge-case test, minor performance optimization.
|
|
51
|
+
- **P3 (Nit / Suggestion)**: Naming polish, optional refactor, comment clarity.
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 4. PR Review Process
|
|
56
|
+
|
|
57
|
+
1. **Load Context**: Pin fixed point (merge-base with `main`), read spec (`20-spec.md`) and coding standards.
|
|
58
|
+
2. **Review Standards vs. Spec**: Check adherence to project instructions (`AGENTS.md`) and acceptance criteria.
|
|
59
|
+
3. **Validate Findings**: Ensure every finding is reproducible and points to specific files and line numbers.
|
|
60
|
+
4. **Generate Report**: Save substantial review reports under:
|
|
61
|
+
```text
|
|
62
|
+
devflow/runs/{ID}-{slug}/pr_review.md
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
47
66
|
|
|
48
|
-
|
|
67
|
+
## Relationship To DevFlow 2.0
|
|
49
68
|
|
|
50
|
-
-
|
|
51
|
-
-
|
|
52
|
-
-
|
|
53
|
-
- findings by axis
|
|
54
|
-
- worst issue per axis
|
|
55
|
-
- recommended DevFlow route
|
|
69
|
+
- **Classification**: Companion command & Verification support
|
|
70
|
+
- **Mainline stages**: `50-verify` (QA & Code Review lane), `70-release` (Pre-merge review)
|
|
71
|
+
- **Handoff**: `40-implement` (for fixes), `50-verify`, `70-release`
|
|
@@ -103,6 +103,7 @@ Present the rollback plan to the user:
|
|
|
103
103
|
## Rules
|
|
104
104
|
|
|
105
105
|
- **Preserve History**: Never delete run folders under `devflow/runs/`. Historical reports must remain intact.
|
|
106
|
+
- **Update History Ledger**: When the rollback is completed and verified, update the target entry's status in `devflow/history/HISTORY.md` to `Rolled Back` with reference to the reversal commit.
|
|
106
107
|
- **No Destructive Git Commands**: Never execute `git reset --hard HEAD~N` or `git push --force`. All reversals must be applied as forward commits.
|
|
107
108
|
- **One Target Per Rollback**: Avoid bundling multiple unrelated rollbacks into one pass.
|
|
108
109
|
- **Explicit Human Gate**: Always wait for user approval before applying any reverse diffs to code.
|
|
@@ -1,166 +1,63 @@
|
|
|
1
|
-
---name: security-review
|
|
2
|
-
|
|
3
|
-
description: "[Devflow] High-severity security code review and vulnerability audit for folders, projects, files, or diffs."
|
|
4
|
-
argument-hint: "[target folder, project path, file list, or git diff] [--lang=en]"
|
|
5
1
|
---
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
$ARGUMENTS
|
|
10
|
-
|
|
11
|
-
Perform a focused security-only review of a specified target (directory, project, list of files, or code diff) for **High Severity** and **Critical** security vulnerabilities.
|
|
12
|
-
|
|
13
|
-
This workflow is a companion command in DevFlow 2.0. It creates a standardized stage artifact contract inside the active workspace.
|
|
14
|
-
|
|
15
|
-
## Purpose
|
|
16
|
-
|
|
17
|
-
Use this workflow to check an entire folder, project, or changed files for major security risks. It ensures your codebase does not introduce high-severity flaws before advancing to verification or release.
|
|
18
|
-
|
|
19
|
-
## Behavior
|
|
20
|
-
|
|
21
|
-
When `Security-Review` is triggered:
|
|
22
|
-
|
|
23
|
-
1. **Resolve target and scope**:
|
|
24
|
-
- Determine the target folder, project, list of files, or git diff from the arguments.
|
|
25
|
-
- Scan all source files in the target directory recursively, or evaluate the specific list of files/diff.
|
|
26
|
-
2. **Anchor the run**:
|
|
27
|
-
- Locate the active `running_id` from the workspace.
|
|
28
|
-
- If no active running ID is found, prompt the user or create a temporary run workspace (e.g., `sec-global` under `devflow/runs/sec-global/`).
|
|
29
|
-
3. **Execute security-focused analysis**:
|
|
30
|
-
- Trace trust boundaries and inputs across the target files.
|
|
31
|
-
- Check only for **High Severity** and **Critical** security vulnerabilities (e.g., SQL/Command Injection, hardcoded secrets, authentication bypass, path traversal, RCE, data exposure).
|
|
32
|
-
- Ignore theoretical, style, low-impact, or medium/low severity findings for status blocking, but report them under Suggestions if present.
|
|
33
|
-
4. **Load Template**:
|
|
34
|
-
- Inspect `.agent/resources/schemas/security_review.template.md`.
|
|
35
|
-
- Read the `artifact_language` configuration (framework default: `"th"`).
|
|
36
|
-
- Generate the report in English.
|
|
37
|
-
5. **Write the Artifact**:
|
|
38
|
-
- Write the finalized security report to `devflow/runs/{ID}-{slug}/security-review.md`.
|
|
39
|
-
- Ensure the output strictly follows the template contract structure (Headings 1 to 11).
|
|
40
|
-
|
|
41
|
-
## Output Contract & Formats
|
|
42
|
-
|
|
43
|
-
The generated artifact must follow the English contract shape below.
|
|
44
|
-
|
|
45
|
-
### English Output Template
|
|
46
|
-
|
|
47
|
-
```markdown
|
|
2
|
+
name: security-review
|
|
3
|
+
description: "[Devflow] Security review, vulnerability scanner, and code hardening. Audits for OWASP vulnerabilities, secrets, injections, and auth flaws."
|
|
48
4
|
---
|
|
49
|
-
id: "{running_id}-security-review"
|
|
50
|
-
title: "Security Review: {Work Title}"
|
|
51
|
-
doc_type: "companion"
|
|
52
|
-
stage: "security-review"
|
|
53
|
-
created: "{Date}"
|
|
54
|
-
updated: "{Date}"
|
|
55
|
-
owner: "{Owner}"
|
|
56
|
-
status: "draft"
|
|
57
|
-
artifact_language: "th"
|
|
58
|
-
related_run: "{running_id}"
|
|
59
|
-
related_files: []
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
# Security Review: {Work Title}
|
|
63
|
-
|
|
64
|
-
## 1. Objective
|
|
65
|
-
|
|
66
|
-
- Perform a focused security review on the target directory, project, or files to detect High Severity and Critical security vulnerabilities.
|
|
67
|
-
|
|
68
|
-
## 2. Source Inputs
|
|
69
|
-
|
|
70
|
-
- Review Target: {Review Target}
|
|
71
|
-
- Files Evaluated: []
|
|
72
|
-
|
|
73
|
-
## 3. Project Context To Preserve
|
|
74
5
|
|
|
75
|
-
|
|
76
|
-
- Known exceptions or legacy patterns excluded from security flags.
|
|
6
|
+
# Security Review, Hardening & Vulnerability Audit
|
|
77
7
|
|
|
78
|
-
##
|
|
8
|
+
## Overview
|
|
79
9
|
|
|
80
|
-
|
|
81
|
-
- **Status:** [pass | fail]
|
|
82
|
-
- **Reason:** [Explain in detail with file and line references if fail, or "No high-severity or Critical security vulnerabilities found" if pass]
|
|
10
|
+
This is the comprehensive security master skill for Nexus-DevFlow. It combines static vulnerability scanning, threat modeling, OWASP Top 10 defenses, and code hardening. Treat every external input as hostile, every secret as sacred, and every authorization check as mandatory.
|
|
83
11
|
|
|
84
|
-
|
|
85
|
-
[Provide concrete instructions and guidance for the subsequent Agent. If pass, list any medium/low security findings or recommendations for human consideration, directing the next verification/release Agent accordingly. If fail, list step-by-step remediation tasks for the implementer Agent to execute.]
|
|
86
|
-
|
|
87
|
-
### 🔍 Detailed Scope Analysis
|
|
88
|
-
- **Secrets & Configuration:** [Pass | Fail]
|
|
89
|
-
- **Input Validation & Injection:** [Pass | Fail]
|
|
90
|
-
- **Access Control & Auth:** [Pass | Fail]
|
|
91
|
-
- **Data Protection & Cryptography:** [Pass | Fail]
|
|
92
|
-
- **File System & Shell Safety:** [Pass | Fail]
|
|
93
|
-
|
|
94
|
-
## 5. AI Actions Performed
|
|
95
|
-
|
|
96
|
-
- Analyzed target codebase and traced untrusted inputs to critical sinks.
|
|
97
|
-
- Scanned for hardcoded secrets, API keys, and environment leaks.
|
|
98
|
-
|
|
99
|
-
## 6. Human Review Required
|
|
100
|
-
|
|
101
|
-
- Verify findings and evaluate false positives if any.
|
|
102
|
-
- Review medium/low risk suggestions for optional implementation.
|
|
103
|
-
|
|
104
|
-
## 7. Approval Status
|
|
105
|
-
|
|
106
|
-
- Pending
|
|
107
|
-
|
|
108
|
-
## 8. Next Allowed Command
|
|
109
|
-
|
|
110
|
-
- `40-implement {running_id}` (if fail, for code remediation)
|
|
111
|
-
- `50-verify {running_id}` (if pass, to verify execution correctness)
|
|
112
|
-
|
|
113
|
-
## 9. Nexus Event
|
|
114
|
-
|
|
115
|
-
- `Debug` for deep-dive diagnostics or debugging.
|
|
116
|
-
- `grill-with-docs` to clarify security guidelines.
|
|
117
|
-
|
|
118
|
-
## 10. Change Log
|
|
119
|
-
|
|
120
|
-
- {Date}: Initial English security review report created.
|
|
121
|
-
|
|
122
|
-
## 11. Additional Notes
|
|
12
|
+
---
|
|
123
13
|
|
|
124
|
-
|
|
125
|
-
```
|
|
14
|
+
## 1. The Three-Tier Security Boundary
|
|
126
15
|
|
|
127
|
-
|
|
16
|
+
### Always Do (No Exceptions)
|
|
17
|
+
- **Validate & sanitize all inputs** at the boundary (Zod, Yup, schema validation).
|
|
18
|
+
- **Parameterize all queries** — never concatenate user input into SQL/NoSQL queries.
|
|
19
|
+
- **Encode outputs** to prevent XSS (rely on framework auto-escaping).
|
|
20
|
+
- **Hash credentials** using bcrypt, Argon2, or scrypt.
|
|
21
|
+
- **Enforce secure cookies**: `httpOnly`, `secure`, `sameSite=lax/strict`.
|
|
128
22
|
|
|
129
|
-
|
|
23
|
+
### Never Do
|
|
24
|
+
- **Never commit secrets**, API keys, tokens, or credentials to git.
|
|
25
|
+
- **Never trust client-side checks** as a security barrier.
|
|
26
|
+
- **Never use `eval()`, `exec()`, or raw `innerHTML`** with untrusted user data.
|
|
27
|
+
- **Never expose internal stack traces** or detailed database errors to users.
|
|
130
28
|
|
|
131
|
-
|
|
132
|
-
### 🛡️ Security Review Result
|
|
133
|
-
- **Status:** pass
|
|
134
|
-
- **Reason:** No high-severity or Critical security vulnerabilities found
|
|
29
|
+
---
|
|
135
30
|
|
|
136
|
-
|
|
137
|
-
[List any medium, low security findings or recommendations for human consideration, directing the next verification/release Agent accordingly]
|
|
138
|
-
```
|
|
31
|
+
## 2. OWASP & Critical Vulnerability Vectors
|
|
139
32
|
|
|
140
|
-
|
|
33
|
+
| Category | Primary Risk | Mandatory Defense |
|
|
34
|
+
| :--- | :--- | :--- |
|
|
35
|
+
| **A01: Broken Access Control** | IDOR, missing role checks | Enforce server-side authorization on every endpoint/data fetch |
|
|
36
|
+
| **A02: Cryptographic Failures** | Plaintext tokens/passwords, weak cipher | Use TLS 1.3, salted hashing, secret managers / `.env` |
|
|
37
|
+
| **A03: Injection** | SQL, NoSQL, OS Command, Template | Parameterized queries, avoid shell spawning with user input |
|
|
38
|
+
| **A04: Insecure Design** | Missing rate limits, business logic flaw | Defense-in-depth, token bucket throttling, safe defaults |
|
|
39
|
+
| **A05: Security Misconfig** | Permissive CORS (`*`), exposed debug endpoints | Restrict CORS origins, disable debug/admin paths in production |
|
|
40
|
+
| **A07: Identification & Auth** | Session fixation, brute-force | Account lockouts, secure session rotation, MFA support |
|
|
41
|
+
| **A08: Software & Data Integrity**| Untrusted CI/CD packages, deserialization | Run `npm audit`, pin dependency hashes, validate payloads |
|
|
42
|
+
| **A09: Logging & Monitoring** | Missing audit logs or logging secrets | Structured logging with PII masking, alert on repeated auth failure |
|
|
43
|
+
| **A10: SSRF** | Fetching internal URLs from user input | Whitelist allowable destination protocols and domains |
|
|
141
44
|
|
|
142
|
-
|
|
45
|
+
---
|
|
143
46
|
|
|
144
|
-
|
|
145
|
-
- Explain why the issue is High/Critical Severity with file and line references.
|
|
146
|
-
- In **Suggestions for Next Agent Action / Handoff**, write a clear set of step-by-step remediation tasks for the Coder/Implementer Agent to resolve the vulnerability.
|
|
47
|
+
## 3. Security Review Process
|
|
147
48
|
|
|
148
|
-
|
|
49
|
+
1. **Target & Scope**: Inspect targeted files, PR diffs, or entire project directories.
|
|
50
|
+
2. **Trace Trust Boundaries**: Follow untrusted data from entry (HTTP handlers, CLI arguments, file uploads) to sinks (DB, shell, HTML).
|
|
51
|
+
3. **Scan for Secrets & Configs**: Detect hardcoded passwords, private keys, and environment variable leaks.
|
|
52
|
+
4. **Generate Report**: Save formal security audits under:
|
|
53
|
+
```text
|
|
54
|
+
devflow/runs/{ID}-{slug}/security-review.md
|
|
55
|
+
```
|
|
149
56
|
|
|
150
|
-
|
|
151
|
-
- **Hardcoded secrets**: passwords, API keys, private keys, database strings.
|
|
152
|
-
- **Injections**: SQL, NoSQL, OS Command, Template, or Path traversal.
|
|
153
|
-
- **Unvalidated inputs**: dynamic evaluation (`eval`), shell execution, or raw unescaped HTML rendering.
|
|
154
|
-
- **Insecure configuration**: broken authorization, sensitive exposure in public endpoints/logs.
|
|
57
|
+
---
|
|
155
58
|
|
|
156
59
|
## Relationship To DevFlow 2.0
|
|
157
60
|
|
|
158
|
-
- **Classification**: Companion command
|
|
159
|
-
- **Mainline
|
|
160
|
-
- **
|
|
161
|
-
|
|
162
|
-
## Sources
|
|
163
|
-
|
|
164
|
-
- `AGENTS.md`
|
|
165
|
-
- `.agent/resources/schemas/security_review.template.md`
|
|
166
|
-
- `docs/workspace-artifacts.md`
|
|
61
|
+
- **Classification**: Companion command & Safety gate
|
|
62
|
+
- **Mainline integration**: Run during `40-implement` or `50-verify` before `70-release`.
|
|
63
|
+
- **Handoff**: P0/P1 security findings block release and return to `40-implement` for immediate remediation.
|