@jakkrichm/create-nexus-devflow 2.9.4 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +3 -3
  2. package/dist/lib/dashboard-page.d.ts +1 -1
  3. package/dist/lib/dashboard-page.js +5 -1
  4. package/dist/lib/dashboard-page.js.map +1 -1
  5. package/dist/lib/project-config.d.ts +2 -0
  6. package/dist/lib/project-config.js +5 -2
  7. package/dist/lib/project-config.js.map +1 -1
  8. package/dist/lib/review.d.ts +38 -0
  9. package/dist/lib/review.js +429 -0
  10. package/dist/lib/review.js.map +1 -0
  11. package/dist/lib/status.d.ts +19 -2
  12. package/dist/lib/status.js +83 -15
  13. package/dist/lib/status.js.map +1 -1
  14. package/package.json +1 -1
  15. package/template/.agents/skills/audit/SKILL.md +119 -144
  16. package/template/.agents/skills/audit/reference/independent-review.md +128 -0
  17. package/template/.agents/skills/autopilot/SKILL.md +22 -1
  18. package/template/.agents/skills/browser-tests/SKILL.md +163 -0
  19. package/template/.agents/skills/check/SKILL.md +32 -23
  20. package/template/.agents/skills/complete/SKILL.md +28 -39
  21. package/template/.agents/skills/continuous/SKILL.md +12 -0
  22. package/template/.agents/skills/doctor/SKILL.md +8 -4
  23. package/template/.agents/skills/feature/SKILL.md +22 -1
  24. package/template/.agents/skills/implement/SKILL.md +21 -1
  25. package/template/.agents/skills/onboard/SKILL.md +17 -1
  26. package/template/.agents/skills/status/SKILL.md +12 -1
  27. package/template/.agents/skills/tests/SKILL.md +1 -1
  28. package/template/.agents/skills/try/SKILL.md +9 -24
  29. package/template/.claude/skills/audit/SKILL.md +119 -144
  30. package/template/.claude/skills/audit/reference/independent-review.md +128 -0
  31. package/template/.claude/skills/autopilot/SKILL.md +22 -1
  32. package/template/.claude/skills/browser-tests/SKILL.md +163 -0
  33. package/template/.claude/skills/check/SKILL.md +32 -23
  34. package/template/.claude/skills/complete/SKILL.md +28 -39
  35. package/template/.claude/skills/continuous/SKILL.md +12 -0
  36. package/template/.claude/skills/doctor/SKILL.md +9 -4
  37. package/template/.claude/skills/feature/SKILL.md +22 -1
  38. package/template/.claude/skills/implement/SKILL.md +21 -1
  39. package/template/.claude/skills/onboard/SKILL.md +17 -1
  40. package/template/.claude/skills/status/SKILL.md +12 -1
  41. package/template/.claude/skills/tests/SKILL.md +1 -1
  42. package/template/.claude/skills/try/SKILL.md +9 -24
  43. package/template/AGENTS.md +4 -4
  44. package/template/devflow/build-plan.md +6 -0
  45. package/template/devflow/config.json +2 -0
  46. package/template/devflow/context/coding-standards.md +8 -1
@@ -1,11 +1,13 @@
1
1
  ---
2
2
  name: check
3
- description: "[devflow] Prove the current work actually does what its spec says and adheres to architectural standards through a Dual-Axis Independent Review. Supports Multi-Run: given an optional ID or name (/check 12), targets that spec and records proof to devflow/context/{xxx-slug}/findings.md. Drives the app, captures empirical evidence, checks Fowler smells, and reports pass/fail. Use when running /check, confirming work, or validating before /complete."
3
+ description: "[devflow] Prove the current work actually does what its spec says and adheres to architectural standards through a Dual-Axis Independent Review. Supports Multi-Run: given an optional ID or name (/check 12), targets that spec and records proof to devflow/context/{xxx-slug}/findings.md. Drives the app, captures empirical evidence using Playwright and MCP browseros-neo, checks Fowler smells, and reports pass/fail. Use when running /check, confirming work, or validating before /complete."
4
4
  argument-hint: "[{run-id, number, or name}]"
5
5
  ---
6
6
 
7
7
  # check - Dual-Axis Independent Verification Engine
8
8
 
9
+ $ARGUMENTS
10
+
9
11
  **First action:** Before project inspection, preflight, or any other tool call,
10
12
  publish `running` to `devflow/.state/run.json` using the dashboard activity
11
13
  contract in `AGENTS.md`.
@@ -30,6 +32,29 @@ It changes no source and commits nothing — it executes, inspects, and reports
30
32
 
31
33
  ---
32
34
 
35
+ ## Hybrid Browser Verification Engine
36
+
37
+ Nexus-DevFlow uses a **Dual-Layer Browser Verification Hierarchy**:
38
+
39
+ ```text
40
+ ┌─────────────────────────────────────────────────────────────────────────────┐
41
+ │ 🌐 Hybrid Browser Verification Engine │
42
+ ├──────────────────────────────────────┬──────────────────────────────────────┤
43
+ │ 1. Code-Driven Test Automation (CI) │ 2. Interactive AI Visual QA (MCP) │
44
+ │ • Framework: Playwright │ • Server: MCP browseros-neo │
45
+ │ • Command: npm run test:browser │ • URL: http://127.0.0.1:9010/mcp │
46
+ │ • Purpose: Assertions, Headless, │ • Purpose: Live DOM Inspection, │
47
+ │ Regression Suite & Pre-commit │ Real Screenshot Proofs, /try │
48
+ └──────────────────────────────────────┴──────────────────────────────────────┘
49
+ ```
50
+
51
+ 1. **Layer 1: Code-Driven Repeatable Tests (Playwright)**:
52
+ - If `AGENTS.md` declares `Browser tests: <command>`, run that exact command as repeatable automated evidence.
53
+ 2. **Layer 2: Interactive AI Visual QA (MCP browseros-neo)**:
54
+ - When the `browseros-neo` MCP server (`http://127.0.0.1:9010/mcp`) is active, use it to inspect the live running app, verify rendered CSS/layout, test click flows, and capture actual screenshot proofs.
55
+
56
+ ---
57
+
33
58
  ## Step 1 - Build the Dual-Axis Review Matrix
