Skip to content

feat: add project-independent brainstorming skill and pack#70

Open
tkstang wants to merge 74 commits intomainfrom
feat/independent-brainstorming-mode
Open

feat: add project-independent brainstorming skill and pack#70
tkstang wants to merge 74 commits intomainfrom
feat/independent-brainstorming-mode

Conversation

@tkstang
Copy link
Copy Markdown

@tkstang tkstang commented May 2, 2026

Summary

Ships oat-brainstorm, a new always-on user-invocable skill in a new dedicated brainstorm tool pack, that turns OAT into a first-class destination for project-independent brainstorming conversations. The skill activates proactively on exploratory phrasing ("I've been thinking about", "what if we did", design uncertainty), runs a structured design conversation without requiring an idea or project artifact up front, and ends in a pack-aware terminal-state picker that hands off to existing OAT skills (oat-idea-*, oat-pjm-add-backlog-item, oat-project-*) or to inline / doc-to-path outcomes that work in any repo. Closes bl-53f0.

The change also generalizes default-scope behavior across the OAT installer via a new PACK_METADATA mechanism (ADR-017), so future user-default-scope packs can opt in by adding a single metadata entry rather than hardcoding pack names in scope-resolution code. The visual-companion bundle is a port of the MIT-licensed superpowers:brainstorming@5.0.7 companion with OAT-aligned persistence-path resolution; attribution is in NOTICES.md.

Goals / Non-Goals

Goals (from bl-53f0 acceptance criteria):

  • Always-on activation with concrete trigger signals — done via disable-model-invocation: false plus a tightly-scoped description string.
  • Pack-aware terminal-state picker filtered by oat config get tools.<pack> — done; same canonical signal oat-project-document already uses.
  • Two base outcomes work in any repo (inline + doc-to-path) — done; both built into the dispatcher and require no other pack.
  • Pack-gated outcomes hand off to existing skills — done; nine destination families covered (capture/extend/summarize idea, scoped backlog item, project promotion, active-project fold-back, active-project reference file, plus the two base outcomes).
  • External / off-repo paths first-class — done via the doc-to-path mechanism with explicit out-of-repo confirmation.
  • Visual companion ported with attribution — done; NOTICES.md extended with verbatim-vs-patched file enumeration.
  • Dogfood scenarios documented per terminal state — done as walkthrough plans (.agents/skills/oat-brainstorm/references/dogfood-results.md); live dogfood follow-up captured as backlog item bl-7d5b.

Non-Goals:

  • Replacing or deprecating oat-idea-* skills — they continue to own conversational ideation when an idea exists.
  • Automating the post-PR-review revise flow (out of scope; covered by oat-project-revise).
  • core pack consolidation under the new PACK_METADATA mechanism — flagged as a follow-up in ADR-017.

Changes

Phase 1 — Pack-metadata mechanism (4 tasks):

  • New PackMetadata interface + PACK_METADATA map + resolvePackDefaultScope helper in packages/cli/src/commands/init/tools/shared/skill-manifest.ts.
  • Wired into both installer paths: buildUserScopeChoices (interactive picker) and the non-interactive branch of resolvePackScopes.
  • Existing-install detection short-circuits before metadata lookup — preserves migration safety on re-install.

Phase 2 — Brainstorm pack registration + skill scaffolding + visual-companion bundle (8 tasks):

  • New brainstorm pack across the install/update/remove pipelines: BRAINSTORM_SKILLS manifest constant; PackName type union extended; bundle-assets.sh SKILLS array; cascading exhaustive-switch updates across BUNDLED_PACK_MEMBERS, BUNDLED_PACK_ASSETS, install-sync-context, scan-tools, VALID_PACKS, PACK_DESCRIPTIONS; runInitTools dispatcher imports + dependency interface + default deps + dispatch branch; update/remove handlers; interactive picker description; oat init tools default-on set entry.
  • Per-pack install helper at packages/cli/src/commands/init/tools/brainstorm/ mirroring the ideas/ and docs/ patterns.
  • Visual-companion bundle ported from superpowers:brainstorming@5.0.7 (MIT): server.cjs, stop-server.sh, frame-template.html, helper.js byte-for-byte verbatim; start-server.sh patched only for OAT-managed persistence paths.
  • Destinations playbook (references/destinations.md) with per-destination stanzas covering trigger phrases, required template fields, confirmation patterns, handoff targets, and "keep brainstorming" rules.
  • Doc-to-path output template (templates/brainstorm-doc.md).
  • NOTICES.md extended with visual-companion attribution subsection.

