@hybridlabor-api/aos 4.2.0-beta.0 → 4.2.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 (83) hide show
  1. package/.agents/graph.md +3 -1
  2. package/.agents/nodes.json +4 -2
  3. package/.claude/workflows/startcycle-dispatch.mjs +18 -5
  4. package/.claude/workflows/teamwork-dispatch.mjs +287 -0
  5. package/THIRD_PARTY_NOTICES.md +50 -0
  6. package/docs/skills_table.md +1 -0
  7. package/installer.js +15 -0
  8. package/package.json +1 -1
  9. package/skills/basic/bdbmediastorm/SKILL.md +7 -5
  10. package/skills/basic/startcycle/SKILL.md +3 -1
  11. package/skills/basic/startcycle-graph/SKILL.md +18 -2
  12. package/skills/basic/startcycle-graph-user/SKILL.md +3 -1
  13. package/skills/basic/teamwork-preview/SKILL.md +209 -0
  14. package/skills/bdbrainstorm/SKILL.md +4 -3
  15. package/skills/global_config/ask-tim/SKILL.md +73 -6
  16. package/skills/global_config/bdbresilience/SKILL.md +216 -0
  17. package/skills/global_config/bdbresilience/contracts/nodes-integration.md +225 -0
  18. package/skills/global_config/bdbresilience/references/cicd-triage.md +179 -0
  19. package/skills/global_config/bdbresilience/references/distributed-locking.md +235 -0
  20. package/skills/global_config/bdbresilience/references/error-recovery.md +210 -0
  21. package/skills/global_config/bdbresilience/references/two-phase-go-gate.md +151 -0
  22. package/skills/global_config/domain-modeling/ADR-FORMAT.md +47 -0
  23. package/skills/global_config/domain-modeling/CONTEXT-FORMAT.md +60 -0
  24. package/skills/global_config/domain-modeling/SKILL.md +77 -0
  25. package/skills/global_config/grill-me/SKILL.md +14 -0
  26. package/skills/global_config/grill-with-docs/SKILL.md +24 -0
  27. package/skills/global_config/grilling/SKILL.md +42 -0
  28. package/skills/global_config/openwiki-skill/scripts/install_daemon.sh +55 -12
  29. package/.agents/skills/firecrawl/SKILL.md +0 -149
  30. package/.agents/skills/firecrawl/rules/install.md +0 -82
  31. package/.agents/skills/firecrawl/rules/security.md +0 -26
  32. package/.agents/skills/firecrawl-agent/SKILL.md +0 -58
  33. package/.agents/skills/firecrawl-build/SKILL.md +0 -39
  34. package/.agents/skills/firecrawl-build-interact/SKILL.md +0 -68
  35. package/.agents/skills/firecrawl-build-onboarding/SKILL.md +0 -103
  36. package/.agents/skills/firecrawl-build-onboarding/references/auth-flow.md +0 -39
  37. package/.agents/skills/firecrawl-build-onboarding/references/project-setup.md +0 -20
  38. package/.agents/skills/firecrawl-build-onboarding/references/sdk-installation.md +0 -17
  39. package/.agents/skills/firecrawl-build-scrape/SKILL.md +0 -69
  40. package/.agents/skills/firecrawl-build-search/SKILL.md +0 -69
  41. package/.agents/skills/firecrawl-crawl/SKILL.md +0 -59
  42. package/.agents/skills/firecrawl-download/SKILL.md +0 -70
  43. package/.agents/skills/firecrawl-interact/SKILL.md +0 -84
  44. package/.agents/skills/firecrawl-map/SKILL.md +0 -51
  45. package/.agents/skills/firecrawl-scrape/SKILL.md +0 -69
  46. package/.agents/skills/firecrawl-search/SKILL.md +0 -60
  47. package/mcps/RhinoMCP/cc-plugin/.claude/settings.json +0 -10
  48. package/mcps/after-effects-mcp/build/index.js +0 -840
  49. package/mcps/after-effects-mcp/build/scripts/applyEffect.jsx +0 -153
  50. package/mcps/after-effects-mcp/build/scripts/applyEffectTemplate.jsx +0 -218
  51. package/mcps/after-effects-mcp/build/scripts/createComposition.jsx +0 -71
  52. package/mcps/after-effects-mcp/build/scripts/createShapeLayer.jsx +0 -147
  53. package/mcps/after-effects-mcp/build/scripts/createSolidLayer.jsx +0 -114
  54. package/mcps/after-effects-mcp/build/scripts/createTextLayer.jsx +0 -115
  55. package/mcps/after-effects-mcp/build/scripts/getLayerInfo.jsx +0 -192
  56. package/mcps/after-effects-mcp/build/scripts/getProjectInfo.jsx +0 -90
  57. package/mcps/after-effects-mcp/build/scripts/listCompositions.jsx +0 -50
  58. package/mcps/after-effects-mcp/build/scripts/mcp-bridge-auto.jsx +0 -1773
  59. package/mcps/after-effects-mcp/build/scripts/setLayerProperties.jsx +0 -160
  60. package/mcps/bdb-remoteos-mcp/queue.db +0 -0
  61. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/__init__.cpython-312.pyc +0 -0
  62. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/incus_client.cpython-312.pyc +0 -0
  63. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/main.cpython-312.pyc +0 -0
  64. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/queue.cpython-312.pyc +0 -0
  65. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/schemas.cpython-312.pyc +0 -0
  66. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/server.cpython-312.pyc +0 -0
  67. package/mcps/bdb-remoteos-mcp/src/bdb_remoteos_mcp/__pycache__/webhook.cpython-312.pyc +0 -0
  68. package/mcps/bdb-remoteos-mcp/tests/__pycache__/__init__.cpython-312.pyc +0 -0
  69. package/mcps/bdb-remoteos-mcp/tests/__pycache__/mock_incus.cpython-312.pyc +0 -0
  70. package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_mcp_server.cpython-312-pytest-9.1.1.pyc +0 -0
  71. package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_security_redteam.cpython-312-pytest-9.1.1.pyc +0 -0
  72. package/mcps/bdb-remoteos-mcp/tests/__pycache__/test_webhook.cpython-312-pytest-9.1.1.pyc +0 -0
  73. package/mcps/computer-use-mcp/dist/client.d.ts +0 -150
  74. package/mcps/computer-use-mcp/dist/client.js +0 -136
  75. package/mcps/computer-use-mcp/dist/entrypoint.d.ts +0 -16
  76. package/mcps/computer-use-mcp/dist/entrypoint.js +0 -26
  77. package/mcps/computer-use-mcp/dist/native.d.ts +0 -212
  78. package/mcps/computer-use-mcp/dist/native.js +0 -50
  79. package/mcps/computer-use-mcp/dist/server.d.ts +0 -32
  80. package/mcps/computer-use-mcp/dist/server.js +0 -342
  81. package/mcps/computer-use-mcp/dist/session.d.ts +0 -101
  82. package/mcps/computer-use-mcp/dist/session.js +0 -2372
  83. package/skills/bdbsaastraining/scripts/__pycache__/build_profile.cpython-314.pyc +0 -0
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: teamwork-preview
3
+ description: Interactive 9-step prompt crafting and delegation protocol for autonomous multi-agent teams. Enforces objective verification, integrity modes, and acceptance criteria across Antigravity, Claude Code, Cursor, OpenCode, Codex, and Roo Code.
4
+ category: bdb-core
5
+ ---
6
+
7
+ # 🤝 Teamwork Preview — Multi-Agent Prompt Crafting & Delegation
8
+
9
+ A structured workflow to turn high-level user ideas into robust, objectively verifiable multi-agent project specifications and delegate them cleanly to execution swarms.
10
+
11
+ Two-phase workflow:
12
+ 1. **Interactive Prompt Crafting (Steps 1–9)**: Iteratively define project goals, eliminate ambiguity, select integrity modes, and enforce objective verification mechanisms.
13
+ 2. **Delegation**: Hand off the validated specification to the target multi-agent team or execution harness.
14
+
15
+ ---
16
+
17
+ ## ▶️ On Claude Code: run the script, don't narrate the protocol
18
+
19
+ **Action:** call the `Workflow` tool with `scriptPath` set to
20
+ `$HOME/.claude/workflows/teamwork-dispatch.mjs` — resolve `$HOME` yourself rather
21
+ than hardcoding a username — and `args` set to whatever the user said after the
22
+ command, passed through verbatim. If they said nothing, pass no `args`; step 1
23
+ asks.
24
+
25
+ Use `scriptPath`, not `name`. By-name lookup for a custom workflow script has been
26
+ observed to fail with `Workflow "..." not found` even when the file exists and its
27
+ `meta.name` matches.
28
+
29
+ Then wait for the call to finish and relay its result — the draft path, the
30
+ validation outcome, and any issues it reports. Do not summarise or reinterpret it.
31
+
32
+ **Do NOT walk through the nine steps yourself in response to this skill.** The
33
+ protocol below is the specification the script implements; it is not a set of
34
+ instructions to follow inline. This repo has already paid for that mistake once,
35
+ recorded in `skills/basic/startcycle-graph/SKILL.md`: an earlier version embedded
36
+ its pipeline in prose, the model followed it "in spirit" instead of invoking the
37
+ script, and the entire graph — subagents, state, review, quality gate — silently
38
+ never ran. A 9-step protocol with integrity modes and acceptance criteria is
39
+ exactly the shape of thing that gets approximated.
40
+
41
+ If the `Workflow` tool is unavailable (some harnesses have none; Claude Code can
42
+ have Dynamic Workflows switched off in `/config`), *then* run the protocol below
43
+ manually, in order, one step at a time.
44
+
45
+ ## 🌐 Which harnesses get which
46
+
47
+ | | |
48
+ |---|---|
49
+ | **Claude Code** | The script above. Deterministic: it runs or it doesn't. |
50
+ | **Codex · Cursor · OpenCode · Roo · Antigravity** | The prose protocol below, interpreted by that harness's model. |
51
+
52
+ The `.mjs` script depends on Claude Code's Dynamic Workflows runtime — the ambient
53
+ `agent()` global and the `Workflow` tool. No other harness exposes an equivalent
54
+ today, so the prose is not a fallback there, it is the implementation. Both are
55
+ kept in this one file deliberately: two files would drift, and the drift would be
56
+ invisible until someone on the other harness got different behaviour.
57
+
58
+ **This is not Antigravity's `/teamwork-preview`.** That command is compiled into
59
+ the `agy` binary, with its own conductor/orchestrator/auditor agent types, and is
60
+ maintained by Google. This is an independent implementation of the same idea on a
61
+ different runtime. It will behave differently, and it does not claim otherwise.
62
+
63
+ ---
64
+
65
+ ## 🧭 Core Principles
66
+
67
+ | # | Principle | Rule |
68
+ |---|---|---|
69
+ | 1 | **Specify What, Not How** | Define requirements and acceptance criteria. Never prescribe implementation details (file structure, algorithms, libraries) unless the user explicitly mandates them. |
70
+ | 2 | **Objective Verification** | Every requirement needs an independent verification mechanism. Programmatic verification (tests, assertion scripts, CLI benchmarks) is preferred; explicit agent-as-judge rubrics are accepted when programmatic testing is impossible. |
71
+ | 3 | **Acceptance Criteria = Guardrails** | Acceptance criteria serve as the quality bar to prevent premature self-certification of incomplete or broken work. |
72
+ | 4 | **Minimal Requirements** | Only specify what the user explicitly cares about. Give the agent team maximal solution space. |
73
+
74
+ ---
75
+
76
+ ## 📋 Artifact-Based Workflow
77
+
78
+ Maintain a **prompt draft artifact** (`prompt_draft.md`) throughout the interaction. It provides real-time visibility to the user and tracks step progression.
79
+
80
+ ```markdown
81
+ # Teamwork Project Prompt — Draft
82
+
83
+ > Status: Step 1 — Eliciting project idea
84
+ > Goal: Craft prompt → get user approval → delegate
85
+ > Requested team: [none — routes automatically from description]
86
+
87
+ [Project description — 1-2 sentences]
88
+
89
+ Working directory: [TBD]
90
+ Integrity mode: [development | demo | benchmark]
91
+
92
+ ## Requirements
93
+
94
+ ### R1. [TBD]
95
+
96
+ ### R2. [TBD]
97
+
98
+ ## Acceptance Criteria
99
+
100
+ ### [Category]
101
+ - [ ] [Objective condition checkable without subjective bias]
102
+
103
+ ---
104
+ *Next: when approved → delegate via execution protocol*
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 🔄 The 9-Step Interactive Workflow
110
+
111
+ ### Step 1: Elicit the Idea
112
+ - Ask: What do you want to build? What is the purpose (production, demo, eval, prototype)? Who is the audience?
113
+ - Condense into a 1–2 sentence project description.
114
+ - Initialize `prompt_draft.md` and set status to Step 2.
115
+
116
+ ### Step 2: Identify Ambiguity & Scale
117
+ - Probe points with multiple reasonable interpretations (data sources, third-party services, scope limits).
118
+ - Ask about effort and team scale:
119
+ - **Single self-contained fix/feature**: Keep focused (one implementer + repeated adversarial review). Prefix prompt: *"This is a single self-contained fix; keep it small and focused."*
120
+ - **Math, formal proofs, or massive search**: Offer standard pipeline vs. large-scale team. If large-scale selected, prefix prompt: *"Use a very large team of agents."*
121
+ - **Standard multi-agent build**: Standard workflow routes from task description.
122
+
123
+ ### Step 3: Determine Integrity Mode
124
+ Clarify operational boundaries:
125
+ - Can code be copied from existing open-source projects?
126
+ - Are pre-built external libraries permitted for core logic?
127
+ - Can test implementations be inspected before coding?
128
+ - **Mapping**:
129
+ - Unrestricted / default → `integrity_mode: development`
130
+ - Some shortcuts allowed (demo showcase) → `integrity_mode: demo`
131
+ - Strict isolation / zero external leakage → `integrity_mode: benchmark`
132
+
133
+ ### Step 4: Draft Requirements (R1, R2, ...)
134
+ - Write 2–5 concise requirement blocks.
135
+ - Focus strictly on **what** is required, not **how** to implement it.
136
+ - Apply litmus test: *"Would a senior engineer feel over-constrained by this requirement?"* If yes, prune.
137
+
138
+ ### Step 5: Design Verification Mechanisms (Forcing Function)
139
+ > **Why this matters:** Verification is a forcing function. Its job is to create an objective test target that forces a genuine build → test → debug loop and prevents premature self-certification.
140
+
141
+ - Design programmatic tests where feasible (unit test suites, test runners, CLI assertion scripts).
142
+ - If programmatic tests are not feasible, draft an explicit agent-as-judge scoring rubric.
143
+ - Inquire whether the user has existing test suites, schemas, or reference implementations to include in a `## Verification Resources` section.
144
+
145
+ ### Step 6: Set Acceptance Criteria
146
+ - Convert verification mechanisms into checkable markdown checkboxes (`- [ ]`).
147
+ - Calibrate strictly to the project purpose:
148
+ - Demo: Achievable within rapid time budget.
149
+ - Production: Full test coverage, strict error handling, production readiness.
150
+ - Eval: Strict reproducible metrics over polish.
151
+
152
+ ### Step 7: Infrastructure Constraints (If Applicable)
153
+ - Define sandboxing or controlled APIs for remote file operations, job launching, and external network calls.
154
+ - Skip if the project operates purely within local workspace files.
155
+
156
+ ### Step 8: Choose Working Directory
157
+ - Confirm the target working directory (default: `~/teamwork_projects/{project_name}` or a relative path in the current repo).
158
+ - Record as `Working directory: <path>` at top of prompt draft.
159
+
160
+ ### Step 9: Assemble, Validate & Seek Approval
161
+ Assemble the final structured prompt:
162
+
163
+ ```markdown
164
+ [1-2 sentence project description]
165
+
166
+ Working directory: <path>
167
+ Integrity mode: [development | demo | benchmark]
168
+ [Optional: Team scaling directive]
169
+
170
+ ## Requirements
171
+
172
+ ### R1. [Primary Deliverable]
173
+ [What it does, not how to build it]
174
+
175
+ ### R2. [Secondary Deliverable]
176
+ [What it does, not how to build it]
177
+
178
+ ## Acceptance Criteria
179
+
180
+ ### [Category]
181
+ - [ ] [Objective condition checkable without subjective bias]
182
+ ```
183
+
184
+ **Pre-flight Checklist:**
185
+ - [ ] No unsolicited implementation hints (file structures, algorithms).
186
+ - [ ] Every acceptance criterion is objectively verifiable.
187
+ - [ ] Scope matches actual user needs.
188
+ - [ ] Team scale directive included if requested in Step 2.
189
+
190
+ Seek explicit approval from the user before triggering execution.
191
+
192
+ ---
193
+
194
+ ## 🚀 Delegation Protocol
195
+
196
+ Once approved by the user:
197
+
198
+ ### 1. In Antigravity Harness
199
+ If running in Google Antigravity with native subagent support:
200
+ - Call `invoke_subagent`:
201
+ - `TypeName`: `teamwork_preview`
202
+ - `Role`: `Teamwork Coordinator`
203
+ - `Prompt`: Full prompt content from `prompt_draft.md`
204
+ - Set artifact status to `Launched`.
205
+
206
+ ### 2. In Other Agent Harnesses
207
+ - **Claude Code**: Feed the finalized prompt to dynamic workflows or dispatch via `/startcycle-graph` / subagents.
208
+ - **Cursor / Windsurf**: Inject the prompt into composer or project rules context.
209
+ - **OpenCode / Codex CLI**: Pass the prompt to `opencode run` or Codex runner.
@@ -16,9 +16,10 @@ You are strictly required to enforce the following 6 pillars in your process:
16
16
  - Instead of brainstorming alone, you MUST spawn specialized subagents (using `invoke_subagent`) to discuss ideas, architecture, and features.