34
59
 
35
60
  Read the target spec from `devflow/context/{xxx-slug}/spec.md` and `devflow/context/coding-standards.md`. Prepare the inspection criteria across two independent axes:
@@ -50,7 +75,7 @@ Read the target spec from `devflow/context/{xxx-slug}/spec.md` and `devflow/cont
50
75
 
51
76
  Use the project's real commands (from `AGENTS.md`):
52
77
 
53
- - **Web app**: Start (or reuse) the local dev server. Drive a real browser to relevant routes. Prefer Playwright when installed for screenshots, network errors, and console assertions.
78
+ - **Web app**: Start (or reuse) the local dev server. Drive a real browser to relevant routes. If `Browser tests: <command>` is declared, run it. When MCP `browseros-neo` is active, connect to inspect live visual state.
54
79
  - **CLI**: Execute commands with representative input fixtures, asserting exit codes and output snapshots.
55
80
  - **Server / API**: Hit endpoints with real payloads and assert on HTTP response status and bodies.
56
81
  - **Library**: Exercise public interfaces through integration tests or sample scripts.
@@ -60,7 +85,7 @@ Use the project's real commands (from `AGENTS.md`):
60
85
 
61
86
  ---
62
87
 
63
- ## Step 3 - Dual-Axis Independent Report
88
+ ## Step 3 - Dual-Axis Independent Report & State Update
64
89
 
65
90
  Format the report into two distinct, un-merged review axes:
66
91
 
@@ -72,6 +97,8 @@ Format the report into two distinct, un-merged review axes:
72
97
  - **Technical Lanes**:
73
98
  - [pass] Type Safety: `tsc --noEmit` (0 errors)
74
99
  - [pass] Automated Tests: `npm test` (All tests green)
100
+ - [pass] Browser Tests: `npm run test:browser` (Playwright passed)
101
+ - [pass] Visual Inspection: MCP browseros-neo verified UI layout & zero console errors
75
102
  - [pass] Security & Hygiene: Zero secrets, sanitized inputs
76
103
  - [pass] Findings Ledger: 0 blocking P0/P1 in `devflow/context/{xxx-slug}/findings.md`
77
104
  - **Deep Modules & Architecture**:
@@ -93,25 +120,7 @@ Line-by-line verification against `devflow/context/{xxx-slug}/spec.md`:
93
120
 
94
121
  ## 🚦 Final Routing & Verdict
95
122
 
96
- - **ALL PASSED**: Both axes green. Ready for `/complete`.
123
+ - **ALL PASSED**: Both axes green. Update `stage.md` (Passed -> Ready for `/complete`).
97
124
  - **ANY FAILURE**: Hand back to `/implement` with exact failure evidence and reproduction steps.
98
125
  - **UNVERIFIABLE**: Clearly document the gap and residual risk. Never fabricate a pass.
99
- ```
100
-
101
- ---
102
-
103
- ## Why Two Independent Axes?
104
-
105
- A code change can pass one axis and fail the other:
106
- - **Standards Pass, Spec Fail**: Code is beautifully architected and tested, but implements the wrong business behavior.
107
- - **Spec Pass, Standards Fail**: Feature works end-to-end, but violates encapsulation, introduces shallow modules, or leaks secrets.
108
-
109
- Reporting both axes side-by-side stops elegance from masking functional bugs, and stops functional completeness from excusing architectural rot.
110
-
111
- ---
112
-
113
- ## Rules
114
-
115
- - **Observe, don't change**: `/check` runs the app and reports. It never edits source or commits. Fixing is `/implement`'s job.
116
- - **Honest over green**: "Failed" and "Could not verify" are valid, valuable outputs. Faking a pass destroys the gate.
117
- - **Check the spec, not vibes**: Verify against documented ACs, not subjective feelings.
126
+ ```
@@ -1,11 +1,13 @@
1
1
  ---
2
2
  name: complete
3
- description: "[devflow] Wrap up a finished feature, fix, or rollback. Supports Multi-Run: given an optional ID (/complete 12), archives that run from devflow/context/{xxx-slug}/ to devflow/history/, cleans up the run workspace, updates build-plan and HISTORY.md, and makes the work commit. Enforces mandatory user gate (Squash-merge vs MR/PR)."
3
+ description: "[devflow] Wrap up a finished feature, fix, or rollback. Supports Multi-Run: given an optional ID (/complete 12), archives that run from devflow/context/{xxx-slug}/ to devflow/history/, verifies independent review receipt and findings ledger, cleans up the run workspace, updates build-plan and HISTORY.md, and makes the work commit. Enforces mandatory user gate (Squash-merge vs MR/PR)."
4
4
  argument-hint: "[{run-id, number, or name}]"
5
5
  ---
6
6
 
7
7
  # complete - log the finished work, make the work commit, and deliver
8
8
 
9
+ $ARGUMENTS
10
+
9
11
  **First action:** Before project inspection, preflight, or any other tool call,
10
12
  publish `running` to `devflow/.state/run.json` using the dashboard activity
11
13
  contract in `AGENTS.md`.
@@ -28,6 +30,9 @@ passes.
28
30
 
29
31
  ## Before you start
30
32
 
33
+ Read `devflow/config.json`. A missing file means the built-in defaults apply.
34
+ If the file exists but is invalid, stop and point the user to `/doctor`.
35
+
31
36
  Confirm the target work is actually finished: `devflow/context/{xxx-slug}/spec.md`
32
37
  holds a real spec, its steps are built on a branch, and `Verify`, or the fallback
33
38
  build and tests, passes. If any of the
@@ -36,6 +41,19 @@ running app first - don't merge or complete on an unverified claim. Uncommitted
36
41
  expected (per-step checkpoints are optional); this skill commits it. Don't require
37
42
  the steps to be pre-committed.
38
43
 
44
+ Read `devflow/context/{xxx-slug}/review.md` (or `devflow/context/review.md`) when present. A pending,
45
+ changes-requested, malformed, or stale record is always a blocker because the
46
+ user already initiated that gate, even when its configured policy is `manual`.
47
+
48
+ ## Configured regular quality gates
49
+
50
+ Use `qualityGates.regular` for this work item:
51
+
52
+ - **Audit:** `manual` runs only when the user explicitly requests `/audit`; `when-sensitive` runs for sensitive categories; `always` runs for every work item.
53
+ - **Independent review:** `manual` runs only when explicitly requested (`/audit independent current`); `when-sensitive` requires it for sensitive domains; `always` requires it for every work item.
54
+ - **Check:** `manual` runs only when explicitly requested; `when-behavioral` runs when done-whens need observed runtime behavior; `always` runs for every work item.
55
+ - **Try guide:** `manual` runs only when explicitly requested; `when-user-facing` generates guide when change affects UI/UX; `always` generates one for every work item.
56
+
39
57
  ## Step 0 - final safety pass
40
58
 
41
59
  Before logging or committing, run a short safety pass and report blockers only:
@@ -47,15 +65,12 @@ Before logging or committing, run a short safety pass and report blockers only:
47
65
  declared test command and the change touched logic
48
66
  - behavioral done-whens have `/check` evidence or equivalent proof, and there is
49
67
  a clear manual try path
50
- - if workflow files changed, `.agents` and `.claude` stayed in sync where both
51
- adapters exist
68
+ - any check required by `qualityGates.regular` has evidence, and there is a clear manual try path
69
+ - a selected independent-review gate has a `passed` receipt in `review.md` whose target equals `HEAD`, whose spec hash matches, and whose receipt is current. Any mismatch is stale and blocks completion.
70
+ - if workflow files changed, `.agents` and `.claude` stayed in sync where both adapters exist
52
71
  - no P0 or P1 finding in `devflow/context/{xxx-slug}/findings.md` is `open` or `fixed`.
53
72
  `fixed` still blocks on purpose: the repair exists but no review has looked at
54
- it - run `/audit` to close it. The only waivers are `accepted` (the user's
55
- explicit decision in the current chat, reason recorded; never set it for
56
- them) or `invalid` (an `/audit` re-examination verdict with recorded
57
- evidence, or the user's explicit call). A missing ledger file means no
58
- findings.
73
+ it - run `/audit` to close it. The only waivers are `accepted` or `invalid`.
59
74
 
60
75
  Do not claim "passed", "verified", or "working" without naming the command,
61
76
  route, screenshot, or output that proves it. Stop before Step 1 if required
@@ -71,20 +86,14 @@ and records the exact target feature, archive, commit, and parent.
71
86
  - **Fix** - archive `devflow/context/{xxx-slug}/spec.md` to `devflow/history/fixes/{xxx-slug}.md`, and record an entry into `devflow/history/HISTORY.md`.
72
87
  - **Rollback** - archive `devflow/context/{xxx-slug}/spec.md` to `devflow/history/rollbacks/YYYY-MM-DD-{xxx-slug}.md`, preserving the original completed feature archive. Uncheck the target item in `devflow/build-plan.md` and record in `devflow/history/HISTORY.md`.
73
88
 
74
- **Archive resolved findings.** If `devflow/context/{xxx-slug}/findings.md` holds any
75
- findings, append a `## Findings` section to the archive file just written with
76
- every `closed`, `accepted`, or `invalid` entry at its final status (`accepted`
77
- entries keep their recorded reason). Do not archive or remove a `fixed` finding
78
- at any severity; repaired findings must remain in the ledger until an `/audit`
79
- re-review closes them.
89
+ **Archive resolved findings & review receipts.**
90
+ - If `devflow/context/{xxx-slug}/findings.md` holds findings, append `## Findings` to the archive file with resolved entries.
91
+ - If `devflow/context/{xxx-slug}/review.md` holds a completed passing receipt, append `## Independent Review` to the archive file with the receipt summary.
80
92
 
