@inneranimalmedia/primetech-procedures 0.0.0-stage → 2.6.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/.codex-plugin/plugin.json +39 -0
  2. package/LICENSE +110 -0
  3. package/README.md +181 -2
  4. package/agents/openai.yaml +6 -0
  5. package/agentsam.package.json +80 -0
  6. package/assets/architect-icon.svg +10 -0
  7. package/assets/primetech-design-studio.svg +7 -0
  8. package/companion.json +40 -0
  9. package/package.json +56 -4
  10. package/plugin.README.md +37 -0
  11. package/plugin.json +43 -0
  12. package/procedures/arch.assembly.calculate/procedure.json +83 -0
  13. package/procedures/cad.motor-bearing-end-plate/README.md +21 -0
  14. package/procedures/cad.motor-bearing-end-plate/build_freecad.py +514 -0
  15. package/procedures/cad.motor-bearing-end-plate/finalize_bundle.py +26 -0
  16. package/procedures/cad.motor-bearing-end-plate/generate_assets.py +284 -0
  17. package/procedures/cad.motor-bearing-end-plate/generate_toolpaths.py +715 -0
  18. package/procedures/cad.motor-bearing-end-plate/package_artifacts.py +154 -0
  19. package/procedures/cad.motor-bearing-end-plate/parameters.json +51 -0
  20. package/procedures/cad.motor-bearing-end-plate/procedure.json +101 -0
  21. package/procedures/cad.motor-bearing-end-plate/render_preview.py +98 -0
  22. package/procedures/cad.motor-bearing-end-plate/run.py +214 -0
  23. package/procedures/cad.motor-bearing-end-plate/test_generate_toolpaths.py +50 -0
  24. package/procedures/media.asset.preflight/procedure.json +85 -0
  25. package/procedures/media.image.optimize-asset/procedure.json +102 -0
  26. package/procedures/primetech.assets.package/procedure.json +63 -0
  27. package/procedures/primetech.design-system.package/procedure.json +58 -0
  28. package/procedures/primetech.ebook.package/procedure.json +53 -0
  29. package/procedures/primetech.icon-family.build/procedure.json +101 -0
  30. package/procedures/primetech.production-board.manage/procedure.json +156 -0
  31. package/procedures/primetech.sprite-atlas.build/procedure.json +86 -0
  32. package/procedures/primetech.typeface.package/procedure.json +61 -0
  33. package/procedures/primetech.visuals.compare/procedure.json +74 -0
  34. package/procedures/repo.asset.inventory/procedure.json +65 -0
  35. package/procedures/repo.asset.inventory/run.py +116 -0
  36. package/procedures/repo.asset.inventory/run.sh +11 -0
  37. package/procedures/repo.git.status/procedure.json +58 -0
  38. package/procedures/repo.git.status/run.sh +10 -0
  39. package/profiles/PRIMETECH_PROCEDURE_ENGINEER.md +25 -0
  40. package/scripts/generate-procedures.py +112 -0
  41. package/scripts/generate-skills.py +425 -0
  42. package/scripts/package-openai-plugin.py +94 -0
  43. package/skills/primetech-brand-kit/SKILL.md +40 -0
  44. package/skills/primetech-brand-kit/agentsam.skill.json +64 -0
  45. package/skills/primetech-character-sprites/SKILL.md +40 -0
  46. package/skills/primetech-character-sprites/agentsam.skill.json +64 -0
  47. package/skills/primetech-creative-delivery/SKILL.md +39 -0
  48. package/skills/primetech-creative-delivery/agentsam.skill.json +57 -0
  49. package/skills/primetech-design-systems/SKILL.md +43 -0
  50. package/skills/primetech-design-systems/agentsam.skill.json +57 -0
  51. package/skills/primetech-digital-publishing/SKILL.md +39 -0
  52. package/skills/primetech-digital-publishing/agentsam.skill.json +52 -0
  53. package/skills/primetech-iconography/SKILL.md +40 -0
  54. package/skills/primetech-iconography/agentsam.skill.json +53 -0
  55. package/skills/primetech-type-design/SKILL.md +40 -0
  56. package/skills/primetech-type-design/agentsam.skill.json +53 -0
  57. package/skills/primetech-ui-ux-prototypes/SKILL.md +43 -0
  58. package/skills/primetech-ui-ux-prototypes/agentsam.skill.json +64 -0
  59. package/skills/primetech-visual-qa/SKILL.md +39 -0
  60. package/skills/primetech-visual-qa/agentsam.skill.json +56 -0
  61. package/src/creative/asset-package.js +42 -0
  62. package/src/creative/design-system.js +107 -0
  63. package/src/creative/ebook.js +88 -0
  64. package/src/creative/icon-family.js +125 -0
  65. package/src/creative/index.d.ts +157 -0
  66. package/src/creative/index.js +7 -0
  67. package/src/creative/paths.js +64 -0
  68. package/src/creative/sprite-atlas.js +100 -0
  69. package/src/creative/typeface.js +154 -0
  70. package/src/creative/visual-qa.js +88 -0
  71. package/src/index.d.ts +160 -0
  72. package/src/index.js +656 -0
  73. package/src/production-board.d.ts +103 -0
  74. package/src/production-board.js +181 -0
  75. package/src/skills.d.ts +48 -0
  76. package/src/skills.js +101 -0