17
17
  - Assign clear, distinct roles to subagents (e.g., "UI/UX Visionary", "Technical Architect", "Devil's Advocate") and have them debate and refine the concept before any code is written.
18
18
 
19
- ### 2. The `/grill-me` Approach
20
- - Actively challenge the user's initial ideas.
21
- - Initiate a `/grill-me` style interactive interview to uncover blind spots, resolve design decisions, and align on a robust plan. Do not accept vague requirements. Ask deep, targeted questions.
19
+ ### 2. The Grilling Interview
20
+ - **Invoke the `grill-with-docs` skill and follow it** — or `grill-me` when there is no working directory to leave a paper trail in. Do not paraphrase an interview here; those skills hold the protocol (design tree, frontier rounds, numbered questions each with a recommended answer), and a second description of it in this file would drift from the first.
21
+ - Actively challenge the user's initial ideas. Do not accept vague requirements.
22
+ - `grill-with-docs` additionally runs `domain-modeling`, so terminology and decisions settled during the debate land in `CONTEXT.md` and ADRs as they crystallise rather than evaporating with the session — which is usually what you want before a multi-agent build.
22
23
 
23
24
  ### 3. Target Folder Selection & Project Scaffolding
24
25
  - After the brainstorming and grilling phase produces a solid conceptual plan, you MUST explicitly ask the user: *"In which folder, workspace, or project directory should the output artifacts (e.g., plan, README.md, AGENTS.md) be stored?"*