81
93
  **Clean up run workspace.** Delete the task directory `devflow/context/{xxx-slug}/`. In Pure Multi-Run architecture, completed work leaves zero residual stubs in `devflow/context/`.
82
94
 
83
95
  **Discard consumed prototypes.** If this feature built the look from `prototypes/`
84
- - its Design reference pointed there and an early step ported `prototypes/theme.css`
85
- into the app - delete the `prototypes/` folder now. The tokens live in the real
86
- stylesheet and the HTML mockups were always throwaway; fold the deletion into this
87
- feature's commit. Skip this if the feature didn't consume prototypes.
96
+ delete the `prototypes/` folder now.
88
97
 
89
98
  ## Step 2 - make the work commit on feature branch
90
99
 
@@ -127,24 +136,4 @@ Present the user with two clear delivery options:
127
136
  ## Step 4 - Finish & Try Path
128
137
 
129
138
  Point the user at `/feature`, `/fix`, or `/rollback` for the next task.
130
-
131
- Finish with a concise **How to try it** note for the completed work. For a
132
- rollback, explain how to confirm the removed behavior is gone and name one
133
- unaffected regression path. If the
134
- manual path is more than a couple of steps, tell the user to run `/try latest`;
135
- that command can read the archived feature from history.
136
-
137
- ## Rules
138
-
139
- - **Mandatory User Confirmation Gate**: Always ask before choosing between Team MR/PR Push vs Direct Squash-Merge.
140
- - **Never auto-merge into main/master**: The decision to merge into `main` or `master` belongs strictly to the user.
141
- - The work item is the unit of history: one squashed feature, fix, or rollback
142
- commit, even if the branch carried several checkpoint commits.
143
- - A rollback preserves the original feature archive and adds a separate rollback
144
- archive. Never rewrite history to make the feature look as if it never existed.
145
- - Don't merge or push unfinished or failing work. The documented `Verify` command, or
146
- the fallback build and tests, must pass first.
147
- - Never merge or push while a P0 or P1 finding is `open` or `fixed` in the ledger.
148
- - Pushing to remote is always explicit: confirm before running `git push`.
149
- - One item per completion. If a parent feature still has unchecked sub-features,
150
- leave the parent unchecked.
139
+ Finish with a concise **How to try it** note for the completed work.
@@ -88,9 +88,21 @@ Where this sits in the workflow:
88
88
  ### 2.4 Apply Continuous Quality Gates
