@growthub/cli 0.7.8 → 0.8.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.
Files changed (135) hide show
  1. package/assets/worker-kits/creative-strategist-v1/SKILL.md +95 -0
  2. package/assets/worker-kits/creative-strategist-v1/bundles/creative-strategist-v1.json +12 -2
  3. package/assets/worker-kits/creative-strategist-v1/helpers/README.md +29 -0
  4. package/assets/worker-kits/creative-strategist-v1/helpers/extract-muse-frames.sh +81 -0
  5. package/assets/worker-kits/creative-strategist-v1/helpers/grep-hooks.sh +62 -0
  6. package/assets/worker-kits/creative-strategist-v1/kit.json +20 -2
  7. package/assets/worker-kits/creative-strategist-v1/skills/README.md +23 -0
  8. package/assets/worker-kits/creative-strategist-v1/skills/frame-analysis/SKILL.md +88 -0
  9. package/assets/worker-kits/creative-strategist-v1/templates/project.md +48 -0
  10. package/assets/worker-kits/creative-strategist-v1/templates/self-eval.md +67 -0
  11. package/assets/worker-kits/creative-strategist-v1/workers/creative-strategist/CLAUDE.md +22 -0
  12. package/assets/worker-kits/growthub-ai-website-cloner-v1/SKILL.md +89 -0
  13. package/assets/worker-kits/growthub-ai-website-cloner-v1/bundles/growthub-ai-website-cloner-v1.json +9 -2
  14. package/assets/worker-kits/growthub-ai-website-cloner-v1/helpers/README.md +29 -0
  15. package/assets/worker-kits/growthub-ai-website-cloner-v1/kit.json +14 -2
  16. package/assets/worker-kits/growthub-ai-website-cloner-v1/skills/README.md +23 -0
  17. package/assets/worker-kits/growthub-ai-website-cloner-v1/templates/project.md +48 -0
  18. package/assets/worker-kits/growthub-ai-website-cloner-v1/templates/self-eval.md +67 -0
  19. package/assets/worker-kits/growthub-ai-website-cloner-v1/workers/ai-website-cloner-operator/CLAUDE.md +22 -0
  20. package/assets/worker-kits/growthub-custom-workspace-starter-v1/SKILL.md +122 -0
  21. package/assets/worker-kits/growthub-custom-workspace-starter-v1/bundles/growthub-custom-workspace-starter-v1.json +14 -2
  22. package/assets/worker-kits/growthub-custom-workspace-starter-v1/docs/governed-workspace-primitives.md +182 -0
  23. package/assets/worker-kits/growthub-custom-workspace-starter-v1/helpers/README.md +44 -0
  24. package/assets/worker-kits/growthub-custom-workspace-starter-v1/kit.json +16 -2
  25. package/assets/worker-kits/growthub-custom-workspace-starter-v1/skills/README.md +55 -0
  26. package/assets/worker-kits/growthub-custom-workspace-starter-v1/templates/project.md +55 -0
  27. package/assets/worker-kits/growthub-custom-workspace-starter-v1/templates/self-eval.md +67 -0
  28. package/assets/worker-kits/growthub-custom-workspace-starter-v1/workers/custom-workspace-operator/CLAUDE.md +24 -2
  29. package/assets/worker-kits/growthub-email-marketing-v1/SKILL.md +90 -0
  30. package/assets/worker-kits/growthub-email-marketing-v1/bundles/growthub-email-marketing-v1.json +9 -2
  31. package/assets/worker-kits/growthub-email-marketing-v1/helpers/README.md +29 -0
  32. package/assets/worker-kits/growthub-email-marketing-v1/kit.json +14 -2
  33. package/assets/worker-kits/growthub-email-marketing-v1/skills/README.md +23 -0
  34. package/assets/worker-kits/growthub-email-marketing-v1/templates/project.md +48 -0
  35. package/assets/worker-kits/growthub-email-marketing-v1/templates/self-eval.md +67 -0
  36. package/assets/worker-kits/growthub-email-marketing-v1/workers/email-marketing-strategist/CLAUDE.md +22 -0
  37. package/assets/worker-kits/growthub-geo-seo-v1/SKILL.md +90 -0
  38. package/assets/worker-kits/growthub-geo-seo-v1/bundles/growthub-geo-seo-v1.json +12 -3
  39. package/assets/worker-kits/growthub-geo-seo-v1/helpers/README.md +29 -0
  40. package/assets/worker-kits/growthub-geo-seo-v1/kit.json +23 -5
  41. package/assets/worker-kits/growthub-geo-seo-v1/skills/README.md +23 -0
  42. package/assets/worker-kits/growthub-geo-seo-v1/templates/project.md +48 -0
  43. package/assets/worker-kits/growthub-geo-seo-v1/templates/self-eval.md +67 -0
  44. package/assets/worker-kits/growthub-geo-seo-v1/workers/geo-seo-operator/CLAUDE.md +22 -0
  45. package/assets/worker-kits/growthub-hyperframes-studio-v1/SKILL.md +89 -0
  46. package/assets/worker-kits/growthub-hyperframes-studio-v1/bundles/growthub-hyperframes-studio-v1.json +6 -1
  47. package/assets/worker-kits/growthub-hyperframes-studio-v1/helpers/README.md +29 -0
  48. package/assets/worker-kits/growthub-hyperframes-studio-v1/kit.json +14 -2
  49. package/assets/worker-kits/growthub-hyperframes-studio-v1/skills/README.md +23 -0
  50. package/assets/worker-kits/growthub-hyperframes-studio-v1/templates/project.md +48 -0
  51. package/assets/worker-kits/growthub-hyperframes-studio-v1/templates/self-eval.md +67 -0
  52. package/assets/worker-kits/growthub-hyperframes-studio-v1/workers/hyperframes-studio-operator/CLAUDE.md +22 -0
  53. package/assets/worker-kits/growthub-marketing-skills-v1/SKILL.md +90 -0
  54. package/assets/worker-kits/growthub-marketing-skills-v1/bundles/growthub-marketing-skills-v1.json +12 -3
  55. package/assets/worker-kits/growthub-marketing-skills-v1/helpers/README.md +29 -0
  56. package/assets/worker-kits/growthub-marketing-skills-v1/kit.json +23 -5
  57. package/assets/worker-kits/growthub-marketing-skills-v1/skills/README.md +23 -0
  58. package/assets/worker-kits/growthub-marketing-skills-v1/templates/project.md +48 -0
  59. package/assets/worker-kits/growthub-marketing-skills-v1/templates/self-eval.md +67 -0
  60. package/assets/worker-kits/growthub-marketing-skills-v1/workers/marketing-operator/CLAUDE.md +22 -0
  61. package/assets/worker-kits/growthub-open-higgsfield-studio-v1/SKILL.md +89 -0
  62. package/assets/worker-kits/growthub-open-higgsfield-studio-v1/bundles/growthub-open-higgsfield-studio-v1.json +9 -2
  63. package/assets/worker-kits/growthub-open-higgsfield-studio-v1/helpers/README.md +29 -0
  64. package/assets/worker-kits/growthub-open-higgsfield-studio-v1/kit.json +14 -2
  65. package/assets/worker-kits/growthub-open-higgsfield-studio-v1/skills/README.md +23 -0
  66. package/assets/worker-kits/growthub-open-higgsfield-studio-v1/templates/project.md +48 -0
  67. package/assets/worker-kits/growthub-open-higgsfield-studio-v1/templates/self-eval.md +67 -0
  68. package/assets/worker-kits/growthub-open-higgsfield-studio-v1/workers/open-higgsfield-studio-operator/CLAUDE.md +22 -0
  69. package/assets/worker-kits/growthub-open-montage-studio-v1/SKILL.md +89 -0
  70. package/assets/worker-kits/growthub-open-montage-studio-v1/bundles/growthub-open-montage-studio-v1.json +9 -2
  71. package/assets/worker-kits/growthub-open-montage-studio-v1/helpers/README.md +29 -0
  72. package/assets/worker-kits/growthub-open-montage-studio-v1/kit.json +14 -2
  73. package/assets/worker-kits/growthub-open-montage-studio-v1/skills/README.md +23 -0
  74. package/assets/worker-kits/growthub-open-montage-studio-v1/templates/project.md +48 -0
  75. package/assets/worker-kits/growthub-open-montage-studio-v1/templates/self-eval.md +67 -0
  76. package/assets/worker-kits/growthub-open-montage-studio-v1/workers/open-montage-studio-operator/CLAUDE.md +22 -0
  77. package/assets/worker-kits/growthub-postiz-social-v1/SKILL.md +90 -0
  78. package/assets/worker-kits/growthub-postiz-social-v1/bundles/growthub-postiz-social-v1.json +9 -2
  79. package/assets/worker-kits/growthub-postiz-social-v1/helpers/README.md +29 -0
  80. package/assets/worker-kits/growthub-postiz-social-v1/kit.json +14 -2
  81. package/assets/worker-kits/growthub-postiz-social-v1/skills/README.md +23 -0
  82. package/assets/worker-kits/growthub-postiz-social-v1/templates/project.md +48 -0
  83. package/assets/worker-kits/growthub-postiz-social-v1/templates/self-eval.md +67 -0
  84. package/assets/worker-kits/growthub-postiz-social-v1/workers/postiz-social-operator/CLAUDE.md +22 -0
  85. package/assets/worker-kits/growthub-twenty-crm-v1/SKILL.md +89 -0
  86. package/assets/worker-kits/growthub-twenty-crm-v1/bundles/growthub-twenty-crm-v1.json +9 -2
  87. package/assets/worker-kits/growthub-twenty-crm-v1/helpers/README.md +29 -0
  88. package/assets/worker-kits/growthub-twenty-crm-v1/kit.json +14 -2
  89. package/assets/worker-kits/growthub-twenty-crm-v1/skills/README.md +23 -0
  90. package/assets/worker-kits/growthub-twenty-crm-v1/templates/project.md +48 -0
  91. package/assets/worker-kits/growthub-twenty-crm-v1/templates/self-eval.md +67 -0
  92. package/assets/worker-kits/growthub-twenty-crm-v1/workers/twenty-crm-operator/CLAUDE.md +22 -0
  93. package/assets/worker-kits/growthub-video-use-studio-v1/.env.example +13 -0
  94. package/assets/worker-kits/growthub-video-use-studio-v1/QUICKSTART.md +47 -0
  95. package/assets/worker-kits/growthub-video-use-studio-v1/SKILL.md +89 -0
  96. package/assets/worker-kits/growthub-video-use-studio-v1/brands/NEW-CLIENT.md +3 -0
  97. package/assets/worker-kits/growthub-video-use-studio-v1/brands/_template/brand-kit.md +7 -0
  98. package/assets/worker-kits/growthub-video-use-studio-v1/brands/growthub/brand-kit.md +6 -0
  99. package/assets/worker-kits/growthub-video-use-studio-v1/bundles/growthub-video-use-studio-v1.json +54 -0
  100. package/assets/worker-kits/growthub-video-use-studio-v1/docs/provider-adapter-layer.md +15 -0
  101. package/assets/worker-kits/growthub-video-use-studio-v1/docs/video-use-discovery-path.md +13 -0
  102. package/assets/worker-kits/growthub-video-use-studio-v1/docs/video-use-fork-integration.md +35 -0
  103. package/assets/worker-kits/growthub-video-use-studio-v1/examples/video-brief-sample.md +11 -0
  104. package/assets/worker-kits/growthub-video-use-studio-v1/growthub-meta/README.md +3 -0
  105. package/assets/worker-kits/growthub-video-use-studio-v1/growthub-meta/kit-standard.md +6 -0
  106. package/assets/worker-kits/growthub-video-use-studio-v1/helpers/README.md +29 -0
  107. package/assets/worker-kits/growthub-video-use-studio-v1/kit.json +112 -0
  108. package/assets/worker-kits/growthub-video-use-studio-v1/output/README.md +9 -0
  109. package/assets/worker-kits/growthub-video-use-studio-v1/output-standards.md +19 -0
  110. package/assets/worker-kits/growthub-video-use-studio-v1/runtime-assumptions.md +9 -0
  111. package/assets/worker-kits/growthub-video-use-studio-v1/setup/check-deps.sh +21 -0
  112. package/assets/worker-kits/growthub-video-use-studio-v1/setup/clone-fork.sh +18 -0
  113. package/assets/worker-kits/growthub-video-use-studio-v1/setup/install-skill.sh +23 -0
  114. package/assets/worker-kits/growthub-video-use-studio-v1/setup/verify-env.mjs +23 -0
  115. package/assets/worker-kits/growthub-video-use-studio-v1/skills/README.md +23 -0
  116. package/assets/worker-kits/growthub-video-use-studio-v1/skills.md +21 -0
  117. package/assets/worker-kits/growthub-video-use-studio-v1/templates/edit-decision-list.md +17 -0
  118. package/assets/worker-kits/growthub-video-use-studio-v1/templates/edit-strategy.md +11 -0
  119. package/assets/worker-kits/growthub-video-use-studio-v1/templates/project.md +48 -0
  120. package/assets/worker-kits/growthub-video-use-studio-v1/templates/qa-checklist.md +21 -0
  121. package/assets/worker-kits/growthub-video-use-studio-v1/templates/render-plan.md +40 -0
  122. package/assets/worker-kits/growthub-video-use-studio-v1/templates/self-eval.md +67 -0
  123. package/assets/worker-kits/growthub-video-use-studio-v1/templates/video-brief.md +11 -0
  124. package/assets/worker-kits/growthub-video-use-studio-v1/validation-checklist.md +11 -0
  125. package/assets/worker-kits/growthub-video-use-studio-v1/workers/video-use-studio-operator/CLAUDE.md +93 -0
  126. package/assets/worker-kits/growthub-zernio-social-v1/SKILL.md +90 -0
  127. package/assets/worker-kits/growthub-zernio-social-v1/bundles/growthub-zernio-social-v1.json +9 -2
  128. package/assets/worker-kits/growthub-zernio-social-v1/helpers/README.md +29 -0
  129. package/assets/worker-kits/growthub-zernio-social-v1/kit.json +14 -2
  130. package/assets/worker-kits/growthub-zernio-social-v1/skills/README.md +23 -0
  131. package/assets/worker-kits/growthub-zernio-social-v1/templates/project.md +48 -0
  132. package/assets/worker-kits/growthub-zernio-social-v1/templates/self-eval.md +67 -0
  133. package/assets/worker-kits/growthub-zernio-social-v1/workers/zernio-social-operator/CLAUDE.md +22 -0
  134. package/dist/index.js +974 -233
  135. package/package.json +2 -2