@@ -1,12 +1,64 @@
1
1
  ---
2
2
  name: ask-tim
3
- description: Meta-skill for discovering and routing to the right skill out of the ~154 available options. Use when a user or agent is unsure which skill fits their intent, or needs to pick between overlapping choices (e.g. build pipelines, scraping tools, UI components).
3
+ description: Ask which skill or flow fits your situation. A route through AOS's skills for work that travels idea to ship, plus a catalogue of the ~169 available options for lookup. Use when unsure where to start, or when picking between overlapping choices.
4
4
  category: bdb-core
5
+ disable-model-invocation: true
5
6
  ---
6
7
 
7
- # `ask-tim`: The BDB Skill Routing Meta-Skill
8
+ <!-- The flow map below is derived from mattpocock/skills' ask-matt (MIT, see
9
+ THIRD_PARTY_NOTICES.md). The route is AOS's own: most stations on
10
+ upstream's main flow have no AOS equivalent, so copying it verbatim would
11
+ have produced a router pointing at skills that do not exist. -->
8
12
 
9
- This is a discovery and routing guide. It does not perform work itself. Use it to map a user's intent to the correct specialized skill(s).
13
+ # `ask-tim`: which way do I go?
14
+
15
+ You don't remember every skill, so ask. This does no work itself.
16
+
17
+ Two layers, answering different questions. **The flow map** answers *"which way?"* — the route work travels from an idea to something shipped, and which branch to take at each fork. **The catalogue** below it answers *"which skill?"* — grouped by domain, with overlap guidance for the cases where several look alike. Start with the flow; drop to the catalogue when you already know roughly where you are.
18
+
19
+ ---
20
+
21
+ ## The main flow: idea → ship
22
+
23
+ The route most work travels.
24
+
25
+ **1. Sharpen the idea.** `/grill-with-docs` whenever you are in a working directory — the interview *plus* a paper trail, writing settled terminology into `CONTEXT.md` and ADRs as it goes. Without a repo to write to, `/grill-me`. Both run the same `grilling` primitive; the difference is only whether the understanding survives the session.
26
+
27
+ For a bigger or fuzzier idea, `/bdbrainstorm` runs the same interview inside a multi-agent debate (`/bdbmediastorm` for live show-control and event tech). Don't grill twice — those skills already do this step.
28
+
29
+ **2. Branch: how much machinery does the build need?** This is the fork that matters, and picking wrong is expensive in both directions.
30
+
31
+ - **`/startcycle`** — the linear chain, and the right answer for most daily work. Architect → TechLead → Build → Reviewer, hand-offs as plain files, no state machine.
32
+ - **`/startcycle-graph`** — when you need the durable `state.json`, a Reviewer repair loop with a no-progress guard, an automated quality gate, and escalation to a human. Mission-critical or multi-session work. Runs headless.
33
+ - **`/startcycle-graph-user`** — a throwaway 2–4 node fan-out for one-off parallel work. Nothing persistent left behind.
34
+ - **Two-file edit?** No pipeline. Just do it.
35
+
36
+ **3. Review the plan before it is built.** At the Architect→TechLead gate, `aos-plan-canvas open production_artifacts/00_execution_plan.md` opens the plan in a browser where you point at what should change instead of retyping it. Mandatory at the end of `/bdbrainstorm` and `/bdbmediastorm`; optional in `/startcycle`; deliberately not forced in `/startcycle-graph`, which runs headless.
37
+
38
+ **4. Build, then review adversarially.** The pipelines invoke their own build and review nodes — you do not call these by hand. Reviewer's pass is a correctness check against the plan's contract; `godmode-shipping`'s gate is mechanical (lint, typecheck, tests). Two different checks, deliberately not merged.
39
+
40
+ Reach for `test-driven-development` or `tdd-workflow` on their own when you want one behaviour built test-first without a whole pipeline, and `git-pr-review` when reviewing a branch or PR against a fixed point.
41
+
42
+ **Forcing a specific skill into a run:** `--skill=<name>` on any startcycle variant makes it a hard requirement — for a private skill of your own no node would otherwise reach for. Validated before the run starts; a name that does not resolve halts rather than proceeding without it.
43
+
44
+ ---
45
+
46
+ ## On-ramps
47
+
48
+ A starting situation that generates work, then merges onto the main flow.
49
+
50
+ - **Issues piling up** → `/triage`. For work you did *not* create: bug reports, incoming requests, anything raw. Tickets a pipeline already produced are agent-ready — **do not triage them**.
51
+ - **Something is broken** → `systematic-debugging` for a structured hunt, `debugger` for a plain error. Both refuse to theorise before there is a reproduction.
52
+ - **You need a runnable answer, not an argument** → `/prototype`. Throwaway code to settle a question that conversation cannot, then bring what you learned back to the idea thread.
53
+ - **Deploying or shipping infrastructure** → `godmode-shipping` gates a release; `bdb-deploy`, `vercel-deployment` and `cloudflare-workers-expert` do the actual shipping.
54
+
55
+ ---
56
+
57
+ ## What this flow does not cover
58
+
59
+ Named so you don't go looking: AOS has no equivalent of a cross-session `handoff` file, and no `wayfinder`-style skill for charting a months-long effort as decision tickets. For work too large for one session, `/startcycle-graph`'s durable `state.json` is the closest thing — it is resumable, but it does not chart the fog for you.
60
+
61
+ ---
10
62
 
