用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/richfrem/Project_Sanctuary --skill spec-kitty-tasks命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
ADR management skill. Auto-invoked for generating architecture decisions, documenting design rationale, and maintaining the decision record log. Uses native read/write tools to scaffold and update ADR markdown files.
(Industry standard: Parallel Agent) Primary Use Case: Work that can be partitioned into independent sub-tasks running concurrently across multiple agents. Parallel multi-agent execution pattern. Use when: work can be partitioned into independent tasks that N agents can execute simultaneously across worktrees. Includes routing (sequential vs parallel), merge verification, and correction loops.
Systematically analyze agent plugins and skills to extract design patterns, architectural decisions, and reusable techniques. Trigger with "analyze this plugin", "mine patterns from", "review plugin structure", "extract learnings from", "what patterns does this plugin use", or when examining any plugin or skill collection to understand its design.
基于 SOC 职业分类
正在显示 SKILL.md
| name | spec-kitty-tasks |
| description | Generate grouped work packages with actionable subtasks and matching |
Version: 0.11.0+
You are creating the blueprint for implementation. The quality of work packages determines:
QUALITY OVER SPEED: This is NOT the time to save tokens or rush. Take your time to:
Token usage is EXPECTED and GOOD here. A thorough task breakdown saves 10x the effort during implementation. Do not cut corners.
IMPORTANT: Tasks works in the planning repository. NO worktrees created.
# Run from project root (same directory as /spec-kitty.plan):
# You should already be here if you just ran /spec-kitty.plan
# Creates:
# - kitty-specs/###-feature/tasks/WP01-*.md → In planning repository
# - kitty-specs/###-feature/tasks/WP02-*.md → In planning repository
# - Commits ALL to target branch
# - NO worktrees created
Do NOT cd anywhere. Stay in the planning repository root.
Worktrees created later: After tasks are generated, use spec-kitty implement WP## to create workspace for each WP.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Before proceeding, verify you are in the planning repository:
Run spec-kitty agent feature check-prerequisites --json --paths-only --include-tasks from the repository root and capture:
target_branch / base_branchTARGET_BRANCH / BASE_BRANCH (uppercase aliases)feature_dir, artifact_files, artifact_dirsTreat this JSON as canonical branch context for this command. Do not read meta.json to infer branch expectations.
Check your current branch:
git branch --show-current
Expected output: the value from TARGET_BRANCH (typically main or 2.x)
If you see a feature branch: You're in the wrong place. Return to the target branch:
cd $(git rev-parse --show-toplevel)
git checkout "$TARGET_BRANCH"
Work packages are generated directly in kitty-specs/###-feature/ and committed to the target branch. Worktrees are created later when implementing each work package.
Setup: Use the previously captured check-prerequisites JSON. Capture:
feature_dirartifact_files / artifact_dirs (if present)available_docstarget_branch / base_branch
All paths must be absolute.CRITICAL: The command returns JSON with feature_dir as an ABSOLUTE path (e.g., /Users/robert/Code/new_specify/kitty-specs/001-feature-name).
It also returns runtime_vars.now_utc_iso (NOW_UTC_ISO) for deterministic timestamp fields.
YOU MUST USE THIS PATH for ALL subsequent file operations. Example:
feature_dir = "/Users/robert/Code/new_specify/kitty-specs/001-a-simple-hello"
tasks.md location: feature_dir + "/tasks.md"
prompt location: feature_dir + "/tasks/WP01-slug.md"
DO NOT CREATE paths like:
tasks/WP01-slug.md (missing feature_dir prefix)/tasks/WP01-slug.md (wrong root)feature_dir/tasks/planned/WP01-slug.md (WRONG - no subdirectories!)WP01-slug.md (wrong directory)Load design documents from feature_dir (only those present):
Derive fine-grained subtasks (IDs T001, T002, ...):
[P] means safe to parallelize per file/concern).Roll subtasks into work packages (IDs , , ...):
Context for work-package planning: $ARGUMENTS
The combination of tasks.md and the bundled prompt files must enable a new engineer to pick up any work package and deliver it end-to-end without further specification spelunking.
Parse dependencies from tasks.md structure:
The LLM should analyze tasks.md for dependency relationships:
Generate dependencies in WP frontmatter:
Each WP prompt file MUST include a dependencies field:
---
work_package_id: "WP02"
title: "Build API"
lane: "planned"
dependencies: ["WP01"] # Generated from tasks.md
subtasks: ["T001", "T002"]
---
Include the correct implementation command:
spec-kitty implement WP01spec-kitty implement WP02 --base WP01The WP prompt must show the correct command so agents don't branch from the wrong base.
finalize-tasks validates requirement coverage from tasks.md. Each WP section must include a requirement mapping line in this format:
### Requirement Refs
- FR-001, FR-007
or
**Requirements Refs**: FR-001, FR-007
Do not rely on WP frontmatter alone for requirement mapping; keep the canonical mapping in tasks.md.
Target: 3-7 subtasks per WP
Examples of well-sized WPs:
WP01: Foundation Setup (5 subtasks, ~300 lines)
WP02: User Authentication (6 subtasks, ~400 lines)
Hard limit: 10 subtasks, ~700 lines
If you need more than 10 subtasks: SPLIT into multiple WPs.
DO NOT limit based on WP count. Limit based on SIZE.
Feature complexity scales with subtask count, not WP count:
The goal is manageable WP size, not minimizing WP count.
Split if ANY of these are true:
How to split:
Merge if ALL of these are true:
Don't merge just to hit a WP count target!
Tests remain optional. Only include testing tasks/steps if the feature spec or user explicitly demands them.
Subtask derivation:
Txxx sequentially in execution order.[P] for parallel-safe items (different files/components).Work package grouping:
Prioritisation & dependencies:
tasks.md and the prompts.Prompt composition:
Quality checkpoints:
Think like a reviewer: Any vague requirement should be tightened until a reviewer can objectively mark it done or not done.
Run spec-kitty agent feature check-prerequisites --json --paths-only --include-tasks and capture feature_dir.
Read from feature_dir:
Create complete list of subtasks with IDs T001, T002, etc.
Don't worry about count yet - capture EVERYTHING needed.
SIZING ALGORITHM:
For each cohesive unit of work:
1. List related subtasks
2. Count subtasks
3. Estimate prompt lines (subtasks × 50 lines avg)
If subtasks <= 7 AND estimated lines <= 500:
✓ Good WP size - create it
Else if subtasks > 10 OR estimated lines > 700:
✗ Too large - split into 2+ WPs
Else if subtasks < 3 AND can merge with related WP:
→ Consider merging (but don't force it)
Examples:
Good sizing:
Too large - MUST SPLIT:
Too small - CONSIDER MERGING:
Create work package sections with:
For each WP, generate feature_dir/tasks/WPxx-slug.md using the template.
CRITICAL VALIDATION: After generating each prompt:
Self-check:
Run spec-kitty agent feature finalize-tasks --json to:
DO NOT run git commit after this - finalize-tasks commits automatically. Check JSON output for "commit_created": true and "commit_hash" to verify.
Provide summary with:
Parse dependencies from tasks.md structure:
The LLM should analyze tasks.md for dependency relationships:
Generate dependencies in WP frontmatter:
Each WP prompt file MUST include a dependencies field:
---
work_package_id: "WP02"
title: "Build API"
lane: "planned"
dependencies: ["WP01"] # Generated from tasks.md
subtasks: ["T001", "T002"]
---
Include the correct implementation command:
spec-kitty implement WP01spec-kitty implement WP02 --base WP01The WP prompt must show the correct command so agents don't branch from the wrong base.
Bad thinking: "I'll create exactly 5-7 WPs to keep it manageable" → Results in: 20 subtasks per WP, 1200-line prompts, overwhelmed agents
Good thinking: "Each WP should be 3-7 subtasks (200-500 lines). If that means 15 WPs, that's fine." → Results in: Focused WPs, successful implementation, happy agents
Bad thinking: "I'll save tokens by writing brief prompts with minimal guidance" → Results in: Agents confused during implementation, asking clarifying questions, doing work wrong, requiring rework
Good thinking: "I'll invest tokens now to write thorough prompts with examples and edge cases" → Results in: Agents implement correctly the first time, no rework needed, net token savings
Bad example: WP03: Misc Backend Work (12 subtasks)
Good approach: Split by concern
Bad prompt (~20 lines per subtask):
### Subtask T001: Add user authentication
**Purpose**: Implement login
**Steps**:
1. Create endpoint
2. Add validation
3. Test it
Good prompt (~60 lines per subtask):
### Subtask T001: Implement User Login Endpoint
**Purpose**: Create POST /api/auth/login endpoint that validates credentials and returns JWT token.
**Steps**:
1. Create endpoint handler in `src/api/auth.py`:
- Route: POST /api/auth/login
- Request body: `{email: string, password: string}`
- Response: `{token: string, user: UserProfile}` on success
- Error codes: 400 (invalid input), 401 (bad credentials), 429 (rate limited)
2. Implement credential validation:
- Hash password with bcrypt (matches registration hash)
- Compare against stored hash from database
- Use constant-time comparison to prevent timing attacks
3. Generate JWT token on success:
- Include: user_id, email, issued_at, expires_at (24 hours)
- Sign with SECRET_KEY from environment
- Algorithm: HS256
4. Add rate limiting:
- Max 5 attempts per IP per 15 minutes
- Return 429 with Retry-After header
**Files**:
- `src/api/auth.py` (new file, ~80 lines)
- `tests/api/test_auth.py` (new file, ~120 lines)
**Validation**:
- [ ] Valid credentials return 200 with token
- [ ] Invalid credentials return 401
- [ ] Missing fields return 400
- [ ] Rate limit enforced (test with 6 requests)
- [ ] JWT token is valid and contains correct claims
- [ ] Token expires after 24 hours
**Edge Cases**:
- Account doesn't exist: Return 401 (same as wrong password - don't leak info)
- Empty password: Return 400
SQL injection in email field: Prevented by parameterized queries
Concurrent login attempts: Handle with database locking
This is the most important planning work you'll do.
A well-crafted set of work packages with detailed prompts makes implementation smooth and parallelizable.
A rushed job with vague, oversized WPs causes:
Invest the tokens now. Be thorough. Future agents will thank you.
WP01WP02IDEAL WORK PACKAGE SIZE (most important guideline):
WHY SIZE MATTERS:
NUMBER OF WPs: Let the work dictate the count
GROUPING PRINCIPLES:
Write tasks.md using the bundled tasks template (.kittify/missions/software-dev/templates/tasks-template.md):
feature_dir/tasks.md (use the absolute feature_dir path from step 1)WPxx entriesTxxx)Generate prompt files (one per work package):
feature_dir/tasks/ directory, NOT in subdirectories!feature_dir/tasks/WPxx-slug.md (flat, no subdirectories)feature_dir/tasks/planned/, feature_dir/tasks/doing/, or ANY lane subdirectories/tasks/, tasks/, or any path not under feature_dirartifact_dirs.tasks_dir when available.mkdir -p; create-feature already creates tasks/ in normal flow.tasks/ is missing unexpectedly, report the mismatch instead of improvising shell directory setup.WPxx-slug.mdfeature_dir/tasks/WP01-create-html-page.md (use ABSOLUTE path from feature_dir variable).kittify/missions/software-dev/templates/task-prompt-template.md) to capture:work_package_id, subtasks array, lane: "planned", dependencies, history entry
tasks.md to reference the prompt filenameIMPORTANT: All WP files live in flat tasks/ directory. Lane status is tracked ONLY in the lane: frontmatter field, NOT by directory location. Agents can change lanes by editing the lane: field directly or using spec-kitty agent tasks move-task.
Finalize tasks with dependency parsing and commit: After generating all WP prompt files, run the finalization command to:
CRITICAL: Run this command from repo root:
spec-kitty agent feature finalize-tasks --json
This step is MANDATORY for workspace-per-WP features. Without it:
IMPORTANT - DO NOT COMMIT AGAIN AFTER THIS COMMAND:
Report: Provide a concise outcome summary:
tasks.md/spec-kitty.analyze or /spec-kitty.implement)