89
89
  ตรวจสอบตามการตั้งค่า `qualityGates.continuous` ใน `devflow/config.json`:
90
90
  - **Audit**: `manual` (ข้ามอัตโนมัติ), `when-sensitive` (รันเมื่อแตะ Auth/Security/Database/Secrets), `always` (รันทุกฟีเจอร์)
91
+ - **Independent Review**: อ่าน `qualityGates.continuous.independentReview`; `manual` คือ opt-in, `always` บังคับทุกฟีเจอร์, และ `when-sensitive` บังคับเมื่อฟีเจอร์แตะ authentication, authorization, secrets, payments, personal data, destructive operations, dependencies, deployment หรือ security boundary อื่น บันทึกคำตัดสินและหลักฐานต่อฟีเจอร์ใน spec
91
92
  - **Check**: `manual` (ข้ามอัตโนมัติ), `when-behavioral` (รันเมื่อมี Runtime Behavior เช่น UI/CLI/API), `always` (รันทุกฟีเจอร์)
92
93
  - **Try Guide**: `manual` (ข้ามอัตโนมัติ), `when-user-facing` (สร้าง Try Guide เมื่อเป็น UI/CLI), `always` (สร้างทุกฟีเจอร์)
93
94
 
95
+ ทุก product/spec edit ทำให้ receipt เดิมหมดอายุ เมื่อ Independent Review gate
96
+ ทำงาน ให้รัน Verify และซ่อม audit findings ให้เสร็จก่อนส่ง
97
+ `audit independent current` ไปยัง fresh reviewer context หากไม่สามารถรับ
98
+ receipt ที่ verdict เป็น `passed` และ freshness เป็น `current` ให้หยุด Continuous
99
+ Mode โดยคง workspace/branch ไว้ ห้ามข้ามไป archive หรือ local squash-merge
100
+
101
+ สำหรับฟีเจอร์ browser-facing ให้รัน `npm run test:browser` เมื่อมี
102
+ `test:browser` script และเก็บ interactive evidence ผ่าน `browseros-neo` เมื่อ
103
+ พร้อมใช้งาน หาก script หรือ MCP ไม่มี ให้บันทึก limitation และหยุดเมื่อ evidence
104
+ นั้นเป็น gate ที่จำเป็น ห้ามติดตั้งหรืออ้างผลโดยปริยาย
105
+
94
106
  ### 2.5 Repair Findings
95
107
  - ซ่อมแซม Finding ระดับ P0/P1 ที่เกิดขึ้นจากฟีเจอร์นี้โดยอัตโนมัติ (ไม่เกิน `continuous.maxRepairAttempts` ครั้ง)
96
108
  - หากไม่สามารถซ่อมแซมได้ หรือมี P0/P1 ค้างอยู่ ให้หยุดการทำงานทันที
@@ -39,12 +39,16 @@ Gather these, then summarize. Do not dump file contents.
39
39
  `devflow/history/rollbacks/`. A missing rollback folder on a legacy
40
40
  installation is a warning, not a blocker; `/complete` creates it on the
41
41
  first rollback.
42
- - Check `devflow/context/findings.md`. Missing on a legacy installation is
43
- a warning, not a blocker; `/audit` and `/complete` create it on first use.
42
+ - Check `devflow/context/findings.md` and `devflow/context/{xxx-slug}/findings.md`.
43
+ Missing on a legacy installation is a warning, not a blocker; `/audit` and `/complete` create it on first use.
44
44
  When present, confirm its entry headers still match
45
45
  `### <id> [<severity>] <status> - <title>` and warn on a malformed ledger.
46
46
  Report any P0 or P1 finding still `open` or `fixed` by ID, since it will
47
47
  block `/complete`. Never block on the ledger yourself.