11
63
  ## 🧭 Intent Index (Table of Contents)
12
64
 
@@ -231,12 +283,27 @@ Specific utilities for the BDB environment.
231
283
 
232
284
  ## 🧊 Media & EventTech
233
285
 
234
- Use these for 3D, motion, and live show control.
286
+ Use these for 3D, motion, video and live show control.
235
287
 
236
- * **Top Picks:** `godmode-eventtech`, `godmode-3d-creation`, `godmode-media-creation`
288
+ * **Top Picks:** `godmode-media-creation` (video and montage), `godmode-eventtech` (live shows), `godmode-3d-creation` (meshes and scenes)
237
289
 
238
290
  * **Godmodes**: Determine the overarching flow (3D, Media, EventTech).
239
- * **Implementations**: `MCP_Manage` (Unreal, Rhino, Resolve, TouchDesigner), `spline-3d-integration` (web 3D), `threejs-skills` (WebGL).
291
+ * **Implementations**: `MCP_Manage` drives the creative applications over MCP, `spline-3d-integration` (web 3D), `threejs-skills` (WebGL), `remotion` (React → MP4, deterministic frame counts).
292
+
293
+ ### Which video route?
294
+
295
+ The choice is driven by where the pixels come from, not by the output format — all four end in a video file.
296
+
297
+ | Source material | Route |
298
+ |---|---|
299
+ | Code-generated motion graphics, text, brand animation | `remotion` — React components rendered to MP4, deterministic and exactly frame-accurate |
300
+ | Existing footage: cutting, colour, beat-sync | `godmode-media-creation` + `MCP_Manage` → **DaVinci Resolve** (`davinci-resolve-mcp`) or **Adobe Premiere** (`adobe_uxp_mcp`) |
301
+ | Compositing, motion design over footage | `MCP_Manage` → **After Effects** (`ae-mcp`, `after-effects-mcp`), or **Photoshop** for stills (`adobe_uxp_mcp`) |
302
+ | Generative visuals: audio-reactive, shaders, real-time | `godmode-eventtech` → TouchDesigner MCP, then `record_movie` |
303
+ | Generative *assets*: text→3D, image→3D, AI video | The **Creator Extension** engines — TRELLIS and TripoSR (3D), Text-to-CAD, OpenMontage (multimodal montage), Video-Shotcraft (shot direction), Palmier-Pro (timeline and grading), driven through `comfyui-mcp`. Installed as a separate power-up module, not a skill in this catalogue. |
304
+ | Concept not settled yet | `bdbmediastorm` first — it runs the grilling interview for show-control and media work |
305
+
306
+ Resolve and Premiere are interchangeable at this level: pick whichever is actually installed. Both have a working MCP under `mcps/`.
240
307
 
241
308
  ---
242
309
 
@@ -0,0 +1,216 @@
1
+ ---
2
+ name: bdbresilience
3
+ description: Autonomous CI/CD error recovery, distributed file-based locking, diagnostic triage, and two-phase GO gate resilience engine for BDB Agent OS multi-agent pipelines.
4
+ category: bdb-core
5
+ triggers:
6
+ - error recovery
7
+ - transient error
8
+ - rate limit 429
9
+ - exponential backoff
10
+ - distributed lock
11
+ - lockfile
12
+ - concurrency control
13
+ - state race
14
+ - ci/cd triage
15
+ - log parser
16
+ - flaky test
17
+ - self-healing
18
+ - verification gate
19
+ - go gate
20
+ - two-phase gate
21
+ capabilities:
22
+ - monitoring
23
+ - security
24
+ - context-management
25
+ - testing
26
+ - automation
27
+ disable-model-invocation: false
28
+ user-invocable: true
29
+ ---
30
+
31
+ # 🛡️ BDB Resilience & Concurrency Engine (`/bdbresilience`)
32
+
33
+ The `/bdbresilience` master skill suite provides deterministic runtime fault tolerance, concurrency coordination, diagnostic log triage, and pre-tool deployment gating for autonomous multi-agent pipelines operating across the BDB Agent OS ecosystem.
34
+
35
+ ---
36
+
37
+ ## 1. Core Tenets
38
+
39
+ 1. **Fail Deterministically, Recover Gracefully**: Never swallow errors silently or crash abruptly. Intercept all tool, network, and runtime faults through a 4-tier taxonomy (`transient`, `tool_level_fault`, `auth_credential`, `unrecoverable`). Execute structured recovery before attempting escalation.
40
+ 2. **Zero-Race Concurrency**: Shared mutable state—including `production_artifacts/state.json`, git branches, and worktrees—must never suffer lost updates or dirty reads. Enforce mutual exclusion through atomic POSIX/APFS file locking (`O_CREAT | O_EXCL`) or fragment isolation (`state.d/<nodeId>.json`).
41
+ 3. **No Hallucinated Triage**: Parse raw CI/CD logs directly (Vitest, Jest, tsc, ESLint, GitHub Actions). Extract verified file coordinates, line numbers, failure diffs, and exact root causes into structured JSON reports. Never synthesize speculative fixes without log verification.
42
+ 4. **Strict Two-Phase Gate Precedence**: High-consequence actions (`git push`, `npm publish`, `npm version`, recursive `rm`) require an uncompromised human verification gate. Enforce the BDB Pre-Tool Gate protocol: lock execution in strict read-only mode until a literal, isolated human token `"GO"` is validated.
43
+
44
+ ---
45
+
46
+ ## 2. When to Use vs. When to Exclude
47
+
48
+ ### ✅ When to Use
49
+ - **External API & Network Flakiness**: Handling HTTP 429 rate limits, socket timeouts (`ETIMEDOUT`), connection resets (`ECONNRESET`), and temporary provider dropouts.
50
+ - **Tool Failures with Fallbacks**: Automatically rerouting failed tool invocations to secondary providers (e.g., primary MCP down → secondary CLI fallback) with immutable diversion audit trails.
51
+ - **Concurrent Agent Execution**: Protecting shared files (`state.json`), databases, or worktrees during parallel build node execution (Engineering, UI/UX, Media).
52
+ - **CI/CD Pipeline Failures**: Ingesting build and test runner failure logs, distinguishing transient infrastructure errors from code regressions, and generating actionable repair proposals.
53
+ - **Release Verification & Deployment**: Enforcing the two-phase approval gate prior to running destructive or outward-facing operations.
54
+
55
+ ### ❌ When to Exclude
56
+ - **Single-Agent Read-Only Probes**: Reading static documentation, viewing local files, or querying local git status where no concurrency or network calls occur.
57
+ - **Internal Synchronous Transforms**: Pure CPU operations, in-memory string formatting, or deterministic array manipulations without side effects.
58
+ - **Explicit User-Directed Interrupts**: Direct manual cancellation or kill signals received from the operator.
59
+
60
+ ---
61
+
62
+ ## 3. Resilience Architecture & Operational Playbooks
63
+
64
+ ```
65
+ +---------------------------------------------------------------------------------------+
66
+ | /bdbresilience Skill Suite |
67
+ | Master Operational Architecture |
68
+ +-------------------------------------------+-------------------------------------------+
69
+ |
70
+ +-----------------------------------+-----------------------------------+
71
+ | |
72
+ v v
73
+ +---------------------------------------+ +-----------------------------------------+
74
+ | Pattern 1: Error Recovery | | Pattern 2: Distributed Locking |
75
+ | - 4-Tier Failure Classification | | - POSIX Atomic Creation (O_CREAT|EXCL) |
76
+ | - Full Jitter Exponential Backoff | | - Monotonic Fencing Tokens |
77
+ | - Secondary Tool Router & Diversion | | - Background Heartbeat Renewal |
78
+ | - Fail-Closed Human Escalation | | - Atomic Stale / Orphan Eviction |
79
+ | [references/error-recovery.md] | | [references/distributed-locking.md] |
80
+ +---------------------------------------+ +-----------------------------------------+
81
+ | |
82
+ +-----------------------------------+-----------------------------------+
83
+ |
84
+ +-----------------------------------+-----------------------------------+
85
+ | |
86
+ v v
87
+ +---------------------------------------+ +-----------------------------------------+
88
+ | Pattern 3: CI/CD Triage | | Pattern 4: Two-Phase GO Gate |
89
+ | - Multi-Runner ANSI Normalization | | - Phase 1: Strict Read-Only Planning |
90
+ | - Flaky vs Deterministic Classifier | | - Phase 2: Literal Token Execution |
91
+ | - JSON Diagnostic Report Schema | | - Fail-Closed Transcript Scanner |
92
+ | - isCleanRun() Pass Predicate | | - Caller-Written approvals Ledger |
93
+ | [references/cicd-triage.md] | | [references/two-phase-go-gate.md] |
94
+ +---------------------------------------+ +-----------------------------------------+
95
+ ```
96
+
97
+ ### Specialized Reference Guides
98
+ - 📘 **[Error Recovery & Retry Routing](references/error-recovery.md)**: Taxonomy classification, Full Jitter backoff formula, diversion logging, and zero-hallucination escalation payloads.
99
+ - 📘 **[Distributed Locking & Concurrency](references/distributed-locking.md)**: Atomic lockfile creation, lease TTLs, heartbeat renewal, atomic rename break eviction, and `state.json` protection.
100
+ - 📘 **[CI/CD Self-Healing Triage](references/cicd-triage.md)**: Multi-runner log parsers, flaky vs. deterministic classifier, and structured JSON diagnostics.
101
+ - 📘 **[Two-Phase Pre-Tool GO Gate](references/two-phase-go-gate.md)**: PreToolUse hook specifications, transcript token verification, and fail-closed gate mechanics.
102
+ - 📘 **[Node Integration Contracts](contracts/nodes-integration.md)**: **PROPOSAL, not applied.** How Reviewer and Shipping *would* be equipped in `nodes.json`, plus hooks for `/startcycle-graph` and `/bdbrainstorm`. No AOS node carries `bdbresilience` today.
103
+
104
+ ---
105
+
106
+ ## 4. Operational Commands & Procedures
107
+
108
+ ### `/bdbresilience recover`
109
+ Invokes the automated error classification and recovery pipeline for a failed operation.
110
+ ```typescript
111
+ import { classifyError, withRetry, executeWithFallback } from 'bdb-cicd-resilience/recovery/index.js';
112
+
113
+ // 1. Classify error
114
+ const classification = classifyError(error, { toolName: 'api_fetch', attempt: 1 });
115
+
116
+ // 2. Retry with full jitter if transient
117
+ // (withRetry classifies internally too, and rethrows at once on canRetry: false)
118
+ if (classification.category === 'transient') {
119
+ const result = await withRetry(
120
+ () => callApi(),
121
+ { maxRetries: 3, baseDelayMs: 500, maxDelayMs: 10000 }
122
+ );
123
+ }
124
+
125
+ // 3. Fallback route if tool fault. The fallback is a tool NAME; your execute
126
+ // function does the dispatch, and a canRetry:false classification suppresses
127
+ // the diversion instead of re-sending the call to a second provider.
128
+ if (classification.category === 'tool_level_fault') {
129
+ const fallbackResult = await executeWithFallback({
130
+ originalTool: 'mcp_primary',
131
+ fallbackTool: 'cli_fallback',
132
+ execute: (toolName) => invokeTool(toolName, args),
133
+ auditFilePath: 'production_artifacts/diversions.jsonl',
134
+ });
135
+ }
136
+ ```
137
+
138
+ ### `/bdbresilience lock`
139
+ Coordinates exclusive access to a shared resource using deterministic atomic locking.
140
+ ```typescript
141
+ import { withStateLock, withDistributedLock } from 'bdb-cicd-resilience/locking/index.js';
142
+
143
+ // Guard state.json mutations
144
+ await withStateLock('production_artifacts/state.json', (state) => {
145
+ state.artifacts.backend = 'production_artifacts/02_backend_schema.md';
146
+ state.findings.push({ id: 'F-ENG-01', status: 'fixed' });
147
+ return state;
148
+ }, { ttlMs: 15000, acquireTimeoutMs: 10000 });
149
+ ```
150
+
151
+ ### `/bdbresilience triage`
152
+ Parses build or test logs to isolate failures and propose fixes.
153
+ ```typescript
154
+ import { generateDiagnosticReport, isCleanRun } from 'bdb-cicd-resilience/triage/index.js';
155
+
156
+ const report = generateDiagnosticReport(rawBuildOutput, 'vitest');
157
+ console.log(`Failures: ${report.summary.totalFailures} (Transient: ${report.summary.transientCount})`);
158
+ if (isCleanRun(report)) {
159
+ // The ONLY sanctioned "it passed". `totalFailures === 0` alone is also true
160
+ // for an empty or unrecognised log (summary.parseStatus 'empty' / 'unparsed').
161
+ } else if (report.summary.canAutoRetry) {
162
+ // Safe infrastructure retry
163
+ } else {
164
+ // Escalate exact deterministic failure coordinates to engineer
165
+ }
166
+ ```
167
+
168
+ ### `/bdbresilience gate`
169
+ Evaluates pre-tool execution authorization against the conversation transcript.
170
+ ```typescript
171
+ import { verifyGoGate, checkPreToolGate } from 'bdb-cicd-resilience/triage/index.js';
172
+
173
+ const gate = checkPreToolGate('git push origin main', transcriptPath);
174
+ if (!gate.allowed) {
175
+ throw new Error(`Gate Closed: ${gate.reason}. Reply with GO to unlock.`);
176
+ }
177
+ ```
178
+
179
+ ---
180
+
181
+ ## 5. Common Rationalizations vs. Reality
182
+
183
+ | Rationalization | Engineering Reality | Resilience Protocol |
184
+ |-----------------|---------------------|---------------------|
185
+ | *"A simple `setTimeout(1000)` retry is fine without jitter."* | Synchronous fixed backoffs cause thundering herds on rate-limited endpoints. | **Mandatory Full Jitter**: Sleep for $T = \text{random}(0, \min(T_{\max}, T_{\text{base}} \cdot 2^{\text{attempt}}))$. |
186
+ | *"State file collisions won't happen because agents finish quickly."* | Parallel agent fan-out runs in separate processes; uncoordinated writes cause lost updates. | **Atomic POSIX Lock**: Use `open(..., 'wx')` with fencing tokens or isolated `state.d/<nodeId>.json` fragments. |
187
+ | *"The test failed due to an intermittent CI glitch, let's ignore it."* | Masking real assertion failures as "flaky" leads to shipping broken code to production. | **Deterministic Classifier**: Only classify network/OOM/timeout as flaky; assertion and type errors must never be bypassed. |
188
+ | *"The user said 'starte jetzt', so that counts as approval."* | Compound action verbs violate the two-phase safety protocol; user intent may be unconfirmed. | **Strict Literal Token**: Gate unlocks ONLY if the single trimmed word is `"GO"`. Fail-closed on everything else. |
189
+
190
+ ---
191
+
192
+ ## 6. Red Flags Checklist
193
+
194
+ - [ ] **Hardcoded Delays**: Retrying without random jitter or exponential backoff.
195
+ - [ ] **Missing Finally Block**: Acquiring a distributed lock without releasing in a `finally` block or relying on process exit.
196
+ - [ ] **Unlink Without Verification**: Deleting a stale lockfile without checking process liveness (`process.kill(pid, 0)`) or using the atomic rename break protocol.
197
+ - [ ] **Synthetic Error Hallucination**: Fabricating an error root cause when log parsing failed or was inconclusive.
198
+ - [ ] **Soft Gate Bypass**: Proceeding with deployment when gate evaluation returned `allowed: false` or when transcript was missing.
199
+ - [ ] **Sidechain Approval**: Permitting an automated subagent message (`isSidechain: true`) to satisfy human approval.
200
+
201
+ ---
202
+
203
+ ## 7. Verification & Testing Protocol
204
+
205
+ To verify the `/bdbresilience` suite and its underlying TypeScript engine:
206
+
207
+ ```bash
208
+ # 1. Typecheck TypeScript implementation
209
+ npm run typecheck
210
+
211
+ # 2. Compile to dist/ distribution
212
+ npm run build
213
+
214
+ # 3. Execute full unit, integration, and E2E verification
215
+ npm test
216
+ ```