pipeline-subwindow

Enforces DB query and CLI conventions for pipeline sub-window story execution.

10|3|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/Cynthia1070711/PHYCOOL_Tools --skill pipeline-subwindow-cynthia1070711
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pipeline-subwindow
Source: https://github.com/Cynthia1070711/PHYCOOL_Tools/tree/main/config-templates/claude/skills/pipeline-subwindow
Command: npx skills add https://github.com/Cynthia1070711/PHYCOOL_Tools --skill pipeline-subwindow-cynthia1070711

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires better-sqlite3, and includes references (resource) components.

What problem does it solve? Pipeline sub-windows running dev-story, code-review, or tasks-backfill repeatedly hit known traps: better-sqlite3 module resolution failures from the project root, hallucinated upsert-story.js CLI syntax, and direct SQL writes that bypass lifecycle invariants. This Skill codifies the correct conventions so sub-windows avoid these recurring errors. ## Core Features & Use Cases - DB Query/Write Golden Path: A priority matrix mandating MCP-first access (search_stories, add_context) with CLI fallback through .context-db/scripts wrappers, and explicit bans on raw SQL UPDATE against the stories table. - upsert-story.js CLI Cheatsheet: Documents the three modes (create, --merge with inline JSON, --merge with JSON file) including the required story-id positional argument and common failure patterns. - Anti-Pattern Catalog: 12 documented mistakes covering module paths, shell escaping, lifecycle invariant violations, and permission prompt handling, each with the correct alternative. - Use Case: A dev-story sub-window finishing implementation needs to set status to review; it consults this Skill, runs upsert-story.js with the correct three-argument merge syntax, then calls record-phase-timestamp.js instead of writing raw SQL. ## Quick Start Load the pipeline-subwindow skill before performing any database or CLI operation in a dev-story or code-review sub-window to get the correct MCP-first conventions and upsert-story syntax.

Frequently Asked Questions about pipeline-subwindow

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I update a story status from a pipeline sub-window?

Run upsert-story.js with three arguments: --merge {story-id} --inline '{json}'. There is no MCP write tool for the stories table, so this CLI script is the required path because it enforces lifecycle invariants and auto status promotion.

Why does require('better-sqlite3') fail with Cannot find module?

better-sqlite3 is only installed under .context-db/node_modules, and Node.js resolves modules upward from the current working directory. Run commands after cd .context-db, use the wrapper scripts, or prefer MCP search tools instead.

Should I use MCP tools or CLI scripts for database access?

Use MCP tools first: search_stories, search_context, add_context, and add_intentional_decision cover most reads and writes. Only the stories and tech_debt_items tables lack MCP write tools, requiring upsert-story.js or upsert-debt.js CLI fallback.

Can I run SQL UPDATE directly on the stories table?

No. Direct SQL bypasses auto-status-promotion, the I1-I9 lifecycle invariant validation, and sync gate hooks. All story writes must go through upsert-story.js, which enforces these three protection layers.

What should a sub-window do if a permission prompt appears?

After the SKL-08 hotfix added --dangerously-skip-permissions, approval prompts should not appear. If one does, treat it as a new bug: write a signal file to notify the controller and report it rather than waiting for a timeout.