48
+ - Check `devflow/context/review.md` and `devflow/context/{xxx-slug}/review.md`. Missing is a
49
+ warning, not a blocker; `/audit independent current` and `/complete` create
50
+ it on first use. When present, validate the required request or receipt
51
+ fields and report pending, changes-requested, malformed, or stale state.
48
52
  - If `.gitignore` marks DevFlow workflow files as local-only, still require
49
53
  the files to exist on disk. Ignored but present is healthy; ignored and
50
54
  missing means the local workflow needs to be restored.
@@ -53,7 +57,8 @@ Gather these, then summarize. Do not dump file contents.
53
57
  file with `schemaVersion: 1`. Reject unknown keys and unsupported values.
54
58
  Report the effective workflow, git, verification, regular quality-gate,
55
59
  Continuous quality-gate, and Continuous Mode settings. Confirm each audit,
56
- check, and try-guide gate uses its supported values and defaults to `manual`.
60
+ independent-review, check, and try-guide gate uses its supported values and
61
+ defaults to `manual`.
57
62
  An invalid config is a setup blocker for mutating workflow skills because
58
63
  they must not guess which policy to follow.
59
64
  2. **Tool adapters**
@@ -61,7 +66,7 @@ Gather these, then summarize. Do not dump file contents.
61
66
  logical adapters: Codex, Claude Code, GitHub Copilot, Antigravity, and OpenCode.
62
67
  - Confirm at least one compatible skill tree exists. Codex, Antigravity, and
63
68
  GitHub Copilot use `.agents/skills/`. Claude Code uses `.claude/skills/`.
64
- OpenCode can use either tree.
69
+ - OpenCode can use either tree.
65
70
  - If both skill trees are present, say that is healthy when the selected
66
71
  tools require both. Compare their skill folder names and warn about missing
67
72
  skills on either side.
@@ -151,6 +151,27 @@ discarded at `/complete`.
151
151
 
152
152
  This is a draft. Don't present it yet - critique it first.
153
153
 
154
+ ### Quality-gate and browser-evidence plan
155
+
156
+ Before finishing the draft, read `devflow/config.json` and record the effective
157
+ `qualityGates.regular.independentReview` policy in the spec. `manual` does not
158
+ activate an automatic gate, `always` does, and `when-sensitive` activates it
159
+ only when the feature touches authentication, authorization, secrets, payments,
160
+ personal data, destructive operations, dependencies, deployment, or another
161
+ security-sensitive boundary. Record the sensitivity decision and its evidence;
162
+ do not silently choose the conditional result later.
163
+
164
+ When the gate is active, add an explicit post-implementation handoff to
165
+ `audit independent current`. The receipt must be produced from a fresh reviewer
166
+ context after the final product/spec change; `/feature` only plans this handoff
167
+ and never fabricates or pre-approves a receipt.
168
+
169
+ Also inspect the repository's declared scripts and the feature behavior. If the
170
+ feature is browser-facing and `test:browser` exists, put `npm run test:browser`
171
+ in the verification matrix. Record an interactive `browseros-neo` handoff for
172
+ observable UI behavior when that MCP is available. If either capability is
173
+ absent, record it as unavailable instead of installing or claiming evidence.
174
+
154
175
  ## Step 4 - red-team the draft, then tighten
155
176
 
156
177
  Before the user reads it, turn on the spec yourself and try to break it. The
@@ -211,4 +232,4 @@ checked), archive the finished `devflow/context/{xxx-slug}/spec.md` to
211
232
 
212
233
  Format the output to match the project's conventions in
213
234
  `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
214
- enumerations and tables for matrices rather than dense paragraphs.
235
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -44,6 +44,26 @@ the visual target - build components to match them, and treat `prototypes/theme.
44
44
  as the token source (the spec's first step ports it into the app's global
45
45
  stylesheet before the components are built).
46
46
 
47
+ ### Quality-gate and browser preflight
48
+
49
+ Read `devflow/config.json` and the target spec's recorded decision for
50
+ `qualityGates.regular.independentReview`. `manual` does not activate an
51
+ automatic gate, `always` does, and `when-sensitive` follows the sensitivity
52
+ decision and evidence captured by `/feature` or `/fix`. Stop for a spec repair
53
+ instead of guessing when a conditional decision is missing.
54
+
55
+ Treat any product or living-spec edit in this build as invalidating an earlier
56
+ receipt. After the final Verify pass, an active gate routes to
57
+ `audit independent current`; only a fresh receipt with `passed` verdict and
58
+ `current` freshness may proceed toward `/complete`. This skill never approves
59
+ its own work or rewrites receipt evidence.
60
+
61
+ For a browser-facing step, run `npm run test:browser` when the script exists and
62
+ record the result in the step evidence. Use `browseros-neo` for the interactive
63
+ handoff when it is available and the done-when is visual or behavioral. When the
64
+ script or MCP is absent, report that exact limitation; do not silently install a
65
+ runner or claim browser evidence.
66
+
47
67
  **Resuming?** If the spec already has some build steps checked off (`- [x]`), this
48
68
  feature was started earlier and interrupted (often a cleared context). The spec and
49
69
  its ticked steps are files, so pick up where it left off: read which steps are done,
@@ -217,4 +237,4 @@ approval. This skill does not touch main.
217
237
 
218
238
  Format the output to match the project's conventions in