Phase 3 — Skill flow implementation (7 tasks):

  • Filled .agents/skills/oat-brainstorm/SKILL.md end-to-end: tightened always-on description, mode assertion, progress indicators, 9-step process flow, all 9 handoff branches (inline / doc-to-path / capture-as-new-idea / extend-existing-idea / summarize-idea-directly / scoped-backlog-item / promote-to-new-OAT-project / active-project router / fold-back / active-project reference file).
  • Active-project fold-back commit safety contract (preflight git status --porcelain, scoped git add --, three-option dirty-tree picker, conditional handoff prompt) — word-for-word aligned with design.

Phase 4 — Documentation, dogfood, release validation (5 tasks):

  • New "Brainstorm pack" section in apps/oat-docs/docs/cli-utilities/tool-packs.md; brainstorm entries in apps/oat-docs/docs/workflows/skills/index.md.
  • 10 dogfood walkthroughs documented in dogfood-results.md; live-dogfood follow-up captured as bl-7d5b.
  • All 5 lockstep public packages bumped to 0.0.59 (rebased over f33c6597 which had already shipped 0.0.58).
  • .oxfmtrc.jsonc ignore patterns for bundled MIT-port scripts and bundled docs.

Phase 5 — Final-review fixes (8 tasks):

  • tools.brainstorm registered end-to-end in config schema (validPacks / effective defaults / config command catalog).
  • Brainstorm subcommand routes through standard install lifecycle (existing-install scan, scope precedence, config write, affected-scope tracking).
  • SKILL.md visual-companion offer uses ${SKILL_DIR} resolution with documented user/project fallback.
  • .oat/brainstorm/ added to managed gitignore via localPaths.
  • Active-project reference destination switched to durable-tracked semantics with scoped commit + confirmation note.
  • OAT state artifacts refreshed (oat state refresh + project state.md body matches frontmatter).
  • Plan p04-t02 wording reframed to walkthrough; backlog item bl-7d5b created with embedded copy of dogfood-results.md.
  • current-state.md workflow path references and oat tools install pack list updated.

Documentation sync (separate commit):

  • New "Not Sure If It's an Idea Yet?" pointer in apps/oat-docs/docs/workflows/ideas/index.md.
  • New "Relationship to oat-brainstorm" section in apps/oat-docs/docs/workflows/ideas/lifecycle.md covering capture / extend / summarize routes from a brainstorm.
  • New "Brainstorming integration with the project lifecycle" section in apps/oat-docs/docs/workflows/projects/lifecycle.md covering both new-project seeding and active-project fold-back.
  • Repo reference updates: bl-53f0 closed, ADR-017 added, current-state.md updated, backlog/completed.md entry added.

Verification

  • pnpm release:validate — pass on all 5 public packages at 0.0.59
  • pnpm format — pass
  • pnpm lint — pass (0 warnings, 0 errors)
  • pnpm type-check — pass (10 packages)
  • pnpm --filter @open-agent-toolkit/cli test — pass (1459 tests across 163 files)
  • pnpm build:docs — pass
  • pnpm oat:validate-skillsoat-brainstorm validates clean (the two pre-existing failures on oat-pjm-update-repo-reference and oat-project-spec are unrelated baseline issues)
  • pnpm cli config get tools.brainstorm — returns false (was Unknown config key before fix)
  • git check-ignore .oat/brainstorm/test/page.html — exit 0

Reviews

Scope Type Status Date Artifact
p01 code passed 2026-05-01 reviews/archived/p01-code-review-2026-05-01.md
p02 code passed 2026-05-01 reviews/archived/p02-code-review-2026-05-01.md
p03 code passed 2026-05-01 reviews/archived/p03-code-review-2026-05-01.md
p04 code passed 2026-05-01 reviews/archived/p04-code-review-2026-05-01.md
p05 code passed 2026-05-02 reviews/archived/p05-code-review-2026-05-02.md
final code passed 2026-05-02 reviews/archived/final-review-2026-05-02-v2.md
design artifact fixes_completed 2026-05-01 reviews/archived/artifact-design-review-2026-05-01.md
plan artifact fixes_completed 2026-05-01 reviews/archived/artifact-plan-review-2026-05-01.md

The first final code review (v1, 2026-05-02) flagged 6 Important + 2 Medium + 1 Minor — all 9 converted to fix tasks (Phase 5) and closed in the v2 narrowed re-review (verdict: pass). A v3 final review surfaced 1 Important + 2 Medium of post-pass bookkeeping drift; the cycle limit (3) was exceeded, the v3 reviewer explicitly said no code changes were needed, and the user opted to apply fixes inline as a single bookkeeping commit — recorded in implementation.md Review History.

