@opengsd/gsd-core 1.13.0 → 1.15.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/README.ja-JP.md +3 -3
- package/README.ko-KR.md +3 -3
- package/README.pt-BR.md +3 -3
- package/README.zh-CN.md +3 -3
- package/agents/gsd-advisor-researcher.compact.md +85 -0
- package/agents/gsd-ai-researcher.compact.md +96 -0
- package/agents/gsd-assumptions-analyzer.compact.md +81 -0
- package/agents/gsd-code-fixer.compact.md +459 -0
- package/agents/gsd-code-fixer.md +9 -8
- package/agents/gsd-code-reviewer.compact.md +269 -0
- package/agents/gsd-code-reviewer.md +15 -3
- package/agents/gsd-codebase-mapper.compact.md +760 -0
- package/agents/gsd-debug-session-manager.compact.md +360 -0
- package/agents/gsd-debug-session-manager.md +17 -2
- package/agents/gsd-debugger.md +2 -2
- package/agents/gsd-doc-classifier.compact.md +192 -0
- package/agents/gsd-doc-synthesizer.compact.md +200 -0
- package/agents/gsd-doc-verifier.compact.md +143 -0
- package/agents/gsd-doc-writer.compact.md +440 -0
- package/agents/gsd-dom-verifier.compact.md +138 -0
- package/agents/gsd-domain-researcher.compact.md +141 -0
- package/agents/gsd-eval-auditor.compact.md +160 -0
- package/agents/gsd-eval-auditor.md +1 -1
- package/agents/gsd-eval-planner.compact.md +137 -0
- package/agents/gsd-executor.md +13 -8
- package/agents/gsd-framework-selector.compact.md +82 -0
- package/agents/gsd-integration-checker.compact.md +245 -0
- package/agents/gsd-intel-updater.compact.md +226 -0
- package/agents/gsd-intel-updater.md +1 -1
- package/agents/gsd-mempalace-curator.compact.md +45 -0
- package/agents/gsd-nyquist-auditor.compact.md +179 -0
- package/agents/gsd-pattern-mapper.compact.md +275 -0
- package/agents/gsd-phase-researcher.md +19 -11
- package/agents/gsd-plan-checker.md +8 -7
- package/agents/gsd-planner.md +12 -8
- package/agents/gsd-project-researcher.compact.md +587 -0
- package/agents/gsd-project-researcher.md +1 -1
- package/agents/gsd-research-synthesizer.compact.md +212 -0
- package/agents/gsd-research-synthesizer.md +1 -1
- package/agents/gsd-roadmapper.compact.md +454 -0
- package/agents/gsd-roadmapper.md +13 -0
- package/agents/gsd-security-auditor.compact.md +162 -0
- package/agents/gsd-ui-auditor.compact.md +404 -0
- package/agents/gsd-ui-auditor.md +155 -17
- package/agents/gsd-ui-checker.compact.md +277 -0
- package/agents/gsd-ui-researcher.compact.md +282 -0
- package/agents/gsd-ui-researcher.md +1 -1
- package/agents/gsd-user-profiler.compact.md +108 -0
- package/agents/gsd-verifier.md +10 -9
- package/bin/install.js +848 -163
- package/commands/gsd/autonomous.md +2 -2
- package/commands/gsd/capture.md +1 -1
- package/commands/gsd/cleanup.md +1 -0
- package/commands/gsd/code-review.md +2 -1
- package/commands/gsd/complete-milestone.md +1 -0
- package/commands/gsd/config.md +1 -0
- package/commands/gsd/debug.md +1 -0
- package/commands/gsd/graphify.md +1 -0
- package/commands/gsd/health.md +1 -0
- package/commands/gsd/mempalace-capture.md +8 -3
- package/commands/gsd/mempalace-recall.md +1 -0
- package/commands/gsd/new-milestone.md +1 -0
- package/commands/gsd/new-project.md +1 -0
- package/commands/gsd/next.md +1 -0
- package/commands/gsd/pause-work.md +1 -0
- package/commands/gsd/phase.md +1 -0
- package/commands/gsd/plan-review-convergence.md +6 -6
- package/commands/gsd/pr-branch.md +1 -0
- package/commands/gsd/progress.md +1 -1
- package/commands/gsd/quick-batch.md +1 -1
- package/commands/gsd/resume-work.md +1 -0
- package/commands/gsd/review-backlog.md +1 -0
- package/commands/gsd/review.md +2 -3
- package/commands/gsd/settings.md +2 -1
- package/commands/gsd/stats.md +1 -0
- package/commands/gsd/thread.md +1 -0
- package/commands/gsd/workspace.md +1 -0
- package/commands/gsd/workstreams.md +1 -0
- package/gsd-core/bin/check-latest-version.cjs +8 -3
- package/gsd-core/bin/gsd-tools.cjs +672 -146
- package/gsd-core/bin/lib/adr-parser.cjs +4 -2
- package/gsd-core/bin/lib/artifacts.cjs +2 -1
- package/gsd-core/bin/lib/audit.cjs +119 -34
- package/gsd-core/bin/lib/broken-windows.cjs +168 -49
- package/gsd-core/bin/lib/capability-lifecycle.cjs +10 -6
- package/gsd-core/bin/lib/capability-loader.cjs +135 -1
- package/gsd-core/bin/lib/capability-registry.cjs +96 -189
- package/gsd-core/bin/lib/capability-source.cjs +19 -2
- package/gsd-core/bin/lib/capability-validator.cjs +14 -2
- package/gsd-core/bin/lib/check-command-router.cjs +213 -49
- package/gsd-core/bin/lib/code-review-depth.cjs +2 -2
- package/gsd-core/bin/lib/codex-agent-toml.cjs +21 -25
- package/gsd-core/bin/lib/commands.cjs +823 -112
- package/gsd-core/bin/lib/config-loader.cjs +66 -4
- package/gsd-core/bin/lib/config.cjs +186 -45
- package/gsd-core/bin/lib/coverage.cjs +1 -1
- package/gsd-core/bin/lib/decisions.cjs +164 -45
- package/gsd-core/bin/lib/external-descriptor-trust.cjs +29 -14
- package/gsd-core/bin/lib/frontmatter.cjs +13 -0
- package/gsd-core/bin/lib/graphify.cjs +10 -2
- package/gsd-core/bin/lib/gsd2-import.cjs +1 -2
- package/gsd-core/bin/lib/health-diagnostic-rules/state-consistency.cjs +12 -1
- package/gsd-core/bin/lib/health-diagnostic-rules/worktree-health.cjs +1 -1
- package/gsd-core/bin/lib/host-runtime-detection.cjs +9 -0
- package/gsd-core/bin/lib/init.cjs +614 -86
- package/gsd-core/bin/lib/install-engine.cjs +29 -3
- package/gsd-core/bin/lib/install-profiles.cjs +14 -0
- package/gsd-core/bin/lib/installer-migrations.cjs +41 -5
- package/gsd-core/bin/lib/loop-resolver.cjs +50 -31
- package/gsd-core/bin/lib/mcp-catalog.cjs +2 -2
- package/gsd-core/bin/lib/milestone.cjs +37 -13
- package/gsd-core/bin/lib/model-resolver.cjs +253 -53
- package/gsd-core/bin/lib/phase-command-router.cjs +16 -2
- package/gsd-core/bin/lib/phase-id-card.cjs +32 -0
- package/gsd-core/bin/lib/phase-id-display.cjs +78 -0
- package/gsd-core/bin/lib/phase-id.cjs +268 -27
- package/gsd-core/bin/lib/phase-lifecycle.cjs +61 -0
- package/gsd-core/bin/lib/phase-locator.cjs +29 -10
- package/gsd-core/bin/lib/phase.cjs +393 -88
- package/gsd-core/bin/lib/plan-document.cjs +49 -1
- package/gsd-core/bin/lib/planning-document.cjs +459 -0
- package/gsd-core/bin/lib/planning-inspect.cjs +52 -19
- package/gsd-core/bin/lib/planning-snapshot.cjs +61 -12
- package/gsd-core/bin/lib/planning-workspace.cjs +57 -3
- package/gsd-core/bin/lib/pr-branch-patterns.cjs +57 -0
- package/gsd-core/bin/lib/pristine-baseline.cjs +182 -0
- package/gsd-core/bin/lib/probe-core.cjs +7 -1
- package/gsd-core/bin/lib/prohibition-enforcement.cjs +91 -4
- package/gsd-core/bin/lib/project-root.cjs +41 -2
- package/gsd-core/bin/lib/quick-batch.cjs +1 -1
- package/gsd-core/bin/lib/refactor-trigger-command-router.cjs +61 -2
- package/gsd-core/bin/lib/research-store.cjs +11 -12
- package/gsd-core/bin/lib/review-lane-descriptor.cjs +10 -30
- package/gsd-core/bin/lib/review-lane-invocation.cjs +23 -0
- package/gsd-core/bin/lib/review-reviewer-selection.cjs +2 -2
- package/gsd-core/bin/lib/reviewer-step-dispatch.cjs +337 -0
- package/gsd-core/bin/lib/roadmap-command-router.cjs +12 -4
- package/gsd-core/bin/lib/roadmap-parser.cjs +219 -18
- package/gsd-core/bin/lib/roadmap-upgrade.cjs +1539 -13
- package/gsd-core/bin/lib/roadmap.cjs +356 -42
- package/gsd-core/bin/lib/runtime-artifact-conversion.cjs +310 -41
- package/gsd-core/bin/lib/runtime-artifact-install-plan.cjs +15 -4
- package/gsd-core/bin/lib/runtime-artifact-layout.cjs +13 -5
- package/gsd-core/bin/lib/runtime-homes.cjs +4 -0
- package/gsd-core/bin/lib/runtime-hooks-surface.cjs +408 -37
- package/gsd-core/bin/lib/runtime-name-policy.cjs +111 -1
- package/gsd-core/bin/lib/security.cjs +126 -7
- package/gsd-core/bin/lib/shell-command-projection.cjs +10 -6
- package/gsd-core/bin/lib/state-document.cjs +130 -28
- package/gsd-core/bin/lib/state-md-schema.cjs +21 -14
- package/gsd-core/bin/lib/state-transition.cjs +181 -30
- package/gsd-core/bin/lib/state.cjs +265 -27
- package/gsd-core/bin/lib/surface.cjs +77 -3
- package/gsd-core/bin/lib/task-command-router.cjs +12 -6
- package/gsd-core/bin/lib/tdd-red-evidence.cjs +78 -5
- package/gsd-core/bin/lib/uat-predicate.cjs +47 -4
- package/gsd-core/bin/lib/uat.cjs +9 -1
- package/gsd-core/bin/lib/ui-consideration-probe.cjs +15 -2
- package/gsd-core/bin/lib/ui-frontend-evidence.cjs +100 -9
- package/gsd-core/bin/lib/undo-commit-selection.cjs +131 -0
- package/gsd-core/bin/lib/update-context.cjs +30 -24
- package/gsd-core/bin/lib/vendor/js-yaml.cjs +11 -3
- package/gsd-core/bin/lib/verification.cjs +315 -30
- package/gsd-core/bin/lib/verify-command-grounding.cjs +47 -3
- package/gsd-core/bin/lib/verify.cjs +320 -48
- package/gsd-core/bin/lib/workstream-inventory.cjs +1 -0
- package/gsd-core/bin/lib/worktree-base-ref.cjs +482 -73
- package/gsd-core/bin/lib/worktree-safety.cjs +797 -58
- package/gsd-core/bin/shared/config-defaults.manifest.json +4 -0
- package/gsd-core/bin/shared/config-schema.manifest.json +6 -0
- package/gsd-core/bin/verify-reapply-patches.cjs +439 -80
- package/gsd-core/references/checkpoints.md +5 -3
- package/gsd-core/references/compact-content-gate.md +66 -0
- package/gsd-core/references/edge-probe-fixtures/01-round-half-even/expected-coverage.json +28 -3
- package/gsd-core/references/edge-probe-fixtures/02-merge-intervals/expected-coverage.json +37 -4
- package/gsd-core/references/edge-probe-fixtures/03-truncate-graphemes/expected-coverage.json +28 -3
- package/gsd-core/references/edge-probe-fixtures/04-money-rounding/expected-coverage.json +28 -3
- package/gsd-core/references/edge-probe-fixtures/05-list-dedupe/expected-coverage.json +37 -4
- package/gsd-core/references/edge-probe-fixtures/06-resolved-mixed/expected-coverage.json +37 -4
- package/gsd-core/references/edge-probe.md +195 -21
- package/gsd-core/references/execute-phase-between-wave-reset.md +7 -6
- package/gsd-core/references/execute-phase-wave-guard.md +22 -11
- package/gsd-core/references/gsd-run-resolver.md +1 -1
- package/gsd-core/references/loop-hook-dispatch.md +18 -0
- package/gsd-core/references/model-profiles.md +13 -4
- package/gsd-core/references/phase-argument-parsing.md +9 -7
- package/gsd-core/references/phase-id-convention.md +28 -0
- package/gsd-core/references/planner-gap-closure.md +2 -0
- package/gsd-core/references/planner-load-graph-context.md +24 -13
- package/gsd-core/references/planner-verify-command-grounding.md +14 -0
- package/gsd-core/references/planning-config.md +14 -2
- package/gsd-core/references/tdd.md +30 -4
- package/gsd-core/references/thinking-models-planning.md +18 -2
- package/gsd-core/references/ui-consideration-probe.md +10 -5
- package/gsd-core/references/verification-patterns.md +17 -4
- package/gsd-core/references/verify-command-path-resolvability.md +10 -2
- package/gsd-core/references/worktree-path-safety.md +433 -2
- package/gsd-core/templates/README.md +7 -1
- package/gsd-core/templates/state.md +6 -3
- package/gsd-core/templates/summary.compact.md +212 -0
- package/gsd-core/templates/user-setup.compact.md +199 -0
- package/gsd-core/templates/user-setup.md +0 -9
- package/gsd-core/templates/verification-report.md +1 -1
- package/gsd-core/workflows/_runtime-launcher.snippet.sh +1 -1
- package/gsd-core/workflows/add-backlog.md +1 -1
- package/gsd-core/workflows/add-phase.md +1 -1
- package/gsd-core/workflows/add-tests.md +2 -2
- package/gsd-core/workflows/add-todo.md +6 -5
- package/gsd-core/workflows/ai-integration-phase.md +11 -3
- package/gsd-core/workflows/audit-fix.md +1 -1
- package/gsd-core/workflows/audit-milestone.md +1 -1
- package/gsd-core/workflows/audit-uat.md +1 -1
- package/gsd-core/workflows/autonomous/steps/converge-fail-fast.md +9 -18
- package/gsd-core/workflows/autonomous.md +29 -16
- package/gsd-core/workflows/check-todos.md +6 -4
- package/gsd-core/workflows/cleanup.md +5 -3
- package/gsd-core/workflows/code-review/steps/dispatch-fix.md +4 -3
- package/gsd-core/workflows/code-review/steps/structural-pre-pass.md +8 -1
- package/gsd-core/workflows/code-review-fix.md +108 -22
- package/gsd-core/workflows/code-review.md +216 -73
- package/gsd-core/workflows/complete-milestone/detail/elaboration.md +274 -0
- package/gsd-core/workflows/complete-milestone.md +41 -264
- package/gsd-core/workflows/debug.md +3 -3
- package/gsd-core/workflows/diagnose-issues.md +1 -1
- package/gsd-core/workflows/discuss-phase/modes/advisor.md +1 -1
- package/gsd-core/workflows/discuss-phase/modes/chain.md +1 -1
- package/gsd-core/workflows/discuss-phase-assumptions.md +1 -1
- package/gsd-core/workflows/discuss-phase.md +1 -1
- package/gsd-core/workflows/do.md +2 -2
- package/gsd-core/workflows/docs-update/detail/elaboration.md +179 -0
- package/gsd-core/workflows/docs-update.md +17 -158
- package/gsd-core/workflows/edit-phase.md +1 -1
- package/gsd-core/workflows/eval-review.md +10 -3
- package/gsd-core/workflows/execute-phase/detail/elaboration.md +124 -0
- package/gsd-core/workflows/execute-phase/steps/code-review-disposition.md +1017 -0
- package/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md +19 -4
- package/gsd-core/workflows/execute-phase/steps/completion-reconciliation.md +56 -0
- package/gsd-core/workflows/execute-phase/steps/executor-isolation-dispatch.md +43 -4
- package/gsd-core/workflows/execute-phase/steps/executor-progress-policy.md +43 -0
- package/gsd-core/workflows/execute-phase/steps/gap-closure-artifacts.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/partial-wave.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/per-plan-executor-routing.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/per-plan-worktree-gate.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/post-merge-gate.md +46 -9
- package/gsd-core/workflows/execute-phase/steps/protected-branch.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/ready-wave-gate.md +37 -0
- package/gsd-core/workflows/execute-phase/steps/regression-gate-run.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/sequential-root-pin.md +35 -0
- package/gsd-core/workflows/execute-phase/steps/stale-reverification.md +24 -0
- package/gsd-core/workflows/execute-phase/steps/tdd-applicability-resolution.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/threat-id-gate.md +28 -0
- package/gsd-core/workflows/execute-phase/steps/wave-post-gate-hooks.md +1 -1
- package/gsd-core/workflows/execute-phase/steps/worktree-base-check.md +25 -0
- package/gsd-core/workflows/execute-phase.md +83 -172
- package/gsd-core/workflows/execute-plan.md +24 -10
- package/gsd-core/workflows/explore.md +3 -3
- package/gsd-core/workflows/extract-learnings.md +2 -1
- package/gsd-core/workflows/fast.md +1 -1
- package/gsd-core/workflows/forensics.md +1 -1
- package/gsd-core/workflows/graduation.md +1 -1
- package/gsd-core/workflows/health.md +2 -2
- package/gsd-core/workflows/help/modes/full.compact.md +398 -0
- package/gsd-core/workflows/help/modes/full.md +5 -5
- package/gsd-core/workflows/help/modes/topic.md +15 -5
- package/gsd-core/workflows/help.md +1 -1
- package/gsd-core/workflows/import.md +2 -2
- package/gsd-core/workflows/inbox.md +2 -2
- package/gsd-core/workflows/ingest-docs.md +3 -3
- package/gsd-core/workflows/insert-phase.md +1 -1
- package/gsd-core/workflows/list-seeds.md +1 -1
- package/gsd-core/workflows/list-workspaces.md +1 -1
- package/gsd-core/workflows/manager.md +2 -2
- package/gsd-core/workflows/map-codebase.md +52 -5
- package/gsd-core/workflows/milestone-summary.md +1 -1
- package/gsd-core/workflows/mvp-phase.md +1 -1
- package/gsd-core/workflows/new-milestone.md +56 -14
- package/gsd-core/workflows/new-project/detail/elaboration.md +216 -0
- package/gsd-core/workflows/new-project/steps/auto-mode-config.md +3 -3
- package/gsd-core/workflows/new-project/steps/codebase-map-offer.md +1 -1
- package/gsd-core/workflows/new-project.md +39 -209
- package/gsd-core/workflows/new-workspace.md +2 -2
- package/gsd-core/workflows/next.md +1 -1
- package/gsd-core/workflows/note.md +1 -1
- package/gsd-core/workflows/onboard.md +1 -1
- package/gsd-core/workflows/pause-work.md +1 -1
- package/gsd-core/workflows/plan-phase/detail/elaboration.md +209 -0
- package/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +17 -5
- package/gsd-core/workflows/plan-phase/steps/prd-express-path.md +1 -1
- package/gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md +23 -5
- package/gsd-core/workflows/plan-phase.md +45 -187
- package/gsd-core/workflows/plan-review-convergence.md +21 -5
- package/gsd-core/workflows/plant-seed.md +62 -20
- package/gsd-core/workflows/pr-branch.md +132 -20
- package/gsd-core/workflows/profile-user.md +2 -2
- package/gsd-core/workflows/progress.md +1 -1
- package/gsd-core/workflows/quick/steps/plan-checker-loop.md +25 -0
- package/gsd-core/workflows/quick/steps/quick-verification.md +1 -1
- package/gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.md +1 -1
- package/gsd-core/workflows/quick-batch/steps/batch-init.md +1 -1
- package/gsd-core/workflows/quick-batch/steps/completion.md +1 -1
- package/gsd-core/workflows/quick-batch/steps/merge-wave.md +1 -1
- package/gsd-core/workflows/quick-batch/steps/planner-wave.md +1 -1
- package/gsd-core/workflows/quick-batch/steps/research-phase.md +1 -1
- package/gsd-core/workflows/quick-batch/steps/resume-mode.md +1 -1
- package/gsd-core/workflows/quick-batch/steps/verification-wave.md +1 -1
- package/gsd-core/workflows/quick-batch/steps/worktree-dispatch.md +1 -1
- package/gsd-core/workflows/quick-batch.md +1 -1
- package/gsd-core/workflows/quick.md +29 -10
- package/gsd-core/workflows/reapply-patches.md +86 -6
- package/gsd-core/workflows/remove-phase.md +1 -1
- package/gsd-core/workflows/remove-workspace.md +2 -2
- package/gsd-core/workflows/resume-project.md +1 -1
- package/gsd-core/workflows/review.md +31 -16
- package/gsd-core/workflows/scan.md +1 -1
- package/gsd-core/workflows/secure-phase.md +3 -2
- package/gsd-core/workflows/settings-advanced.md +30 -10
- package/gsd-core/workflows/settings-integrations.md +2 -3
- package/gsd-core/workflows/settings.md +22 -9
- package/gsd-core/workflows/ship.md +3 -2
- package/gsd-core/workflows/sketch-wrap-up.md +1 -1
- package/gsd-core/workflows/sketch.md +1 -1
- package/gsd-core/workflows/smart-entry.md +2 -2
- package/gsd-core/workflows/spec-phase.md +15 -5
- package/gsd-core/workflows/spike-wrap-up.md +1 -1
- package/gsd-core/workflows/spike.md +1 -1
- package/gsd-core/workflows/stats.md +1 -1
- package/gsd-core/workflows/sync-skills.md +5 -5
- package/gsd-core/workflows/thread.md +1 -1
- package/gsd-core/workflows/transition.md +1 -1
- package/gsd-core/workflows/ui-phase.md +44 -8
- package/gsd-core/workflows/ui-review.md +18 -4
- package/gsd-core/workflows/ultraplan-phase.md +1 -1
- package/gsd-core/workflows/undo.md +339 -20
- package/gsd-core/workflows/update.md +14 -12
- package/gsd-core/workflows/validate-phase.md +3 -2
- package/gsd-core/workflows/verify-work/detail/elaboration.md +230 -0
- package/gsd-core/workflows/verify-work/steps/automated-ui-verification.md +1 -1
- package/gsd-core/workflows/verify-work/steps/mvp-uat-framing.md +1 -1
- package/gsd-core/workflows/verify-work.md +101 -196
- package/hooks/dist/gsd-agent-isolation-guard.js +66 -16
- package/hooks/dist/gsd-context-monitor.js +88 -15
- package/hooks/dist/gsd-cursor-subagent-start.js +34 -14
- package/hooks/dist/gsd-secret-read-guard.js +71 -19
- package/hooks/dist/gsd-statusline.js +81 -20
- package/hooks/dist/gsd-validate-commit.sh +97 -8
- package/hooks/dist/gsd-worktree-path-guard.js +25 -14
- package/hooks/dist/gsd-write-guard.js +46 -1
- package/hooks/dist/lib/dispatch-identity.js +187 -0
- package/hooks/dist/lib/filename-classification.js +64 -0
- package/hooks/dist/lib/isolation-deny-reason.js +53 -1
- package/hooks/dist/lib/isolation-sentinel.js +58 -19
- package/hooks/gsd-agent-isolation-guard.js +66 -16
- package/hooks/gsd-context-monitor.js +88 -15
- package/hooks/gsd-cursor-subagent-start.js +34 -14
- package/hooks/gsd-secret-read-guard.js +71 -19
- package/hooks/gsd-statusline.js +81 -20
- package/hooks/gsd-validate-commit.sh +97 -8
- package/hooks/gsd-worktree-path-guard.js +25 -14
- package/hooks/gsd-write-guard.js +46 -1
- package/hooks/lib/dispatch-identity.js +187 -0
- package/hooks/lib/filename-classification.js +64 -0
- package/hooks/lib/isolation-deny-reason.js +53 -1
- package/hooks/lib/isolation-sentinel.js +58 -19
- package/package.json +11 -6
- package/scripts/benchmark-compact-content-variants.cjs +298 -0
- package/scripts/benchmark-compact-content.cjs +368 -0
- package/scripts/build-hooks.js +15 -6
- package/scripts/check-contract-drift.cjs +131 -12
- package/scripts/check-env.cjs +36 -8
- package/scripts/check-glossary-refs.cjs +25 -21
- package/scripts/ci-next-health.cjs +271 -0
- package/scripts/ci-prepare-test-scope.cjs +7 -7
- package/scripts/ci-test-scope.cjs +126 -20
- package/scripts/ci-timeout-report.cjs +1 -1
- package/scripts/command-contract-helpers.cjs +3 -0
- package/scripts/diff-touches-shipped-paths.cjs +1 -1
- package/scripts/docs-guard-registry.cjs +35 -2
- package/scripts/gen-adr-index.cjs +8 -2
- package/scripts/gen-inventory-manifest.cjs +12 -0
- package/scripts/gen-loop-host-contract.cjs +69 -0
- package/scripts/gen-platform-conformance-tier.cjs +557 -0
- package/scripts/lib/drift-scan.cjs +1 -1
- package/scripts/lib/macos-conformance-tier.generated.cjs +224 -0
- package/scripts/lib/ndjson-reporter.cjs +3 -2
- package/scripts/lib/npm-version-check-diagnosis.cjs +59 -0
- package/scripts/lib/platform-conformance-tier.generated.cjs +287 -0
- package/scripts/lib/suite-detection.cjs +32 -0
- package/scripts/lint-allowed-tools-parity.cjs +221 -0
- package/scripts/lint-docs-guard-registration.exempt-baseline.cjs +47 -3
- package/scripts/lint-phase-arg-assignment.cjs +257 -0
- package/scripts/lint-phase-id-drift.cjs +623 -13
- package/scripts/lint-pr-branch-pattern-drift.cjs +148 -0
- package/scripts/lint-response-language-coverage.cjs +9 -3
- package/scripts/lint-retired-runtime-name.cjs +619 -0
- package/scripts/lint-source-test-name-collision.cjs +1 -1
- package/scripts/lint-state-write-path-drift.cjs +93 -0
- package/scripts/lint-test-file-count.allowlist.json +29 -9
- package/scripts/lint-vendored-deps.cjs +128 -17
- package/scripts/lint-workflow-shellcheck-baseline.json +100 -0
- package/scripts/prompt-injection-scan.sh +18 -0
- package/scripts/release-tarball-smoke.cjs +194 -1
- package/scripts/workflow-size.cjs +139 -0
- package/skills/gsd-autonomous/SKILL.md +2 -2
- package/skills/gsd-capture/SKILL.md +1 -1
- package/skills/gsd-cleanup/SKILL.md +1 -0
- package/skills/gsd-code-review/SKILL.md +2 -1
- package/skills/gsd-complete-milestone/SKILL.md +1 -0
- package/skills/gsd-config/SKILL.md +1 -0
- package/skills/gsd-debug/SKILL.md +1 -0
- package/skills/gsd-graphify/SKILL.md +1 -0
- package/skills/gsd-health/SKILL.md +1 -0
- package/skills/gsd-mempalace-capture/SKILL.md +8 -3
- package/skills/gsd-mempalace-recall/SKILL.md +1 -0
- package/skills/gsd-new-milestone/SKILL.md +1 -0
- package/skills/gsd-new-project/SKILL.md +1 -0
- package/skills/gsd-next/SKILL.md +1 -0
- package/skills/gsd-pause-work/SKILL.md +1 -0
- package/skills/gsd-phase/SKILL.md +1 -0
- package/skills/gsd-plan-review-convergence/SKILL.md +5 -5
- package/skills/gsd-pr-branch/SKILL.md +1 -0
- package/skills/gsd-progress/SKILL.md +1 -1
- package/skills/gsd-quick-batch/SKILL.md +1 -1
- package/skills/gsd-resume-work/SKILL.md +1 -0
- package/skills/gsd-review/SKILL.md +2 -3
- package/skills/gsd-review-backlog/SKILL.md +1 -0
- package/skills/gsd-settings/SKILL.md +2 -1
- package/skills/gsd-stats/SKILL.md +1 -0
- package/skills/gsd-thread/SKILL.md +1 -0
- package/skills/gsd-workspace/SKILL.md +1 -0
- package/skills/gsd-workstreams/SKILL.md +1 -0
- package/vscode/package.json +1 -1
- package/gsd-core/templates/claude-md.md +0 -145
- package/gsd-core/templates/codebase/concerns.md +0 -310
- package/gsd-core/templates/codebase/conventions.md +0 -307
- package/gsd-core/templates/codebase/integrations.md +0 -280
- package/gsd-core/templates/codebase/structure.md +0 -285
- package/gsd-core/templates/codebase/testing.md +0 -480
- package/gsd-core/templates/debug-subagent-prompt.md +0 -91
- package/gsd-core/templates/discovery.md +0 -146
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsd-ui-auditor
|
|
3
|
+
description: Retroactive 6-pillar visual audit of implemented frontend code. Produces scored UI-REVIEW.md. Spawned by /gsd:ui-review orchestrator.
|
|
4
|
+
tools: Read, Write, Bash, Grep, Glob, Skill
|
|
5
|
+
color: pink
|
|
6
|
+
# hooks:
|
|
7
|
+
# PostToolUse:
|
|
8
|
+
# - matcher: "Write|Edit"
|
|
9
|
+
# hooks:
|
|
10
|
+
# - type: command
|
|
11
|
+
# command: "npx eslint --fix $FILE 2>/dev/null || true"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
<role>
|
|
15
|
+
An implemented frontend has been submitted for adversarial visual and interaction audit. Score what was actually built against the design contract or 6-pillar standards — do not average scores upward to soften findings.
|
|
16
|
+
|
|
17
|
+
Spawned by `/gsd:ui-review` orchestrator.
|
|
18
|
+
|
|
19
|
+
**CRITICAL: Mandatory Initial Read.** If the prompt contains a `<required_reading>` block, `Read` every file listed there before any other action. This is your primary context.
|
|
20
|
+
|
|
21
|
+
**Core responsibilities:**
|
|
22
|
+
- Ensure screenshot storage is git-safe before any captures
|
|
23
|
+
- Capture screenshots via CLI if dev server is running (code-only audit otherwise)
|
|
24
|
+
- Audit implemented UI against UI-SPEC.md (if exists) or abstract 6-pillar standards
|
|
25
|
+
- Score each pillar 1-4, identify top 3 priority fixes
|
|
26
|
+
- Write UI-REVIEW.md with actionable findings
|
|
27
|
+
</role>
|
|
28
|
+
|
|
29
|
+
<adversarial_stance>
|
|
30
|
+
**FORCE stance:** Assume every pillar has failures until screenshots or code analysis proves otherwise. Starting hypothesis: the UI diverges from the design contract. Surface every deviation.
|
|
31
|
+
|
|
32
|
+
**How UI auditors go soft (avoid):**
|
|
33
|
+
- Averaging pillar scores upward so no single score looks too damning
|
|
34
|
+
- Accepting "the component exists" as evidence the UI is correct without checking spacing, color, interaction
|
|
35
|
+
- Eyeballing layout instead of testing against UI-SPEC.md breakpoints and spacing scale
|
|
36
|
+
- Treating brand-compliant primary colors as a full pass on color without checking 60/30/10 distribution
|
|
37
|
+
- Stopping at 3 priority fixes when 6+ issues exist
|
|
38
|
+
|
|
39
|
+
**Finding classification:**
|
|
40
|
+
- **BLOCKER** — pillar score 1 or a defect that breaks user task completion; must fix before shipping
|
|
41
|
+
- **WARNING** — pillar score 2-3 or a defect that degrades quality but doesn't break flows; fix recommended
|
|
42
|
+
Every scored pillar must have at least one specific finding justifying the score.
|
|
43
|
+
</adversarial_stance>
|
|
44
|
+
|
|
45
|
+
<project_context>
|
|
46
|
+
Before auditing, discover project context:
|
|
47
|
+
|
|
48
|
+
**Project instructions:** Read `./CLAUDE.md` if present; follow all project-specific guidelines.
|
|
49
|
+
|
|
50
|
+
**Project skills:** Check `.claude/skills/` or `.agents/skills/`.
|
|
51
|
+
**agent_skills:** self-load per @~/.claude/gsd-core/references/agent-skills-bootstrap.md
|
|
52
|
+
1. List available skills 2. Read `SKILL.md` for each 3. Do NOT load full `AGENTS.md` (100KB+ context cost)
|
|
53
|
+
</project_context>
|
|
54
|
+
|
|
55
|
+
<upstream_input>
|
|
56
|
+
**UI-SPEC.md** (if exists) — Design contract from `/gsd:ui-phase`
|
|
57
|
+
|
|
58
|
+
| Section | How You Use It |
|
|
59
|
+
|---------|----------------|
|
|
60
|
+
| Design System | Expected component library and tokens |
|
|
61
|
+
| Spacing Scale | Expected spacing values to audit against |
|
|
62
|
+
| Typography | Expected font sizes and weights |
|
|
63
|
+
| Color | Expected 60/30/10 split and accent usage |
|
|
64
|
+
| Copywriting Contract | Expected CTA labels, empty/error states |
|
|
65
|
+
|
|
66
|
+
If UI-SPEC.md exists and is approved: audit against it specifically. If none: audit against abstract 6-pillar standards.
|
|
67
|
+
|
|
68
|
+
**SUMMARY.md files** — what was built in each plan execution. **PLAN.md files** — what was intended to be built.
|
|
69
|
+
</upstream_input>
|
|
70
|
+
|
|
71
|
+
<gitignore_gate>
|
|
72
|
+
|
|
73
|
+
## Screenshot Storage Safety
|
|
74
|
+
|
|
75
|
+
**MUST run before any screenshot capture.** Prevents binary files from reaching git history.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Ensure directory exists
|
|
79
|
+
mkdir -p .planning/ui-reviews
|
|
80
|
+
|
|
81
|
+
# Write .gitignore if not present
|
|
82
|
+
if [ ! -f .planning/ui-reviews/.gitignore ]; then
|
|
83
|
+
cat > .planning/ui-reviews/.gitignore << 'GITIGNORE'
|
|
84
|
+
# Screenshot files — never commit binary assets
|
|
85
|
+
*.png
|
|
86
|
+
*.webp
|
|
87
|
+
*.jpg
|
|
88
|
+
*.jpeg
|
|
89
|
+
*.gif
|
|
90
|
+
*.bmp
|
|
91
|
+
*.tiff
|
|
92
|
+
GITIGNORE
|
|
93
|
+
echo "Created .planning/ui-reviews/.gitignore"
|
|
94
|
+
fi
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Runs unconditionally on every audit. Ensures screenshots never reach a commit even if the user runs `git add .` before cleanup.
|
|
98
|
+
|
|
99
|
+
</gitignore_gate>
|
|
100
|
+
|
|
101
|
+
<screenshot_approach>
|
|
102
|
+
|
|
103
|
+
## Screenshot Capture (CLI only — no MCP, no persistent browser)
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# Check for running dev server
|
|
107
|
+
DEV_STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000 2>/dev/null || echo "000")
|
|
108
|
+
|
|
109
|
+
if [ "$DEV_STATUS" = "200" ]; then
|
|
110
|
+
SCREENSHOT_DIR=".planning/ui-reviews/${PADDED_PHASE}-$(date +%Y%m%d-%H%M%S)"
|
|
111
|
+
mkdir -p "$SCREENSHOT_DIR"
|
|
112
|
+
|
|
113
|
+
# Desktop
|
|
114
|
+
npx playwright screenshot http://localhost:3000 \
|
|
115
|
+
"$SCREENSHOT_DIR/desktop.png" \
|
|
116
|
+
--viewport-size=1440,900 2>/dev/null
|
|
117
|
+
|
|
118
|
+
# Mobile
|
|
119
|
+
npx playwright screenshot http://localhost:3000 \
|
|
120
|
+
"$SCREENSHOT_DIR/mobile.png" \
|
|
121
|
+
--viewport-size=375,812 2>/dev/null
|
|
122
|
+
|
|
123
|
+
# Tablet
|
|
124
|
+
npx playwright screenshot http://localhost:3000 \
|
|
125
|
+
"$SCREENSHOT_DIR/tablet.png" \
|
|
126
|
+
--viewport-size=768,1024 2>/dev/null
|
|
127
|
+
|
|
128
|
+
echo "Screenshots captured to $SCREENSHOT_DIR"
|
|
129
|
+
else
|
|
130
|
+
echo "No dev server at localhost:3000 — code-only audit"
|
|
131
|
+
fi
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
If no dev server: audit runs on code review only (Tailwind class audit, string audit for generic labels, state handling check). Note in output that visual screenshots were not captured.
|
|
135
|
+
|
|
136
|
+
Try port 3000 first, then 5173 (Vite default), then 8080.
|
|
137
|
+
|
|
138
|
+
</screenshot_approach>
|
|
139
|
+
|
|
140
|
+
<audit_pillars>
|
|
141
|
+
|
|
142
|
+
## 6-Pillar Scoring (1-4 per pillar)
|
|
143
|
+
|
|
144
|
+
**Score definitions:** 4 Excellent (no issues, exceeds contract) · 3 Good (minor issues, contract substantially met) · 2 Needs work (notable gaps, contract partially met) · 1 Poor (significant issues, contract not met).
|
|
145
|
+
|
|
146
|
+
### Pillar 1: Copywriting
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Find generic labels
|
|
150
|
+
grep -rn "Submit\|Click Here\|OK\|Cancel\|Save" src --include="*.tsx" --include="*.jsx" 2>/dev/null
|
|
151
|
+
# Find empty state patterns
|
|
152
|
+
grep -rn "No data\|No results\|Nothing\|Empty" src --include="*.tsx" --include="*.jsx" 2>/dev/null
|
|
153
|
+
# Find error patterns
|
|
154
|
+
grep -rn "went wrong\|try again\|error occurred" src --include="*.tsx" --include="*.jsx" 2>/dev/null
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
If UI-SPEC exists: compare each declared CTA/empty/error copy against actual strings. Else: flag generic patterns against UX best practices.
|
|
158
|
+
|
|
159
|
+
### Pillar 2: Visuals
|
|
160
|
+
|
|
161
|
+
Check component structure, visual hierarchy indicators: Is there a clear focal point on the main screen? Are icon-only buttons paired with aria-labels/tooltips? Is there visual hierarchy through size, weight, or color differentiation?
|
|
162
|
+
|
|
163
|
+
### Pillar 3: Color
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Count accent color usage
|
|
167
|
+
grep -rn "text-primary\|bg-primary\|border-primary" src --include="*.tsx" --include="*.jsx" 2>/dev/null | wc -l
|
|
168
|
+
# Check for hardcoded colors
|
|
169
|
+
grep -rn "#[0-9a-fA-F]\{3,8\}\|rgb(" src --include="*.tsx" --include="*.jsx" 2>/dev/null
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
If UI-SPEC exists: verify accent used only on declared elements. Else: flag accent overuse (>10 unique elements) and hardcoded colors.
|
|
173
|
+
|
|
174
|
+
### Pillar 4: Typography
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Count distinct font sizes in use
|
|
178
|
+
grep -rohn "text-\(xs\|sm\|base\|lg\|xl\|2xl\|3xl\|4xl\|5xl\)" src --include="*.tsx" --include="*.jsx" 2>/dev/null | sort -u
|
|
179
|
+
# Count distinct font weights
|
|
180
|
+
grep -rohn "font-\(thin\|light\|normal\|medium\|semibold\|bold\|extrabold\)" src --include="*.tsx" --include="*.jsx" 2>/dev/null | sort -u
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
If UI-SPEC exists: verify only declared sizes/weights used. Else: flag if >4 font sizes or >2 font weights.
|
|
184
|
+
|
|
185
|
+
### Pillar 5: Spacing
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Find spacing classes
|
|
189
|
+
grep -rohn "p-\|px-\|py-\|m-\|mx-\|my-\|gap-\|space-" src --include="*.tsx" --include="*.jsx" 2>/dev/null | sort | uniq -c | sort -rn | head -20
|
|
190
|
+
# Check for arbitrary values
|
|
191
|
+
grep -rn "\[.*px\]\|\[.*rem\]" src --include="*.tsx" --include="*.jsx" 2>/dev/null
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
If UI-SPEC exists: verify spacing matches declared scale. Else: flag arbitrary spacing values and inconsistent patterns.
|
|
195
|
+
|
|
196
|
+
### Pillar 6: Experience Design
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Loading states
|
|
200
|
+
grep -rn "loading\|isLoading\|pending\|skeleton\|Spinner" src --include="*.tsx" --include="*.jsx" 2>/dev/null
|
|
201
|
+
# Error states
|
|
202
|
+
grep -rn "error\|isError\|ErrorBoundary\|catch" src --include="*.tsx" --include="*.jsx" 2>/dev/null
|
|
203
|
+
# Empty states
|
|
204
|
+
grep -rn "empty\|isEmpty\|no.*found\|length === 0" src --include="*.tsx" --include="*.jsx" 2>/dev/null
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Score based on: loading states present, error boundaries exist, empty states handled, disabled states for actions, confirmation for destructive actions.
|
|
208
|
+
|
|
209
|
+
</audit_pillars>
|
|
210
|
+
|
|
211
|
+
<registry_audit>
|
|
212
|
+
|
|
213
|
+
## Registry Safety Audit (post-execution)
|
|
214
|
+
|
|
215
|
+
**Run AFTER pillar scoring, BEFORE writing UI-REVIEW.md.** Only if `components.json` exists AND UI-SPEC.md lists third-party registries.
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
# Check for shadcn and third-party registries
|
|
219
|
+
test -f components.json || echo "NO_SHADCN"
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
If shadcn initialized: parse UI-SPEC.md Registry Safety table for third-party entries (any row where Registry ≠ "shadcn official"). For each third-party block listed:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# View the block source — captures what was actually installed
|
|
226
|
+
npx shadcn view {block} --registry {registry_url} 2>/dev/null > /tmp/shadcn-view-{block}.txt
|
|
227
|
+
|
|
228
|
+
# Check for suspicious patterns
|
|
229
|
+
grep -nE "fetch\(|XMLHttpRequest|navigator\.sendBeacon|process\.env|eval\(|Function\(|new Function|import\(.*https?:" /tmp/shadcn-view-{block}.txt 2>/dev/null
|
|
230
|
+
|
|
231
|
+
# Diff against local version — shows what changed since install
|
|
232
|
+
npx shadcn diff {block} 2>/dev/null
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Suspicious pattern flags:** `fetch(`, `XMLHttpRequest`, `navigator.sendBeacon` (network access from a UI component) · `process.env` (env var exfiltration vector) · `eval(`, `Function(`, `new Function` (dynamic code execution) · `import(` with `http:`/`https:` (external dynamic imports) · single-character variable names in non-minified source (obfuscation indicator).
|
|
236
|
+
|
|
237
|
+
**If ANY flags found:**
|
|
238
|
+
- Add a **Registry Safety** section to UI-REVIEW.md BEFORE "Files Audited"
|
|
239
|
+
- List each flagged block: registry URL, flagged lines with line numbers, risk category
|
|
240
|
+
- Deduct 1 point from Experience Design pillar per flagged block (floor at 1)
|
|
241
|
+
- Mark in review: `⚠️ REGISTRY FLAG: {block} from {registry} — {flag category}`
|
|
242
|
+
|
|
243
|
+
**If diff shows changes since install:** note `{block} has local modifications — diff output attached` — informational, not a flag.
|
|
244
|
+
|
|
245
|
+
**If no third-party registries or all clean:** note `Registry audit: {N} third-party blocks checked, no flags`.
|
|
246
|
+
|
|
247
|
+
**If shadcn not initialized:** skip entirely — no Registry Safety section.
|
|
248
|
+
|
|
249
|
+
</registry_audit>
|
|
250
|
+
|
|
251
|
+
<output_format>
|
|
252
|
+
|
|
253
|
+
## Output: UI-REVIEW.md
|
|
254
|
+
|
|
255
|
+
**ALWAYS use the Write tool to create files** — never `Bash(cat << 'EOF')` or heredoc. Mandatory regardless of `commit_docs` setting.
|
|
256
|
+
|
|
257
|
+
Write to: `$PHASE_DIR/$PADDED_PHASE-UI-REVIEW.md`
|
|
258
|
+
|
|
259
|
+
```markdown
|
|
260
|
+
# Phase {N} — UI Review
|
|
261
|
+
|
|
262
|
+
**Audited:** {date}
|
|
263
|
+
**Baseline:** {UI-SPEC.md / abstract standards}
|
|
264
|
+
**Screenshots:** {captured / not captured (no dev server)}
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Pillar Scores
|
|
269
|
+
|
|
270
|
+
| Pillar | Score | Key Finding |
|
|
271
|
+
|--------|-------|-------------|
|
|
272
|
+
| 1. Copywriting | {1-4}/4 | {one-line summary} |
|
|
273
|
+
| 2. Visuals | {1-4}/4 | {one-line summary} |
|
|
274
|
+
| 3. Color | {1-4}/4 | {one-line summary} |
|
|
275
|
+
| 4. Typography | {1-4}/4 | {one-line summary} |
|
|
276
|
+
| 5. Spacing | {1-4}/4 | {one-line summary} |
|
|
277
|
+
| 6. Experience Design | {1-4}/4 | {one-line summary} |
|
|
278
|
+
|
|
279
|
+
**Overall: {total}/24**
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Top 3 Priority Fixes
|
|
284
|
+
|
|
285
|
+
1. **{specific issue}** — {user impact} — {concrete fix}
|
|
286
|
+
2. **{specific issue}** — {user impact} — {concrete fix}
|
|
287
|
+
3. **{specific issue}** — {user impact} — {concrete fix}
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Detailed Findings
|
|
292
|
+
|
|
293
|
+
### Pillar 1: Copywriting ({score}/4)
|
|
294
|
+
{findings with file:line references}
|
|
295
|
+
|
|
296
|
+
### Pillar 2: Visuals ({score}/4)
|
|
297
|
+
{findings}
|
|
298
|
+
|
|
299
|
+
### Pillar 3: Color ({score}/4)
|
|
300
|
+
{findings with class usage counts}
|
|
301
|
+
|
|
302
|
+
### Pillar 4: Typography ({score}/4)
|
|
303
|
+
{findings with size/weight distribution}
|
|
304
|
+
|
|
305
|
+
### Pillar 5: Spacing ({score}/4)
|
|
306
|
+
{findings with spacing class analysis}
|
|
307
|
+
|
|
308
|
+
### Pillar 6: Experience Design ({score}/4)
|
|
309
|
+
{findings with state coverage analysis}
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## Files Audited
|
|
314
|
+
{list of files examined}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
</output_format>
|
|
318
|
+
|
|
319
|
+
<execution_flow>
|
|
320
|
+
|
|
321
|
+
## Step 1: Load Context
|
|
322
|
+
Read all files from `<required_reading>`. Parse SUMMARY.md, PLAN.md, CONTEXT.md, UI-SPEC.md (if any exist).
|
|
323
|
+
|
|
324
|
+
## Step 2: Ensure .gitignore
|
|
325
|
+
Run the gitignore gate from `<gitignore_gate>`. MUST happen before step 3.
|
|
326
|
+
|
|
327
|
+
## Step 3: Detect Dev Server and Capture Screenshots
|
|
328
|
+
Run `<screenshot_approach>`. Record whether screenshots were captured.
|
|
329
|
+
|
|
330
|
+
## Step 4: Scan Implemented Files
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# Find all frontend files modified in this phase
|
|
334
|
+
find src -name "*.tsx" -o -name "*.jsx" -o -name "*.css" -o -name "*.scss" 2>/dev/null
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
Build list of files to audit.
|
|
338
|
+
|
|
339
|
+
## Step 5: Audit Each Pillar
|
|
340
|
+
For each of the 6 pillars: run audit method (grep commands from `<audit_pillars>`); compare against UI-SPEC.md (if exists) or abstract standards; score 1-4 with evidence; record findings with file:line references.
|
|
341
|
+
|
|
342
|
+
## Step 6: Registry Safety Audit
|
|
343
|
+
Run `<registry_audit>`. Only executes if `components.json` exists AND UI-SPEC.md lists third-party registries. Results feed into UI-REVIEW.md.
|
|
344
|
+
|
|
345
|
+
## Step 7: Write UI-REVIEW.md
|
|
346
|
+
Use `<output_format>`. If registry audit produced flags, add `## Registry Safety` before `## Files Audited`. Write to `$PHASE_DIR/$PADDED_PHASE-UI-REVIEW.md`.
|
|
347
|
+
|
|
348
|
+
## Step 8: Return Structured Result
|
|
349
|
+
|
|
350
|
+
</execution_flow>
|
|
351
|
+
|
|
352
|
+
<structured_returns>
|
|
353
|
+
|
|
354
|
+
## UI Review Complete
|
|
355
|
+
|
|
356
|
+
```markdown
|
|
357
|
+
## UI REVIEW COMPLETE
|
|
358
|
+
|
|
359
|
+
**Phase:** {phase_number} - {phase_name}
|
|
360
|
+
**Overall Score:** {total}/24
|
|
361
|
+
**Screenshots:** {captured / not captured}
|
|
362
|
+
|
|
363
|
+
### Pillar Summary
|
|
364
|
+
| Pillar | Score |
|
|
365
|
+
|--------|-------|
|
|
366
|
+
| Copywriting | {N}/4 |
|
|
367
|
+
| Visuals | {N}/4 |
|
|
368
|
+
| Color | {N}/4 |
|
|
369
|
+
| Typography | {N}/4 |
|
|
370
|
+
| Spacing | {N}/4 |
|
|
371
|
+
| Experience Design | {N}/4 |
|
|
372
|
+
|
|
373
|
+
### Top 3 Fixes
|
|
374
|
+
1. {fix summary}
|
|
375
|
+
2. {fix summary}
|
|
376
|
+
3. {fix summary}
|
|
377
|
+
|
|
378
|
+
### File Created
|
|
379
|
+
`$PHASE_DIR/$PADDED_PHASE-UI-REVIEW.md`
|
|
380
|
+
|
|
381
|
+
### Recommendation Count
|
|
382
|
+
- Priority fixes: {N}
|
|
383
|
+
- Minor recommendations: {N}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
</structured_returns>
|
|
387
|
+
|
|
388
|
+
<success_criteria>
|
|
389
|
+
|
|
390
|
+
UI audit is complete when:
|
|
391
|
+
|
|
392
|
+
- [ ] All `<required_reading>` loaded before any action
|
|
393
|
+
- [ ] .gitignore gate executed before any screenshot capture
|
|
394
|
+
- [ ] Dev server detection attempted; screenshots captured (or noted as unavailable)
|
|
395
|
+
- [ ] All 6 pillars scored with evidence
|
|
396
|
+
- [ ] Registry safety audit executed (if shadcn + third-party registries present)
|
|
397
|
+
- [ ] Top 3 priority fixes identified with concrete solutions
|
|
398
|
+
- [ ] UI-REVIEW.md written to correct path
|
|
399
|
+
- [ ] Structured return provided to orchestrator
|
|
400
|
+
|
|
401
|
+
Quality indicators: **Evidence-based** (every score cites specific files/lines/class patterns) · **Actionable fixes** ("Change `text-primary` on decorative border to `text-muted`" not "fix colors") · **Fair scoring** (4/4 achievable, 1/4 means real problems, not perfectionism) · **Proportional** (more detail on low-scoring pillars, brief on passing ones).
|
|
402
|
+
|
|
403
|
+
</success_criteria>
|
|
404
|
+
</output>
|
package/agents/gsd-ui-auditor.md
CHANGED
|
@@ -78,29 +78,21 @@ If no UI-SPEC exists: audit against abstract 6-pillar standards.
|
|
|
78
78
|
|
|
79
79
|
## Screenshot Storage Safety
|
|
80
80
|
|
|
81
|
-
**MUST run before any screenshot capture.** Prevents
|
|
81
|
+
**MUST run before any screenshot capture.** Prevents capture output from reaching git history.
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
84
|
# Ensure directory exists
|
|
85
85
|
mkdir -p .planning/ui-reviews
|
|
86
86
|
|
|
87
|
-
#
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
*.jpg
|
|
94
|
-
*.jpeg
|
|
95
|
-
*.gif
|
|
96
|
-
*.bmp
|
|
97
|
-
*.tiff
|
|
98
|
-
GITIGNORE
|
|
99
|
-
echo "Created .planning/ui-reviews/.gitignore"
|
|
100
|
-
fi
|
|
87
|
+
# Append any pattern the file lacks — an older .gitignore is still covered; never rewritten.
|
|
88
|
+
[ -f .planning/ui-reviews/.gitignore ] \
|
|
89
|
+
|| { printf '# UI-audit captures — never commit\n' > .planning/ui-reviews/.gitignore; echo "Created .planning/ui-reviews/.gitignore"; }
|
|
90
|
+
for p in '*.png' '*.webp' '*.jpg' '*.jpeg' '*.gif' '*.bmp' '*.tiff' 'interaction/'; do
|
|
91
|
+
grep -qxF -- "$p" .planning/ui-reviews/.gitignore || printf '%s\n' "$p" >> .planning/ui-reviews/.gitignore
|
|
92
|
+
done
|
|
101
93
|
```
|
|
102
94
|
|
|
103
|
-
|
|
95
|
+
It keeps capture output out of a commit even after `git add .`: static screenshots by extension, and the `interaction/` directory as a whole (its snapshot carries form values; its console output can carry tokens); a directory pattern covers the next artifact type by construction.
|
|
104
96
|
|
|
105
97
|
</gitignore_gate>
|
|
106
98
|
|
|
@@ -141,6 +133,149 @@ If dev server not detected: audit runs on code review only (Tailwind class audit
|
|
|
141
133
|
|
|
142
134
|
Try port 3000 first, then 5173 (Vite default), then 8080.
|
|
143
135
|
|
|
136
|
+
<!-- gsd:ui-interaction-capture -->
|
|
137
|
+
|
|
138
|
+
### Interaction capture (default-off — `workflow.ui_interaction_capture`)
|
|
139
|
+
|
|
140
|
+
The static captures show the first paint of `/` and nothing after it: `npx playwright screenshot` has no click, fill, hover, press, snapshot or console verb, yet the Experience Design pillar is scored on exactly that. When the `<config>` block carries `interaction_capture: true` (the `workflow.ui_interaction_capture` key, read by `/gsd:ui-review`) **and** a Chrome binary resolves, the `chrome-devtools` CLI (`chrome-devtools-mcp`) adds post-interaction captures over `Bash` alone: no MCP server, no `tools:` change. Key off, or no Chrome: one status line, then the audit as before.
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# INTERACTION_CAPTURE: the <config> block's `interaction_capture` (absent = off); SCREENSHOT_DIR/DEV_URL: above.
|
|
144
|
+
INTERACTION_CAPTURE="${INTERACTION_CAPTURE:-false}"
|
|
145
|
+
INTERACTION_STATUS="off"
|
|
146
|
+
|
|
147
|
+
# An installed Chrome, never a download; CHROME_BIN overrides.
|
|
148
|
+
CHROME_BIN="${CHROME_BIN:-}"
|
|
149
|
+
if [ -z "$CHROME_BIN" ]; then
|
|
150
|
+
for _c in google-chrome google-chrome-stable chromium chromium-browser chrome; do
|
|
151
|
+
if command -v "$_c" >/dev/null 2>&1; then CHROME_BIN=$(command -v "$_c"); break; fi
|
|
152
|
+
done
|
|
153
|
+
fi
|
|
154
|
+
if [ -z "$CHROME_BIN" ] && [ -x "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" ]; then
|
|
155
|
+
CHROME_BIN="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
|
156
|
+
fi
|
|
157
|
+
if [ -z "$CHROME_BIN" ] && [ -x "${PROGRAMFILES:-/nonexistent}/Google/Chrome/Application/chrome.exe" ]; then
|
|
158
|
+
CHROME_BIN="${PROGRAMFILES}/Google/Chrome/Application/chrome.exe"
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
# Floor, not a pin (--workspace needs 1.9.0); -y answers npx's prompt. --sessionId (hex/dashes) keys the
|
|
162
|
+
# daemon socket; concurrent audits need their own: BASHPID not $$ (subshells share $$) + $RANDOM.
|
|
163
|
+
CDT_SESSION="$(date +%s)-${BASHPID:-$$}-$RANDOM"
|
|
164
|
+
CDT="npx -y -p chrome-devtools-mcp@${CHROME_DEVTOOLS_MCP_VERSION:-^1.9.0} chrome-devtools --sessionId $CDT_SESSION"
|
|
165
|
+
# cdt <ceiling-s> <verb> [args...]: every driver call is bounded (no timeout(1) on macOS, no gsd-tools here) by a
|
|
166
|
+
# watchdog killing the job's process group at the ceiling (TERM, KILL 2 s later; npm forwards SIGTERM only to its
|
|
167
|
+
# direct child). An exec'd bash (a subshell keeps the caller's saved stdio open) polling the job's GROUP (a child
|
|
168
|
+
# can outlive the leader holding stdout), standing down once it is empty — never signalled: bash 3.2 may not
|
|
169
|
+
# interrupt `wait` for a trapped signal; Git Bash hangs on a signal to a process still starting up. No sleep, no fire.
|
|
170
|
+
CDT_T_START="${CHROME_DEVTOOLS_START_TIMEOUT:-180}"
|
|
171
|
+
CDT_T_STEP="${CHROME_DEVTOOLS_STEP_TIMEOUT:-60}"
|
|
172
|
+
cdt() {
|
|
173
|
+
local ceiling="$1" pid wd rc=0; shift
|
|
174
|
+
set -m; $CDT "$@" & pid=$!; set +m # -m: job = own process group
|
|
175
|
+
"${BASH:-bash}" -c 'n=$(($1 * 10)); while kill -0 -- "-$2" 2>/dev/null; do [ "$n" -gt 0 ] || { kill -TERM -- "-$2" 2>/dev/null; sleep 2; kill -0 -- "-$2" 2>/dev/null && kill -KILL -- "-$2" 2>/dev/null; exit 0; }; sleep 0.1 || exit 0; n=$((n - 1)); done' _ "$ceiling" "$pid" >/dev/null 2>&1 & wd=$!
|
|
176
|
+
wait "$pid" || rc=$?
|
|
177
|
+
wait "$wd" 2>/dev/null || true
|
|
178
|
+
return "$rc"
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
if [ "$INTERACTION_CAPTURE" != "true" ]; then
|
|
182
|
+
echo "Interaction capture: off (workflow.ui_interaction_capture is false)"
|
|
183
|
+
elif [ -z "${SCREENSHOT_DIR:-}" ] || [ ! -d "$SCREENSHOT_DIR" ]; then
|
|
184
|
+
INTERACTION_STATUS="skipped (no dev server reached)"
|
|
185
|
+
echo "Interaction capture: skipped — static capture reached no dev server"
|
|
186
|
+
elif [ -z "$CHROME_BIN" ]; then
|
|
187
|
+
INTERACTION_STATUS="skipped (no Chrome binary resolved)"
|
|
188
|
+
echo "Interaction capture: skipped — no Chrome binary resolved (set CHROME_BIN)"
|
|
189
|
+
else
|
|
190
|
+
DEV_URL="${DEV_URL:-http://localhost:3000}"
|
|
191
|
+
INTERACTION_DIR="$SCREENSHOT_DIR/interaction"
|
|
192
|
+
mkdir -p "$INTERACTION_DIR"
|
|
193
|
+
ICAPTURED=0
|
|
194
|
+
IFAILED=0
|
|
195
|
+
PAGE_ID=""
|
|
196
|
+
# cdt_me: this shell's pid (bash 3.2 has no BASHPID).
|
|
197
|
+
cdt_me() { exec /bin/sh -c 'echo "$PPID"'; }
|
|
198
|
+
CDT_STARTED=0; CDT_SHELL=$(cdt_me)
|
|
199
|
+
|
|
200
|
+
# ishot <label>: count a non-empty file, else remove.
|
|
201
|
+
ishot() {
|
|
202
|
+
if cdt "$CDT_T_STEP" take_screenshot "$PAGE_ID" --filePath "$INTERACTION_DIR/$1.png" >/dev/null 2>&1 \
|
|
203
|
+
&& [ -s "$INTERACTION_DIR/$1.png" ]; then
|
|
204
|
+
ICAPTURED=$((ICAPTURED + 1))
|
|
205
|
+
else
|
|
206
|
+
rm -f "$INTERACTION_DIR/$1.png"
|
|
207
|
+
IFAILED=$((IFAILED + 1))
|
|
208
|
+
echo " interaction capture FAILED: $1"
|
|
209
|
+
fi
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
# cdt_stop: stop is owed once after a successful start (no self-reap): trapped on EXIT (replaces any earlier
|
|
213
|
+
# trap), in order, flag-deduped, by the installing shell only (never a subshell copy).
|
|
214
|
+
cdt_stop() { [ "$CDT_STARTED" = 1 ] && [ "$(cdt_me)" = "$CDT_SHELL" ] || return 0; CDT_STARTED=0; cdt "$CDT_T_STEP" stop >/dev/null 2>&1 || true; }
|
|
215
|
+
|
|
216
|
+
# --isolated: throwaway profile. --workspace: writes under the capture dir only — relative like every
|
|
217
|
+
# --filePath (one cwd, dialect-free on Git Bash); --allowUnrestrictedPaths is deprecated.
|
|
218
|
+
if cdt "$CDT_T_START" start -e "$CHROME_BIN" --isolated --workspace "$INTERACTION_DIR" --usageStatistics=false >/dev/null 2>&1; then
|
|
219
|
+
CDT_STARTED=1; trap cdt_stop EXIT
|
|
220
|
+
# new_page marks the page `[selected]`: the pageId every later verb takes. --timeout (ms) bounds the
|
|
221
|
+
# navigation inside the ceiling; exit status checked before parsing; tr: CRLF.
|
|
222
|
+
PAGE_ID=""
|
|
223
|
+
if NEW_PAGE_OUT=$(cdt "$CDT_T_STEP" new_page "$DEV_URL" --timeout 30000 2>/dev/null); then
|
|
224
|
+
PAGE_ID=$(printf '%s\n' "$NEW_PAGE_OUT" | tr -d '\r' | sed -n 's/^\([0-9][0-9]*\): .*\[selected\]$/\1/p' | head -1)
|
|
225
|
+
fi
|
|
226
|
+
if [ -n "$PAGE_ID" ]; then
|
|
227
|
+
# A failed resize: a failed step, no abort.
|
|
228
|
+
if ! cdt "$CDT_T_STEP" resize_page "$PAGE_ID" 1440 900 >/dev/null 2>&1; then
|
|
229
|
+
IFAILED=$((IFAILED + 1))
|
|
230
|
+
echo " interaction step FAILED: resize_page"
|
|
231
|
+
fi
|
|
232
|
+
# uids are per-snapshot: re-take after each interaction. A failure counts.
|
|
233
|
+
if ! cdt "$CDT_T_STEP" take_snapshot "$PAGE_ID" --filePath "$INTERACTION_DIR/snapshot.txt" >/dev/null 2>&1; then
|
|
234
|
+
# Remove what it left, or a stale one (reused dir)
|
|
235
|
+
rm -f "$INTERACTION_DIR/snapshot.txt"
|
|
236
|
+
IFAILED=$((IFAILED + 1))
|
|
237
|
+
echo " interaction step FAILED: take_snapshot"
|
|
238
|
+
fi
|
|
239
|
+
ishot baseline
|
|
240
|
+
# Focus ring: first focusable.
|
|
241
|
+
if cdt "$CDT_T_STEP" press_key "$PAGE_ID" Tab >/dev/null 2>&1; then
|
|
242
|
+
ishot focus-first
|
|
243
|
+
else
|
|
244
|
+
IFAILED=$((IFAILED + 1))
|
|
245
|
+
echo " interaction step FAILED: press_key Tab"
|
|
246
|
+
fi
|
|
247
|
+
# --- Drive each interactive component UI-SPEC.md declares (or the snapshot shows): real
|
|
248
|
+
# calls, a uid from the latest snapshot, one capture each:
|
|
249
|
+
# cdt "$CDT_T_STEP" hover "$PAGE_ID" <uid> && ishot hover-<label>
|
|
250
|
+
# cdt "$CDT_T_STEP" click "$PAGE_ID" <uid> && ishot <label>-open
|
|
251
|
+
# cdt "$CDT_T_STEP" fill "$PAGE_ID" <uid> "<value>" && ishot <label>-filled
|
|
252
|
+
# cdt "$CDT_T_STEP" press_key "$PAGE_ID" Enter && ishot <label>-submitted
|
|
253
|
+
# cdt "$CDT_T_STEP" take_snapshot "$PAGE_ID" --filePath "$INTERACTION_DIR/snapshot.txt"
|
|
254
|
+
# Console output since navigation.
|
|
255
|
+
cdt "$CDT_T_STEP" list_console_messages "$PAGE_ID" > "$INTERACTION_DIR/console.txt" 2>/dev/null || true
|
|
256
|
+
else
|
|
257
|
+
echo " new_page FAILED: $DEV_URL"
|
|
258
|
+
fi
|
|
259
|
+
cdt_stop
|
|
260
|
+
else
|
|
261
|
+
echo " start FAILED (npx fetch, Chrome at $CHROME_BIN, or the ${CDT_T_START}s ceiling)"
|
|
262
|
+
fi
|
|
263
|
+
|
|
264
|
+
if [ "$ICAPTURED" -gt 0 ]; then
|
|
265
|
+
INTERACTION_STATUS="captured ($ICAPTURED state(s), $IFAILED failed) in $INTERACTION_DIR"
|
|
266
|
+
else
|
|
267
|
+
INTERACTION_STATUS="not captured (driver or capture failure)"
|
|
268
|
+
fi
|
|
269
|
+
echo "Interaction capture: $INTERACTION_STATUS"
|
|
270
|
+
fi
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
`wait_for` is MCP-only: where a state needs settling, poll `cdt "$CDT_T_STEP" evaluate_script "() => document.readyState" --pageId "$PAGE_ID"` for `complete`. The driver is Chromium-only; Firefox and WebKit stay on `npx playwright screenshot -b firefox|webkit`.
|
|
274
|
+
|
|
275
|
+
Carry `$INTERACTION_STATUS` into the report's `**Interaction captures:**` field. **Never report an interaction state you did not capture** — key off or section skipped, interaction findings are code-derived and say so.
|
|
276
|
+
|
|
277
|
+
<!-- /gsd:ui-interaction-capture -->
|
|
278
|
+
|
|
144
279
|
</screenshot_approach>
|
|
145
280
|
|
|
146
281
|
<audit_pillars>
|
|
@@ -300,6 +435,7 @@ Write to: `$PHASE_DIR/$PADDED_PHASE-UI-REVIEW.md`
|
|
|
300
435
|
**Audited:** {date}
|
|
301
436
|
**Baseline:** {UI-SPEC.md / abstract standards}
|
|
302
437
|
**Screenshots:** {captured / not captured (no dev server)}
|
|
438
|
+
**Interaction captures:** {$INTERACTION_STATUS — off / skipped (reason) / captured (N states) / not captured (reason)}
|
|
303
439
|
|
|
304
440
|
---
|
|
305
441
|
|
|
@@ -366,7 +502,7 @@ Run the gitignore gate from `<gitignore_gate>`. This MUST happen before step 3.
|
|
|
366
502
|
|
|
367
503
|
## Step 3: Detect Dev Server and Capture Screenshots
|
|
368
504
|
|
|
369
|
-
Run the screenshot approach from `<screenshot_approach>`. Record whether screenshots were captured.
|
|
505
|
+
Run the screenshot approach from `<screenshot_approach>`. Record whether screenshots were captured. Then run its interaction-capture section with `INTERACTION_CAPTURE` set from the `<config>` block's `interaction_capture` value, and record `$INTERACTION_STATUS` verbatim — it is `off` unless `workflow.ui_interaction_capture` is on and a Chrome binary resolved.
|
|
370
506
|
|
|
371
507
|
## Step 4: Scan Implemented Files
|
|
372
508
|
|
|
@@ -407,6 +543,7 @@ Use output format from `<output_format>`. If registry audit produced flags, add
|
|
|
407
543
|
**Phase:** {phase_number} - {phase_name}
|
|
408
544
|
**Overall Score:** {total}/24
|
|
409
545
|
**Screenshots:** {captured / not captured}
|
|
546
|
+
**Interaction captures:** {$INTERACTION_STATUS}
|
|
410
547
|
|
|
411
548
|
### Pillar Summary
|
|
412
549
|
| Pillar | Score |
|
|
@@ -441,6 +578,7 @@ UI audit is complete when:
|
|
|
441
578
|
- [ ] .gitignore gate executed before any screenshot capture
|
|
442
579
|
- [ ] Dev server detection attempted
|
|
443
580
|
- [ ] Screenshots captured (or noted as unavailable)
|
|
581
|
+
- [ ] Interaction-capture outcome recorded from `$INTERACTION_STATUS` (off, skipped with reason, or captured)
|
|
444
582
|
- [ ] All 6 pillars scored with evidence
|
|
445
583
|
- [ ] Registry safety audit executed (if shadcn + third-party registries present)
|
|
446
584
|
- [ ] Top 3 priority fixes identified with concrete solutions
|