219
239
  `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
220
- enumerations and tables for matrices rather than dense paragraphs.
240
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -133,6 +133,22 @@ If no changes are needed, say so.
133
133
 
134
134
  ## Step 5 - point to optional CI setup
135
135
 
136
+ Before the CI handoff, read `devflow/config.json` and report the effective
137
+ `qualityGates.regular.independentReview` onboarding default. Preserve an
138
+ existing valid user choice. Explain that `manual` is opt-in, `always` requires a
139
+ fresh receipt for every regular run, and `when-sensitive` activates for work
140
+ touching authentication, authorization, secrets, payments, personal data,
141
+ destructive operations, dependencies, deployment, or another security boundary.
142
+ Onboarding has no active task to review, so it must not create `review.md` or
143
+ claim a verdict; when the future gate activates, the handoff is
144
+ `audit independent current` after final implementation and verification.
145
+
146
+ Detect browser capability without installing anything. If the project already
147
+ declares `test:browser`, record `npm run test:browser` in the onboarding report.
148
+ Also report whether `browseros-neo` is available for interactive UI evidence.
149
+ When a browser-facing project lacks either capability, point to `/browser-tests`
150
+ as an optional setup route and describe the gap honestly.
151
+
136
152
  Do not create or change Verify commands or GitHub workflows during onboarding.
137
153
  Report any verification command or CI already present. When equivalent automatic
138
154
  pull-request checks are absent, mention the optional standalone setup:
@@ -261,4 +277,4 @@ $overview
261
277
 
262
278
  Format the output to match the project's conventions in
263
279
  `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
264
- enumerations and tables for matrices rather than dense paragraphs.
280
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -58,6 +58,17 @@ state.
58
58
  8. **Onboarding check** - Before recommending `/overview`, check whether `AGENTS.md`
59
59
  still contains the `<!-- devflow:onboarding-required -->` marker or standard template commands.
60
60
  When it does, onboarding is incomplete and `/onboard` is the next action.
61
+ 9. **Independent review and browser evidence** - read
62
+ `qualityGates.regular.independentReview` from `devflow/config.json` and the
63
+ recorded sensitivity decision for `when-sensitive`. For every active run,
64
+ report the `review.md` state, verdict, freshness, check result, warnings, and
65
+ whether the effective gate is satisfied. An active gate with a missing,
66
+ pending, malformed, changes-requested, or stale receipt routes to
67
+ `audit independent current`, never `/complete`. Also report whether the spec
68
+ requires browser proof, whether `npm run test:browser` is declared and has
69
+ recorded evidence, and whether an interactive `browseros-neo` handoff is
70
+ available or explicitly unavailable. This remains read-only: do not execute
71
+ either browser path from `/status`.
61
72
 
62
73
  ## Output
63
74
 
@@ -106,4 +117,4 @@ drift is half the value of the command.
106
117
 
107
118
  Format the output to match the project's conventions in
108
119
  `devflow/context/ai-interaction.md`: concise, scannable markdown, with lists for
109
- enumerations and tables for matrices rather than dense paragraphs.
120
+ enumerations and tables for matrices rather than dense paragraphs.
@@ -17,7 +17,7 @@ Where this sits in the workflow:
17
17
  Testing is optional in the Blueprint until the project declares a real test
18
18
  command in `AGENTS.md`. This skill is the explicit setup path. It adds or
19
19
  normalizes **unit testing** only; browser automation and end-to-end testing are
20
- separate setup work.
20
+ separate optional setup through `/browser-tests`.
21
21
 
22
22
  ## Input
23
23
 
@@ -1,10 +1,13 @@
1
1
  ---
2
2
  name: try
3
- description: "[devflow] Generate a human manual try guide for the current or most recently completed Blueprint feature, fix, or rollback. Reads the spec, project commands, and available app context, then tells the user exactly what to start, where to go, what to click or run, what to expect, and what would count as wrong. Read-only. Use when the user runs /try, invokes $try, asks how to test manually, asks where to click, asks how to see the change, or wants a manual review path after /implement, /autopilot, /check, or /complete."
3
+ description: "[devflow] Generate a human manual try guide for the current or most recently completed Blueprint feature, fix, or rollback. Reads the spec, project commands, and available app context, connects with MCP browseros-neo when available for interactive previews, then tells the user exactly what to start, where to go, what to click or run, what to expect, and what would count as wrong. Read-only. Use when the user runs /try, invokes $try, asks how to test manually, asks where to click, asks how to see the change, or wants a manual review path after /implement, /autopilot, /check, or /complete."
4
+ argument-hint: "[{latest|step-id|path}]"
4
5
  ---
5
6
 
6
7
  # try - manual review guide
7
8
 
9
+ $ARGUMENTS
10
+
8
11
  Where this sits in the workflow:
9
12
 
10
13
  /implement or /complete -> [try] -> human review
@@ -58,7 +61,7 @@ include one unaffected regression path from the rollback spec.
58
61
 
59
62
  Use the Commands section in `AGENTS.md`. Match the project type:
60
63
 
61
- - **Web app** - dev server command, URL, and the route or screen to open.
64
+ - **Web app** - dev server command, URL, and the route or screen to open. If `browseros-neo` MCP server is active (`http://127.0.0.1:9010/mcp`), you can also offer to inspect or navigate in the live browser.
62
65
  - **Server/API** - server command, base URL, endpoint, method, and expected
63
66
  response shape.
64
67
  - **CLI** - exact command(s), arguments, and expected output.
@@ -77,9 +80,9 @@ Produce a short guide with these sections:
77
80
  2. **Open** - URLs, screens, tabs, API endpoints, or CLI commands.
78
81
  3. **Do** - clicks, inputs, selections, or command arguments.
79
82
  4. **Expect** - visible result, output, response, state change, file, or lack of
80
- error.
83
+ error.
81
84
  5. **Watch For** - common wrong outcomes, console or network errors, stale data,
