Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions sections/copilot_skills.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ SKILLS_SHARED=(
SKILLS_LOCAL=(
code-audit
hunk-reviewer
skill-conductor
skill-conductor-decision
skill-conductor-context
skill-conductor-execution
)

section_copilot_skills() {
Expand Down Expand Up @@ -81,6 +85,33 @@ section_copilot_skills() {
done

ok "Copilot skills installation complete."

# Install GSD (Get Shit Done) context engineering skills
_copilot_skills_install_gsd
}

_copilot_skills_install_gsd() {
if [[ -f "${HOME}/.copilot/skills/gsd-new-project/SKILL.md" ]]; then
ok "GSD skills already installed (Copilot)"
else
if command_exists npx; then
run npx get-shit-done-cc@latest --copilot --global --profile=full
ok "Installed GSD skills (Copilot)"
else
warn "npx not found; skipping GSD installation. Install Node.js first."
fi
fi

if [[ -f "${HOME}/.claude/skills/gsd-new-project/SKILL.md" ]]; then
ok "GSD skills already installed (Claude Code)"
else
if command_exists npx; then
run npx get-shit-done-cc@latest --claude --global --profile=full
ok "Installed GSD skills (Claude Code)"
else
warn "npx not found; skipping GSD installation for Claude Code."
fi
fi
}

# -- Verification (--verify mode) ---------------------------------------------
Expand Down Expand Up @@ -124,4 +155,30 @@ verify_copilot_skills() {
|| fail "Skill missing: ${skill}"
done
fi

# Verify GSD core skills are installed
local gsd_core_skills=(gsd-new-project gsd-plan-phase gsd-discuss-phase gsd-execute-phase gsd-map-codebase)
for skill in "${gsd_core_skills[@]}"; do
[[ -f "${skills_dir}/${skill}/SKILL.md" ]] \
&& pass "GSD skill installed: ${skill}" \
|| fail "GSD skill missing: ${skill} (run: npx get-shit-done-cc@latest --copilot --global --profile=full)"
done

# Verify conductor registry is not stale (warn if installed skills exist outside registry)
if [[ -f "${skills_dir}/skill-conductor/SKILL.md" ]]; then
local registry_file="${skills_dir}/skill-conductor/SKILL.md"
local unregistered=0
for dir in "${skills_dir}"/gstack-*/; do
[[ -d "$dir" ]] || continue
local skill_name
skill_name="$(basename "$dir" | sed 's/^gstack-//')"
if ! grep -q "$skill_name" "$registry_file" 2>/dev/null; then
warn "Unregistered skill in conductor: $(basename "$dir")"
unregistered=$((unregistered + 1))
fi
done
[[ $unregistered -eq 0 ]] \
&& pass "Conductor registry covers all installed gstack skills" \
|| warn "Conductor registry has ${unregistered} unregistered gstack skill(s)"
fi
}
87 changes: 87 additions & 0 deletions skills/skill-conductor-context/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
name: skill-conductor-context
description: Context layer guidance for the skill conductor. Helps establish and maintain project context using GSD artifacts to prevent context rot.
---

# Context Layer: Anchoring Project Context with GSD

You were routed here because the project needs context anchoring before work
can proceed effectively. Context rot (quality degradation as context windows
fill) is the problem GSD solves.

## When Context Work Is Needed

- **New project:** No PROJECT.md, REQUIREMENTS.md, or ROADMAP.md exists
- **Stale context:** STATE.md not updated in 7+ days
- **Session boundary:** Starting a new session on existing work
- **Scope shift:** Requirements changed, need to re-anchor
- **Long chain:** Multiple sessions of work, context drifting

## Decision Tree

```
Does the project have GSD artifacts (PROJECT.md, REQUIREMENTS.md, ROADMAP.md)?
NO --> Is there existing code?
YES --> invoke gsd-map-codebase, then gsd-new-project
NO --> invoke gsd-new-project
YES --> Is there a specific phase being worked on?
YES --> Is the phase planned?
NO --> invoke gsd-discuss-phase, then gsd-plan-phase
YES --> invoke gsd-execute-phase
NO --> Are decisions needed before planning?
YES --> invoke gsd-discuss-phase
NO --> invoke gsd-plan-phase
```

## GSD Core Skills

### gsd-new-project
**When:** Starting fresh. No GSD artifacts exist yet.
**What it does:** Questions you about the project, researches context, produces
REQUIREMENTS.md and ROADMAP.md. You approve, then you are ready to build.
**Prerequisite:** If code exists, run gsd-map-codebase first.
**Output:** PROJECT.md, REQUIREMENTS.md, ROADMAP.md, STATE.md

### gsd-discuss-phase [N]
**When:** A phase exists in the roadmap but implementation details are unclear.
**What it does:** Captures your decisions about layouts, API shapes, error handling,
data structures. Feeds directly into planning.
**Output:** CONTEXT.md (per-phase implementation decisions)

### gsd-plan-phase [N]
**When:** Phase is discussed, ready to be planned for execution.
**What it does:** Research, plan, and verify in a loop until plans pass.
Each plan is small enough to execute in a fresh context window.
**Output:** Phase plan files

### gsd-execute-phase [N]
**When:** Phase is planned, ready to build.
**What it does:** Executes plans in parallel waves. Each executor gets fresh context.
Each task gets its own atomic commit.
**Output:** Implemented code with clean git history

### gsd-phase
**When:** Need to manage phase state (advance, check status).
**What it does:** Phase lifecycle management.

## Context Artifacts (what GSD maintains)

| File | Purpose | Created by |
|------|---------|-----------|
| PROJECT.md | What the project is (vision, goals) | gsd-new-project |
| REQUIREMENTS.md | Scope (what to build, what not to) | gsd-new-project |
| ROADMAP.md | Where you are going (phased plan) | gsd-new-project |
| STATE.md | Current position, active decisions | Updated continuously |
| CONTEXT.md | Per-phase implementation decisions | gsd-discuss-phase |

## Integration with Other Layers

After context is anchored:
- **If requirements are clear:** Route to execution layer (Superpowers)
- **If approach needs validation:** Route to decision layer (gstack reviews)
- **If both:** Decision first (validate approach), then execution

## After Choosing

Invoke the chosen GSD skill. Let it run its own flow. GSD skills are
self-contained and will guide the conversation from here.
81 changes: 81 additions & 0 deletions skills/skill-conductor-decision/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: skill-conductor-decision
description: Decision layer guidance for the skill conductor. Helps choose the right gstack decision skill based on what kind of thinking is needed.
---

# Decision Layer: Choosing the Right Thinking Tool

You were routed here because the user needs to DECIDE something before building.
Your job: pick the right decision skill and invoke it.

## Decision Tree

```
Is this a brand new idea or feature?
YES --> Is it a startup/product idea?
YES --> invoke office-hours
NO --> invoke brainstorming
NO --> Is there an existing plan/design doc to review?
YES --> What kind of review?
Scope/strategy --> invoke plan-ceo-review
Architecture/code --> invoke plan-eng-review
UI/UX/visual --> invoke plan-design-review
Security --> invoke cso
All of the above --> invoke autoplan
NO --> Is the user unsure what to build?
YES --> invoke office-hours
NO --> invoke brainstorming
```

## Skill Descriptions

### office-hours
**When:** New ideas, unclear requirements, need to stress-test assumptions.
**What it does:** YC-style questioning (6 forcing questions for startups, generative
questions for builders). Produces a design doc with premises, approaches, and
recommended path.
**Token cost:** High (~2000+ tokens loaded, multi-turn conversation)
**Output:** Design doc in ~/.gstack/projects/

### brainstorming (Superpowers)
**When:** Lighter ideation, refining an existing concept, exploring options.
**What it does:** Explores intent, proposes approaches, presents design for approval.
**Token cost:** Medium (~800 tokens)
**Output:** Design spec in docs/superpowers/specs/

### plan-ceo-review
**When:** Existing plan needs scope/strategy validation. "Is this ambitious enough?"
**What it does:** Challenges premises, proposes scope expansion or reduction,
finds the 10-star product version.
**Token cost:** High (~1500 tokens)
**Output:** Review log, plan file updates

### plan-eng-review
**When:** Existing plan needs architecture, test coverage, performance review.
**What it does:** Reviews architecture, code quality, test gaps, performance.
Interactive: one issue at a time with recommendations.
**Token cost:** High (~2000 tokens)
**Output:** Review log, test plan, coverage diagram

### plan-design-review
**When:** Plan has UI/UX components that need visual/interaction review.
**What it does:** Rates design dimensions, proposes improvements.
**Token cost:** Medium (~1000 tokens)
**Output:** Review log, design scores

### autoplan
**When:** Want the full review gauntlet without answering 15-30 intermediate questions.
**What it does:** Runs CEO, eng, and design reviews sequentially with auto-decisions.
**Token cost:** Very high (sum of all above)
**Output:** All review logs, unified report

### cso
**When:** Security-focused review needed (secrets, supply chain, OWASP, STRIDE).
**What it does:** Infrastructure-first security audit with active verification.
**Token cost:** High (~1500 tokens)
**Output:** Security report with findings

## After Choosing

Invoke the chosen skill using the Skill tool. The skill will take over from here.
Do not provide additional routing guidance; let the skill run its own flow.
110 changes: 110 additions & 0 deletions skills/skill-conductor-execution/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
---
name: skill-conductor-execution
description: Execution layer guidance for the skill conductor. Helps choose the right Superpowers execution skill for the current phase of implementation work.
---

# Execution Layer: Building with Superpowers

You were routed here because requirements are clear and it is time to build.
Superpowers provides a disciplined execution loop: plan, implement (TDD),
verify, ship.

## Decision Tree

```
What phase of execution are you in?
PLANNING (need implementation plan)
--> invoke writing-plans
IMPLEMENTING (plan exists, building features)
--> Is TDD appropriate (new behavior, not config/docs)?
YES --> invoke test-driven-development
NO --> invoke executing-plans
--> Are there 2+ independent tasks?
YES --> invoke dispatching-parallel-agents
--> Is it complex multi-step with shared state?
YES --> invoke subagent-driven-development
DEBUGGING (something is broken)
--> invoke systematic-debugging
REVIEWING (code is written, needs review)
--> invoke requesting-code-review (for others to review you)
--> invoke receiving-code-review (responding to review feedback)
VERIFYING (think you are done)
--> invoke verification-before-completion
SHIPPING (verified, ready to merge)
--> invoke finishing-a-development-branch
```

## Skill Descriptions

### writing-plans
**When:** Requirements are clear, need a step-by-step implementation plan.
**What it does:** Creates a detailed plan with phases, dependencies, and
acceptance criteria. Saves to plan.md.
**Follows:** Decision layer (office-hours/brainstorming produced a design)
**Output:** plan.md with numbered steps

### executing-plans
**When:** Plan exists, time to build step by step.
**What it does:** Executes plan with review checkpoints. Marks steps complete.
**Prerequisite:** plan.md must exist
**Output:** Implemented code, updated plan status

### test-driven-development
**When:** Building new behavior where tests should drive the design.
**What it does:** RED (write failing test) -> GREEN (make it pass) -> REFACTOR.
Strict cycle enforcement.
**Best for:** New functions, services, APIs, business logic
**Not for:** Config changes, documentation, scaffolding

### dispatching-parallel-agents
**When:** 2+ independent tasks that can run simultaneously.
**What it does:** Launches multiple agents in parallel, each with a focused task.
Collects results.
**Best for:** Multiple file edits, independent modules, research threads

### subagent-driven-development
**When:** Complex multi-step work requiring coordination.
**What it does:** Manages a team of subagents with shared context and handoffs.
**Best for:** Large features spanning many files/modules

### systematic-debugging
**When:** Something is broken and the cause is not obvious.
**What it does:** Four phases: investigate, analyze, hypothesize, implement.
Iron rule: no fixes without root cause.
**Best for:** Intermittent bugs, mysterious failures, regression hunting

### requesting-code-review
**When:** Code is written, want feedback before merging.
**What it does:** Prepares a structured review request with context.

### receiving-code-review
**When:** Review feedback received, need to address it.
**What it does:** Guides systematic response to each review comment.

### verification-before-completion
**When:** Implementation seems done, need to confirm.
**What it does:** Checks that all acceptance criteria are met, tests pass,
no regressions introduced.
**Output:** Verification report

### finishing-a-development-branch
**When:** Verified, ready to merge/ship.
**What it does:** Guides PR creation, merge strategy, cleanup.
**Output:** Merged branch, cleaned up

## Choosing Between Similar Skills

| Situation | Choose |
|-----------|--------|
| Simple sequential steps | executing-plans |
| New behavior needs tests | test-driven-development |
| Many independent pieces | dispatching-parallel-agents |
| Complex coordinated work | subagent-driven-development |
| Bug fix | systematic-debugging |
| "Am I done?" | verification-before-completion |
| "Ship it" | finishing-a-development-branch |

## After Choosing

Invoke the chosen skill. Let it run its own flow. Each Superpowers skill is
self-contained with its own process and checkpoints.
Loading
Loading