@@ -0,0 +1,86 @@
1
+ {
2
+ "schema": "inneranimalmedia.primetech.procedure.v1",
3
+ "id": "primetech.sprite-atlas.build",
4
+ "version": "1.0.0",
5
+ "summary": "Pack ordered character or pet frames into a transparent sprite atlas with frame metadata and preview.",
6
+ "effect": "project_write",
7
+ "capabilities": [
8
+ "primetech.sprite-atlas.build"
9
+ ],
10
+ "runtime": {
11
+ "kind": "sam_operation",
12
+ "operation": "primetech.sprite-atlas.build"
13
+ },
14
+ "input_schema": {
15
+ "type": "object",
16
+ "required": [
17
+ "framePaths"
18
+ ],
19
+ "properties": {
20
+ "framePaths": {
21
+ "type": "array",
22
+ "minItems": 1,
23
+ "maxItems": 256,
24
+ "items": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 240
28
+ }
29
+ },
30
+ "outputDir": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 240
34
+ },
35
+ "columns": {
36
+ "type": "integer",
37
+ "minimum": 1,
38
+ "maximum": 32
39
+ },
40
+ "cellWidth": {
41
+ "type": "integer",
42
+ "minimum": 1,
43
+ "maximum": 4096
44
+ },
45
+ "cellHeight": {
46
+ "type": "integer",
47
+ "minimum": 1,
48
+ "maximum": 4096
49
+ },
50
+ "padding": {
51
+ "type": "integer",
52
+ "minimum": 0,
53
+ "maximum": 128
54
+ },
55
+ "fps": {
56
+ "type": "integer",
57
+ "minimum": 1,
58
+ "maximum": 60
59
+ },
60
+ "loop": {
61
+ "type": "boolean"
62
+ }
63
+ },
64
+ "additionalProperties": false
65
+ },
66
+ "output_schema": {
67
+ "type": "object",
68
+ "properties": {
69
+ "ok": {
70
+ "type": "boolean"
71
+ }
72
+ },
73
+ "required": [
74
+ "ok"
75
+ ],
76
+ "additionalProperties": true
77
+ },
78
+ "verification": {
79
+ "kind": "output_schema"
80
+ },
81
+ "flags": {
82
+ "network": false,
83
+ "physical_hardware": false,
84
+ "requires_operator_review": true
85
+ }
86
+ }
@@ -0,0 +1,61 @@
1
+ {
2
+ "schema": "inneranimalmedia.primetech.procedure.v1",
3
+ "id": "primetech.typeface.package",
4
+ "version": "1.0.0",
5
+ "summary": "Validate Typeface Studio glyph geometry and produce a verified static TTF, source package and specimen.",
6
+ "effect": "project_write",
7
+ "capabilities": [
8
+ "primetech.typeface.package"
9
+ ],
10
+ "runtime": {
11
+ "kind": "sam_operation",
12
+ "operation": "primetech.typeface.package"
13
+ },
14
+ "input_schema": {
15
+ "type": "object",
16
+ "required": [
17
+ "sourcePath"
18
+ ],
19
+ "properties": {
20
+ "sourcePath": {
21
+ "type": "string",
22
+ "minLength": 1,
23
+ "maxLength": 240
24
+ },
25
+ "outputDir": {
26
+ "type": "string",
27
+ "minLength": 1,
28
+ "maxLength": 240
29
+ },
30
+ "licenseText": {
31
+ "type": "string",
32
+ "maxLength": 20000
33
+ },
34
+ "specimenText": {
35
+ "type": "string",
36
+ "maxLength": 4000
37
+ }
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ "output_schema": {
42
+ "type": "object",
43
+ "properties": {
44
+ "ok": {
45
+ "type": "boolean"
46
+ }
47
+ },
48
+ "required": [
49
+ "ok"
50
+ ],
51
+ "additionalProperties": true
52
+ },
53
+ "verification": {
54
+ "kind": "output_schema"
55
+ },
56
+ "flags": {
57
+ "network": false,
58
+ "physical_hardware": false,
59
+ "requires_operator_review": true
60
+ }
61
+ }
@@ -0,0 +1,74 @@
1
+ {
2
+ "schema": "inneranimalmedia.primetech.procedure.v1",
3
+ "id": "primetech.visuals.compare",
4
+ "version": "1.0.0",
5
+ "summary": "Compare reference and rendered images and write diff, overlay, metrics and evidence report.",
6
+ "effect": "project_write",
7
+ "capabilities": [
8
+ "primetech.visuals.compare"
9
+ ],
10
+ "runtime": {
11
+ "kind": "sam_operation",
12
+ "operation": "primetech.visuals.compare"
13
+ },
14
+ "input_schema": {
15
+ "type": "object",
16
+ "required": [
17
+ "referencePath",
18
+ "renderedPath"
19
+ ],
20
+ "properties": {
21
+ "referencePath": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 240
25
+ },
26
+ "renderedPath": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 240
30
+ },
31
+ "outputDir": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 240
35
+ },
36
+ "pixelThreshold": {
37
+ "type": "integer",
38
+ "minimum": 1,
39
+ "maximum": 255
40
+ },
41
+ "maxMeanAbsoluteError": {
42
+ "type": "number",
43
+ "minimum": 0,
44
+ "maximum": 255
45
+ },
46
+ "maxChangedPixelRatio": {
47
+ "type": "number",
48
+ "minimum": 0,
49
+ "maximum": 1
50
+ }
51
+ },
52
+ "additionalProperties": false
53
+ },
54
+ "output_schema": {
55
+ "type": "object",
56
+ "properties": {
57
+ "ok": {
58
+ "type": "boolean"
59
+ }
60
+ },
61
+ "required": [
62
+ "ok"
63
+ ],
64
+ "additionalProperties": true
65
+ },
66
+ "verification": {
67
+ "kind": "output_schema"
68
+ },
69
+ "flags": {
70
+ "network": false,
71
+ "physical_hardware": false,
72
+ "requires_operator_review": true
73
+ }
74
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "schema": "inneranimalmedia.primetech.procedure.v1",
3
+ "id": "repo.asset.inventory",
4
+ "version": "0.1.0",
5
+ "summary": "Inspect a project for native CAD, BIM, and visualization assets without modifying project files.",
6
+ "effect": "read",
7
+ "capabilities": ["sam.superbash"],
8
+ "runtime": {
9
+ "kind": "python",
10
+ "entrypoint": "run.py",
11
+ "min_python": "3.10",
12
+ "dependencies": [],
13
+ "interpreter_candidates": ["python3.12", "python3.11", "python3.10", "python3"]
14
+ },
15
+ "input_schema": {
16
+ "type": "object",
17
+ "properties": {},
18
+ "additionalProperties": false
19
+ },
20
+ "output_schema": {
21
+ "type": "object",
22
+ "required": ["schema", "ok", "total", "counts", "assets", "truncated", "engine"],
23
+ "properties": {
24
+ "schema": {"const": "inneranimalmedia.primetech.asset-inventory.v1"},
25
+ "ok": {"type": "boolean"},
26
+ "total": {"type": "integer"},
27
+ "counts": {"type": "object"},
28
+ "assets": {
29
+ "type": "array",
30
+ "items": {
31
+ "type": "object",
32
+ "required": ["path", "kind", "bytes", "sha256", "hash_status"],
33
+ "properties": {
34
+ "path": {"type": "string"},
35
+ "kind": {"type": "string"},
36
+ "bytes": {"type": "integer"},
37
+ "sha256": {"type": ["string", "null"]},
38
+ "hash_status": {"enum": ["hashed", "size_limit", "budget_limit", "read_error"]}
39
+ },
40
+ "additionalProperties": false
41
+ }
42
+ },
43
+ "truncated": {"type": "boolean"},
44
+ "engine": {
45
+ "type": "object",
46
+ "required": ["name", "version"],
47
+ "properties": {
48
+ "name": {"const": "python"},
49
+ "version": {"type": "string"}
50
+ },
51
+ "additionalProperties": false
52
+ }
53
+ },
54
+ "additionalProperties": false
55
+ },
56
+ "verification": {
57
+ "kind": "output_schema",
58
+ "expected": "inneranimalmedia.primetech.asset-inventory.v1"
59
+ },
60
+ "flags": {
61
+ "network": false,
62
+ "physical_hardware": false,
63
+ "requires_operator_review": false
64
+ }
65
+ }
@@ -0,0 +1,116 @@
1
+ #!/usr/bin/env python3
2
+ """Read-only, stdlib-only inventory of native CAD/BIM/visualization assets."""
3
+ from __future__ import annotations
4
+
5
+ import hashlib
6
+ import json
7
+ import os
8
+ from pathlib import Path
9
+ import platform
10
+ import sys
11
+
12
+ KINDS = {
13
+ ".fcstd": "freecad", ".ifc": "bim_ifc", ".blend": "blender",
14
+ ".scad": "openscad", ".step": "step", ".stp": "step",
15
+ ".dxf": "dxf", ".svg": "svg", ".glb": "glb",
16
+ ".gltf": "gltf", ".stl": "stl", ".obj": "obj",
17
+ }
18
+ SKIP_DIRS = {
19
+ ".git", ".agentsam", ".wrangler", "node_modules", ".venv", "venv",
20
+ "__pycache__", ".next", ".cache", "dist", "build", "coverage",
21
+ }
22
+ MAX_ASSETS = 2000
23
+ MAX_HASH_BYTES_PER_ASSET = 128 * 1024 * 1024
24
+ MAX_HASH_BYTES_TOTAL = 512 * 1024 * 1024
25
+ CHUNK_BYTES = 1024 * 1024
26
+
27
+
28
+ def _hash_file(path: Path) -> str:
29
+ digest = hashlib.sha256()
30
+ with path.open("rb") as stream:
31
+ while True:
32
+ chunk = stream.read(CHUNK_BYTES)
33
+ if not chunk:
34
+ break
35
+ digest.update(chunk)
36
+ return digest.hexdigest()
37
+
38
+
39
+ def inventory(root: Path, payload: dict | None = None) -> dict:
40
+ if sys.version_info < (3, 10):
41
+ raise RuntimeError("python_3_10_or_newer_required")
42
+ if payload not in (None, {}):
43
+ raise ValueError("inventory_input_must_be_empty_object")
44
+ root = root.resolve(strict=True)
45
+ if not root.is_dir():
46
+ raise ValueError("inventory_root_not_directory")
47
+ counts: dict[str, int] = {}
48
+ assets: list[dict] = []
49
+ truncated = False
50
+ hashed_bytes = 0
51
+ for current, dirs, files in os.walk(root, followlinks=False):
52
+ dirs[:] = sorted(
53
+ name for name in dirs
54
+ if name not in SKIP_DIRS
55
+ and not name.startswith(".")
56
+ and not (Path(current) / name).is_symlink()
57
+ )
58
+ for name in sorted(files):
59
+ entry = Path(current) / name
60
+ kind = KINDS.get(entry.suffix.lower())
61
+ if not kind or entry.is_symlink():
62
+ continue
63
+ if len(assets) >= MAX_ASSETS:
64
+ truncated = True
65
+ break
66
+ try:
67
+ stat = entry.stat(follow_symlinks=False)
68
+ except OSError:
69
+ continue
70
+ if not entry.is_file():
71
+ continue
72
+ digest = None
73
+ hash_status = "hashed"
74
+ if stat.st_size > MAX_HASH_BYTES_PER_ASSET:
75
+ hash_status = "size_limit"
76
+ elif hashed_bytes + stat.st_size > MAX_HASH_BYTES_TOTAL:
77
+ hash_status = "budget_limit"
78
+ else:
79
+ try:
80
+ digest = _hash_file(entry)
81
+ hashed_bytes += stat.st_size
82
+ except OSError:
83
+ hash_status = "read_error"
84
+ assets.append({
85
+ "path": entry.relative_to(root).as_posix(),
86
+ "kind": kind,
87
+ "bytes": stat.st_size,
88
+ "sha256": digest,
89
+ "hash_status": hash_status,
90
+ })
91
+ counts[kind] = counts.get(kind, 0) + 1
92
+ if truncated:
93
+ break
94
+ return {
95
+ "schema": "inneranimalmedia.primetech.asset-inventory.v1",
96
+ "ok": True,
97
+ "total": len(assets),
98
+ "counts": dict(sorted(counts.items())),
99
+ "assets": assets,
100
+ "truncated": truncated,
101
+ "engine": {"name": "python", "version": platform.python_version()},
102
+ }
103
+
104
+
105
+ if __name__ == "__main__":
106
+ try:
107
+ payload = json.loads(sys.argv[1]) if len(sys.argv) > 1 else {}
108
+ result = inventory(Path.cwd(), payload)
109
+ print(json.dumps(result, sort_keys=True, separators=(",", ":")))
110
+ except (OSError, ValueError, RuntimeError) as exc:
111
+ print(json.dumps({
112
+ "schema": "inneranimalmedia.primetech.asset-inventory.v1",
113
+ "ok": False,
114
+ "error": str(exc),
115
+ }, sort_keys=True, separators=(",", ":")), file=sys.stderr)
116
+ sys.exit(2)
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env bash
2
+ # Standalone read-only launcher. Project root is the caller's current directory.
3
+ set -euo pipefail
4
+ here="$(cd -- "$(dirname -- "$0")" && pwd)"
5
+ for python in python3.12 python3.11 python3.10 python3; do
6
+ if command -v "$python" >/dev/null 2>&1; then
7
+ exec "$python" -B -I -S "$here/run.py" '{}'
8
+ fi
9
+ done
10
+ printf '%s\n' '{"schema":"inneranimalmedia.primetech.asset-inventory.v1","ok":false,"error":"python_3_10_or_newer_required"}' >&2
11
+ exit 2
@@ -0,0 +1,58 @@
1
+ {
2
+ "schema": "inneranimalmedia.primetech.procedure.v1",
3
+ "id": "repo.git.status",
4
+ "version": "0.1.0",
5
+ "summary": "Read current Git worktree state and return a deterministic JSON count of tracked changes and untracked files without modifying the repository.",
6
+ "effect": "read",
7
+ "capabilities": [
8
+ "sam.superbash"
9
+ ],
10
+ "runtime": {
11
+ "kind": "bash",
12
+ "entrypoint": "run.sh"
13
+ },
14
+ "input_schema": {
15
+ "type": "object",
16
+ "properties": {},
17
+ "additionalProperties": false
18
+ },
19
+ "output_schema": {
20
+ "type": "object",
21
+ "required": [
22
+ "schema",
23
+ "ok",
24
+ "tracked_changes",
25
+ "untracked_files",
26
+ "engine"
27
+ ],
28
+ "properties": {
29
+ "schema": {
30
+ "const": "inneranimalmedia.primetech.git-status.v1"
31
+ },
32
+ "ok": {
33
+ "const": true
34
+ },
35
+ "tracked_changes": {
36
+ "type": "integer",
37
+ "minimum": 0
38
+ },
39
+ "untracked_files": {
40
+ "type": "integer",
41
+ "minimum": 0
42
+ },
43
+ "engine": {
44
+ "const": "git"
45
+ }
46
+ },
47
+ "additionalProperties": false
48
+ },
49
+ "verification": {
50
+ "kind": "output_schema",
51
+ "expected": "inneranimalmedia.primetech.git-status.v1"
52
+ },
53
+ "flags": {
54
+ "network": false,
55
+ "physical_hardware": false,
56
+ "requires_operator_review": false
57
+ }
58
+ }
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ # Pinned, read-only procedure; the trusted host already selects the project cwd.
3
+ set -euo pipefail
4
+ if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" != "true" ]]; then
5
+ printf '%s\n' 'Not a Git worktree' >&2
6
+ exit 2
7
+ fi
8
+ tracked=$(git status --porcelain=v1 --untracked-files=no | awk 'END { print NR + 0 }')
9
+ untracked=$(git ls-files --others --exclude-standard | awk 'END { print NR + 0 }')
10
+ printf '{"schema":"inneranimalmedia.primetech.git-status.v1","ok":true,"tracked_changes":%s,"untracked_files":%s,"engine":"git"}\n' "$tracked" "$untracked"
@@ -0,0 +1,25 @@
1
+ # PrimeTech Procedure Engineer
2
+
3
+ ## Mission
4
+ Turn repeated technical work into portable, deterministic, versioned procedures that produce verified native outputs. Do not duplicate AgentSam, SAM, ExecOS, or existing domain-specific operation packs.
5
+
6
+ ## Standard workflow
7
+ 1. Resolve the application owner, SDK root, project owner, current branch and project identity before creating anything.
8
+ 2. Inspect existing SAM operations, scripts/superbash, Python tools, hooks, native adapters and receipts.
9
+ 3. Prefer an existing domain operation over a procedure, and a procedure over an ad-hoc shell script.
10
+ 4. Declare input/output schemas, effect, owner, dependencies, native tool versions, resource scope, preconditions and verification criteria.
11
+ 5. Use Python for deterministic data/geometry orchestration, Bash for bounded shell composition, TypeScript for SDK/host integration, and native CAD/Blender engines for real artifacts.
12
+ 6. Run only through the authenticated host and the appropriate approved execution lane. Do not route around existing permissions.
13
+ 7. Record procedure/version hashes, input/output hashes, execution receipts, verification outcomes and performance.
14
+ 8. Promote a workflow only after fixtures and a representative real project pass. Keep one source owner for each capability.
15
+
16
+ ## Nonnegotiables
17
+ - No second agent framework, CLI, scheduler, terminal daemon or global registry.
18
+ - Keep CMS content contracts for public-site content; CAD, robotics, machining and business data belong to their domains.
19
+ - Resolve storage through installation bindings; never hardcode a customer's R2 bucket.
20
+ - Unknown or unbound capabilities are unavailable, not implemented.
21
+ - The existing authorized shell operation is not a sandbox; do not automatically retry uncertain writes.
22
+ - Physical machinery execution remains outside this offline procedure system and requires separate operator and safety controls.
23
+
24
+ ## Definition of done
25
+ A reproducible procedure ID, passing tests, real outputs, exact source revision, verified receipt and destination evidence where required—without duplicated implementations or unmerged throwaway branches.
@@ -0,0 +1,112 @@
1
+ import json
2
+ from pathlib import Path
3
+
4
+ root = Path(__file__).resolve().parents[1] / "procedures"
5
+ colorway_ids = ["technical-slate","lagoon","industrial-ember","alloy-blue","prime-electric","prime-spectrum","reverse","core-mono"]
6
+ string = {"type":"string","minLength":1,"maxLength":240}
7
+ output = {"type":"object","properties":{"ok":{"type":"boolean"}},"required":["ok"],"additionalProperties":True}
8
+ colorway = {
9
+ "type":"object","required":["id","foreground","background"],
10
+ "properties":{
11
+ "id":{"type":"string","enum":colorway_ids},
12
+ "foreground":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"},
13
+ "background":{"type":"string","pattern":"^#[0-9a-fA-F]{3,8}$"}
14
+ },"additionalProperties":False
15
+ }
16
+ schemas = {
17
+ "primetech.icon-family.build": {
18
+ "required":["sourceSvgPath","colorways"],
19
+ "properties":{
20
+ "sourceSvgPath":string,"outputDir":string,
21
+ "colorways":{"type":"array","minItems":8,"maxItems":8,"items":colorway},
22
+ "sizes":{"type":"array","minItems":1,"maxItems":12,"items":{"type":"integer","minimum":16,"maximum":4096}}
23
+ }
24
+ },
25
+ "primetech.typeface.package": {
26
+ "required":["sourcePath"],
27
+ "properties":{"sourcePath":string,"outputDir":string,"licenseText":{"type":"string","maxLength":20000},"specimenText":{"type":"string","maxLength":4000}}
28
+ },
29
+ "primetech.sprite-atlas.build": {
30
+ "required":["framePaths"],
31
+ "properties":{
32
+ "framePaths":{"type":"array","minItems":1,"maxItems":256,"items":string},
33
+ "outputDir":string,"columns":{"type":"integer","minimum":1,"maximum":32},
34
+ "cellWidth":{"type":"integer","minimum":1,"maximum":4096},"cellHeight":{"type":"integer","minimum":1,"maximum":4096},
35
+ "padding":{"type":"integer","minimum":0,"maximum":128},"fps":{"type":"integer","minimum":1,"maximum":60},"loop":{"type":"boolean"}
36
+ }
37
+ },
38
+ "primetech.visuals.compare": {
39
+ "required":["referencePath","renderedPath"],
40
+ "properties":{
41
+ "referencePath":string,"renderedPath":string,"outputDir":string,
42
+ "pixelThreshold":{"type":"integer","minimum":1,"maximum":255},
43
+ "maxMeanAbsoluteError":{"type":"number","minimum":0,"maximum":255},
44
+ "maxChangedPixelRatio":{"type":"number","minimum":0,"maximum":1}
45
+ }
46
+ },
47
+ "primetech.design-system.package": {
48
+ "required":["tokensPath"],
49
+ "properties":{"tokensPath":string,"outputDir":string,"projectName":{"type":"string","minLength":1,"maxLength":160}}
50
+ },
51
+ "primetech.assets.package": {
52
+ "required":["assetPaths"],
53
+ "properties":{
54
+ "assetPaths":{"type":"array","minItems":1,"maxItems":512,"items":string},
55
+ "outputDir":string,"packageName":{"type":"string","minLength":1,"maxLength":120}
56
+ }
57
+ },
58
+ "primetech.ebook.package": {
59
+ "required":["sourcePath"],
60
+ "properties":{"sourcePath":string,"outputDir":string}
61
+ },
62
+ "primetech.production-board.manage": {
63
+ "required":["action"],
64
+ "properties":{
65
+ "action":{"type":"string","enum":["create","get","list","begin","complete","fail","resume"]},
66
+ "title":{"type":"string","minLength":1,"maxLength":160},
67
+ "objective":{"type":"string","minLength":1,"maxLength":1200},
68
+ "brief":{"type":"string","maxLength":12000},
69
+ "projectId":{"type":["string","null"],"maxLength":160},
70
+ "tags":{"type":"array","maxItems":32,"items":{"type":"string","maxLength":48}},
71
+ "boardId":{"type":"string","pattern":"^ptb_[a-f0-9]{24}$"},
72
+ "generationId":{"type":"string","minLength":1,"maxLength":160},
73
+ "idempotencyKey":{"type":"string","minLength":1,"maxLength":200},
74
+ "kind":{"type":"string","pattern":"^[a-z][a-z0-9_.-]{1,79}$"},
75
+ "generationBrief":{"type":"string","minLength":1,"maxLength":8000},
76
+ "prompt":{"type":"string","maxLength":12000},
77
+ "sourceRefs":{"type":"array","maxItems":64,"items":{"type":"string","maxLength":1024}},
78
+ "artifacts":{"type":"array","maxItems":256,"items":{"type":"object","additionalProperties":True}},
79
+ "quality":{"type":"object","additionalProperties":True},
80
+ "error":{"type":"object","required":["code"],"properties":{"code":{"type":"string","minLength":1,"maxLength":120},"message":{"type":"string","maxLength":1000}},"additionalProperties":False},
81
+ "retryable":{"type":"boolean"},"expectedRevision":{"type":"integer","minimum":1}
82
+ }
83
+ }
84
+ }
85
+ summaries = {
86
+ "primetech.icon-family.build":"Build a verified icon family from an approved SVG master with three shapes, eight colorways, raster sizes and source checksums.",
87
+ "primetech.typeface.package":"Validate Typeface Studio glyph geometry and produce a verified static TTF, source package and specimen.",
88
+ "primetech.sprite-atlas.build":"Pack ordered character or pet frames into a transparent sprite atlas with frame metadata and preview.",
89
+ "primetech.visuals.compare":"Compare reference and rendered images and write diff, overlay, metrics and evidence report.",
90
+ "primetech.design-system.package":"Validate design tokens, calculate contrast and package CSS variables and documentation.",
91
+ "primetech.assets.package":"Package approved creative assets with source hashes, metadata and delivery manifest.",
92
+ "primetech.ebook.package":"Build and validate an EPUB 3 archive with navigation, preview and source provenance.",
93
+ "primetech.production-board.manage":"Manage a revisioned creative production board and resumable generation receipts."
94
+ }
95
+ for operation, schema in schemas.items():
96
+ directory = root / operation
97
+ directory.mkdir(parents=True, exist_ok=True)
98
+ manifest = {
99
+ "schema":"inneranimalmedia.primetech.procedure.v1",
100
+ "id":operation,
101
+ "version":"1.0.0",
102
+ "summary":summaries[operation],
103
+ "effect":"project_write",
104
+ "capabilities":[operation],
105
+ "runtime":{"kind":"sam_operation","operation":operation},
106
+ "input_schema":{"type":"object",**schema,"additionalProperties":False},
107
+ "output_schema":output,
108
+ "verification":{"kind":"output_schema"},
109
+ "flags":{"network":False,"physical_hardware":False,"requires_operator_review":True}
110
+ }
111
+ (directory / "procedure.json").write_text(json.dumps(manifest,indent=2)+"\n")
112
+ print(json.dumps({"count":len(schemas),"procedures":list(schemas)},indent=2))