82
- missing fields, bad empty states, layout issues, or safety warnings.
85
+ missing fields, bad empty states, layout issues, or safety warnings.
83
86
 
84
87
  Keep it concrete. Prefer:
85
88
 
@@ -97,23 +100,5 @@ End with:
97
100
 
98
101
  - **Best signal** - the one thing the user should try first.
99
102
  - **Optional deeper checks** - only if useful.
100
- - **Gaps** - anything the guide cannot know from the docs, such as missing route
101
- names, seed data, credentials, or external services.
102
-
103
- If the feature is not user-visible, say so and provide the closest manual signal,
104
- such as an API response, CLI output, log line, or unit test command.
105
-
106
- ## Rules
107
-
108
- - Read-only only. Do not edit, commit, merge, push, install, or delete.
109
- - Do not run the app unless the user explicitly asks you to try it for them.
110
- - Do not pretend a path is known when the spec does not say it. Give the best
111
- likely path and label uncertainty.
112
- - Keep the guide short enough to follow while the app is open.
113
- - Match the project's commands from `AGENTS.md`.
114
-
115
- ## Formatting
116
-
117
- Format the output to match the project's conventions in
118
- `devflow/context/ai-interaction.md`: concise, scannable markdown, with numbered
119
- steps for the manual path and short bullets for warnings.
103
+ - **MCP Visual Preview** - mention live browser inspection via MCP `browseros-neo` if active.
104
+ - **Gaps** - anything the guide cannot know from the docs, such as missing route or seed data.
@@ -18,13 +18,13 @@ To start a new project, scaffold the application first in an empty folder, then
18
18
  - `devflow/context/coding-standards.md` - engineering conventions & rules to follow
19
19
  - `devflow/context/ai-interaction.md` - how to interact with the user on this project
20
20
  - `devflow/context/glossary.md` - domain terms & architecture definitions
21
- - `devflow/context/{xxx-slug}/` - active task living spec, stage, and findings ledger
21
+ - `devflow/context/{xxx-slug}/` - active task living spec, stage, findings ledger, and independent review receipt
22
22
 
23
23
  ## Project configuration
24
24
 
25
25
  `devflow/config.json` is the user-owned, machine-readable workflow policy for this project. Workflow skills read the relevant settings before acting. A missing file means built-in defaults. An invalid file falls back to defaults for read-only status reporting, but mutating workflow commands stop and point to `/doctor` instead of guessing.
26
26
 
27
- `qualityGates.regular` controls automatic audit, check, and try-guide behavior for the normal workflow and Autopilot. `qualityGates.continuous` controls the same per-feature gates for Continuous Mode. Every gate defaults to `manual`.
27
+ `qualityGates.regular` controls automatic audit, independent-review, check, and try-guide behavior for the normal workflow and Autopilot. `qualityGates.continuous` controls the same per-feature gates for Continuous Mode. Every gate defaults to `manual`. The conditional modes are `when-sensitive` for audit and independent review, `when-behavioral` for check, and `when-user-facing` for try guides. `always` runs the gate for every work item in that workflow.
28
28
 
29
29
  ## Tool-Specific Adapters & Execution Rules
30
30
 
@@ -38,7 +38,7 @@ Unused adapter families can be removed. Codex, Antigravity, GitHub Copilot, and
38
38
 
39
39
  ### Universal Invocation & Agent Directives:
40
40
 
41
- 1. **Canonical Command Names & AI Provider Invocation**: Each workflow stage and companion tool has exactly **one Canonical Name** (e.g. `feature`, `fix`, `implement`, `check`, `complete`, `continuous`, `discovery`, `idea`, `grill`, `brainstorm`, `devflow`, `doctor`, `overview`, `debug`, `onboard`, `adopt`, `try`, `rollback`, `ci`, `test`, `tests`, `autopilot`, `prototype`, `report-html`, `brief`, `audit`, `release`, `convert-any-to-md`). The way you invoke commands depends on your AI Provider / Tool:
41
+ 1. **Canonical Command Names & AI Provider Invocation**: Each workflow stage and companion tool has exactly **one Canonical Name** (e.g. `feature`, `fix`, `implement`, `check`, `complete`, `continuous`, `discovery`, `idea`, `grill`, `brainstorm`, `devflow`, `doctor`, `overview`, `debug`, `onboard`, `adopt`, `try`, `rollback`, `ci`, `test`, `tests`, `browser-tests`, `autopilot`, `prototype`, `report-html`, `brief`, `audit`, `release`, `convert-any-to-md`, `publish-devflow`). The way you invoke commands depends on your AI Provider / Tool:
42
42
  - **Canonical Name (Plain text)**: Directly invoke or prompt the command by its standard name (e.g., `feature`, `implement`, `continuous`, `devflow`, `discovery`).
43
43
  - **Slash Prefix (`/`)**: For tools supporting slash commands (Claude Code, Google Antigravity, Gemini CLI), e.g., `/feature`, `/fix`, `/implement`, `/continuous`, `/devflow`, `/discovery`.
44
44
  - **Dollar Prefix (`$`)**: For OpenAI Codex CLI or skill-invocation tools, e.g., `$feature`, `$fix`, `$continuous`, `$devflow`, `$discovery`.
@@ -82,7 +82,7 @@ All development tasks execute through the 4-step progressive lifecycle:
82
82
 
83
83
  The dashboard and status reporting can show the active or most recent substantial DevFlow command from `devflow/.state/run.json`. This file is generated local state, ignored by Git, and never part of a feature commit.
84
84
 