@@ -0,0 +1,95 @@
1
+ ---
2
+ name: creative-strategist-v1
3
+ description: "Frozen Creative Strategist worker kit — produces video creative briefs from frozen ad formats + scene modules + a 500-hook CSV. Use when the user says: \"new creative brief\", \"creative strategist\", \"hook library\", \"scene modules\". Session memory at .growthub-fork/project.md tracks brand kits used, hook variations chosen, and per-cut self-eval outcomes across multi-day brief production."
4
+ triggers:
5
+ - creative strategist
6
+ - fork creative-strategist-v1
7
+ progressiveDisclosure: true
8
+ sessionMemory:
9
+ path: .growthub-fork/project.md
10
+ selfEval:
11
+ criteria:
12
+ - Operator contract (workers/creative-strategist/CLAUDE.md) read before any material change.
13
+ - .growthub-fork/project.md appended to at each material change.
14
+ - .growthub-fork/trace.jsonl receives a typed event for each material change.
15
+ - Kit-specific QUICKSTART / runtime-assumptions / output-standards honoured.
16
+ maxRetries: 3
17
+ traceTo: .growthub-fork/trace.jsonl
18
+ helpers:
19
+ - path: helpers/grep-hooks.sh
20
+ description: 3-pass keyword search over the frozen 500-winning-hooks CSV (replaces inline Step 2d shell).
21
+ - path: helpers/extract-muse-frames.sh
22
+ description: Deterministic ffprobe + ffmpeg wrapper for Step 2b muse-frame extraction.
23
+ subSkills:
24
+ - name: creative-strategist-frame-analysis
25
+ path: skills/frame-analysis/SKILL.md
26
+ mcpTools: []
27
+ ---
28
+
29
+ # Growthub Agent Worker Kit — Creative Strategist
30
+
31
+ Discovery entry + routing menu for the `creative-strategist-v1` worker kit. Family: `workflow`. Agent contract: `workers/creative-strategist/CLAUDE.md`.
32
+
33
+ ## When to use this skill
34
+
35
+ When the user's intent matches any of the triggers above — or when an agent has been dropped into a fork whose `.growthub-fork/fork.json` declares `kitId: "creative-strategist-v1"`.
36
+
37
+ ## Decision tree
38
+
39
+ ```
40
+ Fork exists (this directory contains .growthub-fork/fork.json)?
41
+ ├── No → run: growthub starter init --out <path> (or import-repo / import-skill)
42
+ │ then: growthub kit download creative-strategist-v1 --out <path>
43
+
44
+ └── Yes → read in this order:
45
+ 1. .growthub-fork/project.md — session memory (primitive #3)
46
+ 2. SKILL.md (this file) — routing menu (primitive #1)
47
+ 3. skills.md — operator runbook
48
+ 4. workers/creative-strategist/CLAUDE.md — agent contract
49
+ 5. QUICKSTART.md — first-run steps
50
+ 6. runtime-assumptions.md — host expectations
51
+ 7. .growthub-fork/policy.json — what you may touch
52
+ 8. .growthub-fork/trace.jsonl (tail 20) — recent machine history
53
+ ```
54
+
55
+ ## The six primitives (same shape across every Growthub worker kit)
56
+
57
+ 1. **`SKILL.md`** — this file.
58
+ 2. **Symlinked pointer** — repo-root `AGENTS.md` is authoritative.
59
+ 3. **`.growthub-fork/project.md`** — session memory, seeded by the CLI from `templates/project.md` at init/import time.
60
+ 4. **Self-evaluation** — generate → apply → evaluate → record; retry up to `selfEval.maxRetries` (default 3); mirrors the Fork Sync Agent's preview → apply → trace loop (primitive #4). Contract: `@growthub/api-contract/skills::SkillSelfEval`.
61
+ 5. **`skills/`** — nested sub-skills for parallel sub-agents on heavy / narrow work.
62
+ 6. **`helpers/`** — safe shell tool layer. Promote inline shell here whenever the same snippet is re-used.
63
+
64
+ ## Self-evaluation (primitive #4)
65
+
66
+ Enforce `selfEval.maxRetries: 3`. At the ceiling, park with a `needs_confirmation` note in `project.md` and stop. Record every attempt to both `project.md` and `trace.jsonl`.
67
+
68
+ ## Session memory (primitive #3)
69
+
70
+ `.growthub-fork/project.md` is the only cross-session continuity surface for this fork. Append at every material change, approval boundary, and self-eval outcome.
71
+
72
+ ## Sub-skills (primitive #5)
73
+
74
+ (None declared at the baseline; populate `skills/` and the frontmatter `subSkills[]` array as specialist lanes emerge.)
75
+
76
+ ## Helpers (primitive #6)
77
+
78
+ (None declared at the baseline; populate `helpers/` and the frontmatter `helpers[]` array as inline shell matures.)
79
+
80
+ ## MCP routing (optional)
81
+
82
+ List concrete MCP tool IDs in `mcpTools[]` when a fork runs an MCP server for auth-heavy actions. Declarative only at v1.
83
+
84
+ ## Related files
85
+
86
+ - `skills.md` — operator runbook (deep)
87
+ - `QUICKSTART.md` — first-run steps
88
+ - `runtime-assumptions.md` — host expectations
89
+ - `output-standards.md` — output locations + manifest shape
90
+ - `validation-checklist.md` — pre-flight checklist (if present)
91
+ - `templates/project.md` — session-memory template
92
+ - `templates/self-eval.md` — self-evaluation template
93
+ - `helpers/README.md` — safe shell tool layer convention
94
+ - `skills/README.md` — sub-skill convention
95
+ - `workers/creative-strategist/CLAUDE.md` — agent contract
@@ -36,12 +36,22 @@
36
36
  "templates/scene-modules/hooks/tiktok-comment.md",
