@softspark/ai-toolkit 1.0.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 (327) hide show
  1. package/AGENTS.md +412 -0
  2. package/CHANGELOG.md +68 -0
  3. package/LICENSE +21 -0
  4. package/README.md +632 -0
  5. package/action.yml +53 -0
  6. package/app/.claude-plugin/plugin.json +44 -0
  7. package/app/ARCHITECTURE.md +306 -0
  8. package/app/CLAUDE.md.template +23 -0
  9. package/app/agents/ai-engineer.md +128 -0
  10. package/app/agents/backend-specialist.md +193 -0
  11. package/app/agents/business-intelligence.md +54 -0
  12. package/app/agents/chaos-monkey.md +67 -0
  13. package/app/agents/chief-of-staff.md +51 -0
  14. package/app/agents/code-archaeologist.md +127 -0
  15. package/app/agents/code-reviewer.md +184 -0
  16. package/app/agents/command-expert.md +131 -0
  17. package/app/agents/data-analyst.md +205 -0
  18. package/app/agents/data-scientist.md +151 -0
  19. package/app/agents/database-architect.md +317 -0
  20. package/app/agents/debugger.md +238 -0
  21. package/app/agents/devops-implementer.md +194 -0
  22. package/app/agents/documenter.md +364 -0
  23. package/app/agents/explorer-agent.md +145 -0
  24. package/app/agents/fact-checker.md +172 -0
  25. package/app/agents/frontend-specialist.md +209 -0
  26. package/app/agents/game-developer.md +216 -0
  27. package/app/agents/incident-responder.md +226 -0
  28. package/app/agents/infrastructure-architect.md +127 -0
  29. package/app/agents/infrastructure-validator.md +247 -0
  30. package/app/agents/llm-ops-engineer.md +237 -0
  31. package/app/agents/mcp-expert.md +228 -0
  32. package/app/agents/mcp-server-architect.md +195 -0
  33. package/app/agents/mcp-testing-engineer.md +292 -0
  34. package/app/agents/meta-architect.md +58 -0
  35. package/app/agents/ml-engineer.md +136 -0
  36. package/app/agents/mobile-developer.md +190 -0
  37. package/app/agents/night-watchman.md +55 -0
  38. package/app/agents/nlp-engineer.md +154 -0
  39. package/app/agents/orchestrator.md +437 -0
  40. package/app/agents/performance-optimizer.md +254 -0
  41. package/app/agents/predictive-analyst.md +57 -0
  42. package/app/agents/product-manager.md +194 -0
  43. package/app/agents/project-planner.md +287 -0
  44. package/app/agents/prompt-engineer.md +103 -0
  45. package/app/agents/qa-automation-engineer.md +182 -0
  46. package/app/agents/rag-engineer.md +201 -0
  47. package/app/agents/research-synthesizer.md +138 -0
  48. package/app/agents/search-specialist.md +101 -0
  49. package/app/agents/security-architect.md +62 -0
  50. package/app/agents/security-auditor.md +293 -0
  51. package/app/agents/seo-specialist.md +111 -0
  52. package/app/agents/system-governor.md +57 -0
  53. package/app/agents/tech-lead.md +62 -0
  54. package/app/agents/technical-researcher.md +103 -0
  55. package/app/agents/test-engineer.md +264 -0
  56. package/app/constitution.md +38 -0
  57. package/app/hooks/_profile-check.sh +11 -0
  58. package/app/hooks/guard-destructive.sh +74 -0
  59. package/app/hooks/guard-path.sh +73 -0
  60. package/app/hooks/post-tool-use.sh +35 -0
  61. package/app/hooks/pre-compact.sh +31 -0
  62. package/app/hooks/quality-check.sh +22 -0
  63. package/app/hooks/quality-gate.sh +49 -0
  64. package/app/hooks/save-session.sh +24 -0
  65. package/app/hooks/session-end.sh +37 -0
  66. package/app/hooks/session-start.sh +29 -0
  67. package/app/hooks/subagent-start.sh +16 -0
  68. package/app/hooks/subagent-stop.sh +16 -0
  69. package/app/hooks/track-usage.sh +50 -0
  70. package/app/hooks/user-prompt-submit.sh +25 -0
  71. package/app/hooks.json +178 -0
  72. package/app/mcp-defaults.json +23 -0
  73. package/app/output-styles/golden-rules.md +43 -0
  74. package/app/plugins/README.md +19 -0
  75. package/app/plugins/csharp-pack/README.md +11 -0
  76. package/app/plugins/csharp-pack/plugin.json +18 -0
  77. package/app/plugins/enterprise-pack/README.md +16 -0
  78. package/app/plugins/enterprise-pack/hooks/output-style.sh +6 -0
  79. package/app/plugins/enterprise-pack/hooks/status-line.sh +8 -0
  80. package/app/plugins/enterprise-pack/plugin.json +24 -0
  81. package/app/plugins/frontend-pack/README.md +14 -0
  82. package/app/plugins/frontend-pack/plugin.json +22 -0
  83. package/app/plugins/java-pack/README.md +11 -0
  84. package/app/plugins/java-pack/plugin.json +18 -0
  85. package/app/plugins/kotlin-pack/README.md +11 -0
  86. package/app/plugins/kotlin-pack/plugin.json +18 -0
  87. package/app/plugins/memory-pack/README.md +24 -0
  88. package/app/plugins/memory-pack/hooks/observation-capture.sh +67 -0
  89. package/app/plugins/memory-pack/hooks/session-summary.sh +71 -0
  90. package/app/plugins/memory-pack/plugin.json +22 -0
  91. package/app/plugins/memory-pack/scripts/init_db.py +81 -0
  92. package/app/plugins/memory-pack/scripts/strip_private.py +22 -0
  93. package/app/plugins/memory-pack/skills/mem-search/SKILL.md +70 -0
  94. package/app/plugins/research-pack/README.md +14 -0
  95. package/app/plugins/research-pack/plugin.json +22 -0
  96. package/app/plugins/ruby-pack/README.md +11 -0
  97. package/app/plugins/ruby-pack/plugin.json +18 -0
  98. package/app/plugins/rust-pack/README.md +11 -0
  99. package/app/plugins/rust-pack/plugin.json +18 -0
  100. package/app/plugins/security-pack/README.md +15 -0
  101. package/app/plugins/security-pack/plugin.json +23 -0
  102. package/app/plugins/swift-pack/README.md +11 -0
  103. package/app/plugins/swift-pack/plugin.json +18 -0
  104. package/app/rules/claude-toolkit-rules.md +21 -0
  105. package/app/rules/git-conventions.md +5 -0
  106. package/app/rules/quality-gates.md +10 -0
  107. package/app/skills/_lib/__init__.py +1 -0
  108. package/app/skills/_lib/detect_utils.py +150 -0
  109. package/app/skills/agent-creator/SKILL.md +82 -0
  110. package/app/skills/analyze/SKILL.md +92 -0
  111. package/app/skills/analyze/scripts/complexity.py +165 -0
  112. package/app/skills/api-patterns/SKILL.md +305 -0
  113. package/app/skills/app-builder/SKILL.md +187 -0
  114. package/app/skills/architecture-audit/SKILL.md +141 -0
  115. package/app/skills/architecture-decision/SKILL.md +55 -0
  116. package/app/skills/architecture-decision/templates/adr-template.md +36 -0
  117. package/app/skills/biz-scan/SKILL.md +30 -0
  118. package/app/skills/briefing/SKILL.md +27 -0
  119. package/app/skills/build/SKILL.md +97 -0
  120. package/app/skills/build/scripts/detect-build.py +151 -0
  121. package/app/skills/chaos/SKILL.md +32 -0
  122. package/app/skills/ci/SKILL.md +77 -0
  123. package/app/skills/ci/scripts/ci-detect.py +135 -0
  124. package/app/skills/ci/templates/github-actions-node.yml +38 -0
  125. package/app/skills/ci/templates/github-actions-python.yml +42 -0
  126. package/app/skills/ci-cd-patterns/SKILL.md +299 -0
  127. package/app/skills/clean-code/SKILL.md +110 -0
  128. package/app/skills/clean-code/reference/dart.md +18 -0
  129. package/app/skills/clean-code/reference/go.md +23 -0
  130. package/app/skills/clean-code/reference/php.md +32 -0
  131. package/app/skills/clean-code/reference/python.md +180 -0
  132. package/app/skills/clean-code/reference/typescript.md +26 -0
  133. package/app/skills/command-creator/SKILL.md +83 -0
  134. package/app/skills/commit/SKILL.md +98 -0
  135. package/app/skills/commit/scripts/pre-commit-check.py +87 -0
  136. package/app/skills/commit/templates/conventional-commit.md +52 -0
  137. package/app/skills/csharp-patterns/SKILL.md +450 -0
  138. package/app/skills/database-patterns/SKILL.md +297 -0
  139. package/app/skills/debug/SKILL.md +154 -0
  140. package/app/skills/debug/scripts/error-parser.py +187 -0
  141. package/app/skills/debugging-tactics/SKILL.md +136 -0
  142. package/app/skills/deploy/SKILL.md +130 -0
  143. package/app/skills/deploy/scripts/pre_deploy_check.py +171 -0
  144. package/app/skills/deploy/templates/deployment-checklist.md +31 -0
  145. package/app/skills/design-an-interface/SKILL.md +105 -0
  146. package/app/skills/design-engineering/SKILL.md +260 -0
  147. package/app/skills/docker-devops/SKILL.md +303 -0
  148. package/app/skills/docs/SKILL.md +145 -0
  149. package/app/skills/docs/scripts/doc-inventory.py +176 -0
  150. package/app/skills/docs/templates/adr-template.md +36 -0
  151. package/app/skills/docs/templates/readme-template.md +67 -0
  152. package/app/skills/documentation-standards/SKILL.md +191 -0
  153. package/app/skills/ecommerce-patterns/SKILL.md +209 -0
  154. package/app/skills/evaluate/SKILL.md +132 -0
  155. package/app/skills/evolve/SKILL.md +27 -0
  156. package/app/skills/explain/SKILL.md +54 -0
  157. package/app/skills/explain/scripts/dependency-graph.py +215 -0
  158. package/app/skills/explore/SKILL.md +112 -0
  159. package/app/skills/explore/scripts/visualize.py +117 -0
  160. package/app/skills/fix/SKILL.md +78 -0
  161. package/app/skills/fix/scripts/error-classifier.py +191 -0
  162. package/app/skills/flutter-patterns/SKILL.md +254 -0
  163. package/app/skills/git-mastery/SKILL.md +70 -0
  164. package/app/skills/grill-me/SKILL.md +38 -0
  165. package/app/skills/health/SKILL.md +91 -0
  166. package/app/skills/health/scripts/health_check.py +162 -0
  167. package/app/skills/hive-mind/SKILL.md +56 -0
  168. package/app/skills/hook-creator/SKILL.md +107 -0
  169. package/app/skills/index/SKILL.md +74 -0
  170. package/app/skills/instinct-review/SKILL.md +77 -0
  171. package/app/skills/java-patterns/SKILL.md +442 -0
  172. package/app/skills/kotlin-patterns/SKILL.md +446 -0
  173. package/app/skills/lint/SKILL.md +103 -0
  174. package/app/skills/lint/scripts/detect-linters.py +112 -0
  175. package/app/skills/mcp-patterns/SKILL.md +270 -0
  176. package/app/skills/mem-search/SKILL.md +70 -0
  177. package/app/skills/migrate/SKILL.md +90 -0
  178. package/app/skills/migrate/scripts/migration-status.py +195 -0
  179. package/app/skills/migration-patterns/SKILL.md +260 -0
  180. package/app/skills/night-watch/SKILL.md +28 -0
  181. package/app/skills/observability-patterns/SKILL.md +203 -0
  182. package/app/skills/onboard/SKILL.md +76 -0
  183. package/app/skills/orchestrate/SKILL.md +86 -0
  184. package/app/skills/panic/SKILL.md +30 -0
  185. package/app/skills/performance-profiling/SKILL.md +59 -0
  186. package/app/skills/plan/SKILL.md +110 -0
  187. package/app/skills/plan/templates/plan-template.md +40 -0
  188. package/app/skills/plan-writing/SKILL.md +201 -0
  189. package/app/skills/plugin-creator/SKILL.md +78 -0
  190. package/app/skills/pr/SKILL.md +129 -0
  191. package/app/skills/pr/scripts/pr-summary.py +175 -0
  192. package/app/skills/prd-to-issues/SKILL.md +108 -0
  193. package/app/skills/prd-to-plan/SKILL.md +120 -0
  194. package/app/skills/predict/SKILL.md +30 -0
  195. package/app/skills/qa-session/SKILL.md +110 -0
  196. package/app/skills/rag-patterns/SKILL.md +203 -0
  197. package/app/skills/refactor/SKILL.md +124 -0
  198. package/app/skills/refactor/scripts/refactor-scan.py +210 -0
  199. package/app/skills/refactor-plan/SKILL.md +112 -0
  200. package/app/skills/repeat/SKILL.md +149 -0
  201. package/app/skills/research-mastery/SKILL.md +56 -0
  202. package/app/skills/review/SKILL.md +141 -0
  203. package/app/skills/review/scripts/diff-analyzer.py +170 -0
  204. package/app/skills/rollback/SKILL.md +87 -0
  205. package/app/skills/rollback/scripts/rollback_info.py +149 -0
  206. package/app/skills/ruby-patterns/SKILL.md +454 -0
  207. package/app/skills/rust-patterns/SKILL.md +446 -0
  208. package/app/skills/search/SKILL.md +64 -0
  209. package/app/skills/security-patterns/SKILL.md +91 -0
  210. package/app/skills/security-patterns/reference/authentication.md +37 -0
  211. package/app/skills/security-patterns/reference/authorization.md +22 -0
  212. package/app/skills/security-patterns/reference/input-validation.md +30 -0
  213. package/app/skills/security-patterns/reference/oauth-csrf-audit.md +131 -0
  214. package/app/skills/skill-creator/SKILL.md +154 -0
  215. package/app/skills/skill-creator/templates/dashboard/index.html +130 -0
  216. package/app/skills/skill-creator/templates/reasoning-engine/assets/example.json +12 -0
  217. package/app/skills/skill-creator/templates/reasoning-engine/search.py +110 -0
  218. package/app/skills/subagent-development/SKILL.md +225 -0
  219. package/app/skills/subagent-development/reference/code-quality-reviewer-prompt.md +145 -0
  220. package/app/skills/subagent-development/reference/implementer-prompt.md +118 -0
  221. package/app/skills/subagent-development/reference/spec-reviewer-prompt.md +100 -0
  222. package/app/skills/swarm/SKILL.md +81 -0
  223. package/app/skills/swift-patterns/SKILL.md +500 -0
  224. package/app/skills/tdd/SKILL.md +174 -0
  225. package/app/skills/tdd/reference/deep-modules.md +32 -0
  226. package/app/skills/tdd/reference/interface-design.md +32 -0
  227. package/app/skills/tdd/reference/mocking.md +52 -0
  228. package/app/skills/tdd/reference/refactoring.md +10 -0
  229. package/app/skills/tdd/reference/tests.md +59 -0
  230. package/app/skills/teams/SKILL.md +101 -0
  231. package/app/skills/test/SKILL.md +107 -0
  232. package/app/skills/test/scripts/detect-runner.py +113 -0
  233. package/app/skills/testing-patterns/SKILL.md +73 -0
  234. package/app/skills/testing-patterns/reference/flutter-testing.md +33 -0
  235. package/app/skills/testing-patterns/reference/go-testing.md +52 -0
  236. package/app/skills/testing-patterns/reference/php-phpunit.md +39 -0
  237. package/app/skills/testing-patterns/reference/python-pytest.md +228 -0
  238. package/app/skills/testing-patterns/reference/typescript-vitest.md +50 -0
  239. package/app/skills/triage-issue/SKILL.md +120 -0
  240. package/app/skills/typescript-patterns/SKILL.md +256 -0
  241. package/app/skills/ubiquitous-language/SKILL.md +74 -0
  242. package/app/skills/verification-before-completion/SKILL.md +108 -0
  243. package/app/skills/workflow/SKILL.md +250 -0
  244. package/app/skills/write-a-prd/SKILL.md +129 -0
  245. package/app/skills/write-a-prd/reference/visual-companion.md +78 -0
  246. package/app/skills/write-a-prd/scripts/frame-template.html +111 -0
  247. package/app/skills/write-a-prd/scripts/visual-server.cjs +79 -0
  248. package/app/templates/skill/generator/SKILL.md.template +40 -0
  249. package/app/templates/skill/knowledge/SKILL.md.template +52 -0
  250. package/app/templates/skill/linter/SKILL.md.template +34 -0
  251. package/app/templates/skill/reviewer/SKILL.md.template +51 -0
  252. package/app/templates/skill/workflow/SKILL.md.template +49 -0
  253. package/benchmarks/README.md +111 -0
  254. package/benchmarks/ecosystem-dashboard.json +148 -0
  255. package/benchmarks/ecosystem-harvest.json +148 -0
  256. package/benchmarks/results.json +38 -0
  257. package/benchmarks/run.py +351 -0
  258. package/bin/ai-toolkit.js +345 -0
  259. package/kb/best-practices/README.md +11 -0
  260. package/kb/howto/README.md +11 -0
  261. package/kb/procedures/maintenance-sop.md +306 -0
  262. package/kb/reference/agents-catalog.md +124 -0
  263. package/kb/reference/anti-pattern-registry-format.md +221 -0
  264. package/kb/reference/architecture-overview.md +232 -0
  265. package/kb/reference/benchmark-config.md +62 -0
  266. package/kb/reference/ci-integration.md +66 -0
  267. package/kb/reference/claude-ecosystem-benchmark-snapshot.md +80 -0
  268. package/kb/reference/claude-ecosystem-expansion-foundations.md +102 -0
  269. package/kb/reference/commands-catalog.md +21 -0
  270. package/kb/reference/distribution-model.md +63 -0
  271. package/kb/reference/global-install-model.md +56 -0
  272. package/kb/reference/hierarchical-override-pattern.md +200 -0
  273. package/kb/reference/hooks-catalog.md +306 -0
  274. package/kb/reference/integrations.md +88 -0
  275. package/kb/reference/language-packs.md +52 -0
  276. package/kb/reference/merge-friendly-install-model.md +58 -0
  277. package/kb/reference/plugin-pack-conventions.md +151 -0
  278. package/kb/reference/quick-wins-implementation-summary.md +70 -0
  279. package/kb/reference/skill-templates.md +50 -0
  280. package/kb/reference/skills-catalog.md +215 -0
  281. package/kb/reference/skills-unification.md +57 -0
  282. package/kb/reference/stats.md +69 -0
  283. package/kb/reference/sync.md +76 -0
  284. package/kb/troubleshooting/README.md +11 -0
  285. package/llms-full.txt +3068 -0
  286. package/llms.txt +39 -0
  287. package/package.json +75 -0
  288. package/scripts/_common.py +160 -0
  289. package/scripts/add_rule.py +50 -0
  290. package/scripts/benchmark_config.py +127 -0
  291. package/scripts/benchmark_ecosystem.py +288 -0
  292. package/scripts/check_deps.py +260 -0
  293. package/scripts/create_skill.py +118 -0
  294. package/scripts/doctor.py +504 -0
  295. package/scripts/eject.py +113 -0
  296. package/scripts/emission.py +256 -0
  297. package/scripts/evaluate_skills.py +260 -0
  298. package/scripts/frontmatter.py +58 -0
  299. package/scripts/generate_agents_md.py +91 -0
  300. package/scripts/generate_aider_conf.py +51 -0
  301. package/scripts/generate_cline.py +35 -0
  302. package/scripts/generate_copilot.py +30 -0
  303. package/scripts/generate_cursor_rules.py +35 -0
  304. package/scripts/generate_gemini.py +28 -0
  305. package/scripts/generate_llms_txt.py +164 -0
  306. package/scripts/generate_roo_modes.py +80 -0
  307. package/scripts/generate_windsurf.py +35 -0
  308. package/scripts/generator_base.py +140 -0
  309. package/scripts/harvest_ecosystem.py +50 -0
  310. package/scripts/inject_rule_cli.py +101 -0
  311. package/scripts/inject_section_cli.py +47 -0
  312. package/scripts/injection.py +180 -0
  313. package/scripts/install.py +236 -0
  314. package/scripts/install_git_hooks.py +71 -0
  315. package/scripts/install_steps/__init__.py +5 -0
  316. package/scripts/install_steps/ai_tools.py +261 -0
  317. package/scripts/install_steps/hooks.py +90 -0
  318. package/scripts/install_steps/markers.py +79 -0
  319. package/scripts/install_steps/symlinks.py +87 -0
  320. package/scripts/merge-hooks.py +192 -0
  321. package/scripts/plugin.py +642 -0
  322. package/scripts/plugin_schema.py +138 -0
  323. package/scripts/remove_rule.py +58 -0
  324. package/scripts/stats.py +81 -0
  325. package/scripts/sync.py +215 -0
  326. package/scripts/uninstall.py +292 -0
  327. package/scripts/validate.py +700 -0
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: ubiquitous-language
3
+ description: "Extract a DDD-style ubiquitous language glossary from the conversation, flagging ambiguities and proposing canonical terms. Saves to UBIQUITOUS_LANGUAGE.md. Use when user wants to define domain terms, build a glossary, harden terminology, or mentions DDD or domain model."
4
+ user-invocable: true
5
+ effort: medium
6
+ argument-hint: "[domain or context to extract terms from]"
7
+ allowed-tools: Read, Write, Edit, Grep, Glob
8
+ ---
9
+
10
+ # Ubiquitous Language
11
+
12
+ $ARGUMENTS
13
+
14
+ Extract and formalize domain terminology into a consistent glossary.
15
+
16
+ ## Usage
17
+
18
+ ```
19
+ /ubiquitous-language [domain or context]
20
+ ```
21
+
22
+ ## What This Command Does
23
+
24
+ 1. **Scans** conversation for domain-relevant nouns, verbs, and concepts
25
+ 2. **Identifies** ambiguities, synonyms, and overloaded terms
26
+ 3. **Proposes** canonical glossary with opinionated term choices
27
+ 4. **Writes** to `UBIQUITOUS_LANGUAGE.md`
28
+
29
+ ## Process
30
+
31
+ 1. Scan conversation for domain terms
32
+ 2. Identify problems:
33
+ - Same word used for different concepts (ambiguity)
34
+ - Different words used for same concept (synonyms)
35
+ - Vague or overloaded terms
36
+ 3. Propose canonical glossary
37
+ 4. Write to `UBIQUITOUS_LANGUAGE.md`
38
+ 5. Output summary inline
39
+
40
+ ## Output Format
41
+
42
+ ```markdown
43
+ # Ubiquitous Language
44
+
45
+ ## {Domain Group}
46
+
47
+ | Term | Definition | Aliases to avoid |
48
+ |------|-----------|-----------------|
49
+ | **Order** | A customer's request to purchase one or more items | Purchase, transaction |
50
+
51
+ ## Relationships
52
+
53
+ - An **Invoice** belongs to exactly one **Customer**
54
+
55
+ ## Example dialogue
56
+
57
+ > **Dev:** "When a **Customer** places an **Order**..."
58
+ > **Domain expert:** "..."
59
+
60
+ ## Flagged ambiguities
61
+
62
+ - "account" was used to mean both **Customer** and **User** — ...
63
+ ```
64
+
65
+ ## Rules
66
+
67
+ - **Be opinionated** — pick the best term, list others as aliases to avoid
68
+ - **Flag conflicts explicitly** — call out ambiguous usage with clear recommendations
69
+ - **Domain terms only** — skip generic programming concepts (array, function, endpoint)
70
+ - **Tight definitions** — one sentence max, define what it IS not what it does
71
+ - **Show relationships** — bold term names, express cardinality
72
+ - **Group naturally** — multiple tables when clusters emerge, one table if cohesive
73
+ - **Example dialogue** — 3-5 exchanges showing terms used precisely
74
+ - **Keep existing** — when re-running, read existing file and update incrementally
@@ -0,0 +1,108 @@
1
+ ---
2
+ name: verification-before-completion
3
+ description: "Loaded when agent is about to claim work is complete, fixed, or passing — requires running verification commands and confirming output before making any success claims. Evidence before assertions, always."
4
+ user-invocable: false
5
+ ---
6
+
7
+ # Verification Before Completion
8
+
9
+ ## The Iron Law
10
+
11
+ ```
12
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
13
+ ```
14
+
15
+ If you haven't run the verification command in this message, you cannot claim it passes.
16
+
17
+ Claiming work is complete without verification is dishonesty, not efficiency.
18
+
19
+ ## The Gate Function
20
+
21
+ ```
22
+ BEFORE claiming any status or expressing satisfaction:
23
+
24
+ 1. IDENTIFY: What command proves this claim?
25
+ 2. RUN: Execute the FULL command (fresh, complete)
26
+ 3. READ: Full output, check exit code, count failures
27
+ 4. VERIFY: Does output confirm the claim?
28
+ - If NO: State actual status with evidence
29
+ - If YES: State claim WITH evidence
30
+ 5. ONLY THEN: Make the claim
31
+
32
+ Skip any step = lying, not verifying
33
+ ```
34
+
35
+ ## When To Apply
36
+
37
+ **ALWAYS before:**
38
+ - ANY variation of success/completion claims
39
+ - ANY expression of satisfaction ("Great!", "Perfect!", "Done!")
40
+ - ANY positive statement about work state
41
+ - Committing, PR creation, task completion
42
+ - Moving to next task
43
+ - Delegating to agents
44
+
45
+ ## Common Failures
46
+
47
+ | Claim | Requires | Not Sufficient |
48
+ |-------|----------|----------------|
49
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
50
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
51
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
52
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
53
+ | Regression test works | Red-green cycle verified | Test passes once |
54
+ | Agent completed | VCS diff shows changes | Agent reports "success" |
55
+ | Requirements met | Line-by-line checklist | Tests passing |
56
+
57
+ ## Red Flags — STOP
58
+
59
+ - Using "should", "probably", "seems to"
60
+ - Expressing satisfaction before verification
61
+ - About to commit/push/PR without verification
62
+ - Trusting agent success reports without independent check
63
+ - Relying on partial verification
64
+ - Thinking "just this once"
65
+
66
+ ## Rationalization Prevention
67
+
68
+ | Excuse | Reality |
69
+ |--------|---------|
70
+ | "Should work now" | RUN the verification |
71
+ | "I'm confident" | Confidence is not evidence |
72
+ | "Just this once" | No exceptions |
73
+ | "Linter passed" | Linter is not compiler |
74
+ | "Agent said success" | Verify independently |
75
+ | "Partial check is enough" | Partial proves nothing |
76
+ | "Different words so rule doesn't apply" | Spirit over letter |
77
+
78
+ ## Key Patterns
79
+
80
+ **Tests:**
81
+ ```
82
+ CORRECT: [Run test command] [See: 34/34 pass] "All tests pass"
83
+ WRONG: "Should pass now" / "Looks correct"
84
+ ```
85
+
86
+ **Regression tests (TDD Red-Green):**
87
+ ```
88
+ CORRECT: Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
89
+ WRONG: "I've written a regression test" (without red-green verification)
90
+ ```
91
+
92
+ **Requirements:**
93
+ ```
94
+ CORRECT: Re-read plan → Create checklist → Verify each → Report gaps or completion
95
+ WRONG: "Tests pass, phase complete"
96
+ ```
97
+
98
+ **Agent delegation:**
99
+ ```
100
+ CORRECT: Agent reports success → Check VCS diff → Verify changes → Report actual state
101
+ WRONG: Trust agent report at face value
102
+ ```
103
+
104
+ ## The Bottom Line
105
+
106
+ Run the command. Read the output. THEN claim the result.
107
+
108
+ This is non-negotiable.
@@ -0,0 +1,250 @@
1
+ ---
2
+ name: workflow
3
+ description: "Start and manage autonomous agent workflows"
4
+ user-invocable: true
5
+ effort: max
6
+ argument-hint: "[type] [task description]"
7
+ context: fork
8
+ agent: orchestrator
9
+ model: opus
10
+ allowed-tools: Bash, Read, Write, Edit, Glob, Grep, Agent, TeamCreate, TeamDelete, SendMessage, TaskCreate, TaskList, TaskUpdate
11
+ ---
12
+
13
+ # /workflow - Autonomous Agent Workflow
14
+
15
+ $ARGUMENTS
16
+
17
+ ## Step 1 — Select workflow type
18
+
19
+ ```
20
+ Is production DOWN? → incident-response
21
+ Performance degraded >50%? → performance-optimization
22
+ Bug spanning multiple layers? → debugging
23
+ Warning / trend? → proactive-troubleshooting
24
+ Planned infra change? → infrastructure-change
25
+ Planned app deploy? → application-deploy
26
+ New feature (full stack)? → feature-development
27
+ New feature (backend only)? → backend-feature
28
+ New feature (frontend only)? → frontend-feature
29
+ New API endpoint? → api-design
30
+ Schema / migration change? → database-evolution
31
+ Boost test coverage? → test-coverage
32
+ Security assessment? → security-audit
33
+ Exploring unfamiliar codebase? → codebase-onboarding
34
+ Technical research / spike? → spike
35
+ ```
36
+
37
+ ## Step 2 — Define success criteria (MANDATORY)
38
+
39
+ Cannot proceed without:
40
+
41
+ ```yaml
42
+ Deliverables: [what outputs are expected]
43
+ Verification: [how to verify — tests, metrics, commands]
44
+ Definition of done: [quality bar]
45
+ ```
46
+
47
+ Present to user and wait for approval.
48
+
49
+ ## Step 3 — Spawn agents via Agent tool
50
+
51
+ Launch agents **in parallel where independent, sequentially where dependent**. Use the `Agent` tool — never do the work inline.
52
+
53
+ ---
54
+
55
+ ### Existing workflows
56
+
57
+ **`debugging`**
58
+ ```
59
+ # Sequential diagnosis:
60
+ Agent(subagent_type="debugger", prompt="Diagnose issue, 5 Whys, propose solution options. READ-ONLY.")
61
+ Agent(subagent_type="explorer-agent", prompt="Trace call path across layers. READ-ONLY.")
62
+ # Parallel fix:
63
+ Agent(subagent_type="backend-specialist", prompt="Implement fix. Own files: src/")
64
+ Agent(subagent_type="test-engineer", prompt="Write regression test. Own files: tests/")
65
+ # Sequential:
66
+ Agent(subagent_type="documenter", prompt="Document in kb/troubleshooting/ if recurring.")
67
+ ```
68
+
69
+ **`incident-response`**
70
+ ```
71
+ Agent(subagent_type="incident-responder", prompt="Triage, root cause, immediate mitigation. READ-ONLY.")
72
+ # After triage:
73
+ Agent(subagent_type="backend-specialist", prompt="Apply fix. Own files: src/")
74
+ Agent(subagent_type="documenter", prompt="Write postmortem (MANDATORY). Own files: kb/")
75
+ ```
76
+
77
+ **`performance-optimization`**
78
+ ```
79
+ Agent(subagent_type="performance-optimizer", prompt="Profile, identify bottlenecks, propose fixes. READ-ONLY.")
80
+ Agent(subagent_type="backend-specialist", prompt="Implement optimizations. Own files: src/")
81
+ Agent(subagent_type="test-engineer", prompt="Benchmark before/after. Own files: tests/benchmarks/")
82
+ Agent(subagent_type="documenter", prompt="Document baseline and results. Own files: kb/")
83
+ ```
84
+
85
+ **`infrastructure-change`**
86
+ ```
87
+ Agent(subagent_type="infrastructure-architect", prompt="Design change, create architecture note. Own files: docs/")
88
+ Agent(subagent_type="devops-implementer", prompt="Implement infra changes. Own files: docker/, .github/, infra/")
89
+ Agent(subagent_type="security-auditor", prompt="Review for security issues. READ-ONLY.")
90
+ Agent(subagent_type="test-engineer", prompt="Smoke tests and health checks. Own files: tests/")
91
+ Agent(subagent_type="documenter", prompt="Runbook + deployment docs. Own files: kb/")
92
+ ```
93
+
94
+ **`application-deploy`**
95
+ ```
96
+ Agent(subagent_type="devops-implementer", prompt="Execute deployment. Own files: .github/, scripts/")
97
+ Agent(subagent_type="test-engineer", prompt="Post-deploy smoke tests.")
98
+ Agent(subagent_type="documenter", prompt="Release notes. Own files: kb/")
99
+ ```
100
+
101
+ **`proactive-troubleshooting`**
102
+ ```
103
+ Agent(subagent_type="debugger", prompt="Investigate warning/trend, assess risk. READ-ONLY.")
104
+ Agent(subagent_type="performance-optimizer", prompt="Check performance metrics. READ-ONLY.")
105
+ Agent(subagent_type="backend-specialist", prompt="Apply preventive fix if needed. Own files: src/")
106
+ Agent(subagent_type="documenter", prompt="Update monitoring/alerting docs. Own files: kb/")
107
+ ```
108
+
109
+ ---
110
+
111
+ ### New workflows
112
+
113
+ **`feature-development`** — full stack feature, plan → implement → test → ship
114
+ ```
115
+ # Sequential planning:
116
+ Agent(subagent_type="project-planner", prompt="Requirements, acceptance criteria, task breakdown. Own files: docs/")
117
+ Agent(subagent_type="explorer-agent", prompt="Find integration points in codebase. READ-ONLY.")
118
+ # Parallel implementation:
119
+ Agent(subagent_type="backend-specialist", prompt="API routes, business logic, data layer. Own files: src/api/, src/services/")
120
+ Agent(subagent_type="frontend-specialist", prompt="UI components, state management. Own files: src/components/, src/pages/")
121
+ Agent(subagent_type="database-architect", prompt="Schema changes + migrations if needed. Own files: migrations/")
122
+ # Parallel validation:
123
+ Agent(subagent_type="test-engineer", prompt="Unit + integration tests. Own files: tests/")
124
+ Agent(subagent_type="security-auditor", prompt="Security review of new attack surface. READ-ONLY.")
125
+ # Sequential finalization:
126
+ Agent(subagent_type="documenter", prompt="API docs, KB update, changelog. Own files: kb/, docs/")
127
+ ```
128
+
129
+ **`backend-feature`** — backend only: API + logic + tests
130
+ ```
131
+ Agent(subagent_type="explorer-agent", prompt="Find integration points and patterns. READ-ONLY.")
132
+ Agent(subagent_type="backend-specialist", prompt="Implement endpoint + business logic. Own files: src/")
133
+ Agent(subagent_type="database-architect", prompt="Schema/query changes if needed. Own files: migrations/")
134
+ Agent(subagent_type="test-engineer", prompt="Unit + integration tests. Own files: tests/")
135
+ Agent(subagent_type="security-auditor", prompt="Auth/authz, input validation review. READ-ONLY.")
136
+ ```
137
+
138
+ **`frontend-feature`** — UI feature: component + state + tests
139
+ ```
140
+ Agent(subagent_type="explorer-agent", prompt="Find existing components and patterns. READ-ONLY.")
141
+ Agent(subagent_type="frontend-specialist", prompt="Build component, state, routing. Own files: src/components/, src/pages/")
142
+ Agent(subagent_type="test-engineer", prompt="Component tests, E2E if needed. Own files: tests/")
143
+ Agent(subagent_type="documenter", prompt="Component docs / Storybook if applicable.")
144
+ ```
145
+
146
+ **`api-design`** — design + implement + test + document a new API
147
+ ```
148
+ # Sequential design:
149
+ Agent(subagent_type="tech-lead", prompt="API contract, versioning, error format. Own files: docs/api-spec.md")
150
+ Agent(subagent_type="database-architect", prompt="Data model for new resources. Own files: migrations/")
151
+ # Parallel implementation + validation:
152
+ Agent(subagent_type="backend-specialist", prompt="Implement endpoint, validation, business logic. Own files: src/")
153
+ Agent(subagent_type="test-engineer", prompt="Contract tests, integration tests. Own files: tests/")
154
+ Agent(subagent_type="security-auditor", prompt="Auth/authz, rate limiting, input validation. READ-ONLY.")
155
+ Agent(subagent_type="performance-optimizer", prompt="Response time benchmark. READ-ONLY.")
156
+ # Sequential:
157
+ Agent(subagent_type="documenter", prompt="OpenAPI spec, API reference docs. Own files: docs/")
158
+ ```
159
+
160
+ **`database-evolution`** — schema change: design + migrate + update code + validate
161
+ ```
162
+ # Sequential analysis:
163
+ Agent(subagent_type="database-architect", prompt="Design schema change, migration + rollback plan. Own files: migrations/")
164
+ Agent(subagent_type="explorer-agent", prompt="Find all code referencing affected tables/columns. READ-ONLY.")
165
+ # Parallel implementation:
166
+ Agent(subagent_type="backend-specialist", prompt="Update ORM models, queries, data access layer. Own files: src/")
167
+ Agent(subagent_type="test-engineer", prompt="Migration tests, data integrity checks. Own files: tests/")
168
+ # Parallel validation:
169
+ Agent(subagent_type="performance-optimizer", prompt="EXPLAIN ANALYZE on new queries, index efficiency. READ-ONLY.")
170
+ Agent(subagent_type="security-auditor", prompt="SQL injection vectors in new query patterns. READ-ONLY.")
171
+ # Sequential:
172
+ Agent(subagent_type="documenter", prompt="Update schema docs, migration changelog. Own files: kb/")
173
+ ```
174
+
175
+ **`test-coverage`** — systematically boost test coverage for a module
176
+ ```
177
+ # Sequential analysis:
178
+ Agent(subagent_type="explorer-agent", prompt="Map untested code paths, find coverage gaps. READ-ONLY.")
179
+ # Parallel writing:
180
+ Agent(subagent_type="test-engineer", prompt="Write unit tests for uncovered functions. Own files: tests/unit/")
181
+ Agent(subagent_type="backend-specialist", prompt="Add integration test fixtures, mock external services. Own files: tests/integration/")
182
+ # Sequential review:
183
+ Agent(subagent_type="code-reviewer", prompt="Review test quality — no false positives, deterministic. READ-ONLY.")
184
+ ```
185
+
186
+ **`security-audit`** — comprehensive multi-vector security assessment
187
+ ```
188
+ # Sequential recon:
189
+ Agent(subagent_type="explorer-agent", prompt="Map attack surface, entry points, data flows. READ-ONLY.")
190
+ # Parallel audit:
191
+ Agent(subagent_type="security-auditor", prompt="OWASP Top 10, injection, auth review. READ-ONLY.")
192
+ Agent(subagent_type="code-reviewer", prompt="Secrets in code, error handling, logging gaps. READ-ONLY.")
193
+ Agent(subagent_type="devops-implementer", prompt="Infra misconfig, Docker hardening, network. READ-ONLY.")
194
+ Agent(subagent_type="database-architect", prompt="SQL injection vectors, access controls, encryption. READ-ONLY.")
195
+ # Sequential:
196
+ Agent(subagent_type="tech-lead", prompt="Prioritize findings, assign severity (CVSS).")
197
+ Agent(subagent_type="documenter", prompt="Security audit report + remediation checklist. Own files: kb/")
198
+ ```
199
+
200
+ **`codebase-onboarding`** — understand an unfamiliar codebase fast (READ-ONLY)
201
+ ```
202
+ # Parallel discovery:
203
+ Agent(subagent_type="explorer-agent", prompt="Project structure, tech stack, entry points. READ-ONLY.")
204
+ Agent(subagent_type="tech-lead", prompt="Architecture patterns, design decisions, conventions. READ-ONLY.")
205
+ Agent(subagent_type="database-architect", prompt="Data model, relationships, migration history. READ-ONLY.")
206
+ # Parallel analysis:
207
+ Agent(subagent_type="test-engineer", prompt="Test coverage, test patterns, CI pipeline. READ-ONLY.")
208
+ Agent(subagent_type="security-auditor", prompt="Current security posture, credential management. READ-ONLY.")
209
+ # Sequential synthesis:
210
+ Agent(subagent_type="documenter", prompt="Write onboarding guide + architecture overview. Own files: docs/ONBOARDING.md")
211
+ ```
212
+
213
+ **`spike`** — time-boxed technical research to inform a decision
214
+ ```
215
+ # Parallel research:
216
+ Agent(subagent_type="explorer-agent", prompt="Existing codebase patterns relevant to decision. READ-ONLY.")
217
+ Agent(subagent_type="tech-lead", prompt="Architecture implications, trade-off analysis. READ-ONLY.")
218
+ Agent(subagent_type="backend-specialist", prompt="Implementation feasibility, proof of concept.")
219
+ # Sequential evaluation:
220
+ Agent(subagent_type="security-auditor", prompt="Security implications of each option. READ-ONLY.")
221
+ Agent(subagent_type="performance-optimizer", prompt="Performance implications of each option. READ-ONLY.")
222
+ # Sequential decision:
223
+ Agent(subagent_type="tech-lead", prompt="Comparison matrix, recommendation.")
224
+ Agent(subagent_type="documenter", prompt="Write architecture note + spike findings. Own files: kb/reference/")
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Step 4 — Track status
230
+
231
+ | Event | Action |
232
+ |-------|--------|
233
+ | Agent started | `TaskUpdate(status="in_progress")` |
234
+ | Agent complete | `TaskUpdate(status="completed")` |
235
+ | Blocked | Document blocker, reassign or escalate |
236
+
237
+ ## Step 5 — Exit gate
238
+
239
+ Workflow is NOT done until:
240
+ - [ ] Tests pass
241
+ - [ ] Documentation updated in `kb/`
242
+ - [ ] Postmortem written (incident-response only)
243
+ - [ ] Plan archived to `kb/history/completed/`
244
+
245
+ ## Devil's Advocate (workflows >1h)
246
+
247
+ Before implementation:
248
+ - What could go wrong?
249
+ - Hidden costs / tech debt?
250
+ - At least 3 alternatives considered?
@@ -0,0 +1,129 @@
1
+ ---
2
+ name: write-a-prd
3
+ description: "Create a Product Requirements Document through interactive interview, codebase exploration, and deep module design. Use when user wants to write a PRD, create product requirements, or plan a new feature from scratch."
4
+ user-invocable: true
5
+ effort: high
6
+ argument-hint: "[feature or problem description]"
7
+ allowed-tools: Read, Grep, Glob, Bash, Agent
8
+ ---
9
+
10
+ # Write a PRD
11
+
12
+ $ARGUMENTS
13
+
14
+ Create a PRD through structured interview, codebase exploration, and module design, then submit as a GitHub issue.
15
+
16
+ ## Usage
17
+
18
+ ```
19
+ /write-a-prd [feature or problem description]
20
+ ```
21
+
22
+ ## What This Command Does
23
+
24
+ 1. **Gathers** detailed problem description from user
25
+ 2. **Explores** the codebase to verify assertions and understand current state
26
+ 3. **Interviews** relentlessly about every design branch until shared understanding
27
+ 4. **Sketches** major modules — actively seeking deep modules (small interface, deep implementation)
28
+ 5. **Writes** the PRD and submits as GitHub issue via `gh issue create`
29
+
30
+ ## Process
31
+
32
+ ### 1. Gather Problem Description
33
+
34
+ Ask the user for a detailed description of:
35
+ - The problem they want to solve
36
+ - Any potential ideas for solutions
37
+ - Who the users/actors are
38
+
39
+ ### 2. Explore the Codebase
40
+
41
+ Use Agent (subagent_type=Explore) to understand:
42
+ - Current architecture relevant to the feature
43
+ - Existing patterns and conventions
44
+ - Integration points
45
+ - Related code that might be affected
46
+
47
+ ### 3. Interview Relentlessly
48
+
49
+ Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
50
+
51
+ Ask questions one at a time. If a question can be answered by exploring the codebase, explore instead of asking.
52
+
53
+ ### 4. Sketch Modules
54
+
55
+ Identify major modules to build or modify. Look for opportunities to extract **deep modules** — modules that encapsulate significant functionality behind a simple, testable interface.
56
+
57
+ Check with the user:
58
+ - Do these modules match their expectations?
59
+ - Which modules need tests?
60
+
61
+ ### 5. Write and Submit PRD
62
+
63
+ Use the template below. Submit as GitHub issue via `gh issue create`. Share the URL.
64
+
65
+ ## PRD Template
66
+
67
+ <prd-template>
68
+
69
+ ## Problem Statement
70
+
71
+ The problem from the user's perspective.
72
+
73
+ ## Solution
74
+
75
+ The solution from the user's perspective.
76
+
77
+ ## User Stories
78
+
79
+ Extensive numbered list:
80
+
81
+ 1. As an <actor>, I want a <feature>, so that <benefit>
82
+
83
+ Cover ALL aspects of the feature.
84
+
85
+ ## Implementation Decisions
86
+
87
+ - Modules to build/modify
88
+ - Interface designs for those modules
89
+ - Architectural decisions
90
+ - Schema changes
91
+ - API contracts
92
+
93
+ Do NOT include specific file paths or code snippets — they go stale quickly.
94
+
95
+ ## Testing Decisions
96
+
97
+ - What makes a good test (external behavior, not implementation details)
98
+ - Which modules to test
99
+ - Prior art for tests in the codebase
100
+
101
+ ## Out of Scope
102
+
103
+ What is explicitly NOT part of this PRD.
104
+
105
+ ## Further Notes
106
+
107
+ Any additional context.
108
+
109
+ </prd-template>
110
+
111
+ ## Visual Companion (Optional)
112
+
113
+ When upcoming questions will involve visual content (mockups, layouts, diagrams), offer the browser companion:
114
+
115
+ > "Some of what we're working on might be easier to explain visually. I can show mockups and diagrams in a browser. Want to try it?"
116
+
117
+ **This offer MUST be its own message.** Do not combine with other questions. Wait for response.
118
+
119
+ If accepted, start the server and use it for visual questions only. Text/conceptual questions stay in terminal.
120
+
121
+ See [reference/visual-companion.md](reference/visual-companion.md) for details.
122
+
123
+ ## Rules
124
+
125
+ - Interview relentlessly — don't settle for vague answers
126
+ - No file paths or code snippets in the PRD (durability principle)
127
+ - User stories must be extensive and cover all aspects
128
+ - Submit immediately via `gh issue create` — don't ask for review
129
+ - Deep modules over shallow modules
@@ -0,0 +1,78 @@
1
+ # Visual Companion
2
+
3
+ Browser-based companion for showing mockups, diagrams, and layouts during PRD brainstorming sessions.
4
+
5
+ ## What
6
+
7
+ A lightweight Node.js HTTP server that serves a dark-themed HTML page in the user's browser. The agent pushes HTML content to the page via a POST endpoint, enabling real-time display of mockups, wireframes, comparison tables, and diagrams alongside the terminal conversation.
8
+
9
+ ## When to Offer
10
+
11
+ Anticipate visual questions during the PRD interview. Offer the companion when upcoming questions will involve:
12
+
13
+ - UI mockups or wireframes
14
+ - Layout comparisons (side-by-side options)
15
+ - Architecture diagrams
16
+ - Data flow visualizations
17
+ - Feature comparison tables with visual elements
18
+
19
+ ## Consent Flow
20
+
21
+ 1. **Offer once, as its own message.** Do not combine with other questions.
22
+ 2. **Wait for the user's response** before proceeding.
23
+ 3. **Respect a "no"** — continue the interview entirely in the terminal.
24
+
25
+ Example offer:
26
+
27
+ > "Some of what we're working on might be easier to explain visually. I can show mockups and diagrams in a browser. Want to try it?"
28
+
29
+ ## Per-Question Decision
30
+
31
+ After the companion is accepted, decide per question:
32
+
33
+ | Content Type | Where |
34
+ |---|---|
35
+ | Mockups, wireframes, layouts | Browser |
36
+ | Architecture diagrams | Browser |
37
+ | Comparison tables (visual) | Browser |
38
+ | Conceptual questions | Terminal |
39
+ | Text-only decisions | Terminal |
40
+ | Yes/no confirmations | Terminal |
41
+
42
+ ## How to Start
43
+
44
+ ```bash
45
+ node scripts/visual-server.cjs
46
+ ```
47
+
48
+ The server prints the URL to stdout:
49
+
50
+ ```
51
+ Visual companion ready at http://localhost:PORT
52
+ ```
53
+
54
+ Share this URL with the user so they can open it in their browser.
55
+
56
+ ## How to Update Content
57
+
58
+ POST HTML to the `/update` endpoint:
59
+
60
+ ```bash
61
+ curl -X POST http://localhost:PORT/update \
62
+ -H "Content-Type: application/json" \
63
+ -d '{"html": "<h2>Mockup A</h2><p>Description here...</p>"}'
64
+ ```
65
+
66
+ The browser page polls `/content` every 2 seconds and updates automatically with a brief fade transition.
67
+
68
+ ## Auto-Shutdown
69
+
70
+ The server automatically shuts down after 30 minutes of inactivity (no HTTP requests). It also responds to SIGINT and SIGTERM for graceful shutdown.
71
+
72
+ ## Technical Details
73
+
74
+ - **Dependencies:** None. Uses Node.js built-in `http`, `fs`, `path` modules only.
75
+ - **Port:** Binds to a random available port (falls back to 38888 on error).
76
+ - **Template:** Served from `frame-template.html` in the same directory.
77
+ - **Content endpoint:** GET `/content` returns `{"html": "..."}` for polling.
78
+ - **Update endpoint:** POST `/update` accepts `{"html": "..."}` to change displayed content.