peaks-loop 4.0.0-beta.14 → 4.0.0-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/CHANGELOG.md +230 -148
  2. package/README-en.md +1 -1
  3. package/README.md +32 -1
  4. package/bin/peaks.js +0 -0
  5. package/dist/cli/cli-helpers.d.ts +1 -1
  6. package/dist/cli/cli-helpers.js +1 -1
  7. package/dist/cli/commands/adapter-commands-s2a.js +1 -1
  8. package/dist/cli/commands/asset-commands.js +33 -16
  9. package/dist/cli/commands/audit-commands.js +1 -1
  10. package/dist/cli/commands/bee-commands.js +1 -1
  11. package/dist/cli/commands/capability-commands.js +1 -1
  12. package/dist/cli/commands/classify-classify-commands.js +1 -1
  13. package/dist/cli/commands/code-commands.js +1 -1
  14. package/dist/cli/commands/code-review-commands.js +1 -1
  15. package/dist/cli/commands/codegraph-commands.js +1 -1
  16. package/dist/cli/commands/compact-command.js +1 -1
  17. package/dist/cli/commands/complexity-commands.js +1 -1
  18. package/dist/cli/commands/config-commands.js +1 -1
  19. package/dist/cli/commands/context-commands.js +1 -1
  20. package/dist/cli/commands/contract-commands.js +1 -1
  21. package/dist/cli/commands/core/artifacts-command.js +1 -1
  22. package/dist/cli/commands/core/binding-commands.js +1 -1
  23. package/dist/cli/commands/core/doctor-command.js +63 -3
  24. package/dist/cli/commands/core/memory-command.js +1 -1
  25. package/dist/cli/commands/core/profile-command.js +1 -1
  26. package/dist/cli/commands/core/proxy-command.js +1 -1
  27. package/dist/cli/commands/core/session-command.js +1 -1
  28. package/dist/cli/commands/core/skill-command.js +2 -2
  29. package/dist/cli/commands/core/standards-command.js +1 -1
  30. package/dist/cli/commands/dispatch-commands.js +2 -2
  31. package/dist/cli/commands/dispatch-from-dag.js +1 -1
  32. package/dist/cli/commands/doc-commands.js +1 -1
  33. package/dist/cli/commands/ecc-commands.js +2 -2
  34. package/dist/cli/commands/evolution-commands.js +1 -1
  35. package/dist/cli/commands/feedback-commands.js +1 -1
  36. package/dist/cli/commands/final-review-commands.js +1 -1
  37. package/dist/cli/commands/fixture-commands.js +1 -1
  38. package/dist/cli/commands/fork-commands.js +1 -1
  39. package/dist/cli/commands/gate-commands.js +1 -1
  40. package/dist/cli/commands/heartbeat-commands.js +1 -1
  41. package/dist/cli/commands/hook-handle.js +1 -1
  42. package/dist/cli/commands/hooks-commands.js +1 -1
  43. package/dist/cli/commands/ide-commands.js +1 -1
  44. package/dist/cli/commands/impact-commands.js +1 -1
  45. package/dist/cli/commands/job-commands.js +1 -1
  46. package/dist/cli/commands/legacy-commands.js +1 -1
  47. package/dist/cli/commands/log-commands.js +1 -1
  48. package/dist/cli/commands/loop-commands.js +1 -1
  49. package/dist/cli/commands/loop-eval-commands.js +1 -1
  50. package/dist/cli/commands/memory-commands.js +1 -1
  51. package/dist/cli/commands/migrate-1-4-1-command.js +1 -1
  52. package/dist/cli/commands/migrate-v2-10-to-v2-11-command.js +1 -1
  53. package/dist/cli/commands/mut-commands.d.ts +1 -1
  54. package/dist/cli/commands/mut-commands.js +1 -5
  55. package/dist/cli/commands/observability-commands.js +1 -1
  56. package/dist/cli/commands/openspec-commands.js +2 -2
  57. package/dist/cli/commands/perf-audit-commands.js +2 -2
  58. package/dist/cli/commands/perf-commands.js +1 -1
  59. package/dist/cli/commands/polyrepo-commands.js +1 -1
  60. package/dist/cli/commands/prd-blocks-commands.js +1 -1
  61. package/dist/cli/commands/prd-commands.js +1 -1
  62. package/dist/cli/commands/project-commands.js +1 -1
  63. package/dist/cli/commands/qa-business-review-commands.js +1 -1
  64. package/dist/cli/commands/qa-commands.d.ts +1 -1
  65. package/dist/cli/commands/qa-commands.js +2 -2
  66. package/dist/cli/commands/release-commands.js +1 -1
  67. package/dist/cli/commands/request-commands.js +1 -1
  68. package/dist/cli/commands/retrospective-commands.js +1 -1
  69. package/dist/cli/commands/reviewer-commands.js +1 -1
  70. package/dist/cli/commands/role-commands.js +1 -1
  71. package/dist/cli/commands/runtime-commands.js +1 -2
  72. package/dist/cli/commands/sc-commands.js +1 -1
  73. package/dist/cli/commands/scan-commands.js +1 -1
  74. package/dist/cli/commands/security-audit-commands.js +2 -2
  75. package/dist/cli/commands/share-commands.d.ts +19 -0
  76. package/dist/cli/commands/share-commands.js +121 -2
  77. package/dist/cli/commands/skill-conformance-commands.js +1 -1
  78. package/dist/cli/commands/skill-loop-engineering-readiness-commands.js +1 -1
  79. package/dist/cli/commands/skill-search-commands.js +1 -1
  80. package/dist/cli/commands/slice-commands.js +1 -1
  81. package/dist/cli/commands/slice-integrate-commands.js +1 -1
  82. package/dist/cli/commands/slice-review-commands.js +1 -1
  83. package/dist/cli/commands/smoke-commands.js +1 -1
  84. package/dist/cli/commands/sop-commands.js +1 -1
  85. package/dist/cli/commands/statusline-commands.js +1 -1
  86. package/dist/cli/commands/sub-agent-commands.js +2 -1
  87. package/dist/cli/commands/understand-commands.js +1 -1
  88. package/dist/cli/commands/upgrade-commands.js +1 -1
  89. package/dist/cli/commands/user-touchpoint-commands.js +1 -1
  90. package/dist/cli/commands/verdict-aggregate-command.js +1 -1
  91. package/dist/cli/commands/workflow-commands.js +1 -1
  92. package/dist/cli/commands/workflow-plan-commands.js +1 -1
  93. package/dist/cli/commands/workspace/init-command.js +1 -1
  94. package/dist/cli/commands/workspace/migrate-command.js +1 -1
  95. package/dist/cli/commands/workspace/reconcile-command.js +1 -1
  96. package/dist/cli/index.js +1 -1
  97. package/dist/cli/program.js +2 -2
  98. package/dist/services/artifacts/artifact-prerequisites.js +1 -1
  99. package/dist/services/artifacts/request-artifact-service.js +1 -1
  100. package/dist/services/artifacts/workspace-service.js +1 -1
  101. package/dist/services/code/auto-compact-orchestrator.js +5 -2
  102. package/dist/services/code-review/ocr-service.d.ts +1 -1
  103. package/dist/services/code-review/ocr-service.js +6 -3
  104. package/dist/services/config/config-types.js +1 -1
  105. package/dist/services/dashboard/project-dashboard-service.js +2 -2
  106. package/dist/services/dispatch/batch-counter.js +1 -1
  107. package/dist/services/dispatch/dispatch-record-writer.js +1 -1
  108. package/dist/services/job/job-progress-store.d.ts +2 -2
  109. package/dist/services/job/job-types.d.ts +27 -27
  110. package/dist/services/log/retention.js +1 -1
  111. package/dist/services/openspec/openspec-archive-service.js +1 -1
  112. package/dist/services/openspec/openspec-bridge-service.js +1 -1
  113. package/dist/services/openspec/openspec-init-service.js +1 -1
  114. package/dist/services/openspec/openspec-propose-from-doctor-service.js +1 -1
  115. package/dist/services/openspec/openspec-render-service.js +1 -1
  116. package/dist/services/openspec/openspec-scan-service.js +1 -1
  117. package/dist/services/openspec/openspec-validate-service.js +1 -1
  118. package/dist/services/scan/acceptance-coverage-service.js +1 -1
  119. package/dist/services/scan/archetype-service.js +1 -1
  120. package/dist/services/scan/existing-system-service.js +1 -1
  121. package/dist/services/scan/libraries-service.js +1 -1
  122. package/dist/services/skill/skill-search-service.d.ts +5 -5
  123. package/dist/services/skill/skill-search-service.js +2 -2
  124. package/dist/services/skills/skill-registry.js +2 -2
  125. package/dist/services/skills/skill-runbook-service.js +1 -1
  126. package/dist/services/slice/slice-check-service.js +1 -1
  127. package/dist/services/understand/understand-hybrid-service.js +1 -1
  128. package/dist/services/understand/understand-scan-service.js +2 -2
  129. package/dist/services/upgrade/upgrade-service.js +4 -3
  130. package/dist/services/verdict/envelopes.d.ts +2 -2
  131. package/dist/services/verdict/envelopes.js +2 -2
  132. package/dist/services/verdict/verdict-aggregator.d.ts +3 -3
  133. package/dist/services/workflow/autonomous-resume-writer.js +1 -1
  134. package/dist/services/workflow/plan-reader.d.ts +1 -1
  135. package/dist/services/workflow/plan-reader.js +1 -1
  136. package/dist/services/workflow/plan-refresher.d.ts +1 -1
  137. package/dist/services/workflow/plan-refresher.js +1 -1
  138. package/dist/services/workflow/plan-trigger-detector.d.ts +1 -1
  139. package/dist/services/workflow/plan-trigger-detector.js +1 -1
  140. package/dist/services/workflow/workflow-router-service.js +11 -9
  141. package/dist/services/workspace/migrate-service.js +1 -1
  142. package/dist/services/workspace/workspace-service.js +1 -1
  143. package/package.json +13 -8
  144. package/scripts/sync-version.mjs +8 -1
  145. package/skills/bee/peaks-rd/SKILL.md +14 -1
  146. package/skills/peaks-code/SKILL.md +44 -0
  147. package/skills/peaks-code/references/sub-agent-dispatch.md +30 -0
  148. package/dist/services/agent/ecc-cache-service.d.ts +0 -97
  149. package/dist/services/agent/ecc-cache-service.js +0 -491
  150. package/dist/services/audit-independent/perf-audit-service.d.ts +0 -151
  151. package/dist/services/audit-independent/perf-audit-service.js +0 -316
  152. package/dist/services/audit-independent/security-audit-service.d.ts +0 -155
  153. package/dist/services/audit-independent/security-audit-service.js +0 -316
  154. package/dist/services/context/dispatch-context-guard.d.ts +0 -27
  155. package/dist/services/context/dispatch-context-guard.js +0 -192
  156. package/dist/services/context/shared-channel.d.ts +0 -93
  157. package/dist/services/context/shared-channel.js +0 -308
  158. package/dist/services/crystallization/crystallization-service.d.ts +0 -239
  159. package/dist/services/crystallization/crystallization-service.js +0 -397
  160. package/dist/services/crystallization/crystallization-store.d.ts +0 -75
  161. package/dist/services/crystallization/crystallization-store.js +0 -193
  162. package/dist/services/crystallization/crystallization-types.d.ts +0 -313
  163. package/dist/services/crystallization/crystallization-types.js +0 -299
  164. package/dist/services/crystallization/evidence-brief-builder.d.ts +0 -237
  165. package/dist/services/crystallization/evidence-brief-builder.js +0 -240
  166. package/dist/services/doctor/doctor-service.d.ts +0 -149
  167. package/dist/services/doctor/doctor-service.js +0 -929
  168. package/dist/services/filesystem/file-lock.d.ts +0 -11
  169. package/dist/services/filesystem/file-lock.js +0 -152
  170. package/dist/services/final-review/final-review-service.d.ts +0 -12
  171. package/dist/services/final-review/final-review-service.js +0 -52
  172. package/dist/services/final-review/final-review-types.d.ts +0 -42
  173. package/dist/services/final-review/final-review-types.js +0 -18
  174. package/dist/services/job/job-resource-snapshot.d.ts +0 -7
  175. package/dist/services/job/job-resource-snapshot.js +0 -75
  176. package/dist/services/mut/assert-scanner.d.ts +0 -6
  177. package/dist/services/mut/assert-scanner.js +0 -116
  178. package/dist/services/mut/index.d.ts +0 -8
  179. package/dist/services/mut/index.js +0 -7
  180. package/dist/services/mut/mut-runner.d.ts +0 -39
  181. package/dist/services/mut/mut-runner.js +0 -29
  182. package/dist/services/mut/production-stryker.d.ts +0 -2
  183. package/dist/services/mut/production-stryker.js +0 -75
  184. package/dist/services/mut/report-builder.d.ts +0 -11
  185. package/dist/services/mut/report-builder.js +0 -110
  186. package/dist/services/mut/report-loader.d.ts +0 -31
  187. package/dist/services/mut/report-loader.js +0 -78
  188. package/dist/services/mut/thresholds.d.ts +0 -21
  189. package/dist/services/mut/thresholds.js +0 -22
  190. package/dist/services/mut/types.d.ts +0 -336
  191. package/dist/services/mut/types.js +0 -59
  192. package/dist/shared/fs.d.ts +0 -4
  193. package/dist/shared/fs.js +0 -26
  194. package/dist/shared/paths.d.ts +0 -6
  195. package/dist/shared/paths.js +0 -50
  196. package/dist/shared/result.d.ts +0 -22
  197. package/dist/shared/result.js +0 -46
  198. package/dist/shared/version.d.ts +0 -1
  199. package/dist/shared/version.js +0 -1
  200. package/examples/video-demo/README.md +0 -142
  201. package/examples/video-demo/out/en-closing-960.png +0 -0
  202. package/examples/video-demo/out/zh-closing-960.png +0 -0
  203. package/examples/video-demo/preview/peaks-loop-demo-en.mp4 +0 -0
  204. package/examples/video-demo/preview/peaks-loop-demo.mp4 +0 -0