37
37
  "templates/scene-modules/hooks/villain-hook.md",
38
38
  "growthub-meta/README.md",
39
- "growthub-meta/kit-standard.md"
39
+ "growthub-meta/kit-standard.md",
40
+ "SKILL.md",
41
+ "templates/project.md",
42
+ "templates/self-eval.md",
43
+ "helpers/README.md",
44
+ "skills/README.md",
45
+ "helpers/grep-hooks.sh",
46
+ "helpers/extract-muse-frames.sh",
47
+ "skills/frame-analysis/SKILL.md"
40
48
  ],
41
49
  "optionalPresets": [],
42
50
  "export": {
43
51
  "folderName": "growthub-agent-worker-kit-creative-strategist-v1",
44
52
  "zipFileName": "growthub-agent-worker-kit-creative-strategist-v1.zip"
45
53
  },
46
- "activationModes": ["export"]
54
+ "activationModes": [
55
+ "export"
56
+ ]
47
57
  }
@@ -0,0 +1,29 @@
1
+ # `helpers/` — safe shell tool layer (primitive #6)
2
+
3
+ A **helper** is a small, deterministic script an agent invokes via one shell call instead of reconstructing a raw pipeline inline. Helpers are reviewable, deterministic, and safer than raw commands.
4
+
5
+ ## Convention
6
+
7
+ ```
8
+ helpers/
9
+ ├── README.md # this file
10
+ ├── <verb>.sh # single-purpose shell scripts
11
+ ├── <verb>.mjs # optional: Node-based helper
12
+ └── <verb>.py # optional: Python-based helper
13
+ ```
14
+
15
+ Every helper:
16
+
17
+ 1. Carries a one-line header comment: what it does + how to invoke it.
18
+ 2. Uses `set -euo pipefail` (or equivalent) — no silent failures.
19
+ 3. Has a matching row in the parent `SKILL.md`'s `helpers[]` frontmatter.
20
+ 4. Is referenced from `skills.md` at the step the agent should invoke it (no duplicated shell bodies).
21
+
22
+ ## When to promote an inline snippet
23
+
24
+ - Appears more than once in `skills.md`.
25
+ - Has fragile quoting or path interpolation.
26
+ - Calls a side-effecting binary (ffmpeg, git, gh, npm install).
27
+ - Multiple sub-skills invoke it.
28
+
29
+ See the parent `SKILL.md` `helpers[]` array for the current roster.
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env bash
2
+ # extract-muse-frames.sh — deterministic muse-video frame extraction.
3
+ #
4
+ # Use: bash helpers/extract-muse-frames.sh <path-to-video.mp4> [--interval <seconds>]
5
+ #
6
+ # Replaces the inline ffprobe+ffmpeg block in skills.md Step 2b. Writes
7
+ # /tmp/muse_frames/frame_%ds.jpg and prints the first 3 frame paths so an
8
+ # agent can immediately read them via its file-read tool.
9
+ #
10
+ # Interval defaults to 3s for videos >=30s, 2s for videos <30s (matches the
11
+ # runbook guidance for TikTok-format short muses).
12
+
13
+ set -euo pipefail
14
+
15
+ if [[ $# -lt 1 ]]; then
16
+ echo "usage: bash helpers/extract-muse-frames.sh <path-to-video> [--interval N]" >&2
17
+ exit 2
18
+ fi
19
+
20
+ VIDEO="$1"
21
+ shift
22
+
23
+ if [[ ! -f "${VIDEO}" ]]; then
24
+ echo "Video not found: ${VIDEO}" >&2
25
+ exit 1
26
+ fi
27
+
28
+ INTERVAL=""
29
+ while [[ $# -gt 0 ]]; do
30
+ case "$1" in
31
+ --interval)
32
+ INTERVAL="$2"
33
+ shift 2
34
+ ;;
35
+ *)
36
+ echo "unknown arg: $1" >&2
37
+ exit 2
38
+ ;;
39
+ esac
40
+ done
41
+
42
+ for bin in ffprobe ffmpeg python3; do
43
+ if ! command -v "$bin" >/dev/null 2>&1; then
44
+ echo "Missing required binary on PATH: $bin" >&2
45
+ exit 1
46
+ fi
47
+ done
48
+
49
+ DURATION="$(ffprobe -v quiet -print_format json -show_format -show_streams "${VIDEO}" \
50
+ | python3 -c 'import sys, json
51
+ d = json.load(sys.stdin)
52
+ for s in d.get("streams", []):
53
+ if s.get("codec_type") == "video":
54
+ print(s.get("duration", 0))
55
+ break
56
+ ')"
57
+ DURATION_INT="$(python3 -c "print(int(float('${DURATION:-0}')))")"
58
+
59
+ if [[ -z "${INTERVAL}" ]]; then
60
+ if [[ "${DURATION_INT}" -lt 30 ]]; then
61
+ INTERVAL=2
62
+ else
63
+ INTERVAL=3
64
+ fi
65
+ fi
66
+
67
+ OUT_DIR="/tmp/muse_frames"
68
+ mkdir -p "${OUT_DIR}"
69
+ # Clear prior run so downstream `ls` stays deterministic.
70
+ rm -f "${OUT_DIR}"/frame_*.jpg
71
+
72
+ echo "video: ${VIDEO}"
73
+ echo "duration: ${DURATION_INT}s"
74
+ echo "interval: ${INTERVAL}s"
75
+ echo "out: ${OUT_DIR}"
76
+
77
+ ffmpeg -loglevel error -y -i "${VIDEO}" -vf "fps=1/${INTERVAL}" "${OUT_DIR}/frame_%ds.jpg"
78
+
79
+ echo ""
80
+ echo "First frames (read these with your file-read tool):"
81
+ ls "${OUT_DIR}"/frame_*.jpg | sort | head -3
@@ -0,0 +1,62 @@
1
+ #!/usr/bin/env bash
2
+ # grep-hooks.sh — 3-pass search over the frozen 500-hook CSV.
3
+ #
4
+ # Use: bash helpers/grep-hooks.sh "<keyword>" [--limit <n>]
5
+ #
6
+ # Runs the same 3-pass method documented in skills.md Step 2d against
7
+ # ${CREATIVE_STRATEGIST_HOME:-$HOME/creative-strategist}/templates/hooks-library/500-winning-hooks.csv.
8
+ # Prints an Example / Structure pair for each match. Deterministic; no network.
9
+
10
+ set -euo pipefail
11
+
12
+ if [[ $# -lt 1 ]]; then
13
+ echo "usage: bash helpers/grep-hooks.sh <keyword> [--limit N]" >&2
14
+ exit 2
15
+ fi
16
+
17
+ KEYWORD="$1"
18
+ shift
19
+
20
+ LIMIT=20
21
+ while [[ $# -gt 0 ]]; do
22
+ case "$1" in
23
+ --limit)
24
+ LIMIT="$2"
25
+ shift 2
26
+ ;;
27
+ *)
28
+ echo "unknown arg: $1" >&2
29
+ exit 2
30
+ ;;
31
+ esac
32
+ done
33
+
34
+ KIT_HOME="${CREATIVE_STRATEGIST_HOME:-$HOME/creative-strategist}"
35
+ CSV="${KIT_HOME}/templates/hooks-library/500-winning-hooks.csv"
36
+
37
+ if [[ ! -f "${CSV}" ]]; then
38
+ echo "Hooks CSV not found at: ${CSV}" >&2
39
+ echo "Set CREATIVE_STRATEGIST_HOME to the kit root, or download the kit to \$HOME/creative-strategist." >&2
40
+ exit 1
41
+ fi
42
+
43
+ python3 - "${CSV}" "${KEYWORD}" "${LIMIT}" <<'PY'
44
+ import csv, sys
45
+
46
+ path, kw, limit = sys.argv[1], sys.argv[2].lower(), int(sys.argv[3])
47
+ printed = 0
48
+ with open(path, newline="", encoding="utf-8") as f:
49
+ for idx, row in enumerate(csv.reader(f)):
50
+ if len(row) < 2:
51
+ continue
52
+ example, structure = row[0], row[1]
53
+ if kw in example.lower() or kw in structure.lower():
54
+ print(f"[{idx}] EXAMPLE: {example[:90]}")
55
+ print(f" STRUCTURE: {structure[:100]}\n")
56
+ printed += 1
57
+ if printed >= limit:
58
+ break
59
+ if printed == 0:
60
+ print(f"No matches for '{kw}' in {path}", file=sys.stderr)
61
+ sys.exit(3)
62
+ PY
@@ -48,7 +48,15 @@
48
48
  "templates/scene-modules/hooks/tiktok-comment.md",
49
49
  "templates/scene-modules/hooks/villain-hook.md",
50
50
  "growthub-meta/README.md",
51
- "growthub-meta/kit-standard.md"
51
+ "growthub-meta/kit-standard.md",
52
+ "SKILL.md",
53
+ "templates/project.md",
54
+ "templates/self-eval.md",
55
+ "helpers/README.md",
56
+ "skills/README.md",
57
+ "helpers/grep-hooks.sh",
58
+ "helpers/extract-muse-frames.sh",
59
+ "skills/frame-analysis/SKILL.md"
52
60
  ],
53
61
  "outputStandard": {
54
62
  "type": "working-directory",
@@ -61,7 +69,17 @@
61
69
  "brands/_template/brand-kit.md",
62
70
  "brands/solawave/brand-kit.md",
63
71
  "templates",
64
- "growthub-meta"
72
+ "growthub-meta",
73
+ "SKILL.md",
74
+ "templates/project.md",
75
+ "templates/self-eval.md",
76
+ "helpers",
77
+ "helpers/README.md",
78
+ "skills",
79
+ "skills/README.md",
80
+ "helpers/grep-hooks.sh",
81
+ "helpers/extract-muse-frames.sh",
82
+ "skills/frame-analysis/SKILL.md"
65
83
  ]
66
84
  },
67
85
  "bundles": [
@@ -0,0 +1,23 @@
1
+ # `skills/` — nested sub-skill convention (primitive #5)
2
+
3
+ A **sub-skill** is a full `SKILL.md`-addressable lane that a parent skill can spawn as a parallel sub-agent.
4
+
5
+ ## Convention
6
+
7
+ ```
8
+ skills/
9
+ ├── README.md # this file
10
+ └── <slug>/ # kebab-case; matches the SKILL.md name
11
+ ├── SKILL.md # frontmatter + routing body (≤ 500 lines)
12
+ ├── references/ # optional — long docs loaded on demand
13
+ ├── templates/ # optional — reusable text/JS templates
14
+ └── scripts/ # optional — deterministic helpers
15
+ ```
16
+
17
+ Each sub-skill's frontmatter follows `@growthub/api-contract/skills::SkillManifest`. Sub-skills share the parent's `.growthub-fork/project.md` journal — they do not branch it.
18
+
19
+ ## Parallelism
20
+
21
+ Spawn a sub-skill sub-agent when (a) the sub-skill's work is fully scoped by its own criteria, and (b) the parent's next step does not depend on intermediate state from the sub-skill. Each sub-skill run appends a row to `project.md::subSkillRuns` so the parent can read the outcome on return.
22
+
23
+ See the parent `SKILL.md` `subSkills[]` array for the current roster.
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: creative-strategist-frame-analysis
3
+ description: Sub-skill of creative-strategist-v1 — runs the muse-video frame-extraction pass when no frozen ad-format matches the brief. Invokes helpers/extract-muse-frames.sh and returns a scene-map draft. Meant to be spawned as a parallel sub-agent by the parent creative-strategist skill when Step 2b of the brief runbook is triggered.
4
+ triggers:
5
+ - muse frame extraction
6
+ - muse analysis
7
+ - new muse format
8
+ - frame-by-frame analysis
9
+ progressiveDisclosure: true
10
+ sessionMemory:
11
+ path: .growthub-fork/project.md
12
+ selfEval:
13
+ criteria:
14
+ - Frame count in the brief matches the muse scene count (if muse has 9 scenes, brief has 9).
15
+ - Each frame read via the agent's file-read tool, batched at most 3 per call.
16
+ - Tone-flip boundary (problem → solution) identified and recorded in the scene map.
17
+ - Output scene map references helpers/extract-muse-frames.sh invocation, not inline shell.
18
+ maxRetries: 3
19
+ traceTo: .growthub-fork/trace.jsonl
20
+ helpers:
21
+ - path: ../../helpers/extract-muse-frames.sh
22
+ description: Deterministic ffprobe + ffmpeg wrapper — replaces the inline Step 2b shell block.
23
+ subSkills: []
24
+ mcpTools: []
25
+ ---
26
+
27
+ # Creative Strategist — Frame Analysis Sub-Skill
28
+
29
+ Spawned by `creative-strategist-v1` when Step 2b of the brief runbook triggers (no frozen ad-format matches the new muse). Runs in parallel to the parent agent so the parent retains the brief's full context while this sub-agent focuses on frame extraction + scene mapping.
30
+
31
+ Source of truth for the methodology: `templates/ad-formats/frame-analysis.md` in the parent kit (loaded on demand — this SKILL.md is the routing menu, not the methodology).
32
+
33
+ ## When to spawn this sub-skill
34
+
35
+ - The brief's muse does not match any entry in `templates/ad-formats/INDEX.md`.
36
+ - A new muse is being frozen into a reusable ad-format.
37
+ - The operator wants the frame-extraction work isolated so the main agent can continue drafting the brief's narrative.
38
+
39
+ ## Decision tree
40
+
41
+ ```
42
+ No frozen ad-format matches?
43
+ ├── Yes → parent spawns this sub-skill → parallel execution:
44
+ │ 1. bash helpers/extract-muse-frames.sh <muse.mp4>
45
+ │ 2. Agent Read-tool over /tmp/muse_frames/*.jpg (batch ≤ 3)
46
+ │ 3. Produce scene-map draft with 4 answers:
47
+ │ • scene count
48
+ │ • tone-flip boundary
49
+ │ • character / visual format
50
+ │ • text rhythm
51
+ │ 4. Self-eval against criteria above; if pass, return to parent.
52
+
53
+ └── No → do not spawn. Parent uses the frozen ad-format directly.
54
+ ```
55
+
56
+ ## Sub-skill run protocol
57
+
58
+ 1. Append a `subSkillRuns` row to the fork's `.growthub-fork/project.md` frontmatter: `subSkill: creative-strategist-frame-analysis`, `startedAt`, target muse path.
59
+ 2. Run the helper: `bash helpers/extract-muse-frames.sh <muse.mp4>`.
60
+ 3. Batch-Read up to 3 frames at a time. Do not dump raw pixel data back to the parent — summarise into the 4-answer scene map.
61
+ 4. Self-evaluate against `selfEval.criteria`. Each attempt recorded to `project.md` + `trace.jsonl` via the `growthub-local` `recordSelfEval` primitive (`cli/src/skills/self-eval.ts`).
62
+ 5. When `attempt === maxRetries` without pass, park with `needs_confirmation` in `project.md` and return control to the parent.
63
+
64
+ ## Parent-facing return value
65
+
66
+ Return to the parent agent:
67
+
68
+ ```yaml
69
+ sceneMap:
70
+ sceneCount: <int>
71
+ toneFlipAt: <scene index or "none">
72
+ visualFormat: <short description>
73
+ textRhythm: <short description>
74
+ selfEval:
75
+ attempts: <int>
76
+ result: pass | parked
77
+ framesDir: /tmp/muse_frames
78
+ ```
79
+
80
+ ## Freeze-after-run (when brief ships)
81
+
82
+ After the parent brief ships with this new muse, freeze the format by adding a row to `templates/ad-formats/INDEX.md` + a new `templates/ad-formats/<new-id>.md`. This sub-skill is only re-spawned when a new muse does not match the growing frozen set.
83
+
84
+ ## What this sub-skill does NOT do
85
+
86
+ - It does not write the brief. The parent skill owns the brief.
87
+ - It does not install ffmpeg / ffprobe. Those are runtime assumptions (see `runtime-assumptions.md` at the kit root, when present).
88
+ - It does not read outside `/tmp/muse_frames/`. Agents running this sub-skill should not probe other tmp paths.
@@ -0,0 +1,48 @@
1
+ ---
2
+ # .growthub-fork/project.md — session memory primitive (v1)
3
+ #
4
+ # Written by the CLI at init/import time. Append-only, human-readable; sits
5
+ # alongside the machine-readable `trace.jsonl`. Approvals, self-eval outcomes,
6
+ # and sub-skill runs all record here.
7
+ #
8
+ # Replaceable tokens (seeded at init time):
9
+ # {{KIT_ID}} {{FORK_ID}} {{STARTED_AT}} {{SOURCE}} {{SOURCE_REF}}
10
+
11
+ kitId: "{{KIT_ID}}"
12
+ forkId: "{{FORK_ID}}"
13
+ startedAt: "{{STARTED_AT}}"
14
+ source: "{{SOURCE}}"
15
+ sourceRef: "{{SOURCE_REF}}"
16
+ skillManifestVersion: 1
17
+ approvals: []
18
+ selfEvalHistory: []
19
+ subSkillRuns: []
20
+ ---
21
+
22
+ # Project journal — fork `{{FORK_ID}}`
23
+
24
+ Baseline primitive: `{{KIT_ID}}`. Seeded at `{{STARTED_AT}}` from `{{SOURCE}}` (`{{SOURCE_REF}}`).
25
+
26
+ This is your cross-session continuity surface. Read the last few entries before every session; append after every material change, approval, and self-eval boundary.
27
+
28
+ ## How to use this file
29
+
30
+ 1. **Session start.** Read the last 3 entries + tail 20 events in `.growthub-fork/trace.jsonl`. State your plan.
31
+ 2. **Material change.** Record as a dated bullet (what, why, outcome). Simultaneously append a typed event to `trace.jsonl` via the Fork Sync Agent — never bypass.
32
+ 3. **Approval boundary.** Add a row to `approvals` in the frontmatter (verbatim decision).
33
+ 4. **Self-eval boundary.** Append to `selfEvalHistory`: `attempt`, `criteria`, `outcome`, `notes`. Enforce `maxRetries: 3`.
34
+ 5. **Sub-skill spawn.** Append to `subSkillRuns`: `subSkill`, `startedAt`, `result`.
35
+
36
+ ## Session log
37
+
38
+ <!-- Append newest entries at the bottom. Format:
39
+
40
+ ### {{YYYY-MM-DD HH:mm UTC}} · {{skill-slug}}
41
+ - **Plan.** What you intend to do.
42
+ - **Changes.** Material changes (each must correspond to a trace event).
43
+ - **Outcome.** Pass / fail / parked. Reference self-eval criteria.
44
+ - **Next.** What the next session should pick up.
45
+
46
+ -->
47
+
48
+ _No sessions recorded yet. Populated as the fork is operated._
@@ -0,0 +1,67 @@
1
+ # Self-evaluation template — v1 primitive (Growthub, capability-agnostic)
2
+
3
+ A skill's `selfEval` contract declares **what good looks like** (`criteria[]`) and **the retry ceiling** (`maxRetries`). The agent drives the loop; this file is the pattern the agent follows at every unit of work.
4
+
5
+ The contract is defined in `@growthub/api-contract/skills::SkillSelfEval` and is **capability-agnostic** — the same primitive applies to code edits, copy drafts, CRM rules, API payloads, asset renders, audit passes, and every other domain. The "unit of work" is the smallest reversible change the skill operates on; concrete boundaries are defined in the kit's own `skills.md` operator runbook, not here.
6
+
7
+ ## Loop
8
+
9
+ ```
10
+ for attempt in 1..maxRetries: # default maxRetries = 3
11
+ generate — produce a proposal (whatever the skill produces)
12
+ apply — materialise the proposal against the fork
13
+ self-evaluate — for each criterion in skill.selfEval.criteria:
14
+ check → pass / fail / needs-confirmation
15
+ record — append to project.md (human) + trace.jsonl (machine)
16
+
17
+ if all criteria pass: break
18
+ if attempt == maxRetries: park with needs_confirmation note. Stop.
19
+ ```
20
+
21
+ ## What each attempt writes
22
+
23
+ ### Human row — append to `.growthub-fork/project.md` "Session log"
24
+
25
+ ```md
26
+ ### 2026-04-23 18:40 UTC · <skill-slug>
27
+ - **Plan.** What you intend to do this unit of work.
28
+ - **Changes.** Material change applied (must correspond to a trace event).
29
+ - **Self-eval.** attempt 2/3 — criterion "<one of skill.selfEval.criteria>" ✗ (<note>). Retrying.
30
+ - **Outcome.** retry-pending / pass / parked.
31
+ - **Next.** What the next attempt (or next session) should pick up.
32
+ ```
33
+
34
+ ### Machine row — append to `.growthub-fork/trace.jsonl` (via `appendKitForkTraceEvent`)
35
+
36
+ ```json
37
+ {
38
+ "ts": "2026-04-23T18:40:00.000Z",
39
+ "forkId": "<fork-id>",
40
+ "kitId": "<kit-id>",
41
+ "type": "self_eval_recorded",
42
+ "summary": "attempt 2/3 failed on <criterion>",
43
+ "detail": {
44
+ "skill": "<skill-slug>",
45
+ "attempt": 2,
46
+ "maxRetries": 3,
47
+ "criterion": "<one of skill.selfEval.criteria>",
48
+ "outcome": "fail",
49
+ "notes": "<short explanation>"
50
+ }
51
+ }
52
+ ```
53
+
54
+ ## Hard rules
55
+
56
+ 1. **Never exceed `maxRetries`.** At the ceiling, park with a `needs_confirmation` note and stop. Do not loop forever.
57
+ 2. **Record every attempt.** Even the first pass. Continuity depends on a complete journal.
58
+ 3. **Keep `project.md` and `trace.jsonl` in sync.** One without the other is a protocol violation.
59
+ 4. **Preserve prior entries.** Append-only. Never rewrite history.
60
+
61
+ ## Bound the blast radius
62
+
63
+ Evaluate at the smallest unit of work the skill operates on, not only at the end of a multi-step run. The retry ceiling applies to that unit — so a bad attempt does not sink the whole job.
64
+
65
+ What counts as a "unit of work" is **kit-specific** and lives in that kit's `skills.md` operator runbook — not in this agnostic template. A kit picks its own smallest reversible boundary and documents it in `skills.md`; this template does not prescribe one.
66
+
67
+ The agnostic SDK (`@growthub/api-contract/skills::SkillSelfEval`) does not encode any domain-specific boundaries — it only carries `criteria[]`, `maxRetries`, and `traceTo`. See `SKILL.md::selfEval.criteria` in this kit for the concrete checks, and `skills.md` for the kit-specific unit of work.
@@ -439,3 +439,25 @@ This confirmation step costs 10 seconds and prevents hours of rework.
439
439
  | Opening Google Drive before file exists | Run the script and confirm DONE first |
440
440
  | Asking more than 3 questions | Exactly 3. Prioritize the highest-risk unknowns. |
441
441
  | Asking questions already answered in brand kit | Only ask what's genuinely unknown |
442
+
443
+ ---
444
+
445
+ ## Governed-workspace primitives (v1.2)
446
+
447
+ This workspace carries the six architectural primitives every Growthub fork inherits. The contract is capability-agnostic (`@growthub/api-contract/skills::SkillManifest`); kit-specific specialisation lives in `skills.md` above.
448
+
449
+ 1. **`SKILL.md`** at the kit root — the discovery entry / routing menu. Read before `skills.md`.
450
+ 2. **Repo-root `AGENTS.md` pointer** — Cursor / Claude / Codex all read the same contract.
451
+ 3. **`.growthub-fork/project.md`** — session memory, seeded at init/import from `templates/project.md`. Append a dated entry after every material change.
452
+ 4. **Self-evaluation (`selfEval.criteria` + `maxRetries`)** — generate → apply → evaluate → record; retry up to 3; every attempt writes to both `project.md` (human) and `trace.jsonl` (machine). Use `recordSelfEval` (`cli/src/skills/self-eval.ts`); never bypass the fork-trace primitive.
453
+ 5. **Nested `skills/<slug>/SKILL.md`** — sub-skill lanes for parallel sub-agents on heavy or narrow work.
454
+ 6. **`helpers/<verb>.{sh,mjs,py}`** — safe shell tool layer; promote any inline shell that gets used twice.
455
+
456
+ Command surface from inside this fork:
457
+
458
+ - `growthub skills list` — enumerate this fork’s SKILL.md tree
459
+ - `growthub skills validate` — strict shape check
460
+ - `growthub skills session show` — print the current `.growthub-fork/project.md`
461
+ - `growthub skills session init --kit <kit-id>` — (re-)seed session memory
462
+
463
+ Full user-facing narrative: `cli/assets/worker-kits/growthub-custom-workspace-starter-v1/docs/governed-workspace-primitives.md` (also shipped into any workspace forked from the starter kit).