akari-video 0.1.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/LICENSE +21 -0
- package/README.md +81 -0
- package/bin/akari.mjs +14 -0
- package/package.json +42 -0
- package/src/cli.mjs +140 -0
- package/src/messages.mjs +100 -0
- package/src/path-lookup.mjs +47 -0
- package/src/project-state.mjs +25 -0
- package/src/repo-assets.mjs +59 -0
- package/src/task-labels.mjs +30 -0
- package/src/update-check.mjs +189 -0
- package/vendor/packages/project-scaffold/package.json +11 -0
- package/vendor/packages/project-scaffold/src/index.mjs +523 -0
- package/vendor/packages/project-scaffold/test/create-project.test.mjs +81 -0
- package/vendor/packages/project-scaffold/test/skill-adapter-link.test.mjs +204 -0
- package/vendor/packages/schemas/analysis.schema.json +475 -0
- package/vendor/packages/schemas/asset-meta.schema.json +225 -0
- package/vendor/packages/schemas/avatar-rendition.schema.json +65 -0
- package/vendor/packages/schemas/avatar.schema.json +178 -0
- package/vendor/packages/schemas/bin/validate-asset.mjs +597 -0
- package/vendor/packages/schemas/bin/validate-avatar.mjs +486 -0
- package/vendor/packages/schemas/bin/validate-captions.mjs +316 -0
- package/vendor/packages/schemas/bin/validate-connections.mjs +295 -0
- package/vendor/packages/schemas/bin/validate-edit.mjs +766 -0
- package/vendor/packages/schemas/bin/validate-intake.mjs +185 -0
- package/vendor/packages/schemas/bin/validate-interpretation.mjs +515 -0
- package/vendor/packages/schemas/bin/validate-plan-comments.mjs +170 -0
- package/vendor/packages/schemas/bin/validate-plan.mjs +365 -0
- package/vendor/packages/schemas/bin/validate-recipe.mjs +267 -0
- package/vendor/packages/schemas/bin/validate-research-plan.mjs +510 -0
- package/vendor/packages/schemas/bin/validate-review.mjs +427 -0
- package/vendor/packages/schemas/captions.schema.json +141 -0
- package/vendor/packages/schemas/connections.schema.json +153 -0
- package/vendor/packages/schemas/edit.schema.json +437 -0
- package/vendor/packages/schemas/examples/analysis-person-matte-valid/analysis.json +18 -0
- package/vendor/packages/schemas/examples/captions-text-style-background-mode-invalid/captions.json +18 -0
- package/vendor/packages/schemas/examples/captions-text-style-color-non-hex-invalid/captions.json +14 -0
- package/vendor/packages/schemas/examples/captions-text-style-default-only-valid/captions.json +27 -0
- package/vendor/packages/schemas/examples/captions-text-style-omitted-valid/captions.json +11 -0
- package/vendor/packages/schemas/examples/captions-text-style-opacity-out-of-range-invalid/captions.json +8 -0
- package/vendor/packages/schemas/examples/captions-text-style-record-override-valid/captions.json +27 -0
- package/vendor/packages/schemas/examples/captions-text-style-size-non-positive-invalid/captions.json +14 -0
- package/vendor/packages/schemas/examples/captions-text-style-zone-invalid/captions.json +16 -0
- package/vendor/packages/schemas/examples/connections-v0-invalid-auth/connections.json +32 -0
- package/vendor/packages/schemas/examples/connections-v0-memory-valid/connections.json +42 -0
- package/vendor/packages/schemas/examples/edit-beats-duplicate-id/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-beats-invalid-id/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-beats-missing-kind/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-beats-strength-out-of-range/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-beats-v0-src-present/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-beats-v0-valid/edit.json +29 -0
- package/vendor/packages/schemas/examples/edit-beats-v1-src-missing-reference/edit.json +14 -0
- package/vendor/packages/schemas/examples/edit-beats-v1-valid/edit.json +37 -0
- package/vendor/packages/schemas/examples/edit-bgm-ducking-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-fade-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-fade-valid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-in-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-in-valid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-missing-path/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-bgm-null-valid/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-bgm-sfx-gain-out-of-range/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-bgm-sfx-valid/edit.json +23 -0
- package/vendor/packages/schemas/examples/edit-chroma-key-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-cuts-at-negative-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-cuts-at-track-valid/edit.json +20 -0
- package/vendor/packages/schemas/examples/edit-cuts-opacity-out-of-range-invalid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-cuts-track-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-full-valid/edit.json +17 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-omitted-valid/edit.json +9 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-partial-valid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-rotate-invalid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-scale-invalid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-cuts-transform-unknown-key-invalid/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-direction-intensity-negative/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-intensity-not-integer/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-intensity-out-of-range/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-missing-preset/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-overrides-array/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-preset-only/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-direction-valid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-empty-word/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-invalid-id/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-missing-emotion/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-range-invalid/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-v0-src-present/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-v0-valid/edit.json +32 -0
- package/vendor/packages/schemas/examples/edit-emphasis-words-v1-valid/edit.json +39 -0
- package/vendor/packages/schemas/examples/edit-layers-invalid-bad-blend/edit.json +17 -0
- package/vendor/packages/schemas/examples/edit-layers-invalid-chroma-key-on-baked/edit.json +17 -0
- package/vendor/packages/schemas/examples/edit-layers-invalid-duplicate-id/edit.json +11 -0
- package/vendor/packages/schemas/examples/edit-layers-track-invalid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-layers-valid/edit.json +31 -0
- package/vendor/packages/schemas/examples/edit-look-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-master-invalid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-narration-gain-out-of-range/edit.json +18 -0
- package/vendor/packages/schemas/examples/edit-narration-invalid-id/edit.json +17 -0
- package/vendor/packages/schemas/examples/edit-narration-missing-provenance/edit.json +16 -0
- package/vendor/packages/schemas/examples/edit-narration-valid/edit.json +36 -0
- package/vendor/packages/schemas/examples/edit-narration-voicevox-missing-credit/edit.json +20 -0
- package/vendor/packages/schemas/examples/edit-render-basics-valid/edit.json +22 -0
- package/vendor/packages/schemas/examples/edit-sfx-in-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-in-out-valid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-out-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-out-type-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-t-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-sfx-track-invalid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-speed-invalid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-timeline-declared-valid/edit.json +14 -0
- package/vendor/packages/schemas/examples/edit-timeline-duplicate-id-invalid/edit.json +13 -0
- package/vendor/packages/schemas/examples/edit-timeline-interleaved-valid/edit.json +22 -0
- package/vendor/packages/schemas/examples/edit-timeline-omitted-valid/edit.json +7 -0
- package/vendor/packages/schemas/examples/edit-timeline-ref-invalid/edit.json +13 -0
- package/vendor/packages/schemas/examples/edit-tracks-section-invalid/edit.json +8 -0
- package/vendor/packages/schemas/examples/edit-tracks-section-valid/edit.json +13 -0
- package/vendor/packages/schemas/examples/edit-transition-invalid/edit.json +10 -0
- package/vendor/packages/schemas/examples/edit-v0-sample/edit.json +27 -0
- package/vendor/packages/schemas/examples/edit-v0-sample/overlays/cap-a.html +17 -0
- package/vendor/packages/schemas/examples/edit-v0-sample/overlays/cap-b.html +17 -0
- package/vendor/packages/schemas/examples/edit-v1-bgm-sfx-valid/edit.json +13 -0
- package/vendor/packages/schemas/examples/edit-v1-sample/edit.json +14 -0
- package/vendor/packages/schemas/examples/plan-comments-v0-sample/plan-comments.json +19 -0
- package/vendor/packages/schemas/examples/plan-v0-sample/plan.json +39 -0
- package/vendor/packages/schemas/examples/recipe-v0-sample/product-demo-quick-cuts.json +23 -0
- package/vendor/packages/schemas/examples/review-v1-sample/review.json +11 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/AVATAR.md +159 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-avatar-md-136-lines/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-default-role/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-energy-out-of-range/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-asset/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/avatar.json +21 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-missing-rights/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-no-avatar-json/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-in-catalog/catalog/avatars/impostor/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/invalid-person-sellable/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/unsupported-version/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/avatar.json +22 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/AVATAR.md +30 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/avatar.json +23 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-bustup/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/happy.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral-half.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral-open.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/neutral.png +0 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-unknown-fields/renditions/2d-fullbody/rendition.json +18 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-voice-only/AVATAR.md +28 -0
- package/vendor/packages/schemas/fixtures/avatar/valid-voice-only/avatar.json +19 -0
- package/vendor/packages/schemas/fixtures/intake/invalid-duplicate-task/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/invalid-missing-submitted-at/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/invalid-target-exclusive/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/invalid-unknown-task/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/valid-draft/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/intake/valid-submitted/intake.json +8 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-bad-confidence-enum/plan.json +15 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-constraint-bad-applies-to/plan.json +18 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-dangling-media-path/plan.json +15 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-duplicate-slot-id/plan.json +25 -0
- package/vendor/packages/schemas/fixtures/plan/invalid-missing-required-field/plan.json +14 -0
- package/vendor/packages/schemas/fixtures/plan/unsupported-version/plan.json +4 -0
- package/vendor/packages/schemas/fixtures/plan/valid/plan.json +40 -0
- package/vendor/packages/schemas/fixtures/plan/valid/scaffold/beat-01.png +1 -0
- package/vendor/packages/schemas/fixtures/plan/valid/scaffold/beat-01.wav +1 -0
- package/vendor/packages/schemas/fixtures/plan/valid/scaffold/broll.mp4 +1 -0
- package/vendor/packages/schemas/fixtures/plan/warns-confidence-gap/plan.json +28 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-pass/plan-comments.json +6 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-target-id-for-index-kind/plan-comments.json +13 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-bad-target-kind/plan-comments.json +13 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-comments-not-array/plan-comments.json +6 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-missing-comment-field/plan-comments.json +12 -0
- package/vendor/packages/schemas/fixtures/plan-comments/invalid-missing-version/plan-comments.json +5 -0
- package/vendor/packages/schemas/fixtures/plan-comments/unsupported-version/plan-comments.json +6 -0
- package/vendor/packages/schemas/fixtures/plan-comments/valid/plan-comments.json +19 -0
- package/vendor/packages/schemas/fixtures/plan-comments/valid-unknown-fields/plan-comments.json +15 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-bad-aspect/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-bad-confirmed-by/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-bad-name-casing/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-bad-workflow/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-duplicate-overlay-kind/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-empty-confirmed/recipe.json +9 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-empty-narration/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-missing-version/recipe.json +12 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-provenance-mismatch/recipe.json +15 -0
- package/vendor/packages/schemas/fixtures/recipe/invalid-source-project-path/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/unsupported-version/recipe.json +13 -0
- package/vendor/packages/schemas/fixtures/recipe/valid/recipe.json +15 -0
- package/vendor/packages/schemas/fixtures/recipe/valid-unknown-fields/recipe.json +16 -0
- package/vendor/packages/schemas/fixtures/review/invalid-malformed-canvas-target/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-malformed-doc-target/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-malformed-image-target/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-strokes-bad-space/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-strokes-canvas-rect-with-frame/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-strokes-image-rect-with-frame/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/invalid-video-null-sourcet/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/valid/review.json +8 -0
- package/vendor/packages/schemas/fixtures/review/valid-canvas-target/review.json +7 -0
- package/vendor/packages/schemas/fixtures/review/valid-input-session/review.json +6 -0
- package/vendor/packages/schemas/fixtures/review/valid-strokes/review.json +8 -0
- package/vendor/packages/schemas/intake.schema.json +117 -0
- package/vendor/packages/schemas/interpretation.schema.json +419 -0
- package/vendor/packages/schemas/package.json +18 -0
- package/vendor/packages/schemas/plan-comments.schema.json +52 -0
- package/vendor/packages/schemas/plan.schema.json +129 -0
- package/vendor/packages/schemas/recipe.schema.json +106 -0
- package/vendor/packages/schemas/research-plan.schema.json +230 -0
- package/vendor/packages/schemas/review.schema.json +227 -0
- package/vendor/packages/schemas/test/fixtures/asset/invalid-matched-by/audio/whoosh-transition/meta.json +31 -0
- package/vendor/packages/schemas/test/fixtures/asset/valid-catalog/audio/whoosh-transition/meta.json +31 -0
- package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/fragment.html +139 -0
- package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/meta.json +32 -0
- package/vendor/packages/schemas/test/fixtures/asset/valid-library/telop/lower-third-clean/preview.png +0 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-analyses-missing-ref/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-analyses-ref-mismatch/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-arc-empty-refs/interpretation.json +126 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-context-missing-interview/interpretation.json +126 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-context-null-intake/interpretation.json +133 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-dangling-arc-ref/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-duplicate-asset-ref/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-flag-bad-type/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-flag-missing-evidence/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-missing-required-field/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-open-question-answer-present-when-open/interpretation.json +133 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-open-question-answered-without-answer/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-relations-dangling-target/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-relations-self-reference/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-section-end-before-start/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-section-mismatched-start-end/interpretation.json +131 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/invalid-unknown-root-field/interpretation.json +133 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/unsupported-version/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/interpretation/valid/interpretation.json +132 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-bad-category-enum/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-dangling-chapter-ref/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-dangling-shot-list-ref/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-decided-at-mismatch/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-duplicate-candidate-id/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-japan-sns-notes-empty/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-missing-required-field/research-plan.json +127 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-selected-missing-candidate/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/invalid-structure-confirmed-mismatch/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/unsupported-version/research-plan.json +128 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/valid/research-plan.json +79 -0
- package/vendor/packages/schemas/test/fixtures/research-plan/warns-empty-sources/research-plan.json +120 -0
- package/vendor/packages/schemas/test/validate-asset.test.mjs +38 -0
- package/vendor/packages/schemas/test/validate-avatar.test.mjs +109 -0
- package/vendor/packages/schemas/test/validate-captions.test.mjs +59 -0
- package/vendor/packages/schemas/test/validate-connections.test.mjs +31 -0
- package/vendor/packages/schemas/test/validate-edit.test.mjs +490 -0
- package/vendor/packages/schemas/test/validate-intake.test.mjs +66 -0
- package/vendor/packages/schemas/test/validate-interpretation.test.mjs +167 -0
- package/vendor/packages/schemas/test/validate-plan-comments.test.mjs +70 -0
- package/vendor/packages/schemas/test/validate-plan.test.mjs +67 -0
- package/vendor/packages/schemas/test/validate-recipe.test.mjs +107 -0
- package/vendor/packages/schemas/test/validate-research-plan.test.mjs +98 -0
- package/vendor/packages/schemas/test/validate-review.test.mjs +102 -0
- package/vendor/skills/.gitkeep +0 -0
- package/vendor/skills/address-review/SKILL.md +84 -0
- package/vendor/skills/address-review/bin/core/review-store.mjs +210 -0
- package/vendor/skills/address-review/bin/list.mjs +198 -0
- package/vendor/skills/address-review/bin/respond.mjs +89 -0
- package/vendor/skills/address-review/dev-fixtures/fixture-project/captions.json +22 -0
- package/vendor/skills/address-review/dev-fixtures/fixture-project/edit.json +12 -0
- package/vendor/skills/address-review/dev-fixtures/fixture-project/review.json +100 -0
- package/vendor/skills/address-review/test/review-store.test.mjs +201 -0
- package/vendor/skills/analyze-footage/SKILL.md +35 -0
- package/vendor/skills/analyze-footage/analysis-json.md +185 -0
- package/vendor/skills/analyze-footage/bin/person-matte/person-matte-helper.swift +343 -0
- package/vendor/skills/analyze-footage/bin/person-matte/person-matte.mjs +415 -0
- package/vendor/skills/analyze-footage/bin/speechanalyzer-helper.swift +138 -0
- package/vendor/skills/analyze-footage/bin/transcribe-cloud.mjs +486 -0
- package/vendor/skills/analyze-footage/bin/transcribe-sa.mjs +189 -0
- package/vendor/skills/analyze-footage/events-and-hooks.md +93 -0
- package/vendor/skills/analyze-footage/keyframes-and-review.md +130 -0
- package/vendor/skills/analyze-footage/media-and-transcript.md +219 -0
- package/vendor/skills/analyze-footage/person-matte.md +121 -0
- package/vendor/skills/analyze-footage/references/akari-data-contract.md +18 -0
- package/vendor/skills/analyze-footage/references/asset.meta.example.json +23 -0
- package/vendor/skills/analyze-footage/test/fixtures/scribe-punctuation-inflation.json +17 -0
- package/vendor/skills/analyze-footage/test/normalize-scribe.test.mjs +76 -0
- package/vendor/skills/analyze-footage/workflow.md +95 -0
- package/vendor/skills/analyze-project/SKILL.md +58 -0
- package/vendor/skills/analyze-project/collect.md +51 -0
- package/vendor/skills/analyze-project/decision-record.md +55 -0
- package/vendor/skills/analyze-project/interpretation.md +128 -0
- package/vendor/skills/analyze-project/interview.md +66 -0
- package/vendor/skills/analyze-project/references/interpretation-shape.md +42 -0
- package/vendor/skills/analyze-project/references/open-questions-examples.md +35 -0
- package/vendor/skills/analyze-project/validate-and-render.md +66 -0
- package/vendor/skills/bake-3d/SKILL.md +78 -0
- package/vendor/skills/compile-review-session/SKILL.md +78 -0
- package/vendor/skills/compile-review-session/bin/compile-review-session.mjs +799 -0
- package/vendor/skills/compile-review-session/bin/core/canvas-compiler.mjs +105 -0
- package/vendor/skills/compile-review-session/bin/core/compiler.mjs +221 -0
- package/vendor/skills/compile-review-session/bin/core/review-store.mjs +74 -0
- package/vendor/skills/compile-review-session/bin/core/time-mapping.mjs +370 -0
- package/vendor/skills/compile-review-session/bin/core/transcription.mjs +721 -0
- package/vendor/skills/compile-review-session/compilation-rules.md +98 -0
- package/vendor/skills/compile-review-session/dev-fixtures/README.md +24 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/events.jsonl +2 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0001/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/events.jsonl +5 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0002/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/events.jsonl +19 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0003/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/events.jsonl +2 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0004/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0005/session.json +1 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/events.jsonl +2 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0006/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/edit.snapshot.json +13 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/events.jsonl +9 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0007/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/audio.wav +0 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/edit.snapshot.json +12 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/events.jsonl +2 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/session.json +11 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review/sessions/s-0008/transcript.json +9 -0
- package/vendor/skills/compile-review-session/dev-fixtures/fixture-project/review.json +7 -0
- package/vendor/skills/compile-review-session/test/canvas-compiler.test.mjs +283 -0
- package/vendor/skills/compile-review-session/test/compiler.test.mjs +458 -0
- package/vendor/skills/create-project/SKILL.md +46 -0
- package/vendor/skills/create-project/bin/create-project.mjs +88 -0
- package/vendor/skills/edit-lint/SKILL.md +73 -0
- package/vendor/skills/edit-plan/SKILL.md +64 -0
- package/vendor/skills/edit-plan/approvals-and-generation.md +106 -0
- package/vendor/skills/edit-plan/avatar-resolution.md +241 -0
- package/vendor/skills/edit-plan/beat-sync.md +545 -0
- package/vendor/skills/edit-plan/beats.md +197 -0
- package/vendor/skills/edit-plan/emphasis-detection.md +366 -0
- package/vendor/skills/edit-plan/execution.md +157 -0
- package/vendor/skills/edit-plan/expression-selection.md +290 -0
- package/vendor/skills/edit-plan/plan-json.md +52 -0
- package/vendor/skills/edit-plan/recipe.md +74 -0
- package/vendor/skills/edit-plan/references/asset.decisions.example.json +12 -0
- package/vendor/skills/edit-plan/references/event.example.json +7 -0
- package/vendor/skills/edit-plan/report-guide.md +192 -0
- package/vendor/skills/edit-plan/workflow.md +108 -0
- package/vendor/skills/generate-narration/SKILL.md +40 -0
- package/vendor/skills/generate-narration/assets/reading-script-v1.md +18 -0
- package/vendor/skills/generate-narration/avatar-voice.md +54 -0
- package/vendor/skills/generate-narration/bin/generate-narration.mjs +572 -0
- package/vendor/skills/generate-narration/engines.md +78 -0
- package/vendor/skills/generate-narration/reading-text.md +36 -0
- package/vendor/skills/generate-narration/voice-profile-setup.md +77 -0
- package/vendor/skills/harvest-asset/SKILL.md +132 -0
- package/vendor/skills/manage-connections/SKILL.md +75 -0
- package/vendor/skills/manage-connections/bin/doctor.mjs +341 -0
- package/vendor/skills/overlay-authoring/3d.md +143 -0
- package/vendor/skills/overlay-authoring/SKILL.md +30 -0
- package/vendor/skills/overlay-authoring/motion.md +58 -0
- package/vendor/skills/overlay-authoring/table.md +41 -0
- package/vendor/skills/overlay-authoring/telop.md +69 -0
- package/vendor/skills/overlay-authoring/text-behind-person.md +224 -0
- package/vendor/skills/overlay-authoring/thumbnail.md +126 -0
- package/vendor/skills/render-cut/SKILL.md +66 -0
- package/vendor/skills/research-plan/SKILL.md +75 -0
- package/vendor/skills/research-plan/competitor.md +50 -0
- package/vendor/skills/research-plan/ideate.md +56 -0
- package/vendor/skills/research-plan/shotlist.md +46 -0
- package/vendor/skills/research-plan/storyboard.md +48 -0
- package/vendor/skills/research-plan/trends.md +33 -0
- package/vendor/skills/setup-audio-library/SKILL.md +93 -0
- package/vendor/skills/setup-audio-library/candidate-list.md +72 -0
- package/vendor/skills/setup-audio-library/drop-folder.md +72 -0
- package/vendor/skills/setup-audio-library/gallery.md +43 -0
- package/vendor/skills/setup-library/SKILL.md +33 -0
- package/vendor/skills/setup-library/fetch-and-validate.md +102 -0
- package/vendor/skills/setup-library/starter-pack.md +55 -0
- package/vendor/skills/setup-library/tools-check.md +83 -0
- package/vendor/skills/verify/SKILL.md +137 -0
- package/vendor/templates/project-default/.akari/cache/.gitkeep +0 -0
- package/vendor/templates/project-default/.akari/connections.json +233 -0
- package/vendor/templates/project-default/.akari/diffs/.gitkeep +1 -0
- package/vendor/templates/project-default/.akari/events/.gitkeep +1 -0
- package/vendor/templates/project-default/.akari/reports/.gitkeep +0 -0
- package/vendor/templates/project-default/.akari/sidecars/.gitkeep +1 -0
- package/vendor/templates/project-default/.akari/work/.gitkeep +0 -0
- package/vendor/templates/project-default/.akari/workflow.json +48 -0
- package/vendor/templates/project-default/.claude/settings.json +15 -0
- package/vendor/templates/project-default/.claude/skills/README.md +26 -0
- package/vendor/templates/project-default/AGENTS.md +49 -0
- package/vendor/templates/project-default/CLAUDE.md +35 -0
- package/vendor/templates/project-default/assets/.gitkeep +1 -0
- package/vendor/templates/project-default/exports/.gitkeep +1 -0
- package/vendor/templates/project-default/planning/.gitkeep +1 -0
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import fs from 'node:fs/promises';
|
|
4
|
+
import path from 'node:path';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
|
|
7
|
+
const execFileAsync = promisify(execFile);
|
|
8
|
+
|
|
9
|
+
export const PROJECT_GITIGNORE = [
|
|
10
|
+
'# Source video and audio are intentionally kept outside the project history.',
|
|
11
|
+
'assets/**',
|
|
12
|
+
'!assets/.gitkeep',
|
|
13
|
+
'',
|
|
14
|
+
'# Temporary files used by the friendly "変更を見る" view.',
|
|
15
|
+
'.akari/diffs/**',
|
|
16
|
+
'!.akari/diffs/.gitkeep',
|
|
17
|
+
'',
|
|
18
|
+
'# Local operating-system files.',
|
|
19
|
+
'.DS_Store',
|
|
20
|
+
'Thumbs.db',
|
|
21
|
+
''
|
|
22
|
+
].join('\n');
|
|
23
|
+
|
|
24
|
+
const FALLBACK_CLAUDE_GUIDANCE = [
|
|
25
|
+
'# AKARI Video プロジェクト',
|
|
26
|
+
'',
|
|
27
|
+
'- `assets/` は元動画と音声を置く素材の場所です。原本は書き換えたり削除したりしません。',
|
|
28
|
+
'- `planning/` は企画やレポート、`exports/` は完成した動画を置く場所です。',
|
|
29
|
+
'- `.akari/sidecars/` は分析結果、`.akari/events/` は作業の節目の記録を置く場所です。',
|
|
30
|
+
'- 節目の記録は 1 件ずつ新しく追加し、すでにある記録は変更しません。',
|
|
31
|
+
'- 編集スキルは `.claude/skills/` にあり、`/analyze-footage` などの素の名前で使えます。',
|
|
32
|
+
'- Codex など他の AI エージェント用の入り口が `.agents/skills/` と `.codex/skills/` にあります(中身は `.claude/skills/` へのリンク)。',
|
|
33
|
+
'- `.akari/intake.json` の `status` が `submitted` なら、そこに書かれた `tasks` / `target` / `autonomy` に従って進めます。`autonomy` が `checkpoint`(既定)なら、企画の承認や書き出し前などの要所で必ず人に確認します。`status` が `draft` のときは進め方がまだ決まっていないので、フォームや対話で確定させてから作業を始めます。',
|
|
34
|
+
'- 利用者へは日本語で、内部の仕組みではなく「変更履歴」「企画メモ」「素材」などの言葉で説明します。',
|
|
35
|
+
'',
|
|
36
|
+
'このファイルはあなたのプロジェクトのものです。自由に書き換えて構いません。',
|
|
37
|
+
''
|
|
38
|
+
].join('\n');
|
|
39
|
+
|
|
40
|
+
const FALLBACK_AGENT_GUIDANCE = [
|
|
41
|
+
'# AKARI Video プロジェクトの進め方',
|
|
42
|
+
'',
|
|
43
|
+
'`assets/` の原本を保ち、成果物は `planning/` と `exports/`、分析結果と節目の記録は `.akari/` に置く。',
|
|
44
|
+
'節目の記録は `.akari/events/` に 1 件ずつ追加し、すでにある記録は変更しない。',
|
|
45
|
+
'',
|
|
46
|
+
'スキルは `/analyze-footage`、`/edit-plan`、`/overlay-authoring`、`/setup-library`、',
|
|
47
|
+
'`/harvest-asset`、`/bake-3d` の素の名前で使う。手順を直接読む場合は',
|
|
48
|
+
'`.claude/skills/<スキル名>/SKILL.md` を開く。',
|
|
49
|
+
'Codex 等のハーネスでは `.agents/skills/` / `.codex/skills/`(`.claude/skills/` への',
|
|
50
|
+
'symlink)から同じスキルが自動発見される。',
|
|
51
|
+
'',
|
|
52
|
+
'`.akari/intake.json` の `status` が `submitted` なら `tasks` / `target` / `autonomy` に従って進める。',
|
|
53
|
+
'`autonomy: checkpoint`(既定)なら企画承認・書き出し前などの要所で人に確認する。',
|
|
54
|
+
'`status: draft` なら進め方が未確定のため、フォームまたは対話で確定させてから進める。',
|
|
55
|
+
'',
|
|
56
|
+
'利用者へは日本語で、内部の仕組みではなく役割が伝わる言葉を使う。',
|
|
57
|
+
'この案内はこのプロジェクトのものです。自由に書き換えて構いません。',
|
|
58
|
+
''
|
|
59
|
+
].join('\n');
|
|
60
|
+
|
|
61
|
+
const FALLBACK_SKILLS_GUIDANCE = [
|
|
62
|
+
'# このプロジェクトのスキル',
|
|
63
|
+
'',
|
|
64
|
+
'6 本の編集スキルはこのフォルダーに実体で入り、素の名前で使えます。',
|
|
65
|
+
'各手順は `.claude/skills/<スキル名>/SKILL.md` から直接読めます。',
|
|
66
|
+
'`.agents/skills/` と `.codex/skills/` は他の AI エージェント用の入り口で、この実体への symlink です。',
|
|
67
|
+
'`AKARI-SKILLS-VERSION` はプロジェクト作成時のスキル内容を示します。',
|
|
68
|
+
'この案内と各スキルは、運用に合わせて自由に書き換えて構いません。',
|
|
69
|
+
''
|
|
70
|
+
].join('\n');
|
|
71
|
+
|
|
72
|
+
// 進め方フォームの保存先(packages/schemas/intake.schema.json v0 準拠)。
|
|
73
|
+
// 新規プロジェクトは常に status: draft・空 tasks で始まり、フォームまたは対話で確定する。
|
|
74
|
+
const FALLBACK_INTAKE = {
|
|
75
|
+
version: 1,
|
|
76
|
+
tasks: [],
|
|
77
|
+
target: { duration_s: null, keep_length: false, taste: null },
|
|
78
|
+
autonomy: 'checkpoint',
|
|
79
|
+
status: 'draft',
|
|
80
|
+
submitted_at: null
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const FALLBACK_WORKFLOW = {
|
|
84
|
+
version: 1,
|
|
85
|
+
roles: [
|
|
86
|
+
{ path: 'assets', label: '素材', kind: 'assets' },
|
|
87
|
+
{ path: 'planning', label: '企画', kind: 'planning' },
|
|
88
|
+
{ path: 'exports', label: '書き出し', kind: 'exports' }
|
|
89
|
+
],
|
|
90
|
+
tree: {
|
|
91
|
+
hidden: ['.claude', '.agents', '.codex', '.akari', 'CLAUDE.md', 'AGENTS.md', '.gitignore', '.gitkeep'],
|
|
92
|
+
sidecarSuffixes: ['.meta.json', '.decisions.json', '.analysis.json'],
|
|
93
|
+
developerModePreference: 'akari.developerMode'
|
|
94
|
+
},
|
|
95
|
+
events: {
|
|
96
|
+
directory: '.akari/events',
|
|
97
|
+
gateTypes: ['report-generated', 'report-approved', 'edit-completed', 'export-completed']
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
function portablePath(value) {
|
|
102
|
+
return value.split(path.sep).join('/');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function isAlreadyExists(error) {
|
|
106
|
+
return error && typeof error === 'object' && error.code === 'EEXIST';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function runGit(root, args) {
|
|
110
|
+
return execFileAsync('git', ['-C', root, ...args], {
|
|
111
|
+
encoding: 'utf8',
|
|
112
|
+
maxBuffer: 10 * 1024 * 1024
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export async function copyTemplateTree(sourceDir, destinationDir) {
|
|
117
|
+
const copiedFiles = [];
|
|
118
|
+
const skippedExisting = [];
|
|
119
|
+
const skippedSymlinks = [];
|
|
120
|
+
|
|
121
|
+
await fs.mkdir(destinationDir, { recursive: true });
|
|
122
|
+
|
|
123
|
+
async function copyDirectory(source, destination, relativeDirectory) {
|
|
124
|
+
for (const entry of await fs.readdir(source, { withFileTypes: true })) {
|
|
125
|
+
const from = path.join(source, entry.name);
|
|
126
|
+
const to = path.join(destination, entry.name);
|
|
127
|
+
const relativePath = portablePath(path.join(relativeDirectory, entry.name));
|
|
128
|
+
|
|
129
|
+
if (entry.isDirectory()) {
|
|
130
|
+
await fs.mkdir(to, { recursive: true });
|
|
131
|
+
await copyDirectory(from, to, relativePath);
|
|
132
|
+
} else if (entry.isSymbolicLink()) {
|
|
133
|
+
console.warn(`[akari-project] skipping template symbolic link: ${relativePath}`);
|
|
134
|
+
skippedSymlinks.push(relativePath);
|
|
135
|
+
} else if (entry.isFile()) {
|
|
136
|
+
try {
|
|
137
|
+
await fs.writeFile(to, await fs.readFile(from), { flag: 'wx' });
|
|
138
|
+
copiedFiles.push(relativePath);
|
|
139
|
+
} catch (error) {
|
|
140
|
+
if (!isAlreadyExists(error)) {
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
skippedExisting.push(relativePath);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
await copyDirectory(sourceDir, destinationDir, '');
|
|
150
|
+
return { copiedFiles, skippedExisting, skippedSymlinks };
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export async function writeFallbackTemplate(destinationDir) {
|
|
154
|
+
const writtenFiles = [];
|
|
155
|
+
const skippedExisting = [];
|
|
156
|
+
const files = {
|
|
157
|
+
'.gitignore': PROJECT_GITIGNORE,
|
|
158
|
+
'CLAUDE.md': FALLBACK_CLAUDE_GUIDANCE,
|
|
159
|
+
'AGENTS.md': FALLBACK_AGENT_GUIDANCE,
|
|
160
|
+
'.claude/settings.json': JSON.stringify({
|
|
161
|
+
permissions: {
|
|
162
|
+
allow: ['Read(./**)', 'Edit(./planning/**)', 'Edit(./exports/**)', 'Edit(./.akari/sidecars/**)', 'Edit(./.akari/events/**)'],
|
|
163
|
+
deny: ['Edit(./assets/**)']
|
|
164
|
+
}
|
|
165
|
+
}, null, 2) + '\n',
|
|
166
|
+
'.claude/skills/README.md': FALLBACK_SKILLS_GUIDANCE,
|
|
167
|
+
'.akari/workflow.json': JSON.stringify(FALLBACK_WORKFLOW, null, 2) + '\n',
|
|
168
|
+
'.akari/intake.json': JSON.stringify(FALLBACK_INTAKE, null, 2) + '\n',
|
|
169
|
+
'assets/.gitkeep': '',
|
|
170
|
+
'planning/.gitkeep': '',
|
|
171
|
+
'exports/.gitkeep': '',
|
|
172
|
+
'.akari/events/.gitkeep': '',
|
|
173
|
+
'.akari/sidecars/.gitkeep': '',
|
|
174
|
+
'.akari/diffs/.gitkeep': ''
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
for (const [name, content] of Object.entries(files)) {
|
|
178
|
+
const destination = path.join(destinationDir, name);
|
|
179
|
+
await fs.mkdir(path.dirname(destination), { recursive: true });
|
|
180
|
+
try {
|
|
181
|
+
await fs.writeFile(destination, content, { encoding: 'utf8', flag: 'wx' });
|
|
182
|
+
writtenFiles.push(name);
|
|
183
|
+
} catch (error) {
|
|
184
|
+
if (!isAlreadyExists(error)) {
|
|
185
|
+
throw error;
|
|
186
|
+
}
|
|
187
|
+
skippedExisting.push(name);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return { writtenFiles, skippedExisting };
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
const SKILL_ADAPTER_DIRECTORIES = ['.agents', '.codex'];
|
|
195
|
+
|
|
196
|
+
function isPermissionDenied(error) {
|
|
197
|
+
return error && typeof error === 'object' && (error.code === 'EPERM' || error.code === 'EACCES');
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
async function copyDirectoryRecursive(fsImpl, source, destination) {
|
|
201
|
+
await fsImpl.mkdir(destination, { recursive: true });
|
|
202
|
+
for (const entry of await fsImpl.readdir(source, { withFileTypes: true })) {
|
|
203
|
+
const from = path.join(source, entry.name);
|
|
204
|
+
const to = path.join(destination, entry.name);
|
|
205
|
+
if (entry.isDirectory()) {
|
|
206
|
+
await copyDirectoryRecursive(fsImpl, from, to);
|
|
207
|
+
} else if (entry.isSymbolicLink()) {
|
|
208
|
+
console.warn(`[project-scaffold] skipping nested symbolic link during fallback copy: ${from}`);
|
|
209
|
+
} else if (entry.isFile()) {
|
|
210
|
+
await fsImpl.writeFile(to, await fsImpl.readFile(from));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Creates `linkPath` as a directory symlink pointing at `target` (a path relative to
|
|
217
|
+
* `linkPath`'s own directory). Windows without admin rights / developer mode denies plain
|
|
218
|
+
* symlink creation (EPERM); junctions are the privilege-free NTFS alternative but require an
|
|
219
|
+
* absolute target and only work within the same volume. If junction creation also fails
|
|
220
|
+
* (e.g. cross-volume), falls back to a recursive copy so project creation still succeeds —
|
|
221
|
+
* degraded (the adapter stops tracking future skill updates) but functional.
|
|
222
|
+
*/
|
|
223
|
+
export async function createSkillAdapterLink(target, linkPath, { fsImpl = fs, platform = process.platform } = {}) {
|
|
224
|
+
try {
|
|
225
|
+
await fsImpl.symlink(target, linkPath, 'dir');
|
|
226
|
+
return { method: 'symlink' };
|
|
227
|
+
} catch (error) {
|
|
228
|
+
if (isAlreadyExists(error)) {
|
|
229
|
+
throw error;
|
|
230
|
+
}
|
|
231
|
+
if (platform !== 'win32' || !isPermissionDenied(error)) {
|
|
232
|
+
throw error;
|
|
233
|
+
}
|
|
234
|
+
const absoluteTarget = path.resolve(path.dirname(linkPath), target);
|
|
235
|
+
try {
|
|
236
|
+
await fsImpl.symlink(absoluteTarget, linkPath, 'junction');
|
|
237
|
+
return { method: 'junction' };
|
|
238
|
+
} catch (junctionError) {
|
|
239
|
+
if (isAlreadyExists(junctionError)) {
|
|
240
|
+
throw junctionError;
|
|
241
|
+
}
|
|
242
|
+
await copyDirectoryRecursive(fsImpl, absoluteTarget, linkPath);
|
|
243
|
+
console.warn(`[project-scaffold] symlink and junction both failed for ${linkPath}; copied the skill directory instead (it will not reflect future skill updates)`);
|
|
244
|
+
return { method: 'copy' };
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
async function copySkillsTree(source, destination) {
|
|
250
|
+
await fs.mkdir(destination, { recursive: true });
|
|
251
|
+
for (const entry of await fs.readdir(source, { withFileTypes: true })) {
|
|
252
|
+
if (entry.name === '.gitkeep' || entry.name === '.DS_Store') {
|
|
253
|
+
continue;
|
|
254
|
+
}
|
|
255
|
+
const from = path.join(source, entry.name);
|
|
256
|
+
const to = path.join(destination, entry.name);
|
|
257
|
+
if (entry.isDirectory()) {
|
|
258
|
+
await copySkillsTree(from, to);
|
|
259
|
+
} else if (entry.isSymbolicLink()) {
|
|
260
|
+
console.warn(`[akari-project] skipping skill symbolic link: ${entry.name}`);
|
|
261
|
+
} else if (entry.isFile()) {
|
|
262
|
+
await fs.writeFile(to, await fs.readFile(from));
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
async function skillsSignature(source) {
|
|
268
|
+
const hash = createHash('sha256');
|
|
269
|
+
const walk = async (directory, relative) => {
|
|
270
|
+
const entries = (await fs.readdir(directory, { withFileTypes: true }))
|
|
271
|
+
.sort((left, right) => left.name.localeCompare(right.name));
|
|
272
|
+
for (const entry of entries) {
|
|
273
|
+
if (entry.name === '.gitkeep' || entry.name === '.DS_Store') {
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
const absolute = path.join(directory, entry.name);
|
|
277
|
+
const relativePath = relative ? `${relative}/${entry.name}` : entry.name;
|
|
278
|
+
if (entry.isDirectory()) {
|
|
279
|
+
await walk(absolute, relativePath);
|
|
280
|
+
} else if (entry.isFile()) {
|
|
281
|
+
hash.update(relativePath);
|
|
282
|
+
hash.update(await fs.readFile(absolute));
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
await walk(source, '');
|
|
287
|
+
return hash.digest('hex').slice(0, 16);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export async function installProjectSkills(destinationDir, skillsSourceDir, schemasSourceDir) {
|
|
291
|
+
const destination = path.join(destinationDir, '.claude', 'skills');
|
|
292
|
+
await copySkillsTree(skillsSourceDir, destination);
|
|
293
|
+
await fs.writeFile(
|
|
294
|
+
path.join(destination, 'AKARI-SKILLS-VERSION'),
|
|
295
|
+
`${await skillsSignature(skillsSourceDir)}\n`,
|
|
296
|
+
'utf8'
|
|
297
|
+
);
|
|
298
|
+
|
|
299
|
+
if (schemasSourceDir) {
|
|
300
|
+
const schema = JSON.parse(
|
|
301
|
+
await fs.readFile(path.join(schemasSourceDir, 'analysis.schema.json'), 'utf8')
|
|
302
|
+
);
|
|
303
|
+
const provenance = '(この analysis.schema.json は packages/schemas/analysis.schema.json からプロジェクト作成時に installProjectSkills() が機械コピーしたものです。手編集しないでください。再生成するにはプロジェクトを作り直すか、スキルの再インストールを行ってください。)';
|
|
304
|
+
schema.$comment = typeof schema.$comment === 'string'
|
|
305
|
+
? `${schema.$comment} ${provenance}`
|
|
306
|
+
: provenance;
|
|
307
|
+
const schemaDestination = path.join(destination, 'analyze-footage', 'references', 'analysis.schema.json');
|
|
308
|
+
await fs.mkdir(path.dirname(schemaDestination), { recursive: true });
|
|
309
|
+
await fs.writeFile(schemaDestination, `${JSON.stringify(schema, null, 2)}\n`, 'utf8');
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
export async function installSkillAdapters(destinationDir, options = {}) {
|
|
314
|
+
const { fsImpl = fs, platform = process.platform } = options;
|
|
315
|
+
const skillsDir = path.join(destinationDir, '.claude', 'skills');
|
|
316
|
+
const skillNames = (await fsImpl.readdir(skillsDir, { withFileTypes: true }))
|
|
317
|
+
.filter(entry => entry.isDirectory())
|
|
318
|
+
.map(entry => entry.name);
|
|
319
|
+
|
|
320
|
+
const created = [];
|
|
321
|
+
const skippedExisting = [];
|
|
322
|
+
const degraded = [];
|
|
323
|
+
for (const adapter of SKILL_ADAPTER_DIRECTORIES) {
|
|
324
|
+
const adapterDir = path.join(destinationDir, adapter, 'skills');
|
|
325
|
+
await fsImpl.mkdir(adapterDir, { recursive: true });
|
|
326
|
+
for (const name of skillNames) {
|
|
327
|
+
const relativeName = `${adapter}/skills/${name}`;
|
|
328
|
+
try {
|
|
329
|
+
const { method } = await createSkillAdapterLink(
|
|
330
|
+
`../../.claude/skills/${name}`,
|
|
331
|
+
path.join(adapterDir, name),
|
|
332
|
+
{ fsImpl, platform }
|
|
333
|
+
);
|
|
334
|
+
created.push(relativeName);
|
|
335
|
+
if (method !== 'symlink') {
|
|
336
|
+
degraded.push({ name: relativeName, method });
|
|
337
|
+
}
|
|
338
|
+
} catch (error) {
|
|
339
|
+
if (!isAlreadyExists(error)) {
|
|
340
|
+
throw error;
|
|
341
|
+
}
|
|
342
|
+
skippedExisting.push(relativeName);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return { created, skippedExisting, degraded };
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
export async function readSkillsVersion(destinationDir) {
|
|
350
|
+
try {
|
|
351
|
+
return (await fs.readFile(
|
|
352
|
+
path.join(destinationDir, '.claude', 'skills', 'AKARI-SKILLS-VERSION'),
|
|
353
|
+
'utf8'
|
|
354
|
+
)).trim();
|
|
355
|
+
} catch (error) {
|
|
356
|
+
if (error && typeof error === 'object' && error.code === 'ENOENT') {
|
|
357
|
+
return null;
|
|
358
|
+
}
|
|
359
|
+
throw error;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export async function checkGitBoundary(destinationDir) {
|
|
364
|
+
try {
|
|
365
|
+
const { stdout } = await runGit(destinationDir, ['rev-parse', '--is-inside-work-tree']);
|
|
366
|
+
if (stdout.trim() !== 'true') {
|
|
367
|
+
return { eligibility: 'none', parentRoot: null };
|
|
368
|
+
}
|
|
369
|
+
} catch {
|
|
370
|
+
return { eligibility: 'none', parentRoot: null };
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const { stdout } = await runGit(destinationDir, ['rev-parse', '--show-toplevel']);
|
|
374
|
+
const [parentRoot, destinationRoot] = await Promise.all([
|
|
375
|
+
fs.realpath(stdout.trim()),
|
|
376
|
+
fs.realpath(destinationDir)
|
|
377
|
+
]);
|
|
378
|
+
if (parentRoot === destinationRoot) {
|
|
379
|
+
return { eligibility: 'own-root', parentRoot: null };
|
|
380
|
+
}
|
|
381
|
+
return { eligibility: 'inside-parent-repository', parentRoot };
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export async function commitInitialProject(destinationDir, message = 'プロジェクトを作成') {
|
|
385
|
+
await runGit(destinationDir, ['init']);
|
|
386
|
+
await runGit(destinationDir, ['add', '-A', '--', '.']);
|
|
387
|
+
const { stdout } = await runGit(destinationDir, ['status', '--porcelain']);
|
|
388
|
+
if (!stdout.trim()) {
|
|
389
|
+
return { committed: false };
|
|
390
|
+
}
|
|
391
|
+
await runGit(destinationDir, [
|
|
392
|
+
'-c', 'user.name=AKARI Video',
|
|
393
|
+
'-c', 'user.email=local@akari.video',
|
|
394
|
+
'commit', '-m', message
|
|
395
|
+
]);
|
|
396
|
+
return { committed: true };
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
function escapeHtml(value) {
|
|
400
|
+
return String(value)
|
|
401
|
+
.replaceAll('&', '&')
|
|
402
|
+
.replaceAll('<', '<')
|
|
403
|
+
.replaceAll('>', '>')
|
|
404
|
+
.replaceAll('"', '"')
|
|
405
|
+
.replaceAll("'", ''');
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function renderList(items, emptyText = 'なし') {
|
|
409
|
+
if (items.length === 0) {
|
|
410
|
+
return `<p>${escapeHtml(emptyText)}</p>`;
|
|
411
|
+
}
|
|
412
|
+
return `<ul>${items.map(item => `<li><code>${escapeHtml(item)}</code></li>`).join('')}</ul>`;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
export function renderReportHtml(report) {
|
|
416
|
+
return `<!doctype html>
|
|
417
|
+
<html lang="ja">
|
|
418
|
+
<head>
|
|
419
|
+
<meta charset="utf-8">
|
|
420
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
421
|
+
<title>AKARI Video プロジェクト作成結果</title>
|
|
422
|
+
<style>
|
|
423
|
+
:root { color-scheme: light dark; font-family: system-ui, sans-serif; line-height: 1.6; }
|
|
424
|
+
body { max-width: 960px; margin: 0 auto; padding: 2rem; }
|
|
425
|
+
h1, h2 { line-height: 1.25; }
|
|
426
|
+
dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
|
|
427
|
+
dt { font-weight: 700; }
|
|
428
|
+
dd { margin: 0; overflow-wrap: anywhere; }
|
|
429
|
+
code { overflow-wrap: anywhere; }
|
|
430
|
+
section { margin-block: 2rem; }
|
|
431
|
+
</style>
|
|
432
|
+
</head>
|
|
433
|
+
<body>
|
|
434
|
+
<main>
|
|
435
|
+
<h1>AKARI Video プロジェクト作成結果</h1>
|
|
436
|
+
<dl>
|
|
437
|
+
<dt>作成日時</dt><dd>${escapeHtml(report.createdAt)}</dd>
|
|
438
|
+
<dt>作成先</dt><dd><code>${escapeHtml(report.destination)}</code></dd>
|
|
439
|
+
<dt>使用した雛形</dt><dd><code>${escapeHtml(report.templateDir)}</code></dd>
|
|
440
|
+
</dl>
|
|
441
|
+
<section>
|
|
442
|
+
<h2>コピーしたファイル(${escapeHtml(report.copy.copiedFiles.length)} 件)</h2>
|
|
443
|
+
${renderList(report.copy.copiedFiles)}
|
|
444
|
+
</section>
|
|
445
|
+
<section>
|
|
446
|
+
<h2>フォールバック補完されたファイル(${escapeHtml(report.fallback.writtenFiles.length)} 件)</h2>
|
|
447
|
+
${renderList(report.fallback.writtenFiles)}
|
|
448
|
+
</section>
|
|
449
|
+
<section>
|
|
450
|
+
<h2>スキップしたシンボリックリンク(${escapeHtml(report.copy.skippedSymlinks.length)} 件)</h2>
|
|
451
|
+
${renderList(report.copy.skippedSymlinks)}
|
|
452
|
+
</section>
|
|
453
|
+
<section>
|
|
454
|
+
<h2>雛形バージョン</h2>
|
|
455
|
+
<p>${report.skillsVersion === null ? '記録なし' : `<code>${escapeHtml(report.skillsVersion)}</code>`}</p>
|
|
456
|
+
</section>
|
|
457
|
+
<section>
|
|
458
|
+
<h2>git 初期化の結果</h2>
|
|
459
|
+
<dl>
|
|
460
|
+
<dt>実施</dt><dd>${report.git.action === 'initialized-and-committed' ? '実施' : 'スキップ'}</dd>
|
|
461
|
+
<dt>判定</dt><dd>${escapeHtml(report.git.eligibility)}</dd>
|
|
462
|
+
<dt>理由</dt><dd>${escapeHtml(report.git.reason)}</dd>
|
|
463
|
+
</dl>
|
|
464
|
+
</section>
|
|
465
|
+
</main>
|
|
466
|
+
</body>
|
|
467
|
+
</html>
|
|
468
|
+
`;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
export async function createProject(destinationDir, templateDir, options = {}) {
|
|
472
|
+
const destination = path.resolve(destinationDir);
|
|
473
|
+
const resolvedTemplateDir = path.resolve(templateDir);
|
|
474
|
+
const reportPath = path.join(destination, '.akari', 'reports', 'create-project-report.html');
|
|
475
|
+
|
|
476
|
+
await fs.mkdir(destination, { recursive: true });
|
|
477
|
+
const copy = await copyTemplateTree(resolvedTemplateDir, destination);
|
|
478
|
+
const fallback = await writeFallbackTemplate(destination);
|
|
479
|
+
if (options.skillsSourceDir) {
|
|
480
|
+
await installProjectSkills(destination, options.skillsSourceDir, options.schemasSourceDir);
|
|
481
|
+
await installSkillAdapters(destination);
|
|
482
|
+
}
|
|
483
|
+
const skillsVersion = await readSkillsVersion(destination);
|
|
484
|
+
const boundary = await checkGitBoundary(destination);
|
|
485
|
+
|
|
486
|
+
let action;
|
|
487
|
+
let reason;
|
|
488
|
+
if (boundary.eligibility === 'none') {
|
|
489
|
+
action = 'initialized-and-committed';
|
|
490
|
+
reason = 'git 初期化して単一コミットを作成';
|
|
491
|
+
} else if (boundary.eligibility === 'own-root') {
|
|
492
|
+
action = 'skipped';
|
|
493
|
+
reason = 'このフォルダは既に git リポジトリのため git init を skip';
|
|
494
|
+
} else {
|
|
495
|
+
action = 'skipped';
|
|
496
|
+
reason = `親リポジトリ ${boundary.parentRoot} の内側のため git init を skip`;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
const report = {
|
|
500
|
+
destination,
|
|
501
|
+
templateDir: resolvedTemplateDir,
|
|
502
|
+
createdAt: new Date().toISOString(),
|
|
503
|
+
copy,
|
|
504
|
+
fallback,
|
|
505
|
+
skillsVersion,
|
|
506
|
+
git: {
|
|
507
|
+
eligibility: boundary.eligibility,
|
|
508
|
+
parentRoot: boundary.parentRoot,
|
|
509
|
+
action,
|
|
510
|
+
reason
|
|
511
|
+
},
|
|
512
|
+
reportPath
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
await fs.mkdir(path.dirname(reportPath), { recursive: true });
|
|
516
|
+
await fs.writeFile(reportPath, renderReportHtml(report), 'utf8');
|
|
517
|
+
|
|
518
|
+
if (boundary.eligibility === 'none') {
|
|
519
|
+
await commitInitialProject(destination);
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
return report;
|
|
523
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { spawnSync } from "node:child_process";
|
|
3
|
+
import { mkdir, mkdtemp, readFile, rm, stat } from "node:fs/promises";
|
|
4
|
+
import { tmpdir } from "node:os";
|
|
5
|
+
import { dirname, join } from "node:path";
|
|
6
|
+
import { fileURLToPath } from "node:url";
|
|
7
|
+
import test from "node:test";
|
|
8
|
+
|
|
9
|
+
import { createProject } from "../src/index.mjs";
|
|
10
|
+
|
|
11
|
+
const packageRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
12
|
+
const repoRoot = join(packageRoot, "..", "..");
|
|
13
|
+
const validateIntakeCli = join(repoRoot, "packages", "schemas", "bin", "validate-intake.mjs");
|
|
14
|
+
|
|
15
|
+
async function withScratchRoot(callback) {
|
|
16
|
+
const root = await mkdtemp(join(tmpdir(), "akari-scaffold-test-"));
|
|
17
|
+
try {
|
|
18
|
+
return await callback(root);
|
|
19
|
+
} finally {
|
|
20
|
+
await rm(root, { recursive: true, force: true });
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function validateIntake(intakePath) {
|
|
25
|
+
return spawnSync(process.execPath, [validateIntakeCli, intakePath], { encoding: "utf8" });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
test("bare template: scaffold generates a draft .akari/intake.json and a CLAUDE.md carrying the intake discipline note", async () => {
|
|
29
|
+
await withScratchRoot(async (root) => {
|
|
30
|
+
const templateDir = join(root, "empty-template");
|
|
31
|
+
const destination = join(root, "project");
|
|
32
|
+
await mkdir(templateDir, { recursive: true });
|
|
33
|
+
|
|
34
|
+
const report = await createProject(destination, templateDir);
|
|
35
|
+
|
|
36
|
+
const intakePath = join(destination, ".akari", "intake.json");
|
|
37
|
+
const intake = JSON.parse(await readFile(intakePath, "utf8"));
|
|
38
|
+
assert.equal(intake.version, 1);
|
|
39
|
+
assert.deepEqual(intake.tasks, []);
|
|
40
|
+
assert.equal(intake.status, "draft");
|
|
41
|
+
assert.equal(intake.submitted_at, null);
|
|
42
|
+
assert.equal(intake.autonomy, "checkpoint");
|
|
43
|
+
|
|
44
|
+
const validated = validateIntake(intakePath);
|
|
45
|
+
assert.equal(validated.status, 0, validated.stderr);
|
|
46
|
+
assert.match(validated.stdout, /^OK: /);
|
|
47
|
+
|
|
48
|
+
const claudeMd = await readFile(join(destination, "CLAUDE.md"), "utf8");
|
|
49
|
+
assert.match(claudeMd, /intake\.json/);
|
|
50
|
+
assert.match(claudeMd, /submitted/);
|
|
51
|
+
assert.match(claudeMd, /draft/);
|
|
52
|
+
assert.match(claudeMd, /checkpoint/);
|
|
53
|
+
|
|
54
|
+
assert.ok(report.fallback.writtenFiles.includes(".akari/intake.json"));
|
|
55
|
+
assert.ok(report.fallback.writtenFiles.includes("CLAUDE.md"));
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
test("real templates/project-default/: .akari/intake.json is generated via the fallback path (template does not ship one yet) and validates", async () => {
|
|
60
|
+
await withScratchRoot(async (root) => {
|
|
61
|
+
const templateDir = join(repoRoot, "templates", "project-default");
|
|
62
|
+
const destination = join(root, "project");
|
|
63
|
+
|
|
64
|
+
const report = await createProject(destination, templateDir);
|
|
65
|
+
|
|
66
|
+
const intakePath = join(destination, ".akari", "intake.json");
|
|
67
|
+
assert.ok((await stat(intakePath)).isFile());
|
|
68
|
+
|
|
69
|
+
const validated = validateIntake(intakePath);
|
|
70
|
+
assert.equal(validated.status, 0, validated.stderr);
|
|
71
|
+
|
|
72
|
+
assert.ok(report.fallback.writtenFiles.includes(".akari/intake.json"));
|
|
73
|
+
|
|
74
|
+
const claudeMd = await readFile(join(destination, "CLAUDE.md"), "utf8");
|
|
75
|
+
assert.match(claudeMd, /intake\.json/);
|
|
76
|
+
assert.match(claudeMd, /checkpoint/);
|
|
77
|
+
|
|
78
|
+
const agentsMd = await readFile(join(destination, "AGENTS.md"), "utf8");
|
|
79
|
+
assert.match(agentsMd, /intake\.json/);
|
|
80
|
+
});
|
|
81
|
+
});
|