@leocm/flowcraft 0.0.0-stage → 2.0.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/README.md +846 -3
- package/bin/cli.js +102 -0
- package/flowcraft.yaml +30 -0
- package/install.sh +24 -0
- package/lib/args.js +34 -0
- package/lib/config.js +20 -0
- package/lib/copy.js +131 -0
- package/lib/fix.js +110 -0
- package/lib/fsutil.js +104 -0
- package/lib/global.js +229 -0
- package/lib/init.js +43 -0
- package/lib/runtime.js +84 -0
- package/lib/version.js +55 -0
- package/lib/wizard.js +125 -0
- package/package.json +31 -4
- package/presets/backend.yaml +20 -0
- package/presets/default.yaml +15 -0
- package/presets/frontend.yaml +20 -0
- package/presets/quick-fix.yaml +15 -0
- package/setup/.claude/commands/P0.5.md +1 -0
- package/setup/.claude/commands/P0.md +1 -0
- package/setup/.claude/commands/P1.md +1 -0
- package/setup/.claude/commands/P2.md +1 -0
- package/setup/.claude/commands/P3.md +1 -0
- package/setup/.claude/commands/P4.md +1 -0
- package/setup/.claude/commands/P5.md +1 -0
- package/setup/.claude/commands/code-analysis-init.md +1 -0
- package/setup/.claude/commands/code-analysis-rebuild.md +1 -0
- package/setup/.claude/commands/code-analysis-show-memory.md +1 -0
- package/setup/.claude/commands/code-analysis-update.md +1 -0
- package/setup/.claude/hooks/check-phase-advancement.py +180 -0
- package/setup/.claude/hooks/check-phase-test.py +152 -0
- package/setup/.claude/hooks/check-phase-write.py +232 -0
- package/setup/.claude/hooks/dispatch.py +64 -0
- package/setup/.claude/hooks/file-suggestion.py +45 -0
- package/setup/.claude/hooks/flowcraft_env.py +99 -0
- package/setup/.claude/hooks/log_session.py +91 -0
- package/setup/.claude/hooks/permission-request.py +125 -0
- package/setup/.claude/hooks/post-tool-failure.py +34 -0
- package/setup/.claude/hooks/pre-compact.py +64 -0
- package/setup/.claude/hooks/review-runner.py +844 -0
- package/setup/.claude/hooks/session-end.py +182 -0
- package/setup/.claude/hooks/session-start.py +188 -0
- package/setup/.claude/hooks/settings.json +0 -0
- package/setup/.claude/hooks/setup-keys.py +280 -0
- package/setup/.claude/hooks/statusline.py +61 -0
- package/setup/.claude/hooks/stop-check.py +169 -0
- package/setup/.claude/hooks/subagent-start.py +48 -0
- package/setup/.claude/hooks/subagent-stop.py +61 -0
- package/setup/.claude/hooks/task-completed.py +55 -0
- package/setup/.claude/hooks/task_manager.py +592 -0
- package/setup/.claude/hooks/user-prompt-submit.py +85 -0
- package/setup/.claude/project-state.md +109 -0
- package/setup/.claude/settings.json +237 -0
- package/setup/.claude/settings.local.json +13 -0
- package/setup/.claude/skills/P5report/SKILL.md +77 -0
- package/setup/.claude/skills/Pstatus/SKILL.md +68 -0
- package/setup/.claude/skills/archive/SKILL.md +196 -0
- package/setup/.claude/skills/brainstorming/SKILL.md +155 -0
- package/setup/.claude/skills/brainstorming/scripts/frame-template.html +213 -0
- package/setup/.claude/skills/brainstorming/scripts/helper.js +167 -0
- package/setup/.claude/skills/brainstorming/scripts/server.cjs +723 -0
- package/setup/.claude/skills/brainstorming/scripts/start-server.py +245 -0
- package/setup/.claude/skills/brainstorming/scripts/stop-server.py +178 -0
- package/setup/.claude/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/setup/.claude/skills/brainstorming/visual-companion.md +298 -0
- package/setup/.claude/skills/checkpoint/SKILL.md +42 -0
- package/setup/.claude/skills/chrome-integration/SKILL.md +67 -0
- package/setup/.claude/skills/code-analysis/SKILL.md +1243 -0
- package/setup/.claude/skills/code-review/SKILL.md +265 -0
- package/setup/.claude/skills/cross-review/SKILL.md +41 -0
- package/setup/.claude/skills/executing-plans/SKILL.md +64 -0
- package/setup/.claude/skills/git-prep/SKILL.md +50 -0
- package/setup/.claude/skills/gitnexus/gitnexus-cli/SKILL.md +67 -0
- package/setup/.claude/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
- package/setup/.claude/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
- package/setup/.claude/skills/gitnexus/gitnexus-guide/SKILL.md +66 -0
- package/setup/.claude/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
- package/setup/.claude/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
- package/setup/.claude/skills/graphify/SKILL.md +49 -0
- package/setup/.claude/skills/openspec-apply-change/SKILL.md +185 -0
- package/setup/.claude/skills/openspec-archive-change/SKILL.md +182 -0
- package/setup/.claude/skills/openspec-bulk-archive-change/SKILL.md +339 -0
- package/setup/.claude/skills/openspec-continue-change/SKILL.md +118 -0
- package/setup/.claude/skills/openspec-explore/SKILL.md +311 -0
- package/setup/.claude/skills/openspec-ff-change/SKILL.md +113 -0
- package/setup/.claude/skills/openspec-new-change/SKILL.md +77 -0
- package/setup/.claude/skills/openspec-onboard/SKILL.md +573 -0
- package/setup/.claude/skills/openspec-propose/SKILL.md +149 -0
- package/setup/.claude/skills/openspec-sync-specs/SKILL.md +262 -0
- package/setup/.claude/skills/openspec-update-change/SKILL.md +91 -0
- package/setup/.claude/skills/openspec-verify-change/SKILL.md +175 -0
- package/setup/.claude/skills/oss-version-check/SKILL.md +71 -0
- package/setup/.claude/skills/oss-version-check/check_oss_version.py +205 -0
- package/setup/.claude/skills/phase/SKILL.md +63 -0
- package/setup/.claude/skills/playwright/SKILL.md +86 -0
- package/setup/.claude/skills/playwright-cli/SKILL.md +420 -0
- package/setup/.claude/skills/playwright-cli/references/element-attributes.md +23 -0
- package/setup/.claude/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/setup/.claude/skills/playwright-cli/references/references/element-attributes.md +23 -0
- package/setup/.claude/skills/playwright-cli/references/references/playwright-tests.md +39 -0
- package/setup/.claude/skills/playwright-cli/references/references/request-mocking.md +87 -0
- package/setup/.claude/skills/playwright-cli/references/references/running-code.md +241 -0
- package/setup/.claude/skills/playwright-cli/references/references/session-management.md +225 -0
- package/setup/.claude/skills/playwright-cli/references/references/storage-state.md +275 -0
- package/setup/.claude/skills/playwright-cli/references/references/test-generation.md +433 -0
- package/setup/.claude/skills/playwright-cli/references/references/tracing.md +139 -0
- package/setup/.claude/skills/playwright-cli/references/references/video-recording.md +143 -0
- package/setup/.claude/skills/playwright-cli/references/request-mocking.md +87 -0
- package/setup/.claude/skills/playwright-cli/references/running-code.md +241 -0
- package/setup/.claude/skills/playwright-cli/references/session-management.md +225 -0
- package/setup/.claude/skills/playwright-cli/references/storage-state.md +275 -0
- package/setup/.claude/skills/playwright-cli/references/test-generation.md +433 -0
- package/setup/.claude/skills/playwright-cli/references/tracing.md +139 -0
- package/setup/.claude/skills/playwright-cli/references/video-recording.md +143 -0
- package/setup/.claude/skills/review/SKILL.md +98 -0
- package/setup/.claude/skills/review-tools/SKILL.md +76 -0
- package/setup/.claude/skills/subagent-driven-development/SKILL.md +94 -0
- package/setup/.claude/skills/task/SKILL.md +26 -0
- package/setup/.claude/skills/test-driven-development/SKILL.md +320 -0
- package/setup/.claude/skills/test-driven-development/writing-good-tests.md +198 -0
- package/setup/.claude/skills/ui-ux-pro-max/SKILL.md +377 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/setup/.claude/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/setup/.claude/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/setup/.claude/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/setup/.claude/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/setup/.claude/skills/ui-ux-standards/SKILL.md +154 -0
- package/setup/.claude/skills/verification-before-completion/SKILL.md +120 -0
- package/setup/.claude/skills/wiki-read/SKILL.md +190 -0
- package/setup/.claude/skills/writing-plans/SKILL.md +168 -0
- package/setup/.claude/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/setup/.claude/tasks/.last-session +1 -0
- package/setup/.codex/.agents/skills/P5report/SKILL.md +77 -0
- package/setup/.codex/.agents/skills/Pstatus/SKILL.md +30 -0
- package/setup/.codex/.agents/skills/archive/SKILL.md +196 -0
- package/setup/.codex/.agents/skills/brainstorming/SKILL.md +155 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/frame-template.html +213 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/helper.js +167 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/server.cjs +723 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/start-server.py +245 -0
- package/setup/.codex/.agents/skills/brainstorming/scripts/stop-server.py +178 -0
- package/setup/.codex/.agents/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/setup/.codex/.agents/skills/brainstorming/visual-companion.md +298 -0
- package/setup/.codex/.agents/skills/checkpoint/SKILL.md +42 -0
- package/setup/.codex/.agents/skills/chrome-integration/SKILL.md +67 -0
- package/setup/.codex/.agents/skills/code-analysis/SKILL.md +1243 -0
- package/setup/.codex/.agents/skills/code-review/SKILL.md +265 -0
- package/setup/.codex/.agents/skills/cross-review/SKILL.md +42 -0
- package/setup/.codex/.agents/skills/executing-plans/SKILL.md +64 -0
- package/setup/.codex/.agents/skills/git-prep/SKILL.md +50 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-cli/SKILL.md +67 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-debugging/SKILL.md +89 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-exploring/SKILL.md +78 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-guide/SKILL.md +66 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-impact-analysis/SKILL.md +97 -0
- package/setup/.codex/.agents/skills/gitnexus/gitnexus-refactoring/SKILL.md +121 -0
- package/setup/.codex/.agents/skills/graphify/SKILL.md +49 -0
- package/setup/.codex/.agents/skills/openspec-apply-change/SKILL.md +185 -0
- package/setup/.codex/.agents/skills/openspec-archive-change/SKILL.md +182 -0
- package/setup/.codex/.agents/skills/openspec-bulk-archive-change/SKILL.md +339 -0
- package/setup/.codex/.agents/skills/openspec-continue-change/SKILL.md +118 -0
- package/setup/.codex/.agents/skills/openspec-explore/SKILL.md +311 -0
- package/setup/.codex/.agents/skills/openspec-ff-change/SKILL.md +113 -0
- package/setup/.codex/.agents/skills/openspec-new-change/SKILL.md +77 -0
- package/setup/.codex/.agents/skills/openspec-onboard/SKILL.md +573 -0
- package/setup/.codex/.agents/skills/openspec-propose/SKILL.md +149 -0
- package/setup/.codex/.agents/skills/openspec-sync-specs/SKILL.md +262 -0
- package/setup/.codex/.agents/skills/openspec-update-change/SKILL.md +91 -0
- package/setup/.codex/.agents/skills/openspec-verify-change/SKILL.md +175 -0
- package/setup/.codex/.agents/skills/oss-version-check/SKILL.md +71 -0
- package/setup/.codex/.agents/skills/oss-version-check/check_oss_version.py +205 -0
- package/setup/.codex/.agents/skills/phase/SKILL.md +63 -0
- package/setup/.codex/.agents/skills/playwright/SKILL.md +86 -0
- package/setup/.codex/.agents/skills/playwright-cli/SKILL.md +420 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/element-attributes.md +23 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/element-attributes.md +23 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/playwright-tests.md +39 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/request-mocking.md +87 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/running-code.md +241 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/session-management.md +225 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/storage-state.md +275 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/test-generation.md +433 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/tracing.md +139 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/references/video-recording.md +143 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/request-mocking.md +87 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/running-code.md +241 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/session-management.md +225 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/storage-state.md +275 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/test-generation.md +433 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/tracing.md +139 -0
- package/setup/.codex/.agents/skills/playwright-cli/references/video-recording.md +143 -0
- package/setup/.codex/.agents/skills/review/SKILL.md +98 -0
- package/setup/.codex/.agents/skills/review-tools/SKILL.md +76 -0
- package/setup/.codex/.agents/skills/subagent-driven-development/SKILL.md +94 -0
- package/setup/.codex/.agents/skills/task/SKILL.md +27 -0
- package/setup/.codex/.agents/skills/test-driven-development/SKILL.md +320 -0
- package/setup/.codex/.agents/skills/test-driven-development/writing-good-tests.md +198 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/SKILL.md +377 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/setup/.codex/.agents/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/setup/.codex/.agents/skills/ui-ux-standards/SKILL.md +154 -0
- package/setup/.codex/.agents/skills/verification-before-completion/SKILL.md +120 -0
- package/setup/.codex/.agents/skills/wiki-read/SKILL.md +190 -0
- package/setup/.codex/.agents/skills/writing-plans/SKILL.md +168 -0
- package/setup/.codex/.agents/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/setup/.codex/config.toml +10 -0
- package/setup/.codex/hooks/log_session.py +85 -0
- package/setup/.codex/hooks/review-runner.py +844 -0
- package/setup/.codex/hooks/sdlc-codex-hook.cjs +1020 -0
- package/setup/.codex/hooks/setup-keys.py +280 -0
- package/setup/.codex/hooks.json +121 -0
- package/setup/.codex/model-catalog.json +154 -0
- package/setup/.codex/project-state.md +103 -0
- package/setup/AGENTS.md +722 -0
- package/setup/CLAUDE.md +717 -0
- package/setup/install.sh +24 -0
- package/setup/tests/test_decision_timeout.py +241 -0
- package/setup/tests/test_hook_guards.py +341 -0
- package/setup/tests/test_sdlc_bootstrap.py +167 -0
- package/setup/tests/test_task_manager.py +148 -0
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Video Recording
|
|
2
|
+
|
|
3
|
+
Capture browser automation sessions as video for debugging, documentation, or verification. Produces WebM (VP8/VP9 codec).
|
|
4
|
+
|
|
5
|
+
## Basic Recording
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Open browser first
|
|
9
|
+
playwright-cli open
|
|
10
|
+
|
|
11
|
+
# Start recording
|
|
12
|
+
playwright-cli video-start demo.webm
|
|
13
|
+
|
|
14
|
+
# Add a chapter marker for section transitions
|
|
15
|
+
playwright-cli video-chapter "Getting Started" --description="Opening the homepage" --duration=2000
|
|
16
|
+
|
|
17
|
+
# Navigate and perform actions
|
|
18
|
+
playwright-cli goto https://example.com
|
|
19
|
+
playwright-cli snapshot
|
|
20
|
+
playwright-cli click e1
|
|
21
|
+
|
|
22
|
+
# Add another chapter
|
|
23
|
+
playwright-cli video-chapter "Filling Form" --description="Entering test data" --duration=2000
|
|
24
|
+
playwright-cli fill e2 "test input"
|
|
25
|
+
|
|
26
|
+
# Stop and save
|
|
27
|
+
playwright-cli video-stop
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Best Practices
|
|
31
|
+
|
|
32
|
+
### 1. Use Descriptive Filenames
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
# Include context in filename
|
|
36
|
+
playwright-cli video-start recordings/login-flow-2024-01-15.webm
|
|
37
|
+
playwright-cli video-start recordings/checkout-test-run-42.webm
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### 2. Record entire hero scripts.
|
|
41
|
+
|
|
42
|
+
When recording a video for the user or as a proof of work, it is best to create a code snippet and execute it with run-code.
|
|
43
|
+
It allows inserting appropriate pauses between the actions and annotating the video. There are new Playwright APIs for that.
|
|
44
|
+
|
|
45
|
+
1) Perform scenario using CLI and take note of all locators and actions. You'll need those locators to request their bounding boxes for highlight.
|
|
46
|
+
2) Create a file with the intended script for video (below). Use pressSequentially w/ delay for nice typing, make reasonable pauses.
|
|
47
|
+
3) Use playwright-cli run-code --filename your-script.js
|
|
48
|
+
|
|
49
|
+
**Important**: Overlays are `pointer-events: none` — they do not interfere with page interactions. You can safely keep sticky overlays visible while clicking, filling, or performing any actions on the page.
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
async page => {
|
|
53
|
+
await page.screencast.start({ path: 'video.webm', size: { width: 1280, height: 800 } });
|
|
54
|
+
await page.goto('https://demo.playwright.dev/todomvc');
|
|
55
|
+
|
|
56
|
+
// Show a chapter card — blurs the page and shows a dialog.
|
|
57
|
+
// Blocks until duration expires, then auto-removes.
|
|
58
|
+
// Use this for simple use cases, but always feel free to hand-craft your own beautiful
|
|
59
|
+
// overlay via await page.screencast.showOverlay().
|
|
60
|
+
await page.screencast.showChapter('Adding Todo Items', {
|
|
61
|
+
description: 'We will add several items to the todo list.',
|
|
62
|
+
duration: 2000,
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// Perform action
|
|
66
|
+
await page.getByRole('textbox', { name: 'What needs to be done?' }).pressSequentially('Walk the dog', { delay: 60 });
|
|
67
|
+
await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
|
|
68
|
+
await page.waitForTimeout(1000);
|
|
69
|
+
|
|
70
|
+
// Show next chapter
|
|
71
|
+
await page.screencast.showChapter('Verifying Results', {
|
|
72
|
+
description: 'Checking the item appeared in the list.',
|
|
73
|
+
duration: 2000,
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
// Add a sticky annotation that stays while you perform actions.
|
|
77
|
+
// Overlays are pointer-events: none, so they won't block clicks.
|
|
78
|
+
const annotation = await page.screencast.showOverlay(`
|
|
79
|
+
<div style="position: absolute; top: 8px; right: 8px;
|
|
80
|
+
padding: 6px 12px; background: rgba(0,0,0,0.7);
|
|
81
|
+
border-radius: 8px; font-size: 13px; color: white;">
|
|
82
|
+
✓ Item added successfully
|
|
83
|
+
</div>
|
|
84
|
+
`);
|
|
85
|
+
|
|
86
|
+
// Perform more actions while the annotation is visible
|
|
87
|
+
await page.getByRole('textbox', { name: 'What needs to be done?' }).pressSequentially('Buy groceries', { delay: 60 });
|
|
88
|
+
await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
|
|
89
|
+
await page.waitForTimeout(1500);
|
|
90
|
+
|
|
91
|
+
// Remove the annotation when done
|
|
92
|
+
await annotation.dispose();
|
|
93
|
+
|
|
94
|
+
// You can also highlight relevant locators and provide contextual annotations.
|
|
95
|
+
const bounds = await page.getByText('Walk the dog').boundingBox();
|
|
96
|
+
await page.screencast.showOverlay(`
|
|
97
|
+
<div style="position: absolute;
|
|
98
|
+
top: ${bounds.y}px;
|
|
99
|
+
left: ${bounds.x}px;
|
|
100
|
+
width: ${bounds.width}px;
|
|
101
|
+
height: ${bounds.height}px;
|
|
102
|
+
border: 1px solid red;">
|
|
103
|
+
</div>
|
|
104
|
+
<div style="position: absolute;
|
|
105
|
+
top: ${bounds.y + bounds.height + 5}px;
|
|
106
|
+
left: ${bounds.x + bounds.width / 2}px;
|
|
107
|
+
transform: translateX(-50%);
|
|
108
|
+
padding: 6px;
|
|
109
|
+
background: #808080;
|
|
110
|
+
border-radius: 10px;
|
|
111
|
+
font-size: 14px;
|
|
112
|
+
color: white;">Check it out, it is right above this text
|
|
113
|
+
</div>
|
|
114
|
+
`, { duration: 2000 });
|
|
115
|
+
|
|
116
|
+
await page.screencast.stop();
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Embrace creativity, overlays are powerful.
|
|
121
|
+
|
|
122
|
+
### Overlay API Summary
|
|
123
|
+
|
|
124
|
+
| Method | Use Case |
|
|
125
|
+
|--------|----------|
|
|
126
|
+
| `page.screencast.showChapter(title, { description?, duration?, styleSheet? })` | Full-screen chapter card with blurred backdrop — ideal for section transitions |
|
|
127
|
+
| `page.screencast.showOverlay(html, { duration? })` | Custom HTML overlay — use for callouts, labels, highlights |
|
|
128
|
+
| `disposable.dispose()` | Remove a sticky overlay added without duration |
|
|
129
|
+
| `page.screencast.hideOverlays()` / `page.screencast.showOverlays()` | Temporarily hide/show all overlays |
|
|
130
|
+
|
|
131
|
+
## Tracing vs Video
|
|
132
|
+
|
|
133
|
+
| Feature | Video | Tracing |
|
|
134
|
+
|---------|-------|---------|
|
|
135
|
+
| Output | WebM file | Trace file (viewable in Trace Viewer) |
|
|
136
|
+
| Shows | Visual recording | DOM snapshots, network, console, actions |
|
|
137
|
+
| Use case | Demos, documentation | Debugging, analysis |
|
|
138
|
+
| Size | Larger | Smaller |
|
|
139
|
+
|
|
140
|
+
## Limitations
|
|
141
|
+
|
|
142
|
+
- Recording adds slight overhead to automation
|
|
143
|
+
- Large recordings can consume significant disk space
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: "P4 comprehensive review: code quality, test coverage, integration, PRD traceability. | 触发词:审查/检查/review"
|
|
4
|
+
argument-hint: "[filepath]"
|
|
5
|
+
context: fork
|
|
6
|
+
allowed-tools:
|
|
7
|
+
- Read
|
|
8
|
+
- Glob
|
|
9
|
+
- Grep
|
|
10
|
+
- Bash
|
|
11
|
+
- Edit
|
|
12
|
+
hooks:
|
|
13
|
+
Stop:
|
|
14
|
+
- hooks:
|
|
15
|
+
- type: command
|
|
16
|
+
command: "echo '{\"hookSpecificOutput\":{\"additionalContext\":\"Ensure before review completes: (1) report written to .claude/reviews/ (2) all checklist items marked pass/fail\"}}'"
|
|
17
|
+
---
|
|
18
|
+
> **P4 跨模型审查 (Cross-model review, 双跑合并)**: 当前模型 + 用户选定模型各审一次并合并(相同则只跑一次)。Codex 侧用 codex CLI、Claude 侧用 claude CLI(互不串)。脚本:python .codex/hooks/review-runner.py / python ~/.flowcraft/hooks/review-runner.py;provider/base_url/model/context/key 以各自目录 api-keys.json 为准,由 setup-keys.py 自动发现 settings.json + 清单选择生成,不写死;用户选择未配置模型时先确认 base_url/context/key/model。
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Usage: `/review [file path]`
|
|
22
|
+
|
|
23
|
+
Arguments: $ARGUMENTS
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Core principle (核心原则)
|
|
28
|
+
|
|
29
|
+
**P4 is the only formal review gate**, covering code quality + test quality + integration consistency + PRD traceability. No other phase requires review. Running `/review` outside P4 → prompt "当前阶段无需审查" (no review needed in this phase).
|
|
30
|
+
|
|
31
|
+
Review flow: auto-detect project type (see 06-review-tools.md) → install missing tools → run tools to collect output → run the review checklist based on output → generate report to `.claude/reviews/P4-review-{time}.md`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Tool execution (工具执行, must run before review)
|
|
36
|
+
|
|
37
|
+
**All Bash commands on a single line.** Auto-install tools when missing (see 06-review-tools.md).
|
|
38
|
+
|
|
39
|
+
### Code toolchain (Node.js example; other languages see 06-review-tools.md)
|
|
40
|
+
- **Lint**: `npx eslint . 2>&1; echo "LINT_EXIT=$?"`
|
|
41
|
+
- **Typecheck**: `npx tsc --noEmit 2>&1; echo "TSC_EXIT=$?"`
|
|
42
|
+
- **Build**: `npm run build 2>&1; echo "BUILD_EXIT=$?"`
|
|
43
|
+
- **Dependency audit**: `npm audit 2>&1; echo "AUDIT_EXIT=$?"`
|
|
44
|
+
|
|
45
|
+
### Test verification
|
|
46
|
+
**Run tests only once; analyze from the output file. Max 3 test runs per review.**
|
|
47
|
+
|
|
48
|
+
1. Run: `npx vitest run --coverage 2>&1 | tee /tmp/sdlc-test-output.txt; echo "TEST_EXIT=${PIPESTATUS[0]}"`
|
|
49
|
+
2. Read: read `/tmp/sdlc-test-output.txt` to extract results
|
|
50
|
+
3. On failure: collect all errors at once → batch-fix → run once more to verify
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Review checklist (审查清单)
|
|
55
|
+
|
|
56
|
+
### 5.1 Code quality
|
|
57
|
+
- [ ] **Lint + Typecheck + Build + dependency security** pass (0 errors, no high/critical vulnerabilities)
|
|
58
|
+
- [ ] Code standards per 02-coding-standards.md + no security holes + no redundant code
|
|
59
|
+
|
|
60
|
+
### 5.2 Test quality
|
|
61
|
+
- [ ] **Every PRD requirement has a corresponding test** + all tests pass
|
|
62
|
+
- [ ] **Coverage**: line ≥80%, key business ≥90%, branch ≥70%
|
|
63
|
+
|
|
64
|
+
### 5.3 Integration consistency + PRD traceability
|
|
65
|
+
- [ ] **PRD four-ring traceability** — requirement→design→code file:line→test case, no broken links
|
|
66
|
+
- [ ] **No out-of-PRD changes** + global consistency + security + performance + no missed TODO/FIXME
|
|
67
|
+
|
|
68
|
+
### 5.4 Delivery readiness
|
|
69
|
+
- [ ] No sensitive info + reasonable commit granularity + docs updated as needed
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Output format (输出格式, concise)
|
|
74
|
+
```
|
|
75
|
+
# P4 Comprehensive Review Report (P4 综合审查报告)
|
|
76
|
+
|
|
77
|
+
**Toolchain**: Lint ✅ | Typecheck ✅ | Build ✅ | Dependencies ✅
|
|
78
|
+
**Tests**: passed {n} / failed {n} / coverage {n}%
|
|
79
|
+
|
|
80
|
+
**Review results**:
|
|
81
|
+
- 5.1 Code quality: ✅
|
|
82
|
+
- 5.2 Test quality: ✅
|
|
83
|
+
- 5.3 Integration+PRD: ✅
|
|
84
|
+
- 5.4 Delivery ready: ✅
|
|
85
|
+
|
|
86
|
+
**PRD traceability**: R1→src/foo.ts:10-50→test/foo.test.ts ✅ | R2→src/bar.ts:5-30→test/bar.test.ts ✅
|
|
87
|
+
|
|
88
|
+
**Issues**: {none / [severity] description → suggestion}
|
|
89
|
+
**Conclusion**: {pass / needs changes}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Handling failures (未通过处理)
|
|
95
|
+
|
|
96
|
+
- Code issues → back to P2 to fix
|
|
97
|
+
- Test issues → back to P3 to add/fix
|
|
98
|
+
- Auto-fix then re-review (max 3 times)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-tools
|
|
3
|
+
description: "Review toolchain: detect project type, install tools, run Lint/Typecheck/Build/dep audit. | 触发词:工具链/审查工具"
|
|
4
|
+
argument-hint: "[check|install]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Grep
|
|
9
|
+
- Bash
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Usage: `/review-tools [check|install]`
|
|
13
|
+
|
|
14
|
+
Arguments: $ARGUMENTS
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Project type auto-detection (项目类型自动检测)
|
|
19
|
+
|
|
20
|
+
Determine the project type from detector files:
|
|
21
|
+
|
|
22
|
+
| Detector file | Type | Lint | Typecheck | Test+Coverage | Dependency audit |
|
|
23
|
+
|---------|---------|------|-----------|--------------|---------|
|
|
24
|
+
| package.json | Node.js | npx eslint . | npx tsc --noEmit | npx jest --coverage / npx vitest run --coverage | npm audit |
|
|
25
|
+
| pyproject.toml / requirements.txt | Python | ruff check . or flake8 | mypy . | pytest --cov | pip audit |
|
|
26
|
+
| go.mod | Go | go vet ./... | (built-in) | go test -coverprofile=cover.out ./... | govulncheck ./... |
|
|
27
|
+
| Cargo.toml | Rust | cargo clippy | (built-in) | cargo test | cargo audit |
|
|
28
|
+
| pom.xml / build.gradle | Java | (configured) | mvn compile / mvnd compile / gradle compileJava | mvn test / mvnd test / gradle test | mvn dependency-check:check / mvnd dependency-check:check |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Automatic tool installation (工具自动安装)
|
|
33
|
+
|
|
34
|
+
When a review tool is missing, **auto-install it as a devDependency; do not skip**:
|
|
35
|
+
|
|
36
|
+
1. Detect availability with `which <command>` or `npx <command> --version`
|
|
37
|
+
2. If missing → auto-install with the project's package manager (Node.js uses `--save-dev`; Python does not write to requirements.txt)
|
|
38
|
+
3. Inform the user before installing; verify availability after installing
|
|
39
|
+
4. On install failure → log a warning, mark as a risk item, do not block the review
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Key metrics (关键指标)
|
|
44
|
+
|
|
45
|
+
| Phase | Metric |
|
|
46
|
+
|------|------|
|
|
47
|
+
| P2 code review | Lint error count, Typecheck error count, build success, dependency vulnerability count+severity |
|
|
48
|
+
| P3 test review | passed/failed/skipped counts, line coverage ≥80%, key business ≥90%, branch ≥70% |
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Usage (使用方式)
|
|
53
|
+
|
|
54
|
+
- `check` - detect project type only, no install
|
|
55
|
+
- `install` - detect and install missing tools
|
|
56
|
+
- no argument - show detection results and install suggestions
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Output format (输出格式)
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
[Project type detection (项目类型检测)]
|
|
64
|
+
- Type: {Node.js/Python/Go/Rust/Java}
|
|
65
|
+
- Build tool: {npm/gradle/maven/...}
|
|
66
|
+
|
|
67
|
+
[Tool status (工具状态)]
|
|
68
|
+
| Tool | Status | Version |
|
|
69
|
+
|------|------|------|
|
|
70
|
+
| eslint | ✅ installed | v9.x |
|
|
71
|
+
| tsc | ✅ installed | v5.x |
|
|
72
|
+
| jest | ❌ not installed | - |
|
|
73
|
+
|
|
74
|
+
[Install commands (安装命令)]
|
|
75
|
+
npm install --save-dev eslint @typescript-eslint/parser
|
|
76
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: subagent-driven-development
|
|
3
|
+
description: "Parallel development with sub-agents (P2 2+ modules, P3 2+ test targets). | 触发词:并行开发/子代理/派发任务"
|
|
4
|
+
argument-hint: "<task_description>"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Glob
|
|
8
|
+
- Grep
|
|
9
|
+
- Bash
|
|
10
|
+
- Write
|
|
11
|
+
- Edit
|
|
12
|
+
- Agent
|
|
13
|
+
- TaskCreate
|
|
14
|
+
- TaskUpdate
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
Usage: `/subagent-driven-development <task description>`
|
|
18
|
+
|
|
19
|
+
Arguments: $ARGUMENTS
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Core principles (核心原则)
|
|
24
|
+
|
|
25
|
+
1. **Independence & PRD alignment** — only dependency-free tasks can run in parallel; each sub-agent maps to explicit PRD requirements
|
|
26
|
+
2. **Main-agent coordination** — split, assign, aggregate, resolve conflicts
|
|
27
|
+
3. **Max 2 parallel sub-agents**
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Trigger conditions (触发条件)
|
|
32
|
+
|
|
33
|
+
| Phase | Trigger | Split granularity | Post-aggregation |
|
|
34
|
+
|------|---------|---------|-----------|
|
|
35
|
+
| P2 | 2+ independent implementation modules | by module/file | check interface consistency |
|
|
36
|
+
| P3 | 2+ independent tested modules | by tested module | run all tests together |
|
|
37
|
+
| P4 | modified_files ≥5 | by review dimension (max 3) | merge review reports |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Non-applicable scenarios (不适用场景)
|
|
42
|
+
|
|
43
|
+
- P1/P5 do not support parallelism
|
|
44
|
+
- Small tasks (single file or <50 lines) done by the main agent directly
|
|
45
|
+
- Sub-agent failure → switch to main-agent serial execution
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Execution flow (执行流程)
|
|
50
|
+
|
|
51
|
+
### 1. Task splitting (任务拆分)
|
|
52
|
+
|
|
53
|
+
Identify independent tasks from the PRD:
|
|
54
|
+
- Check for dependencies between tasks
|
|
55
|
+
- Prefer splitting dependency-free modules
|
|
56
|
+
- Each sub-agent task maps to an explicit PRD requirement ID
|
|
57
|
+
|
|
58
|
+
### 2. Dispatch sub-agents (派发子 Agent)
|
|
59
|
+
|
|
60
|
+
Use the `Agent` tool to dispatch parallel tasks:
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Agent(subagent_type="subagent", task="specific PRD requirement implementation")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 3. Wait for completion (等待完成)
|
|
67
|
+
|
|
68
|
+
Wait for all sub-agents in parallel.
|
|
69
|
+
|
|
70
|
+
### 4. Aggregate results (汇总结果)
|
|
71
|
+
|
|
72
|
+
- Check interface consistency
|
|
73
|
+
- Merge changes to the main branch
|
|
74
|
+
- Resolve conflicts (if any)
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Output format (输出格式)
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
[Parallel development (并行开发)]
|
|
82
|
+
- Task split: {n} independent tasks
|
|
83
|
+
- Parallelism: {1} / {max} (max 2)
|
|
84
|
+
- Execution mode: main-agent / sub-agent
|
|
85
|
+
|
|
86
|
+
[Sub-agent execution log (子Agent执行记录)]
|
|
87
|
+
- Agent 1: {task description} → {status}
|
|
88
|
+
- Agent 2: {task description} → {status}
|
|
89
|
+
|
|
90
|
+
[Aggregated results (汇总结果)]
|
|
91
|
+
- Merge status: success/failure
|
|
92
|
+
- Interface consistency: pass/fail
|
|
93
|
+
- Conflicts: {n}
|
|
94
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task
|
|
3
|
+
description: 多任务管理:新任务/切换任务/任务列表/归档任务。目录即任务,会话自动绑定,零配置。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# task — 多任务管理(Multi-task Management)
|
|
7
|
+
|
|
8
|
+
触发词:`新任务` / `切换任务` / `任务列表` / `归档任务` / `/task`
|
|
9
|
+
|
|
10
|
+
任务绑定规则(用户无需记忆):**工作根目录即任务**——hooks 自动解析(`FLOWCRAFT_TASK_ID` > session 绑定 > 目录默认 > 单任务回退)。同目录多会话按 session_id 隔离。并行任务用多工作根(git worktree / 多目录)承载。
|
|
11
|
+
|
|
12
|
+
## 子命令(全部由 AI 执行,用户只说人话)
|
|
13
|
+
|
|
14
|
+
| 用户说 | AI 执行 | 说明 |
|
|
15
|
+
|--------|---------|------|
|
|
16
|
+
| 新任务:xxx | `python .claude/hooks/task_manager.py create <task-id> "xxx"` + 视需要 `git worktree add` | 建任务状态;并行时建新工作根,提示用户 `cd <目录> && claude` |
|
|
17
|
+
| 切换任务 xxx | `python .claude/hooks/task_manager.py use <task-id> [session_id]` | 绑定当前会话到任务;session_id 取自会话启动上下文(`session_id=...`),缺省时自动取 `.last-session` |
|
|
18
|
+
| 任务列表 | `python .claude/hooks/task_manager.py list` | 列出任务(阶段/描述)与会话绑定 |
|
|
19
|
+
| 归档任务 xxx | `python .claude/hooks/task_manager.py archive <task-id>` | 归档进 completed_tasks 并删除任务文件 |
|
|
20
|
+
|
|
21
|
+
> 全局安装路径下用 `python ~/.flowcraft/hooks/task_manager.py ...`。
|
|
22
|
+
|
|
23
|
+
## 边界(Codex 侧说明)
|
|
24
|
+
> Codex 侧暂无 session 自动绑定运行时(`sdlc-codex-hook.cjs` 不注入 `FLOWCRAFT_SESSION_ID`);本说明的会话绑定能力以 Claude 侧 `task_manager.py` 为准,Codex 侧仅目录默认与 CLI 可用。
|
|
25
|
+
- 同目录两个会话 = 各绑各的任务(session_id 隔离);跨目录并行 = 多工作根
|
|
26
|
+
- `claude --resume` 可能换 session_id → 说"切换任务 xxx"重新绑定
|
|
27
|
+
- 单任务项目(无 `.claude/tasks/`)行为与旧版完全一致,无需任何操作
|