@automovie/template 0.3.4 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -22
- package/generated/pnpm-workspace.json +5 -5
- package/generated/skills/3d-modeling/conditioning.md +3 -1
- package/generated/skills/3d-modeling/crafting/construction.md +29 -1
- package/generated/skills/3d-modeling/environments.md +47 -0
- package/generated/skills/3d-modeling/inspection.md +7 -4
- package/generated/skills/contracts/development/common.md +4 -6
- package/generated/skills/contracts/development/design.md +7 -17
- package/generated/skills/contracts/development/implementation.md +8 -36
- package/generated/skills/development/repair.md +2 -0
- package/generated/skills/documentation/SKILL.md +5 -5
- package/generated/skills/documentation/writing.md +2 -2
- package/generated/skills/motion/laws/authoring.md +2 -2
- package/generated/skills/motion/laws/contacts.md +6 -2
- package/generated/skills/motion/laws/transitions.md +14 -4
- package/generated/skills/motion/laws/variation.md +2 -2
- package/generated/skills/motion/laws/verification.md +7 -5
- package/generated/skills/multi-agent/continuing.md +5 -0
- package/generated/skills/prompting/SKILL.md +8 -22
- package/generated/skills/visual-debugging/correction-rounds.md +4 -0
- package/lib/IAutoMovieScaffoldProps.d.ts +12 -12
- package/lib/assertScaffoldProjectName.d.ts +8 -10
- package/lib/assertScaffoldProjectName.js +8 -10
- package/lib/assertScaffoldProjectName.js.map +1 -1
- package/lib/createAutoMovieScaffold.d.ts +23 -15
- package/lib/createAutoMovieScaffold.js +35 -18
- package/lib/createAutoMovieScaffold.js.map +1 -1
- package/lib/listAutoMovieScaffoldFiles.d.ts +8 -10
- package/lib/listAutoMovieScaffoldFiles.js +16 -12
- package/lib/listAutoMovieScaffoldFiles.js.map +1 -1
- package/lib/renderAutoMovieWorkspace.d.ts +8 -12
- package/lib/renderAutoMovieWorkspace.js +16 -14
- package/lib/renderAutoMovieWorkspace.js.map +1 -1
- package/lib/scaffoldSharedSkillPath.d.ts +13 -12
- package/lib/scaffoldSharedSkillPath.js +13 -12
- package/lib/scaffoldSharedSkillPath.js.map +1 -1
- package/package.json +6 -6
- package/scaffold/instructions/.agents/skills/3d-modeling/SKILL.md +2 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/coarse-forms.md +3 -1
- package/scaffold/instructions/.agents/skills/3d-modeling/materials.md +11 -0
- package/scaffold/instructions/.agents/skills/audio/SKILL.md +1 -1
- package/scaffold/instructions/.agents/skills/audio/acquisition.md +5 -1
- package/scaffold/instructions/.agents/skills/audio/film-sound.md +3 -1
- package/scaffold/instructions/.agents/skills/audio/soundtrack.md +14 -0
- package/scaffold/instructions/.agents/skills/contracts/development/SKILL.md +4 -2
- package/scaffold/instructions/.agents/skills/contracts/development/behaviors.md +3 -3
- package/scaffold/instructions/.agents/skills/contracts/development/catalog.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/development/composition.md +37 -25
- package/scaffold/instructions/.agents/skills/contracts/development/entities.md +3 -1
- package/scaffold/instructions/.agents/skills/contracts/development/films.md +39 -0
- package/scaffold/instructions/.agents/skills/contracts/development/testing.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/story/principles/research.md +1 -1
- package/scaffold/instructions/.agents/skills/development/SKILL.md +2 -4
- package/scaffold/instructions/.agents/skills/development/entities.md +14 -2
- package/scaffold/instructions/.agents/skills/development/modules.md +16 -6
- package/scaffold/instructions/.agents/skills/development/source-layout.md +6 -6
- package/scaffold/instructions/.agents/skills/development/testing.md +1 -1
- package/scaffold/instructions/.agents/skills/evidence/configuration.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/SKILL.md +4 -5
- package/scaffold/instructions/.agents/skills/motion/catalog-cases.md +3 -3
- package/scaffold/instructions/.agents/skills/motion/compose/composition.md +37 -18
- package/scaffold/instructions/.agents/skills/motion/compose/refusals.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/control-channels.md +4 -4
- package/scaffold/instructions/.agents/skills/motion/diffusion/SKILL.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/judgment.md +7 -3
- package/scaffold/instructions/.agents/skills/motion/laws/SKILL.md +2 -3
- package/scaffold/instructions/.agents/skills/motion/laws/method-references.md +4 -2
- package/scaffold/instructions/.agents/skills/motion/performance.md +2 -2
- package/scaffold/instructions/.agents/skills/motion/physical-feedback.md +6 -4
- package/scaffold/instructions/.agents/skills/motion/retargeting.md +1 -1
- package/scaffold/instructions/.agents/skills/motion/segment-review.md +1 -1
- package/scaffold/instructions/.agents/skills/motion/staging.md +12 -8
- package/scaffold/instructions/.agents/skills/multi-agent/$continuing.md +0 -0
- package/scaffold/instructions/.agents/skills/multi-agent/SKILL.md +8 -0
- package/scaffold/instructions/.agents/skills/production/SKILL.md +1 -2
- package/scaffold/instructions/.agents/skills/production/assembly.md +7 -5
- package/scaffold/instructions/.agents/skills/production/director.md +5 -5
- package/scaffold/instructions/.agents/skills/production/media-records.md +16 -1
- package/scaffold/instructions/.agents/skills/production/project-context.md +7 -13
- package/scaffold/instructions/.agents/skills/production/sustained-runs.md +3 -3
- package/scaffold/instructions/.agents/skills/production/workflow.md +1 -1
- package/scaffold/instructions/.agents/skills/review/delivery-review.md +4 -2
- package/scaffold/instructions/.agents/skills/review/source-review.md +3 -1
- package/scaffold/instructions/.agents/skills/story/answers.md +1 -1
- package/scaffold/instructions/.agents/skills/story/document-layout.md +2 -2
- package/scaffold/instructions/.agents/skills/story/layers/shots.md +1 -1
- package/scaffold/instructions/.agents/skills/story/planning/discovery.md +1 -1
- package/scaffold/instructions/.agents/skills/story/planning/research.md +2 -2
- package/scaffold/instructions/.agents/skills/story/workflow/routes.md +1 -1
- package/scaffold/instructions/.agents/skills/video/SKILL.md +1 -1
- package/scaffold/instructions/.agents/skills/video/diffusion/hints.md +1 -1
- package/scaffold/instructions/.agents/skills/video/direct-film.md +44 -9
- package/scaffold/instructions/.agents/skills/video/finishing.md +11 -3
- package/scaffold/instructions/.agents/skills/video/generated-film.md +1 -0
- package/scaffold/instructions/.agents/skills/video/requests.md +6 -2
- package/scaffold/instructions/AGENTS.md +21 -48
- package/scaffold/production/README.md +18 -99
- package/scaffold/production/package.json +3 -2
- package/scaffold/production/src/IFilm.ts +1 -6
- package/scaffold/production/src/IFilmProduction.ts +255 -31
- package/scaffold/production/src/clampProductionSeconds.ts +5 -8
- package/scaffold/production/src/composition/films/starter.ts +2 -7
- package/scaffold/production/src/executable/motionTake/IMotionTakeSource.ts +1 -2
- package/scaffold/production/src/executable/motionTake/assertMotionTakeBindings.ts +3 -10
- package/scaffold/production/src/executable/motionTake/collectMotionTakeFiles.ts +2 -6
- package/scaffold/production/src/executable/motionTake/hashMotionTakeFile.ts +2 -6
- package/scaffold/production/src/executable/motionTake/openMotionTake.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeArtifact.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeInstalledLock.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakePackageVersion.ts +2 -6
- package/scaffold/production/src/executable/motionTake/readMotionTakeSource.ts +2 -6
- package/scaffold/production/src/executable/motionTake/replayMotionTake.ts +2 -6
- package/scaffold/production/src/executable/motionTake/resolveMotionTakePath.ts +5 -12
- package/scaffold/production/src/executable/motionTake/verifyMotionTakeEditPrefix.ts +2 -6
- package/scaffold/production/src/executable/motionTake/writeMotionTakeArtifact.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/artifact/archiveAutoMovieRecoveryModel.ts +12 -19
- package/scaffold/production/src/executable/recovery/node/artifact/createAutoMovieRecoveryArtifact.ts +13 -26
- package/scaffold/production/src/executable/recovery/node/artifact/writeAutoMovieRecoveryArtifact.ts +16 -22
- package/scaffold/production/src/executable/recovery/node/internal/IAutoMovieRecoveryMemoryUsage.ts +1 -2
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTable.ts +11 -32
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTableInput.ts +5 -14
- package/scaffold/production/src/executable/recovery/node/internal/createRecoveryFileVectorTable.ts +6 -13
- package/scaffold/production/src/executable/recovery/node/internal/observeRecoveryAtlas.ts +16 -24
- package/scaffold/production/src/executable/recovery/node/internal/readAutoMovieRecoveryBoundedFile.ts +9 -17
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryCameraImages.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryFixedReference.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/recovery.ts +12 -17
- package/scaffold/production/src/executable/recovery/node/internal/recoveryAtlas.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraMap.ts +6 -12
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraScene.ts +2 -10
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameras.ts +2 -9
- package/scaffold/production/src/executable/recovery/node/internal/recoveryContourPath.ts +7 -11
- package/scaffold/production/src/executable/recovery/node/internal/recoveryImages.ts +6 -14
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryContourFileMesh.ts +10 -25
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryMeshSpool.ts +9 -15
- package/scaffold/production/src/executable/recovery/node/mesh/readAutoMovieRecoveryMeshFrontier.ts +10 -13
- package/scaffold/production/src/executable/recovery/node/publishAutoMovieRecoveryArtifact.ts +2 -6
- package/scaffold/production/src/executable/recovery/node/reconstruction/reconstructAutoMovieRecoveryLocal.ts +13 -19
- package/scaffold/production/src/executable/recovery/node/runAutoMovieRecoveryCommand.ts +4 -19
- package/scaffold/production/src/executable/verify.ts +11 -0
- package/scaffold/production/src/inspectFilmProduction.ts +252 -0
- package/scaffold/production/src/main.ts +1 -0
- package/scaffold/production/src/markFilmProduction.ts +31 -19
- package/scaffold/production/src/readFilmVerdicts.ts +43 -0
- package/scaffold/production/src/selectFilm.ts +2 -6
- package/scaffold/production/src/subjectOfFilm.ts +158 -0
- package/scaffold/production/src/subjects.ts +13 -61
- package/scaffold/production/test/features/test_clamp_production_seconds.ts +2 -4
- package/scaffold/production/test/features/test_inspect_film_production.ts +325 -0
- package/scaffold/production/test/features/test_recovery_publication_cancellation.ts +2 -4
- package/scaffold/production/test/features/test_select_film.ts +2 -4
- package/scaffold/production/test/features/test_subject_of_film.ts +95 -0
- package/scaffold/production/test/features/testing/test_test_execution.ts +2 -4
- package/scaffold/production/test/features/testing/test_test_selection.ts +2 -4
- package/scaffold/production/test/helpers/assessTestExecution.ts +4 -7
- package/scaffold/production/test/helpers/overlappingPerformance.ts +199 -0
- package/scaffold/production/test/tsconfig.json +4 -1
- package/scaffold/production/tsconfig.json +2 -6
- package/scaffold/production/vite.config.ts +25 -2
- package/scaffold/workspace/README.md +9 -28
- package/scaffold/workspace/package.json +1 -1
- package/src/IAutoMovieScaffoldProps.ts +12 -12
- package/src/assertScaffoldProjectName.ts +8 -10
- package/src/createAutoMovieScaffold.ts +35 -18
- package/src/listAutoMovieScaffoldFiles.ts +16 -12
- package/src/renderAutoMovieWorkspace.ts +20 -15
- package/src/scaffoldSharedSkillPath.ts +13 -12
- package/generated/skills/contracts/development/testing.md +0 -27
- package/scaffold/instructions/.agents/skills/automovie/SKILL.md +0 -32
- package/scaffold/instructions/.agents/skills/motion/laws/extension.md +0 -39
- package/scaffold/instructions/.agents/skills/production/stage-caches.md +0 -26
- package/scaffold/production/src/executable/recovery/node/internal/recoveryLocal.ts +0 -153
- package/scaffold/production/src/executable/recovery/node/internal/recoveryOpen.ts +0 -237
- package/scaffold/production/tsconfig.test.json +0 -9
- /package/scaffold/instructions/.agents/skills/{contracts/development/$testing.md → 3d-modeling/$environments.md} +0 -0
|
@@ -2,7 +2,10 @@ import * as fs from "node:fs";
|
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Directory names the scaffold never ships, whatever a host leaves there: a
|
|
5
|
+
* Directory names the scaffold never ships, whatever a host leaves there: a
|
|
6
|
+
* generated project installs its own dependencies and builds its own caches, so
|
|
7
|
+
* anything under these names is a working artifact of whoever ran a tool inside
|
|
8
|
+
* the scaffold directory.
|
|
6
9
|
*/
|
|
7
10
|
const UNSHIPPED_DIRECTORIES: ReadonlySet<string> = new Set([
|
|
8
11
|
".cache",
|
|
@@ -11,26 +14,27 @@ const UNSHIPPED_DIRECTORIES: ReadonlySet<string> = new Set([
|
|
|
11
14
|
]);
|
|
12
15
|
|
|
13
16
|
/**
|
|
14
|
-
* Compiler outputs, which are never authored scaffold inputs. Every executable
|
|
17
|
+
* Compiler outputs, which are never authored scaffold inputs. Every executable
|
|
18
|
+
* scaffold source is TypeScript, and a generated project's loader would prefer
|
|
19
|
+
* an emitted `.js` next to its `.ts`, so an earlier local compilation must not
|
|
20
|
+
* ship its modules, maps, declarations, or build info.
|
|
15
21
|
*/
|
|
16
22
|
const UNSHIPPED_FILES: RegExp =
|
|
17
23
|
/(?:\.(?:c|m)?js(?:\.map)?|\.d\.(?:c|m)?ts|\.tsbuildinfo)$/u;
|
|
18
24
|
|
|
19
25
|
/**
|
|
20
|
-
* List every shipped file under `root`, as root-relative paths with the host's
|
|
26
|
+
* List every shipped file under `root`, as root-relative paths with the host's
|
|
27
|
+
* separator, in a deterministic order.
|
|
21
28
|
*
|
|
22
|
-
* The walk skips any directory named `.cache`, `.git`, or `node_modules` at any
|
|
29
|
+
* The walk skips any directory named `.cache`, `.git`, or `node_modules` at any
|
|
30
|
+
* depth, and any file whose name ends in `.js`, `.cjs`, `.mjs`, their `.map`,
|
|
31
|
+
* `.d.ts`, `.d.cts`, `.d.mts`, or `.tsbuildinfo`. Entries that are neither a
|
|
32
|
+
* plain directory nor a plain file, such as symbolic links, are skipped. Each
|
|
33
|
+
* directory's entries are visited in UTF-16 code-unit order of their names, so
|
|
34
|
+
* the listing is identical on every host.
|
|
23
35
|
*
|
|
24
36
|
* @param root Absolute scaffold directory.
|
|
25
37
|
* @returns The shipped files.
|
|
26
|
-
*
|
|
27
|
-
* @evidence contracts/development/implementation.md#principled-implementation A depth-first walk over `readdirSync` with file types visits each entry once without a stat per entry; names are compared with relational operators, which order by code unit independent of the host locale, unlike `localeCompare`; skipping symbolic links relies on the premise that the authored scaffold contains none, so a link is never shipped as a copy of its target.
|
|
28
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The two exclusion constants are the whole shipping policy and sit beside the walk, so `createAutoMovieScaffold` and the prepare script receive the population without deciding it.
|
|
29
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Exclusions are by directory name and output-file shape only, with no exception for any particular file or fixture.
|
|
30
|
-
* @evidence contracts/development/common.md#meaningful-documentation The comment lists every excluded directory and file shape, states that links are skipped, and states the path form and the order of the result.
|
|
31
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms The walk is linear in the number of entries under `root` plus a per-directory sort of its entries, never descending into an excluded directory, so a populated `node_modules` costs one skipped entry.
|
|
32
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call lists the directory as it is on disk now, and each caller lists once per scaffold layer or shared item.
|
|
33
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources `readdirSync` opens and closes each directory before returning, the recursion depth equals the scaffold's directory depth, and only the result array is retained, holding one string per shipped file.
|
|
34
38
|
*/
|
|
35
39
|
export const listAutoMovieScaffoldFiles: (root: string) => string[] = (
|
|
36
40
|
root: string,
|
|
@@ -2,7 +2,10 @@ import * as fs from "node:fs";
|
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
import { type Document, isMap, parseDocument, stringify, visit } from "yaml";
|
|
4
4
|
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Catalog dependencies and build policy collected from the shipped manifests at
|
|
7
|
+
* build time.
|
|
8
|
+
*/
|
|
6
9
|
interface IScaffoldSettings {
|
|
7
10
|
automovie: string[];
|
|
8
11
|
catalogs: Record<string, Record<string, string>>;
|
|
@@ -12,20 +15,16 @@ interface IScaffoldSettings {
|
|
|
12
15
|
/**
|
|
13
16
|
* Render pnpm settings for a new production or workspace. Given an existing
|
|
14
17
|
* workspace's directory and YAML, fill missing scaffold catalog entries.
|
|
15
|
-
* Existing pins, overrides, workspace members and build policy keep their
|
|
16
|
-
* A linked SDK supplies missing scoped packages when their sibling
|
|
17
|
-
* identify them. Other new entries use the installed scaffold's
|
|
18
|
+
* Existing pins, overrides, workspace members and build policy keep their
|
|
19
|
+
* values. A linked SDK supplies missing scoped packages when their sibling
|
|
20
|
+
* manifests identify them. Other new entries use the installed scaffold's
|
|
21
|
+
* ranges.
|
|
18
22
|
*
|
|
19
|
-
* @param workspace The new layout or the existing workspace whose catalogs the
|
|
20
|
-
*
|
|
23
|
+
* @param workspace The new layout or the existing workspace whose catalogs the
|
|
24
|
+
* CLI needs.
|
|
25
|
+
* @returns Workspace YAML, byte-for-byte unchanged when every required entry
|
|
26
|
+
* exists.
|
|
21
27
|
* @throws If the shipped settings or workspace YAML cannot be read as required.
|
|
22
|
-
* @evidence contracts/development/implementation.md#principled-implementation Both paths resolve the shipped manifests' catalog references from the same build settings and template version. Local SDK lookup requires an existing link and the requested package identity.
|
|
23
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The layout selects creation or completion. The YAML document owns edits and the caller owns the write.
|
|
24
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The build discovers the dependencies. Package names and workspace layouts follow their published conventions.
|
|
25
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms The existing document is parsed once and each required entry is visited once. Only missing SDK entries probe sibling manifests in distinct linked directories.
|
|
26
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Both layouts share the resolved defaults. SDK directories are deduplicated per document.
|
|
27
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources File reads close synchronously. Parsed settings, document and link directories live for one call.
|
|
28
|
-
* @evidence contracts/development/common.md#meaningful-documentation The comment describes each mode, precedence, return value and failure.
|
|
29
28
|
*/
|
|
30
29
|
export function renderAutoMovieWorkspace(
|
|
31
30
|
workspace: "production" | "workspace" | { directory: string; source: string },
|
|
@@ -107,7 +106,10 @@ export function renderAutoMovieWorkspace(
|
|
|
107
106
|
return changed ? document.toString() : workspace.source;
|
|
108
107
|
}
|
|
109
108
|
|
|
110
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Give this path its own entries, preserving the old values at other uses of
|
|
111
|
+
* its anchor.
|
|
112
|
+
*/
|
|
111
113
|
function isolateMapping(
|
|
112
114
|
document: Document,
|
|
113
115
|
keys: string[],
|
|
@@ -134,7 +136,10 @@ function mapping(value: unknown, key: string): Map<string, unknown> {
|
|
|
134
136
|
throw new Error(`${key} must be a mapping in pnpm-workspace.yaml`);
|
|
135
137
|
}
|
|
136
138
|
|
|
137
|
-
/**
|
|
139
|
+
/**
|
|
140
|
+
* Resolve a missing scoped SDK package beside the workspace's linked SDK
|
|
141
|
+
* packages.
|
|
142
|
+
*/
|
|
138
143
|
function linkedSibling(
|
|
139
144
|
root: string,
|
|
140
145
|
directories: Set<string>,
|
|
@@ -4,20 +4,21 @@ import * as path from "node:path";
|
|
|
4
4
|
const PLACEHOLDER: RegExp = /^\$([a-zA-Z0-9_-][a-zA-Z0-9_.-]*)$/u;
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* The repository skill path a scaffold placeholder stands for, or `null` when
|
|
7
|
+
* The repository skill path a scaffold placeholder stands for, or `null` when
|
|
8
|
+
* the file is not a placeholder.
|
|
8
9
|
*
|
|
9
|
-
* A placeholder is a file under the scaffold's `.agents/skills` whose name is
|
|
10
|
+
* A placeholder is a file under the scaffold's `.agents/skills` whose name is
|
|
11
|
+
* `$` followed by the name of a repository item at the same place under the
|
|
12
|
+
* repository's `.agents/skills`: `$documentation` stands for the whole
|
|
13
|
+
* `documentation` folder and `development/$repair.md` for the single
|
|
14
|
+
* `development/repair.md` file. The placeholder holds no text; the build copies
|
|
15
|
+
* the item it names and the scaffold reader ships that item in its place, so
|
|
16
|
+
* each shared text has one source.
|
|
10
17
|
*
|
|
11
|
-
* @param relative Scaffold-relative file path with the host's separator, as
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One predicate owns the placeholder rule for both the build step that copies the named items and the reader that ships them, so the two cannot disagree on which files are placeholders.
|
|
16
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The rule depends only on the `$` prefix and the location under `.agents/skills`, with no list of particular skills or files.
|
|
17
|
-
* @evidence contracts/development/common.md#meaningful-documentation The comment defines a placeholder, gives both the folder and file forms, states what the build and the reader do with it, and describes the parameter's separator and the result's form.
|
|
18
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Splitting the path and testing one name is linear in the path length.
|
|
19
|
-
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call classifies one path from its text alone; there is no shared work to reuse.
|
|
20
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only call-local component arrays are allocated; no filesystem resource is acquired.
|
|
18
|
+
* @param relative Scaffold-relative file path with the host's separator, as
|
|
19
|
+
* {@link listAutoMovieScaffoldFiles} returns it.
|
|
20
|
+
* @returns The named item's path relative to `.agents/skills`, with `/`
|
|
21
|
+
* separators and the `$` removed, or `null`.
|
|
21
22
|
*/
|
|
22
23
|
export const scaffoldSharedSkillPath: (relative: string) => string | null = (
|
|
23
24
|
relative: string,
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# Testing
|
|
2
|
-
|
|
3
|
-
Each exported test function answers this checklist and [common](common.md) from its assertions and execution path, including cases registered by a shared harness.
|
|
4
|
-
|
|
5
|
-
## Behavioral verification
|
|
6
|
-
|
|
7
|
-
Exercise the behavior and assert its observable result. Delete checks of repository layout or source text and checks that repeat tuned constants, fitted results or implementation output.
|
|
8
|
-
|
|
9
|
-
State the operation exercised, the defect the assertions catch, and the valid behavior they allow.
|
|
10
|
-
|
|
11
|
-
## Independent expectations
|
|
12
|
-
|
|
13
|
-
Derive expected values and tolerances from the supported contract, a specification, a physical requirement, a study of the real practice, or another independent reference, never from the implementation under test or a snapshot of its output.
|
|
14
|
-
|
|
15
|
-
State that basis, how the assertion would catch a wrong implementation, and any oracle limitation.
|
|
16
|
-
|
|
17
|
-
## Distinguishing cases
|
|
18
|
-
|
|
19
|
-
Cover positive, adjacent negative and boundary cases. Identify the input that must change, the meaning to preserve, and any empty, singleton, limit, malformed or failure case the decision requires. Keep the assertions and cases when optimizing runtime.
|
|
20
|
-
|
|
21
|
-
State this test's contribution and the cases another test owns.
|
|
22
|
-
|
|
23
|
-
## Execution ownership
|
|
24
|
-
|
|
25
|
-
A unit test exercises portable behavior with explicit in-memory inputs. Installation, native builds and real hosts belong to other checks. Playback, renders and listening belong to review. Classify a test by what it runs.
|
|
26
|
-
|
|
27
|
-
State the layer, the discoverable entry, and who owns dynamically registered cases.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: automovie
|
|
3
|
-
description: Maps each production need onto the installed AutoMovie package that provides it.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# AutoMovie packages
|
|
7
|
-
|
|
8
|
-
Find the installed package that owns the capability and read its API before writing code.
|
|
9
|
-
|
|
10
|
-
## Packages
|
|
11
|
-
|
|
12
|
-
| Package | Role in the skills | Provides |
|
|
13
|
-
| --- | --- | --- |
|
|
14
|
-
| `@automovie/archetypes` | Archetypes | An object people use, with its affordances |
|
|
15
|
-
| `@automovie/engine` | Engine | Validation, scheduling and film time |
|
|
16
|
-
| `@automovie/evidence` | Evidence package | The check of contract answers |
|
|
17
|
-
| `@automovie/human` | Human package | A person's body |
|
|
18
|
-
| `@automovie/ingest` | Ingest package | Decoding external models and media |
|
|
19
|
-
| `@automovie/interface` | Interface package | The types of authored data |
|
|
20
|
-
| `@automovie/motions` | Motion vocabulary | What each person or group does |
|
|
21
|
-
| `@automovie/recovery` | Recovery package | Curves recovered from a fixed mesh |
|
|
22
|
-
| `@automovie/render` | Renderer | Drawing, inspection, capture and encoding |
|
|
23
|
-
| `@automovie/viewer` | Viewer | The picture on a page, with playback |
|
|
24
|
-
| `automovie` | Command-line tool | Creating productions and running commands |
|
|
25
|
-
|
|
26
|
-
The skills use package roles from the table. [Entity work](../development/entities.md#objects) defines affordances.
|
|
27
|
-
|
|
28
|
-
## Reading a package
|
|
29
|
-
|
|
30
|
-
Read the installed README for entry points and the public types and JSDoc under `node_modules` for units, limits and refusals.
|
|
31
|
-
|
|
32
|
-
Use the installed function or primitive that performs the work. If the API lacks a capability, inspect the owning package's `src/` next to its installed `package.json`. If source is absent, use the repository named in that manifest at the installed version's revision. Follow the nearest implementation's frames, units, ownership and validation conventions when extending it. Send reusable gaps to the package owner.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
# Vocabulary extension
|
|
2
|
-
|
|
3
|
-
Use the first applicable route below. User-chosen generated or traced motion follows [motion diffusion](../diffusion/SKILL.md).
|
|
4
|
-
|
|
5
|
-
## Routes
|
|
6
|
-
|
|
7
|
-
### Composing again
|
|
8
|
-
|
|
9
|
-
Check the closest action's parameters and the [operators](../compose/composition.md#operators). Try another target, effector, object, manner or seed, or compose actions with an overlay or mutual join.
|
|
10
|
-
|
|
11
|
-
Send an installed action that fails under documented use to its [package owner](../compose/refusals.md#when-no-repair-holds).
|
|
12
|
-
|
|
13
|
-
### Registering a row
|
|
14
|
-
|
|
15
|
-
Register a missing table row as the README specifies. Its owning action keeps the open parameters and operators.
|
|
16
|
-
|
|
17
|
-
### Registering a law
|
|
18
|
-
|
|
19
|
-
Write a law only when the missing action owns what no shipped action plans:
|
|
20
|
-
|
|
21
|
-
- a change of base, such as a way onto or off a support;
|
|
22
|
-
- an outcome rule between performers;
|
|
23
|
-
- a planner of its own, for a path, a pattern of steps or a sequence no shipped planner lays out.
|
|
24
|
-
|
|
25
|
-
Register the law with the vocabulary as its README shows, and the vocabulary composes, cuts, refuses and checks it like its own actions.
|
|
26
|
-
|
|
27
|
-
### Other moving bodies
|
|
28
|
-
|
|
29
|
-
Use the installed model and motion capabilities for other moving bodies. Extend a missing reusable capability at its owner, following [physical feedback](../physical-feedback.md) when a scripted response requires simulation.
|
|
30
|
-
|
|
31
|
-
## What an extension owes
|
|
32
|
-
|
|
33
|
-
Confirm the [research](../../story/planning/research.md#what-needs-a-study) first. Put the extension in its [laws folder](../../development/source-layout.md#source) and answer the [behaviors contract](../../contracts/development/behaviors.md). [Test](../../development/testing.md#motion-checks) against the study and accept a [catalog case](../catalog-cases.md).
|
|
34
|
-
|
|
35
|
-
A row takes only its study's values. A law follows the pages this skill's router lists.
|
|
36
|
-
|
|
37
|
-
## Sending it upstream
|
|
38
|
-
|
|
39
|
-
Share a row or a law other productions would need as a [shared module](../../development/modules.md#shared-modules) of the workspace, tell the user, and keep the registered one in the production until the package ships it. Tell the user of an action registration cannot express.
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Stage caches
|
|
2
|
-
|
|
3
|
-
Cache and resume each expensive stage.
|
|
4
|
-
|
|
5
|
-
## Stage keys
|
|
6
|
-
|
|
7
|
-
Keep each stage's result as a content-addressed artifact in an ignored folder under `.cache/`, keyed by a digest of every input that affects its output:
|
|
8
|
-
|
|
9
|
-
- its declared source, data, parameters and seeds;
|
|
10
|
-
- the digests of the artifacts it consumes;
|
|
11
|
-
- its own implementation version and the installed package versions;
|
|
12
|
-
- the toolchain and renderer environment, such as browser build, graphics backend, fonts and encoder.
|
|
13
|
-
|
|
14
|
-
Read only inputs covered by the key. See [Bazel's hermeticity guide](https://bazel.build/basics/hermeticity).
|
|
15
|
-
|
|
16
|
-
Record input and output digests. Reuse a stage only if its own key and artifact digest still match, even after an upstream stage recomputes.
|
|
17
|
-
|
|
18
|
-
A captured frame is reusable only as a pure function of resolved state and frame index under [frame evaluation](../motion/frame-evaluation.md#sampling-and-retained-state). Reuse a valid simulation playback archive to sample a checked response.
|
|
19
|
-
|
|
20
|
-
Use the caches the installed packages provide rather than writing one in the production.
|
|
21
|
-
|
|
22
|
-
## Cache checks and cleanup
|
|
23
|
-
|
|
24
|
-
An unchanged rerun recomputes nothing. Before delivery, bypass the cache for a sample and compare digests. Fix missing key inputs or nondeterminism and delete affected entries.
|
|
25
|
-
|
|
26
|
-
Keep caches untracked and reproducible. Leave collection of unreferenced package cache entries to their owners. Rebuild a cache when its validity is uncertain.
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IAutoMovieRecoveryOpenContinuation,
|
|
3
|
-
IAutoMovieRecoveryTensorFamiliesInput,
|
|
4
|
-
} from "@automovie/interface";
|
|
5
|
-
import {
|
|
6
|
-
applyAutoMovieRecoveryAnalyticPublication,
|
|
7
|
-
restoreRecoveryCurveBasis,
|
|
8
|
-
} from "@automovie/recovery";
|
|
9
|
-
import { createHash } from "node:crypto";
|
|
10
|
-
import fs from "node:fs";
|
|
11
|
-
import path from "node:path";
|
|
12
|
-
|
|
13
|
-
import { archiveAutoMovieRecoveryModel } from "../artifact/archiveAutoMovieRecoveryModel";
|
|
14
|
-
import { reconstructAutoMovieRecoveryLocal } from "../reconstruction/reconstructAutoMovieRecoveryLocal";
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Consume immutable absolute curves and source-free graph with the local Hermite engine.
|
|
18
|
-
* Usage: recoveryLocal curves.json continuation.json model.json ruled|quadratic [final-only|final-only-gzip] [analytic-publication.json]. Source registration
|
|
19
|
-
* remains bound through the generating publications; this command opens no source mesh.
|
|
20
|
-
* Default prefixes favor the longest open-only declared interval family. Final-only avoids repeated prefix serialization. Final-only-gzip also reverse-verifies a lossless archive before retiring the served raw model and spool; its output must be named model.json. The optional source-free extension binds both original byte hashes, replaces named coefficients once and declares analytic ownership.
|
|
21
|
-
* The final log's file, bytes and sha256 describe the served publication; gzip also reports logicalBytes and logicalSha256 for the decompressed model.
|
|
22
|
-
*
|
|
23
|
-
* @evidence contracts/development/implementation.md#principled-implementation Complete-byte hashes admit the saved coefficient authority and its explicit graph before the engine creates independent indexed geometry through its public cubic and streaming contracts.
|
|
24
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One CLI owns input admission and epoch binding; reconstruction owns graph transport, the engine owns mathematics, and spool publication owns bounded file assembly.
|
|
25
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No source vertices, indices, normals, selected hand-authored planes or external mesh substitution enter this command.
|
|
26
|
-
* @evidence contracts/development/common.md#meaningful-documentation States changed operator entry, immutable generating inputs, publication ordering and explicit unfinished checkpoints.
|
|
27
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Each input is read and hashed once; generating and output costs are delegated to the source-free local engine and spool consumer. Optional gzip storage encodes the logical model once and fully reverse-decodes the compressed stream before raw retirement.
|
|
28
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work Existing coefficients and endpoint graph are reused without observation or fitting. Actual emitted fragments serve checkpoint and final output.
|
|
29
|
-
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Parsed bundle and graph are call-owned. Read buffers expire after admission; the consumer releases emitted chunks to bounded disk staging. File handles close synchronously and existing publications remain immutable.
|
|
30
|
-
*/
|
|
31
|
-
export async function recoveryLocal(
|
|
32
|
-
args: string[],
|
|
33
|
-
sourceEpoch: string,
|
|
34
|
-
): Promise<void> {
|
|
35
|
-
const [
|
|
36
|
-
curves,
|
|
37
|
-
continuation,
|
|
38
|
-
output,
|
|
39
|
-
operator,
|
|
40
|
-
publication,
|
|
41
|
-
analytic,
|
|
42
|
-
]: string[] = args;
|
|
43
|
-
if (
|
|
44
|
-
args.length > 6 ||
|
|
45
|
-
(publication !== undefined &&
|
|
46
|
-
publication !== "final-only" &&
|
|
47
|
-
publication !== "final-only-gzip") ||
|
|
48
|
-
!curves ||
|
|
49
|
-
!continuation ||
|
|
50
|
-
!output ||
|
|
51
|
-
!sourceEpoch ||
|
|
52
|
-
!/^[a-f0-9]{40,64}$/i.test(sourceEpoch) ||
|
|
53
|
-
(operator !== "ruled" && operator !== "quadratic")
|
|
54
|
-
)
|
|
55
|
-
throw new Error(
|
|
56
|
-
"Usage: recoveryLocal curves continuation output ruled|quadratic [final-only|final-only-gzip] [analytic-publication.json] with source epoch argument",
|
|
57
|
-
);
|
|
58
|
-
if (
|
|
59
|
-
publication === "final-only-gzip" &&
|
|
60
|
-
(path.basename(output) !== "model.json" ||
|
|
61
|
-
fs.existsSync(path.resolve(output) + ".gz") ||
|
|
62
|
-
fs.existsSync(
|
|
63
|
-
path.join(
|
|
64
|
-
path.dirname(path.resolve(output)),
|
|
65
|
-
"model-storage-receipt.json",
|
|
66
|
-
),
|
|
67
|
-
))
|
|
68
|
-
)
|
|
69
|
-
throw new Error(
|
|
70
|
-
"Lossless final storage requires an unused model.json archive and receipt",
|
|
71
|
-
);
|
|
72
|
-
const started: number = performance.now();
|
|
73
|
-
const read: (file: string) => { value: unknown; sha256: string } = (
|
|
74
|
-
file: string,
|
|
75
|
-
): { value: unknown; sha256: string } => {
|
|
76
|
-
const bytes: Buffer = fs.readFileSync(file);
|
|
77
|
-
return {
|
|
78
|
-
value: JSON.parse(bytes.toString("utf8")) as unknown,
|
|
79
|
-
sha256: createHash("sha256").update(bytes).digest("hex"),
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
const saved: ReturnType<typeof read> = read(curves),
|
|
83
|
-
topology: ReturnType<typeof read> = read(continuation);
|
|
84
|
-
const graph: IAutoMovieRecoveryOpenContinuation & {
|
|
85
|
-
provenance: { curveBundleSha256: string };
|
|
86
|
-
} = topology.value as IAutoMovieRecoveryOpenContinuation & {
|
|
87
|
-
provenance: { curveBundleSha256: string };
|
|
88
|
-
};
|
|
89
|
-
if (graph.provenance.curveBundleSha256 !== saved.sha256)
|
|
90
|
-
throw new Error(
|
|
91
|
-
"Continuation does not bind this exact coefficient publication",
|
|
92
|
-
);
|
|
93
|
-
console.error(
|
|
94
|
-
JSON.stringify({
|
|
95
|
-
phase: "local-input-admitted",
|
|
96
|
-
sourceEpoch,
|
|
97
|
-
curveBundleSha256: saved.sha256,
|
|
98
|
-
continuationSha256: topology.sha256,
|
|
99
|
-
memory: process.memoryUsage(),
|
|
100
|
-
elapsedMs: performance.now() - started,
|
|
101
|
-
}),
|
|
102
|
-
);
|
|
103
|
-
let bundle: IAutoMovieRecoveryTensorFamiliesInput = restoreRecoveryCurveBasis(
|
|
104
|
-
saved.value,
|
|
105
|
-
) as IAutoMovieRecoveryTensorFamiliesInput;
|
|
106
|
-
let analyticPublicationSha256: string | undefined;
|
|
107
|
-
if (analytic) {
|
|
108
|
-
if (fs.statSync(analytic).size > 256 * 1024 * 1024)
|
|
109
|
-
throw new Error(
|
|
110
|
-
"Analytic publication exceeds the declared 256 MiB input budget",
|
|
111
|
-
);
|
|
112
|
-
const extension: ReturnType<typeof read> = read(analytic);
|
|
113
|
-
bundle = applyAutoMovieRecoveryAnalyticPublication(
|
|
114
|
-
bundle,
|
|
115
|
-
restoreRecoveryCurveBasis(extension.value) as Parameters<
|
|
116
|
-
typeof applyAutoMovieRecoveryAnalyticPublication
|
|
117
|
-
>[1],
|
|
118
|
-
{ curveBundleSha256: saved.sha256, continuationSha256: topology.sha256 },
|
|
119
|
-
);
|
|
120
|
-
analyticPublicationSha256 = extension.sha256;
|
|
121
|
-
}
|
|
122
|
-
const result: ReturnType<typeof reconstructAutoMovieRecoveryLocal> =
|
|
123
|
-
reconstructAutoMovieRecoveryLocal(bundle, graph, path.resolve(output), {
|
|
124
|
-
sourceEpoch,
|
|
125
|
-
curveBundleSha256: saved.sha256,
|
|
126
|
-
continuationSha256: topology.sha256,
|
|
127
|
-
operator,
|
|
128
|
-
publishCheckpoints: publication === undefined,
|
|
129
|
-
analyticPublicationSha256,
|
|
130
|
-
});
|
|
131
|
-
const archive:
|
|
132
|
-
| Awaited<ReturnType<typeof archiveAutoMovieRecoveryModel>>
|
|
133
|
-
| undefined =
|
|
134
|
-
publication === "final-only-gzip"
|
|
135
|
-
? await archiveAutoMovieRecoveryModel({
|
|
136
|
-
output: path.dirname(path.resolve(output)),
|
|
137
|
-
path: path.resolve(output),
|
|
138
|
-
bytes: result.bytes,
|
|
139
|
-
sha256: result.sha256,
|
|
140
|
-
})
|
|
141
|
-
: undefined;
|
|
142
|
-
console.log(
|
|
143
|
-
JSON.stringify({
|
|
144
|
-
phase: "local-final",
|
|
145
|
-
...result,
|
|
146
|
-
...(archive ?? {}),
|
|
147
|
-
file: archive?.path ?? path.resolve(output),
|
|
148
|
-
archive,
|
|
149
|
-
memory: process.memoryUsage(),
|
|
150
|
-
elapsedMs: performance.now() - started,
|
|
151
|
-
}),
|
|
152
|
-
);
|
|
153
|
-
}
|