package/dist/shared/fs.js DELETED
@@ -1,26 +0,0 @@
1
- import { access, readdir, readFile, stat } from 'node:fs/promises';
2
- import { constants } from 'node:fs';
3
- export async function pathExists(path) {
4
- try {
5
- await access(path, constants.F_OK);
6
- return true;
7
- }
8
- catch {
9
- return false;
10
- }
11
- }
12
- export async function readText(path) {
13
- return readFile(path, 'utf8');
14
- }
15
- export async function listDirectories(path) {
16
- const entries = await readdir(path, { withFileTypes: true });
17
- return entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort();
18
- }
19
- export async function isDirectory(path) {
20
- try {
21
- return (await stat(path)).isDirectory();
22
- }
23
- catch {
24
- return false;
25
- }
26
- }
@@ -1,6 +0,0 @@
1
- export declare const repoRoot: string;
2
- export declare const skillsDir: string;
3
- export declare const schemasDir: string;
4
- export declare const templatesDir: string;
5
- export declare const requiredSkillNames: readonly ["peaks-code", "peaks-prd", "peaks-ui", "peaks-rd", "peaks-qa", "peaks-sc", "peaks-txt", "peaks-sop"];
6
- export declare const requiredSchemaFiles: readonly ["artifact-manifest.schema.json", "context-capsule.schema.json", "approval-record.schema.json", "change-impact.schema.json", "refactor-slice-spec.schema.json", "artifact-retention-report.schema.json", "capability-source.schema.json", "capability-item.schema.json", "capability-availability.schema.json", "recommendation-plan.schema.json", "artifact-workspace.schema.json", "mcp-server.schema.json", "mcp-install-spec.schema.json", "mcp-install-plan.schema.json", "mcp-apply-result.schema.json", "openspec-change-summary.schema.json", "openspec-render-request.schema.json", "openspec-validation-result.schema.json", "doctor-report.schema.json", "library-breaking-changes.schema.json"];
@@ -1,50 +0,0 @@
1
- import { existsSync } from 'node:fs';
2
- import { dirname, resolve } from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
- function findRepoRoot(startPath) {
5
- let currentPath = startPath;
6
- while (currentPath !== dirname(currentPath)) {
7
- if (existsSync(resolve(currentPath, 'package.json')) && existsSync(resolve(currentPath, 'skills'))) {
8
- return currentPath;
9
- }
10
- currentPath = dirname(currentPath);
11
- }
12
- throw new Error(`Unable to locate Peaks repository root from ${startPath}`);
13
- }
14
- const currentFile = fileURLToPath(import.meta.url);
15
- export const repoRoot = findRepoRoot(dirname(currentFile));
16
- export const skillsDir = resolve(repoRoot, 'skills');
17
- export const schemasDir = resolve(repoRoot, 'schemas');
18
- export const templatesDir = resolve(repoRoot, 'templates');
19
- export const requiredSkillNames = [
20
- 'peaks-code',
21
- 'peaks-prd',
22
- 'peaks-ui',
23
- 'peaks-rd',
24
- 'peaks-qa',
25
- 'peaks-sc',
26
- 'peaks-txt',
27
- 'peaks-sop'
28
- ];
29
- export const requiredSchemaFiles = [
30
- 'artifact-manifest.schema.json',
31
- 'context-capsule.schema.json',
32
- 'approval-record.schema.json',
33
- 'change-impact.schema.json',
34
- 'refactor-slice-spec.schema.json',
35
- 'artifact-retention-report.schema.json',
36
- 'capability-source.schema.json',
37
- 'capability-item.schema.json',
38
- 'capability-availability.schema.json',
39
- 'recommendation-plan.schema.json',
40
- 'artifact-workspace.schema.json',
41
- 'mcp-server.schema.json',
42
- 'mcp-install-spec.schema.json',
43
- 'mcp-install-plan.schema.json',
44
- 'mcp-apply-result.schema.json',
45
- 'openspec-change-summary.schema.json',
46
- 'openspec-render-request.schema.json',
47
- 'openspec-validation-result.schema.json',
48
- 'doctor-report.schema.json',
49
- 'library-breaking-changes.schema.json'
50
- ];
@@ -1,22 +0,0 @@
1
- export type ResultEnvelope<T> = {
2
- ok: boolean;
3
- command: string;
4
- data: T;
5
- warnings: string[];
6
- nextActions: string[];
7
- code?: string;
8
- message?: string;
9
- /**
10
- * Slice 2026-06-23-audit-4th #B3: opaque per-failure correlation
11
- * id. Always present on `fail()` envelopes. Lets a user say
12
- * "my last failure was errorId=X; show me the JSONL log lines
13
- * tagged with X" without grepping on a code/message that may be
14
- * repeated. Also written to the next writeLogEntry call (best-effort)
15
- * by the caller so the log entry can be cross-referenced.
16
- */
17
- errorId?: string;
18
- };
19
- export declare function ok<T>(command: string, data: T, warnings?: string[], nextActions?: string[]): ResultEnvelope<T>;
20
- export declare function fail<T>(command: string, code: string, message: string, data: T, nextActions?: string[]): ResultEnvelope<T>;
21
- export declare function getErrorMessage(error: unknown): string;
22
- export declare function redactSensitiveErrorMessage(message: string): string;
@@ -1,46 +0,0 @@
1
- import { randomUUID } from 'node:crypto';
2
- export function ok(command, data, warnings = [], nextActions = []) {
3
- return { ok: true, command, data, warnings, nextActions };
4
- }
5
- export function fail(command, code, message, data, nextActions = []) {
6
- // Slice 2026-06-23-audit-4th #B3: mint a fresh errorId per failure.
7
- // The id is opaque (uuid v4) and never reused; downstream log
8
- // entries from the same code path can carry the same id for
9
- // post-hoc correlation.
10
- return {
11
- ok: false,
12
- command,
13
- code,
14
- message: redactSensitiveErrorMessage(message),
15
- data,
16
- warnings: [],
17
- nextActions,
18
- errorId: randomUUID()
19
- };
20
- }
21
- const SENSITIVE_ERROR_PATTERNS = [
22
- /\bBearer\s+[A-Za-z0-9._~+/=-]{12,}\b/gi,
23
- /-----BEGIN [A-Z ]*PRIVATE KEY-----/g,
24
- /\b(?:api[\s_-]?key|token|password|secret)\s*[:=]\s*['\"]?[^\s'\"]{8,}/gi,
25
- /\bAKIA[0-9A-Z]{16}\b/g,
26
- /\bAIza[0-9A-Za-z_-]{20,}\b/g,
27
- /\bghp_[0-9A-Za-z_]{20,}\b/g,
28
- /\bgithub_pat_[0-9A-Za-z_]{20,}\b/g,
29
- /\bglpat-[0-9A-Za-z_-]{20,}\b/g,
30
- /\bxox[abprse]-[0-9A-Za-z-]{20,}\b/g,
31
- /\bsk-[A-Za-z0-9_-]{16,}\b/g,
32
- /\beyJ[A-Za-z0-9_-]{20,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,
33
- /(secret|token|password|api[-_ ]?key)/gi
34
- ];
35
- export function getErrorMessage(error) {
36
- if (error instanceof Error) {
37
- return error.message;
38
- }
39
- if (typeof error === 'string') {
40
- return error;
41
- }
42
- return 'Unexpected error';
43
- }
44
- export function redactSensitiveErrorMessage(message) {
45
- return SENSITIVE_ERROR_PATTERNS.reduce((redacted, pattern) => redacted.replace(pattern, '[redacted]'), message);
46
- }
@@ -1 +0,0 @@
1
- export declare const CLI_VERSION = "4.0.0-beta.14";
@@ -1 +0,0 @@
1
- export const CLI_VERSION = "4.0.0-beta.14";
@@ -1,142 +0,0 @@
1
- # peaks-loop video demo (v5)
2
-
3
- Remotion-based ~27-second brand walk-through for peaks-loop 4.x. Mirrors the multi-domain + slash-command narrative of the top-level README.
4
-
5
- ## Composition
6
-
7
- - Two compositions, one per locale:
8
- - `peaks-loop-demo` — Chinese primary
9
- - `peaks-loop-demo-en` — English primary
10
- - Same frame budget for both; dimensions 1920×1080 @ 30fps.
11
- - Scene timeline (frozen in `src/Root.tsx`, v5 narrative):
12
-
13
- | # | Scene | Slug | Frames |
14
- | --- | --- | --- | --- |
15
- | 1 | `IntroScene` | intro | 80 |
16
- | 2 | `RecordingScene` | install | 100 |
17
- | 3 | `RecordingScene` | first-slash | 100 |
18
- | 4 | `RecordingScene` | domains | 100 |
19
- | 5 | `RecordingScene` | sediment | 100 |
20
- | 6 | `CreditScene` | credit | 130 |
21
- | 7 | `ClosingScene` | closing | 110 |
22
-
23
- Plus 12-frame overlap transitions between every scene.
24
-
25
- ## Visual style
26
-
27
- - Background: `#0f172a` (slate-900) via `bg-brand-bg` + `BrandBackground` (drifting indigo halo + diagonal sweep line + bottom green glow).
28
- - Accent: `#6366f1` (indigo-500) · Stable: `#22c55e` (green-500) · Warn: `#f59e0b` (amber-500).
29
- - Typography: `font-mono` for kickers, captions, IDE/terminal HUD; `font-sans` for headlines.
30
- - Three caption styles (`CaptionOverlay`):
31
- - **subtitle** — black semi-transparent bar at the bottom.
32
- - **callout** — indigo gradient emphasis box, slides in from the left.
33
- - **annotation** — amber speech-bubble, drops in from the top-right.
34
-
35
- ## Scene components
36
-
37
- ```
38
- src/scenes/
39
- ├── IntroScene.tsx — hero title + tagline (kicker / brand / tagline)
40
- ├── RecordingScene.tsx — the workhorse: 4 instances, each plays an HUD + captions + cursor
41
- ├── HudWindow.tsx — stylised terminal/IDE panel that types out lines one at a time
42
- ├── CaptionOverlay.tsx — 3-style caption layer (subtitle / callout / annotation)
43
- ├── CursorHighlight.tsx — macOS-style cursor with smooth waypoint interpolation + click ripple
44
- ├── BrandBackground.tsx — shared brand background (halo + sweep + bottom glow)
45
- ├── CreditScene.tsx — tribute + recommended stack
46
- └── ClosingScene.tsx — install chip + 5,439 tests stats
47
- ```
48
-
49
- ## Copy registry
50
-
51
- All on-screen text lives in `src/copy.ts`. Both locales are strict: no hardcoded
52
- CN/EN inline in scene components. The `recordings[]` array holds 4 scene slugs
53
- (install / first-slash / domains / sediment), each with its own captions,
54
- cursor choreography, and HUD payload.
55
-
56
- ## v5 recording pipeline (Playwright + Remotion)
57
-
58
- The `RecordingScene` slots are designed to host **real recorded footage**
59
- when you have a Chromium-equipped machine. The HUD window is the stand-in
60
- for that footage until the recording pass runs.
61
-
62
- ### 1. Install the recording side
63
-
64
- ```bash
65
- cd examples/video-demo
66
- pnpm add -D playwright
67
- pnpm exec playwright install chromium
68
- ```
69
-
70
- ### 2. Author a scenario JSON
71
-
72
- Write `recordings/<slug>.json` per scene using the
73
- `web-demo-video_skills` schema (`goto` / `click` / `fill` / `wait` / `screenshot`).
74
- For our 4 slugs, the natural targets are:
75
-
76
- | slug | URL / action |
77
- | --- | --- |
78
- | `install` | terminal typing `npm i -g peaks-loop` |
79
- | `first-slash` | Claude Code chat with `/peaks-code ...` |
80
- | `domains` | same chat, scrolling through the 5 `/peaks-*` slash commands |
81
- | `sediment` | same chat, completing a run + asking to sediment |
82
-
83
- ### 3. Record per scene
84
-
85
- ```bash
86
- pnpm exec tsx scripts/record-scenes.ts
87
- # outputs recordings/<slug>.webm + recordings/<slug>.cursor.json
88
- ```
89
-
90
- ### 4. Swap the HUD for the recorded clip
91
-
92
- In `src/scenes/RecordingScene.tsx`, replace the `<HudWindow>` block with a
93
- `<Video src={...}>` from the matching `recordings/<slug>.webm`. Drop the
94
- `HudWindow` import when no scene needs it any more.
95
-
96
- ### 5. Render
97
-
98
- ```bash
99
- pnpm install
100
- npx remotion render peaks-loop-demo out/peaks-loop-demo.mp4
101
- npx remotion render peaks-loop-demo-en out/peaks-loop-demo-en.mp4
102
-
103
- mkdir -p preview
104
- cp out/peaks-loop-demo.mp4 preview/peaks-loop-demo.mp4
105
- cp out/peaks-loop-demo-en.mp4 preview/peaks-loop-demo-en.mp4
106
- ```
107
-
108
- Fallback (no Chromium available — renders the HUD stand-in only):
109
-
110
- ```bash
111
- npx remotion still peaks-loop-demo out/still.png --frame=400
112
- ```
113
-
114
- ## Preview during dev
115
-
116
- ```bash
117
- npx remotion studio # http://localhost:3000
118
- ```
119
-
120
- ## Why this layout
121
-
122
- The 4 recording slugs follow the **black-box mental model** the README now
123
- uses: install → first slash command → tour the 5 domains → sediment. Each
124
- scene is **self-contained** (own HUD payload, captions, cursor ticks),
125
- so you can rearrange them, drop one, or A/B test a new one without
126
- touching the others. The 12-frame overlap transitions cross-fade between
127
- scenes so the result feels like one continuous take rather than a slide
128
- deck.
129
-
130
- ## Adding a new scene
131
-
132
- 1. Add a new entry to `recordings` in `src/copy.ts` (both `zh` and `en`):
133
- - `slug` (kebab-case, used for the corner chip + recording filename)
134
- - `captions` (array of `{ text, style }` triples)
135
- - `cursor` (array of waypoints; empty = no cursor overlay)
136
- - `hud` (terminal / ide, with the lines you want typed out)
137
- 2. Add an extra frame budget to `src/Root.tsx` if you want a longer hold.
138
- 3. Typecheck: `pnpm exec tsc --noEmit`.
139
- 4. Re-render.
140
-
141
- If you have a recording, drop a `<Video>` into `RecordingScene.tsx` and
142
- point it at the new `recordings/<slug>.webm`.