85
- Commands with meaningful progress or a durable handoff should write it when the state directory exists: `onboard`, `adopt`, `discovery`, `overview`, `feature`, `fix`, `rollback`, `implement`, `debug`, `check`, `audit`, `tests`, `ci`, `prototype`, `autopilot`, `continuous`, `complete`, and `release`. Short read-only orientation commands such as `brief`, `try`, `status`, and `doctor` do not need activity state.
85
+ Commands with meaningful progress or a durable handoff should write it when the state directory exists: `onboard`, `adopt`, `discovery`, `overview`, `feature`, `fix`, `rollback`, `implement`, `debug`, `check`, `audit`, `tests`, `browser-tests`, `ci`, `prototype`, `autopilot`, `continuous`, `complete`, and `release`. Short read-only orientation commands such as `brief`, `try`, `status`, and `doctor` do not need activity state.
86
86
 
87
87
  Writing the initial activity record is the first action of a tracked command, before project inspection, preflight, or other tool calls. This one generated state write does not authorize product changes or bypass any safety check. Set status to `running`, use the command name and a truthful initial summary, then replace the record at meaningful milestones. On a preflight stop or another blocker, set it to `blocked` with the exact recovery command. Leave the final state in place for the next session; the next tracked command replaces it. Use this schema:
88
88
 
@@ -140,4 +140,10 @@
140
140
  - *Dependencies*: None
141
141
  - *Scope*: เพิ่มฟังก์ชัน `installRecommendedSkills` และ `updateRecommendedSkills` ใน `skill-manager.ts`, รองรับสวิตช์ `--recommended` ในคำสั่ง `nexus-devflow skill add` และ `nexus-devflow skill update`, พร้อมอัปเดตเอกสาร `README.md`, `README.th.md` และ Automated Tests
142
142
 
143
+ ---
144
+
145
+ ## 🔄 Phase 18: Upstream AI Blueprint v1.1.0 & v1.2.0 Synchronization
143
146
 
147
+ - [x] **18. Sync Upstream v1.1.0 & v1.2.0 (Browser Tests & Independent Review System) (`DISC-20260901-001`)** `[Size: M]`
148
+ - *Dependencies*: None
149
+ - *Scope*: ผสานสคิล `/browser-tests` สำหรับ Playwright/E2E testing, ระบบตรวจทานอิสระ Independent Audit Review (`audit independent current` พร้อม `review.ts` และ `review.md`), อัปเกรด Config Quality Gates (`independentReview`), อัปเดต CLI Engine/Dashboard และปรับปรุงคู่มือ Scaffolding
@@ -16,11 +16,13 @@
16
16
  "qualityGates": {
17
17
  "regular": {
18
18
  "audit": "manual",
19
+ "independentReview": "manual",
19
20
  "check": "manual",
20
21
  "tryGuide": "manual"
21
22
  },
22
23
  "continuous": {
23
24
  "audit": "manual",
25
+ "independentReview": "manual",
24
26
  "check": "manual",
25
27
  "tryGuide": "manual"
26
28
  }
@@ -131,6 +131,10 @@ Testing is a core quality gate in Nexus-DevFlow, not an afterthought:
131
131
  - Use isolated temporary directories (`fs.mkdtemp` in `os.tmpdir()`) and ensure cleanup in `finally` blocks.
132
132
  - **Empirical Proof Contract**:
133
133
  - Never claim a task is "working", "tested", or "verified" without providing concrete empirical proof (exact command executed, terminal output, pass/fail counts, exit code).
134
+ - **Hybrid Browser Verification Protocol**:
135
+ - **Dual-Layer Hierarchy**:
136
+ 1. *Code-Driven Automation (CI/Repeatable)*: Headless Playwright (`@playwright/test`) assertions executed via `npm run test:browser`.
137
+ 2. *Interactive AI Visual QA (MCP)*: Live DOM and styling inspection via MCP `browseros-neo` (`http://127.0.0.1:9010/mcp`) during `/check` and `/try`.
134
138
  - **Two-Stage Review Pattern (Verification Gate)**:
135
139
  - **Stage 1: Spec Fidelity & Acceptance Gate**:
136
140
  - Verify 100% conformance against the Single Living Spec (`current-feature.md`).
@@ -145,7 +149,7 @@ Testing is a core quality gate in Nexus-DevFlow, not an afterthought:
145
149
 
146
150
  ---
147
151
 
148
- ## 8. Findings Ledger & Quality Gates (`findings.md`)
152
+ ## 8. Findings Ledger & Quality Gates (`findings.md`, `review.md`)
149
153
 
150
154
  - All quality defects, security findings, or regression issues identified during review must be logged in `devflow/context/findings.md`.
151
155
  - **Finding State Machine**:
@@ -155,6 +159,9 @@ Testing is a core quality gate in Nexus-DevFlow, not an afterthought:
155
159
  - `accepted`: Formally waived with recorded user justification.
156
160
  - **P0/P1 Blockers**: Any P0 or P1 finding in `open` or `fixed` status unconditionally blocks `/complete`.
157
161
  - **Allowed Waivers**: A P0 or P1 finding may only be bypassed if marked `accepted` (with explicit user justification recorded) or `invalid` (with evidence recorded by `/audit`).
162
+ - **Independent Review Gate (`review.md`)**:
163
+ - Holds immutable review request and receipt records bound to target commit SHA, merge base, and spec SHA-256 hash.
164
+ - When `qualityGates.regular.independentReview` is active, completion is blocked until a fresh session completes the 4-lens audit and records a valid, non-stale `passed` receipt.
158
165
 
159
166
  ---
160
167