@kennethsolomon/shipkit 3.9.0 → 3.10.1
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.
- package/README.md +10 -2
- package/commands/sk/autopilot.md +22 -0
- package/commands/sk/set-profile.md +4 -0
- package/commands/sk/start.md +30 -0
- package/commands/sk/team.md +23 -0
- package/package.json +1 -1
- package/skills/.claude/settings.local.json +37 -0
- package/skills/sk:autopilot/SKILL.md +151 -0
- package/skills/sk:brainstorming/SKILL.md +6 -6
- package/skills/sk:debug/__pycache__/debug_conductor.cpython-314.pyc +0 -0
- package/skills/sk:debug/debug_conductor.py +0 -8
- package/skills/sk:debug/lib/__pycache__/findings_writer.cpython-314.pyc +0 -0
- package/skills/sk:debug/lib/__pycache__/lessons_writer.cpython-314.pyc +0 -0
- package/skills/sk:debug/lib/__pycache__/step_runner.cpython-314.pyc +0 -0
- package/skills/sk:debug/lib/findings_writer.py +2 -2
- package/skills/sk:debug/lib/lessons_writer.py +2 -2
- package/skills/sk:debug/lib/step_runner.py +8 -10
- package/skills/sk:lint/SKILL.md +2 -2
- package/skills/sk:setup-claude/scripts/__pycache__/apply_setup_claude.cpython-314.pyc +0 -0
- package/skills/sk:setup-claude/scripts/apply_setup_claude.py +12 -3
- package/skills/sk:setup-claude/templates/.claude/agents/backend-dev.md +63 -0
- package/skills/sk:setup-claude/templates/.claude/agents/frontend-dev.md +65 -0
- package/skills/sk:setup-claude/templates/.claude/agents/qa-engineer.md +66 -0
- package/skills/sk:setup-claude/templates/CLAUDE.md.template +43 -25
- package/skills/sk:setup-optimizer/SKILL.md +4 -1
- package/skills/sk:setup-optimizer/lib/__pycache__/discover.cpython-314.pyc +0 -0
- package/skills/sk:setup-optimizer/lib/discover.py +9 -10
- package/skills/sk:skill-creator/scripts/__pycache__/generate_report.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/improve_description.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/package_skill.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/run_eval.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/run_loop.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/__pycache__/utils.cpython-314.pyc +0 -0
- package/skills/sk:skill-creator/scripts/generate_report.py +2 -0
- package/skills/sk:skill-creator/scripts/improve_description.py +2 -0
- package/skills/sk:skill-creator/scripts/package_skill.py +4 -0
- package/skills/sk:skill-creator/scripts/run_eval.py +3 -1
- package/skills/sk:skill-creator/scripts/run_loop.py +2 -0
- package/skills/sk:skill-creator/scripts/utils.py +2 -0
- package/skills/sk:start/SKILL.md +156 -0
- package/skills/sk:team/SKILL.md +141 -0
- package/skills/sk:test/SKILL.md +2 -2
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-dev
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: Frontend development agent — writes frontend tests and implements UI/components/pages using mocked API contract.
|
|
5
|
+
allowed_tools: Bash, Read, Edit, Write, Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Frontend Development Agent
|
|
9
|
+
|
|
10
|
+
You are the Frontend Agent in a team workflow. Your job is to write frontend tests and implement UI code based on the plan and API contract.
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
You are working in an **isolated worktree** — a separate copy of the repository. Another agent (Backend Agent) is implementing the real API in parallel. A QA Agent is writing E2E scenarios in the background.
|
|
15
|
+
|
|
16
|
+
The **API contract** in `tasks/todo.md` defines the endpoints you will consume. Mock these endpoints in your tests — the real backend will replace mocks after merge.
|
|
17
|
+
|
|
18
|
+
## Behavior
|
|
19
|
+
|
|
20
|
+
### 1. Read the Plan
|
|
21
|
+
|
|
22
|
+
- Read `tasks/todo.md` — find the API contract section and all frontend tasks
|
|
23
|
+
- Read `tasks/lessons.md` — apply all active lessons
|
|
24
|
+
- Identify: components, pages, composables/hooks, forms, state management
|
|
25
|
+
|
|
26
|
+
### 2. Write Frontend Tests (TDD Red Phase)
|
|
27
|
+
|
|
28
|
+
Write failing tests for all frontend behavior:
|
|
29
|
+
- **Component tests**: Rendering with props, conditional display, slots/children
|
|
30
|
+
- **Interaction tests**: Click, type, submit, navigate
|
|
31
|
+
- **Form tests**: Validation, submission, error display
|
|
32
|
+
- **Hook/composable tests**: State changes, side effects
|
|
33
|
+
- Mock API endpoints using the contract shapes
|
|
34
|
+
- Use `@testing-library` conventions: prefer `getByRole`, `getByText`, `getByLabelText`
|
|
35
|
+
- Follow existing test conventions (read 1-2 existing test files first)
|
|
36
|
+
|
|
37
|
+
### 3. Implement Frontend Code (TDD Green Phase)
|
|
38
|
+
|
|
39
|
+
Implement in dependency order:
|
|
40
|
+
1. API client / service layer (typed from contract)
|
|
41
|
+
2. Composables / hooks
|
|
42
|
+
3. Components (smallest first)
|
|
43
|
+
4. Pages (compose components)
|
|
44
|
+
5. Routes / navigation
|
|
45
|
+
|
|
46
|
+
Make each test pass before moving to the next.
|
|
47
|
+
|
|
48
|
+
### 4. Verify
|
|
49
|
+
|
|
50
|
+
Run the frontend test suite:
|
|
51
|
+
- All new tests must pass
|
|
52
|
+
- Existing tests must not break
|
|
53
|
+
- Report: test count, pass/fail, coverage %
|
|
54
|
+
|
|
55
|
+
### 5. Auto-Commit
|
|
56
|
+
|
|
57
|
+
Commit with: `feat(frontend): [description]`
|
|
58
|
+
|
|
59
|
+
## Rules
|
|
60
|
+
|
|
61
|
+
- ONLY touch frontend files (components, pages, composables, CSS, frontend tests, API client)
|
|
62
|
+
- Do NOT touch backend files (models, controllers, services, migrations, routes)
|
|
63
|
+
- Do NOT modify the API contract in `tasks/todo.md`
|
|
64
|
+
- Mock API responses based on the contract shapes — do NOT call the real backend
|
|
65
|
+
- 3-strike protocol: if something fails 3 times, stop and report
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qa-engineer
|
|
3
|
+
model: sonnet
|
|
4
|
+
description: QA engineer agent — writes E2E test scenarios based on the plan while other agents implement.
|
|
5
|
+
allowed_tools: Bash, Read, Write, Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# QA Engineer Agent
|
|
9
|
+
|
|
10
|
+
You are the QA Agent in a team workflow. Your job is to write E2E test scenarios while the Backend and Frontend agents implement code in parallel.
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
You run in the **background** while other agents work. Your E2E scenarios will be executed AFTER the backend and frontend code is merged. Write scenarios that validate the integrated result from a user's perspective.
|
|
15
|
+
|
|
16
|
+
## Behavior
|
|
17
|
+
|
|
18
|
+
### 1. Read the Plan
|
|
19
|
+
|
|
20
|
+
- Read `tasks/todo.md` — extract user-facing flows and acceptance criteria
|
|
21
|
+
- Read `tasks/lessons.md` — apply all active lessons
|
|
22
|
+
- Identify: user journeys, happy paths, error scenarios, edge cases
|
|
23
|
+
|
|
24
|
+
### 2. Detect E2E Framework
|
|
25
|
+
|
|
26
|
+
Check the project for:
|
|
27
|
+
- `playwright.config.ts` → use Playwright
|
|
28
|
+
- `cypress.config.ts` → use Cypress
|
|
29
|
+
- Neither → write framework-agnostic scenario descriptions in markdown
|
|
30
|
+
|
|
31
|
+
### 3. Write E2E Scenarios
|
|
32
|
+
|
|
33
|
+
For each user flow identified in the plan:
|
|
34
|
+
|
|
35
|
+
**If Playwright detected:**
|
|
36
|
+
- Create `e2e/<feature>.spec.ts` files
|
|
37
|
+
- Use `test.describe` / `test` blocks
|
|
38
|
+
- Use role-based locators: `getByRole`, `getByLabel`, `getByText`
|
|
39
|
+
- Use `test.beforeEach` for shared setup (auth, navigation)
|
|
40
|
+
- Guard credential-dependent tests with `test.skip`
|
|
41
|
+
|
|
42
|
+
**If no framework detected:**
|
|
43
|
+
- Create `tasks/e2e-scenarios.md` with structured scenarios:
|
|
44
|
+
```
|
|
45
|
+
## Scenario: [name]
|
|
46
|
+
**Given** [precondition]
|
|
47
|
+
**When** [action]
|
|
48
|
+
**Then** [expected result]
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### 4. Coverage Summary
|
|
52
|
+
|
|
53
|
+
Report:
|
|
54
|
+
- Total scenarios written
|
|
55
|
+
- Happy path coverage: [list of flows covered]
|
|
56
|
+
- Edge cases covered: [list]
|
|
57
|
+
- NOT covered (out of scope): [list]
|
|
58
|
+
|
|
59
|
+
## Rules
|
|
60
|
+
|
|
61
|
+
- Do NOT run E2E tests — they will fail because code isn't implemented yet
|
|
62
|
+
- Do NOT touch backend or frontend source files
|
|
63
|
+
- ONLY create E2E test files or scenario documents
|
|
64
|
+
- Write scenarios based on the PLAN, not on existing code
|
|
65
|
+
- Focus on user-visible behavior, not implementation details
|
|
66
|
+
- 3-strike protocol: if something fails 3 times, stop and report
|
|
@@ -99,9 +99,17 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
|
|
|
99
99
|
|
|
100
100
|
3. **Optional steps** (4, 5, 8, 15, 21): Ask the user "Skip [step]?" and require explicit confirmation. Record the reason in Notes.
|
|
101
101
|
|
|
102
|
-
4. **
|
|
102
|
+
4. **Auto-skip detection.** Optional steps (4, 5, 8, 15) are auto-skipped when detection criteria are met — no confirmation prompt needed, just a log line. Detection runs after the plan is written (step 6) by scanning `tasks/todo.md`:
|
|
103
|
+
- **Step 4 (Design)**: Auto-skipped if plan contains NO frontend keywords (component, view, page, CSS, template, blade, vue, react, svelte, UI, form, modal, button)
|
|
104
|
+
- **Step 5 (Accessibility)**: Auto-skipped if plan contains NO frontend keywords (same list as step 4)
|
|
105
|
+
- **Step 8 (Migrate)**: Auto-skipped if plan contains NO database keywords (migration, schema, table, column, model, database, foreign key, index, seed)
|
|
106
|
+
- **Step 15 (Performance)**: Auto-skipped if plan contains NO frontend keywords AND NO database keywords
|
|
107
|
+
- **Step 21 (Release)**: NEVER auto-skipped — always ask
|
|
108
|
+
- Output when auto-skipped: `Auto-skipped: [Step Name] ([reason])` — e.g., `Auto-skipped: Design (no frontend keywords detected in plan)`
|
|
103
109
|
|
|
104
|
-
5. **
|
|
110
|
+
5. **Gates own their commits.** Each hard gate (steps 12–17) is responsible for committing any fixes it produces before passing control to the next step. There are no separate conditional commit steps.
|
|
111
|
+
|
|
112
|
+
6. **Loop steps are HARD GATES** (12, 13, 14, 16, 17): These steps BLOCK all forward progress until they pass clean. Fix issues immediately and re-run. Do NOT ask the user to re-run — fix and re-run automatically. Track attempt number in Notes (e.g., "clean on attempt 3").
|
|
105
113
|
- **Step 12 (Lint)**: All detected linting tools must pass — every single one.
|
|
106
114
|
- **Step 13 (Verify Tests)**: All detected test suites (BE + FE) must pass with 100% coverage on new code.
|
|
107
115
|
- **Step 14 (Security)**: 0 issues across all severities.
|
|
@@ -110,15 +118,15 @@ Progress is tracked in `tasks/workflow-status.md`. This file persists across con
|
|
|
110
118
|
- **Step 15 (Performance)**: Optional gate — if run, loop until critical/high findings = 0. Can be skipped with explicit confirmation.
|
|
111
119
|
- **DO NOT mark these steps as `done` until every check passes.** If even one tool fails, the step is NOT done. Never proceed to the next step with errors remaining.
|
|
112
120
|
|
|
113
|
-
|
|
121
|
+
7. **Never skip steps without confirmation.** Steps cannot run out of order. Hard gate steps (12, 13, 14, 16, 17) can NEVER be skipped. Optional gate step (15) requires explicit confirmation to skip.
|
|
114
122
|
|
|
115
|
-
|
|
123
|
+
8. **Requirements change mid-workflow?** Stop the current step and run `/sk:change` immediately. It will classify the scope (behavior tweak / new requirements / scope shift) and tell you exactly where to re-enter the workflow. Never continue implementing stale requirements.
|
|
116
124
|
|
|
117
|
-
|
|
125
|
+
8. **Never auto-advance.** When one step completes, stop and tell the user which step is next. Do not proceed automatically.
|
|
118
126
|
|
|
119
|
-
|
|
127
|
+
9. **Never write code during design or plan phases.** Steps 1-6 are reading/exploring/planning/design only — no code, no file edits (except `tasks/` files).
|
|
120
128
|
|
|
121
|
-
|
|
129
|
+
10. **Step completion summary is NON-NEGOTIABLE.** After finishing ANY step, you MUST output a summary block in this exact format before stopping:
|
|
122
130
|
|
|
123
131
|
```
|
|
124
132
|
--- Step [#] [Name]: [done/skipped/partial] ---
|
|
@@ -346,28 +354,38 @@ Create entries in: `[ARCH_CHANGELOG_DIR]`
|
|
|
346
354
|
|
|
347
355
|
| Command | Purpose |
|
|
348
356
|
|---------|---------|
|
|
349
|
-
| `/sk:brainstorm` | Explore requirements and design |
|
|
350
|
-
| `/sk:frontend-design` | UI mockup before implementation. Prompts to create Pencil visual mockup |
|
|
351
|
-
| `/sk:api-design` | Design API contracts (endpoints, payloads, auth, errors) before implementation |
|
|
352
357
|
| `/sk:accessibility` | WCAG 2.1 AA audit — runs after design, before implementation |
|
|
353
|
-
| `/sk:
|
|
358
|
+
| `/sk:api-design` | Design API contracts (endpoints, payloads, auth, errors) before implementation |
|
|
359
|
+
| `/sk:autopilot` | Hands-free workflow — all 21 steps, auto-skip, auto-advance, auto-commit |
|
|
360
|
+
| `/sk:brainstorm` | Explore requirements and design |
|
|
354
361
|
| `/sk:branch` | Create feature branch auto-named from current task |
|
|
355
|
-
| `/sk:
|
|
356
|
-
| `/sk:
|
|
357
|
-
| `/sk:
|
|
358
|
-
| `/sk:lint` | Auto-detect and run all project linters + dependency audits |
|
|
359
|
-
| `/sk:test` | Auto-detect and run all project test suites |
|
|
362
|
+
| `/sk:change` | Handle mid-workflow requirement changes — re-enter at correct step |
|
|
363
|
+
| `/sk:context` | Load all context files + output session brief for fast session start |
|
|
364
|
+
| `/sk:dashboard` | Read-only workflow Kanban board — localhost server, multi-worktree |
|
|
360
365
|
| `/sk:debug` | Investigate and debug issues (bug fix entry point) |
|
|
361
|
-
| `/sk:security-check` | OWASP security audit on changed files |
|
|
362
|
-
| `/sk:perf` | Performance audit — bundle, N+1, Core Web Vitals, memory |
|
|
363
|
-
| `/sk:review` | Self-review with simplify pre-pass + multi-dimensional review |
|
|
364
366
|
| `/sk:e2e` | E2E behavioral verification using agent-browser (final quality gate) |
|
|
365
|
-
| `/sk:
|
|
366
|
-
| `/sk:
|
|
367
|
-
| `/sk:update-task` | Mark task done and log completion |
|
|
368
|
-
| `/sk:finish-feature` | Changelog + PR creation |
|
|
367
|
+
| `/sk:execute-plan` | Execute `tasks/todo.md` checkboxes in batches |
|
|
368
|
+
| `/sk:fast-track` | Abbreviated workflow for small changes — skip planning, keep all gates |
|
|
369
369
|
| `/sk:features` | Sync feature specs with shipped implementation |
|
|
370
|
+
| `/sk:finish-feature` | Changelog + PR creation |
|
|
371
|
+
| `/sk:frontend-design` | UI mockup before implementation. Prompts to create Pencil visual mockup |
|
|
372
|
+
| `/sk:gates` | Run all quality gates in optimized parallel batches |
|
|
373
|
+
| `/sk:hotfix` | Emergency fix workflow — skip design/TDD, quality gates enforced |
|
|
374
|
+
| `/sk:lint` | Auto-detect and run all project linters + dependency audits |
|
|
375
|
+
| `/sk:perf` | Performance audit — bundle, N+1, Core Web Vitals, memory |
|
|
370
376
|
| `/sk:release` | Version bump + changelog + tag |
|
|
371
|
-
| `/sk:
|
|
372
|
-
| `/sk:
|
|
377
|
+
| `/sk:retro` | Post-ship retrospective: velocity, blockers, action items |
|
|
378
|
+
| `/sk:reverse-doc` | Generate architecture/design docs from existing code |
|
|
379
|
+
| `/sk:review` | Self-review with simplify pre-pass + multi-dimensional review |
|
|
380
|
+
| `/sk:scope-check` | Compare implementation against plan, detect scope creep |
|
|
381
|
+
| `/sk:security-check` | OWASP security audit on changed files |
|
|
382
|
+
| `/sk:seo-audit` | SEO audit — dual-mode (source templates + dev server), ask-before-fix |
|
|
373
383
|
| `/sk:setup-optimizer` | Diagnose + update workflow + enrich CLAUDE.md |
|
|
384
|
+
| `/sk:smart-commit` | Conventional commit with approval |
|
|
385
|
+
| `/sk:start` | Smart entry point — classifies task, routes to optimal flow/mode/agents |
|
|
386
|
+
| `/sk:status` | Show workflow + task status |
|
|
387
|
+
| `/sk:team` | Parallel domain agents (backend + frontend + QA) for full-stack tasks |
|
|
388
|
+
| `/sk:test` | Auto-detect and run all project test suites |
|
|
389
|
+
| `/sk:update-task` | Mark task done and log completion |
|
|
390
|
+
| `/sk:write-plan` | Write decision-complete plan into `tasks/todo.md` |
|
|
391
|
+
| `/sk:write-tests` | TDD: Write failing tests before implementation |
|
|
@@ -44,6 +44,8 @@ Before making any changes, runs a diagnostic pass on the existing CLAUDE.md:
|
|
|
44
44
|
- **Inconsistencies** — compares documented vs actual project state (directories, scripts, workflows)
|
|
45
45
|
- **Section completeness** — flags sections that exist but are empty or have only placeholder text
|
|
46
46
|
- **Outdated workflow** — checks if the workflow matches the current 21-step TDD flow with hard gates
|
|
47
|
+
- **Missing commands** — checks for `sk:start`, `sk:autopilot`, `sk:team` in the Commands table
|
|
48
|
+
- **Auto-skip rules** — checks for auto-skip detection rules in the workflow section
|
|
47
49
|
|
|
48
50
|
Reports findings before proceeding. If issues are found, they inform subsequent steps.
|
|
49
51
|
|
|
@@ -57,7 +59,7 @@ Read → Explore → Design → Accessibility → Plan → Branch → Migrate
|
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
**What gets updated:**
|
|
60
|
-
- Workflow table (21 steps with correct commands: `/sk:write-tests`, `/sk:lint`, `/sk:test`, `/sk:accessibility`, `/sk:perf`, `/sk:e2e`)
|
|
62
|
+
- Workflow table (21 steps with correct commands: `/sk:write-tests`, `/sk:lint`, `/sk:test`, `/sk:accessibility`, `/sk:perf`, `/sk:e2e`, `/sk:start`, `/sk:autopilot`, `/sk:team`)
|
|
61
63
|
- Step details (TDD red/green/verify descriptions)
|
|
62
64
|
- Tracker rules (hard gates at 12, 14, 16, 20, 17; optional steps 4, 5, 8, 18, 21)
|
|
63
65
|
- Step completion summary rule (NON-NEGOTIABLE)
|
|
@@ -70,6 +72,7 @@ Read → Explore → Design → Accessibility → Plan → Branch → Migrate
|
|
|
70
72
|
- 3-Strike Protocol (if missing)
|
|
71
73
|
- Fix & Retest Protocol section (if missing)
|
|
72
74
|
- Requirement Change Flow section (if missing)
|
|
75
|
+
- Auto-skip detection rules (if missing)
|
|
73
76
|
|
|
74
77
|
**What gets preserved:**
|
|
75
78
|
- Everything marked with `<!-- LOCK -->` is never touched
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"""Intelligent project structure, documentation, and workflow discovery."""
|
|
2
2
|
|
|
3
|
+
import json
|
|
3
4
|
from pathlib import Path
|
|
4
|
-
from typing import Dict, List
|
|
5
|
+
from typing import Dict, List
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
# Directories to exclude from discovery
|
|
@@ -174,16 +175,14 @@ def _extract_makefile_targets(root_path: Path) -> List[str]:
|
|
|
174
175
|
target = line.split(':')[0].strip()
|
|
175
176
|
if target and not target.startswith('.'):
|
|
176
177
|
targets.append(target)
|
|
177
|
-
except
|
|
178
|
-
|
|
178
|
+
except (OSError, UnicodeDecodeError) as e:
|
|
179
|
+
print(f"Warning: Could not parse Makefile: {e}")
|
|
179
180
|
|
|
180
181
|
return list(set(targets))[:10] # Limit to 10 targets
|
|
181
182
|
|
|
182
183
|
|
|
183
184
|
def _extract_npm_scripts(root_path: Path) -> List[str]:
|
|
184
185
|
"""Extract scripts from package.json."""
|
|
185
|
-
import json
|
|
186
|
-
|
|
187
186
|
package_json = root_path / 'package.json'
|
|
188
187
|
if not package_json.exists():
|
|
189
188
|
return []
|
|
@@ -191,14 +190,14 @@ def _extract_npm_scripts(root_path: Path) -> List[str]:
|
|
|
191
190
|
scripts = []
|
|
192
191
|
try:
|
|
193
192
|
content = json.loads(package_json.read_text())
|
|
194
|
-
if 'scripts' in content:
|
|
193
|
+
if isinstance(content, dict) and 'scripts' in content:
|
|
195
194
|
# Include common scripts, exclude default ones
|
|
196
195
|
exclude = {'test', 'start', 'dev', 'build'}
|
|
197
196
|
for script_name in content['scripts'].keys():
|
|
198
197
|
if script_name not in exclude:
|
|
199
198
|
scripts.append(script_name)
|
|
200
|
-
except
|
|
201
|
-
|
|
199
|
+
except (OSError, json.JSONDecodeError, UnicodeDecodeError) as e:
|
|
200
|
+
print(f"Warning: Could not parse package.json scripts: {e}")
|
|
202
201
|
|
|
203
202
|
return scripts[:8] # Limit to 8 scripts
|
|
204
203
|
|
|
@@ -215,7 +214,7 @@ def _find_github_workflows(root_path: Path) -> List[str]:
|
|
|
215
214
|
workflows.append(workflow_file.stem)
|
|
216
215
|
for workflow_file in workflows_dir.glob('*.yaml'):
|
|
217
216
|
workflows.append(workflow_file.stem)
|
|
218
|
-
except
|
|
219
|
-
|
|
217
|
+
except OSError as e:
|
|
218
|
+
print(f"Warning: Could not read GitHub workflows: {e}")
|
|
220
219
|
|
|
221
220
|
return workflows[:5] # Limit to 5 workflows
|
|
Binary file
|
|
Binary file
|
|
@@ -93,6 +93,10 @@ def package_skill(skill_path, output_dir=None):
|
|
|
93
93
|
for file_path in skill_path.rglob('*'):
|
|
94
94
|
if not file_path.is_file():
|
|
95
95
|
continue
|
|
96
|
+
# Skip symlinks to prevent path traversal
|
|
97
|
+
if file_path.is_symlink():
|
|
98
|
+
print(f" Skipped (symlink): {file_path}")
|
|
99
|
+
continue
|
|
96
100
|
arcname = file_path.relative_to(skill_path.parent)
|
|
97
101
|
if should_exclude(arcname):
|
|
98
102
|
print(f" Skipped: {arcname}")
|
|
@@ -5,6 +5,8 @@ Tests whether a skill's description causes Claude to trigger (read the skill)
|
|
|
5
5
|
for a set of queries. Outputs results as JSON.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
8
10
|
import argparse
|
|
9
11
|
import json
|
|
10
12
|
import os
|
|
@@ -221,7 +223,7 @@ def run_eval(
|
|
|
221
223
|
try:
|
|
222
224
|
query_triggers[query].append(future.result())
|
|
223
225
|
except Exception as e:
|
|
224
|
-
print(f"Warning: query failed: {e}", file=sys.stderr)
|
|
226
|
+
print(f"Warning: query failed for '{query[:60]}': {type(e).__name__}: {e}", file=sys.stderr)
|
|
225
227
|
query_triggers[query].append(False)
|
|
226
228
|
|
|
227
229
|
for query, triggers in query_triggers.items():
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sk:start
|
|
3
|
+
description: Smart entry point — classifies your task, detects scope, and routes to the optimal flow (feature/debug/hotfix/fast-track), mode (manual/autopilot), and agent strategy (solo/team).
|
|
4
|
+
user_invocable: true
|
|
5
|
+
allowed_tools: Read, Write, Bash, Glob, Grep, Agent, Skill
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Smart Start
|
|
9
|
+
|
|
10
|
+
Single entry point that classifies your task and recommends the optimal workflow configuration. Replaces the need to know which command to run first.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
/sk:start <task description>
|
|
16
|
+
/sk:start --manual add user profile page
|
|
17
|
+
/sk:start --team add profile page with API
|
|
18
|
+
/sk:start --debug fix login redirect loop
|
|
19
|
+
/sk:start --hotfix prod payments failing
|
|
20
|
+
/sk:start --fast-track bump lodash dependency
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Step 1 — Classify (automatic, no prompt)
|
|
26
|
+
|
|
27
|
+
Read the task description from arguments. Scan for signal keywords to determine flow and scope:
|
|
28
|
+
|
|
29
|
+
**Flow detection:**
|
|
30
|
+
|
|
31
|
+
| Signal Keywords | Detected Flow |
|
|
32
|
+
|----------------|---------------|
|
|
33
|
+
| bug, fix, broken, error, regression, failing, crash, wrong | `debug` (11 steps) |
|
|
34
|
+
| urgent, prod down, hotfix, emergency, critical, production, incident | `hotfix` (11 steps) |
|
|
35
|
+
| config, bump, typo, copy, rename, dependency, upgrade, version, docs | `fast-track` (10 steps) |
|
|
36
|
+
| *(default — no special signals)* | `feature` (21 steps) |
|
|
37
|
+
|
|
38
|
+
**Scope detection:**
|
|
39
|
+
|
|
40
|
+
| Signal Keywords | Detected Scope |
|
|
41
|
+
|----------------|----------------|
|
|
42
|
+
| Frontend: component, page, view, CSS, UI, form, modal, button, sidebar, navbar, layout, style, tailwind, animation | `frontend` |
|
|
43
|
+
| Backend: API, endpoint, controller, model, migration, service, queue, job, middleware, database, schema, route | `backend` |
|
|
44
|
+
| Both frontend AND backend keywords present | `full-stack` |
|
|
45
|
+
| Neither | `unknown` (ask user) |
|
|
46
|
+
|
|
47
|
+
**Agent recommendation:**
|
|
48
|
+
|
|
49
|
+
| Scope | Agents |
|
|
50
|
+
|-------|--------|
|
|
51
|
+
| `full-stack` | `team` (backend + frontend + QA agents) |
|
|
52
|
+
| `frontend` only | `solo` |
|
|
53
|
+
| `backend` only | `solo` |
|
|
54
|
+
| `unknown` | `solo` (default) |
|
|
55
|
+
|
|
56
|
+
### Step 2 — Recommend (one prompt, user confirms or overrides)
|
|
57
|
+
|
|
58
|
+
Present the classification and recommendation:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Detected: [Full-stack feature / Backend bug fix / Frontend hotfix / Small config change / etc.]
|
|
62
|
+
Recommended:
|
|
63
|
+
Flow: [feature (21 steps) / debug (11 steps) / hotfix (11 steps) / fast-track (10 steps)]
|
|
64
|
+
Mode: [autopilot / manual]
|
|
65
|
+
Agents: [team (backend + frontend + QA) / solo]
|
|
66
|
+
|
|
67
|
+
Proceed? (y) or override: manual / no-team / --debug / --hotfix / --fast-track
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Default mode recommendation:
|
|
71
|
+
- `feature` flow → recommend `autopilot`
|
|
72
|
+
- `debug` flow → recommend `autopilot`
|
|
73
|
+
- `hotfix` flow → recommend `autopilot`
|
|
74
|
+
- `fast-track` flow → recommend `autopilot`
|
|
75
|
+
|
|
76
|
+
Wait for user response:
|
|
77
|
+
- `y` or `yes` → proceed with recommendation
|
|
78
|
+
- `manual` → use recommended flow but in manual mode (step-by-step)
|
|
79
|
+
- `no-team` → use autopilot but single-agent (no team)
|
|
80
|
+
- `--debug` → force debug flow
|
|
81
|
+
- `--hotfix` → force hotfix flow
|
|
82
|
+
- `--fast-track` → force fast-track flow
|
|
83
|
+
- Any other override → apply it
|
|
84
|
+
|
|
85
|
+
### Step 3 — Route (enters the chosen flow)
|
|
86
|
+
|
|
87
|
+
1. Reset `tasks/workflow-status.md`:
|
|
88
|
+
- Set all steps to `not yet`
|
|
89
|
+
- Add metadata to the tracker header:
|
|
90
|
+
```
|
|
91
|
+
> Mode: [autopilot/manual] | Agents: [team/solo] | Flow: [feature/debug/hotfix/fast-track]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
2. Dispatch to the chosen flow:
|
|
95
|
+
|
|
96
|
+
**If autopilot mode:**
|
|
97
|
+
- Invoke `/sk:autopilot` with the task description
|
|
98
|
+
- Autopilot handles everything from here
|
|
99
|
+
|
|
100
|
+
**If manual mode + team:**
|
|
101
|
+
- Start the normal step-by-step workflow (`/sk:brainstorm`)
|
|
102
|
+
- Note in tracker: "Team mode active — activate `/sk:team` at step 9"
|
|
103
|
+
- User drives each step manually; team mode activates at write-tests/implement
|
|
104
|
+
|
|
105
|
+
**If manual mode + solo:**
|
|
106
|
+
- Start the normal step-by-step workflow (`/sk:brainstorm`)
|
|
107
|
+
- Standard manual behavior — no changes from current flow
|
|
108
|
+
|
|
109
|
+
**If debug flow:**
|
|
110
|
+
- Invoke `/sk:debug` with the task description
|
|
111
|
+
|
|
112
|
+
**If hotfix flow:**
|
|
113
|
+
- Invoke `/sk:hotfix` with the task description
|
|
114
|
+
|
|
115
|
+
**If fast-track flow:**
|
|
116
|
+
- Invoke `/sk:fast-track` with the task description
|
|
117
|
+
|
|
118
|
+
## Override Flags
|
|
119
|
+
|
|
120
|
+
| Flag | Effect |
|
|
121
|
+
|------|--------|
|
|
122
|
+
| `--manual` | Force manual mode (step-by-step, no auto-advance) |
|
|
123
|
+
| `--no-team` | Force single-agent even if full-stack detected |
|
|
124
|
+
| `--team` | Force team mode even if single-domain detected |
|
|
125
|
+
| `--debug` | Force debug flow (bug fix) |
|
|
126
|
+
| `--hotfix` | Force hotfix flow (production emergency) |
|
|
127
|
+
| `--fast-track` | Force fast-track flow (small change) |
|
|
128
|
+
|
|
129
|
+
Flags can be combined: `/sk:start --manual --team add profile page`
|
|
130
|
+
|
|
131
|
+
## Relationship to Existing Commands
|
|
132
|
+
|
|
133
|
+
- `/sk:start` is the **recommended** entry point for all new work
|
|
134
|
+
- Old commands still work as direct entry points:
|
|
135
|
+
- `/sk:brainstorm` → manual feature workflow
|
|
136
|
+
- `/sk:debug` → bug fix flow
|
|
137
|
+
- `/sk:hotfix` → hotfix flow
|
|
138
|
+
- `/sk:fast-track` → fast-track flow
|
|
139
|
+
- `/sk:autopilot` → autopilot mode directly
|
|
140
|
+
- `/sk:start` calls those same flows internally — it's a router, not a replacement
|
|
141
|
+
|
|
142
|
+
## Model Routing
|
|
143
|
+
|
|
144
|
+
Read `.shipkit/config.json` from the project root if it exists.
|
|
145
|
+
|
|
146
|
+
- If `model_overrides["sk:start"]` is set, use that model — it takes precedence.
|
|
147
|
+
- Otherwise use the `profile` field. Default: `balanced`.
|
|
148
|
+
|
|
149
|
+
| Profile | Model |
|
|
150
|
+
|---------|-------|
|
|
151
|
+
| `full-sail` | haiku |
|
|
152
|
+
| `quality` | haiku |
|
|
153
|
+
| `balanced` | haiku |
|
|
154
|
+
| `budget` | haiku |
|
|
155
|
+
|
|
156
|
+
> Start is a lightweight classifier — haiku is sufficient for keyword matching and routing.
|