Manual dogfood plan (pre-merge)

The user noted they will manually do some dogfooding before merging using a vault-copied reference at ~/Library/Mobile Documents/iCloud~md~obsidian/Documents/Vault/02 - Projects/Open Agent Toolkit/References/dogfood-results.md (outside the repo, not committed). Live dogfood follow-up — especially the fold-back commit safety contract against a real dirty tree — is captured as backlog item bl-7d5b.

References

@tkstang tkstang force-pushed the feat/independent-brainstorming-mode branch from 3a80c5c to 69fd51f Compare May 3, 2026 21:47
@tkstang tkstang force-pushed the feat/independent-brainstorming-mode branch from 0b4190c to c0c08dd Compare May 4, 2026 04:52
tkstang added 25 commits May 4, 2026 20:08
tkstang added 27 commits May 4, 2026 20:08
PR #71 (f33c659) shipped 0.0.58, so this branch's lockstep bump moves
to 0.0.59. Updates implementation.md, current-state.md, and
backlog/completed.md to reflect the new version. The
public-package-versions.json regeneration line is dropped — PR #71
untracked the bundled assets directory.
Replaces the always-on "any exploratory phrasing" activation model with
an explicit three-tier contract that separates brainstorm-quality
response (the default for any exploratory phrasing) from the OAT
brainstorm banner (a workflow commitment marker, reserved for explicit
hard-activation triggers or user confirmation).

Activation Contract tiers:

- Hard Activation: /oat-brainstorm or explicit `brainstorm` verb with
  topic ("let's brainstorm X", "brainstorm this", "can we brainstorm
  X", "help me brainstorm X"). Banner + mode + full Process flow.
- Soft Exploratory Path: ambiguous exploratory phrasing ("help me think
  through", "I've been thinking about", "what if we", "I'm trying to
  figure out"). Respond conversationally with brainstorm-quality
  reasoning, no banner. After ≥2 sustained exploratory turns, append
  the soft offer once.
- No Activation: advisory / review / debug / PR / status /
  implementation / active-workflow questions ("thoughts?", "what's
  your take?", "does this seem right?"). Direct response, no banner,
  no offer.

Other changes:
- Frontmatter description tightened to explicit brainstorm-verb
  triggers only (drops weak "I've been thinking about" / "what if we
  did" generic openers).
- BLOCKED Activities collapses the two redundant visual-companion
  rules into one combined rule (resolves prev1-review minor #1).
- Self-Correction Protocol gains a new top rule for printing the
  banner on Soft / No Activation paths.
- Step 1: Activate gates the Process flow on the Activation Contract.
- dogfood-results.md gains an Activation Anti-Cases section (12 rows
  across the three tiers) for live-dogfood verification.
- apps/oat-docs/docs/workflows/skills/index.md adds a "resume an
  existing idea or expand a scratchpad seed" hint to the
  oat-idea-ideate catalog entry (resolves prev1-review minor #2).
- apps/oat-docs/docs/workflows/ideas/index.md adds an explicit
  direct-entry note that oat-idea-ideate requires an existing target
  (resolves prev1-review minor #3).
- apps/oat-docs/docs/cli-utilities/tool-packs.md brainstorm pack
  description rewritten to reflect the activation contract.
- 5 lockstep public packages bumped 0.0.60 → 0.0.61.

Per AGENTS.md, the oat-brainstorm SKILL.md `version:` is PR-scoped and
was already bumped to 1.0.1 during prev1; not double-bumped here.

Verified:

- pnpm release:validate: pass on all 5 public packages at 0.0.61
- pnpm format: pass
- pnpm lint: pass
- pnpm type-check: pass
- pnpm --filter @open-agent-toolkit/cli test: 1463/1463 pass
- pnpm oat:validate-skills: oat-brainstorm and oat-idea-ideate
  validate clean; pre-existing 6 unrelated failures unchanged.
The prev2 commit introduced a bare colon in the unquoted YAML scalar
("the brainstorm verb: /oat-brainstorm, ..."), which YAML parsers
interpreted as a nested mapping inside the description value, producing
"mapping values are not allowed in this context". The validate-skills
linter only checked length and lead-word constraints so it didn't
surface the issue, but any consumer that actually loads the YAML
(provider sync, skill resolver) failed.

Replace "verb: \`/oat-brainstorm\`" with "verb, including
\`/oat-brainstorm\`" so the description reads as one unbroken scalar.
Description stays at 475 chars (under the 500 limit).
…iance

PR #71 (`feat(skills): make end-of-lifecycle skills model-invokable`)
removed the `disable-model-invocation` key from four skills to enable
model invocation, but `pnpm oat:validate-skills` still requires the
key as mandatory frontmatter (see
`packages/cli/src/validation/skills.ts:351-364`). Validation has been
broken for all consumers since PR #71 merged.

Restore the key explicitly with the value that matches PR #71's intent
(`false` = model-invokable). Also fix `oat-pjm-update-repo-reference`
which was missing the same key pre-PR-71 (same end-of-lifecycle
family, same intent).

Skills bumped (PR-scoped per AGENTS.md):

- oat-pjm-add-backlog-item:      1.1.0 → 1.1.1, added `disable-model-invocation: false`
- oat-project-document:          1.4.0 → 1.4.1, added `disable-model-invocation: false`
- oat-project-pr-final:          1.4.0 → 1.4.1, added `disable-model-invocation: false`
- oat-project-summary:           1.1.0 → 1.1.1, added `disable-model-invocation: false`
- oat-pjm-update-repo-reference: 1.1.0 → 1.1.1, added `disable-model-invocation: false`

Also fixes one unrelated pre-existing validator failure surfaced while
investigating: oat-project-spec's description started with "Optional
standalone skill..." which fails the lead-word rule ("Use when",
"Run when", "Trigger when"). Rewrote the lead to start with "Use when
discovery is complete..." (semantics preserved); skill bumped 2.0.0 →
2.0.1. Out of scope of the model-invocation thread but small enough
to fix in the same commit so the validator returns clean exit 0.

Lockstep public packages bumped 0.0.61 → 0.0.62.

Verified:

- pnpm oat:validate-skills: OK (48/48 skills)
- pnpm release:validate: pass on all 5 public packages at 0.0.62
- pnpm format / lint / type-check: pass

Strict-YAML validation gap noted in `bl-f19a` (separate follow-up)
will catch a related class of bugs at the parser level.
Address the 3 Important + 2 Minor findings from prev2-review-2026-05-04.md:

- prev2-t04 (I1): remove `thoughts?` from the soft/ambiguous example list in
  oat-brainstorm/SKILL.md frontmatter and apps/oat-docs tool-packs.md. Same
  word listed under both Soft Exploratory Path and No Activation contradicted
  the activation contract; the No Activation classification is correct so the
  Soft list now drops it.
- prev2-t05 (I2): scrub CODEX_CI from the spawned child env in
  visual-companion-smoke.test.ts. start-server.sh auto-sets FOREGROUND=true
  when CODEX_CI is present (intentional for real Codex usage), but the harness
  resolves on the child's `close` event — a foreground server never closes,
  causing all 5 smoke tests to time out at 30s under Codex CI. start-server.sh
  runtime behavior is unchanged.
- prev2-t08 (m2): add three missing spaces around inline-code spans in the
  bl-f19a backlog item description (`verb:` was, scalar. `pnpm`, raised
  `mapping`).

Verified:
- CODEX_CI=1 pnpm --filter @open-agent-toolkit/cli exec vitest run
  src/integration/visual-companion-smoke.test.ts → 5/5 pass
- pnpm oat:validate-skills → 48/48 pass
- rg `thoughts?` confirms the string only appears in No Activation contexts.
Refresh OAT bookkeeping after the prev2-review fix batch:

- state.md frontmatter: oat_current_task → null (all 5 fix tasks done),
  oat_last_commit → 877fbdc, oat_project_state_updated → 2026-05-05T01:10Z.
- state.md body: status / progress / Next Milestone reflect the completed
  prev2-review batch and the orchestrator-owned push + re-review.
- plan.md: prev2 Reviews row → fixes_completed; phase p-rev2 status → complete
  (8/8); ## Implementation Complete totals → 43/43 with the new commit hash.
- implementation.md: Progress Overview prev2 row → complete 8/8; total → 43/43;
  oat_current_task_id → null; appended `Revision Completed: prev2 Review Fixes`
  section with per-task outcomes and verification.
- .oat/state.md regenerated via `pnpm run cli -- state refresh`.

Resolves prev2-review m1 (bookkeeping drift).
@tkstang tkstang force-pushed the feat/independent-brainstorming-mode branch from edd47e0 to 8bd6125 Compare May 5, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant