视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
schematic【文档与办公】Reverse engineer a detailed product and technical specification document from a git branch's implementation. Use when: (1) a branch has shipped or is in-progress and needs documentation, (2) you need to understand what a branch does at product and architecture level, (3) onboarding to someone else's feature branch, (4) creating PR descriptions or des…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Feature branches often ship without comprehensive documentation. After the fact, teams need product specs, architectural docs, or onboarding materials that explain what was built and why. Manually reading every file change is slow and error-prone. This skill systematically extracts a complete spec from a branch's diff.
Get the full picture of what changed before reading any files.
# 1. Identify the base branch (usually main or latest)
git log --oneline <base>..HEAD | head -50
# 2. Get file-level diff stats
git diff --stat <base>...HEAD
# 3. Count the scale
git diff --stat <base>...HEAD | tail -1
From the diff stats, categorize files into groups:
Launch 2-4 parallel exploration agents, each focused on a different file group. This is critical for efficiency — reading 50+ files sequentially is too slow.
Agent 1: Core Implementation
Agent 2: Integration Points
Agent 3: Tests
Agent 4 (if needed): Configuration & Infrastructure
Each agent prompt should ask for:
After agents return, diff the analyzed files against the full file list:
# List all non-test changed files
git diff --stat <base>...HEAD -- '*.ts' '*.tsx' | awk '{print $1}' | sort
# Show small diffs for any files not yet analyzed
git diff <base>...HEAD -- <uncovered-files>
Read the remaining small diffs directly. These often contain important details:
Structure the spec with these sections (skip sections that don't apply):
# [Feature Name]
## Reverse-Engineered Product & Technical Specification
## 1. Problem Statement
Why this feature exists. What user/business pain it addresses.
Infer from the nature of the changes and any comments in the code.
## 2. Solution Overview
High-level description of the approach. Key design properties
(transparent, lazy, bounded, etc.).
## 3. Product Requirements
### 3.1 User-Facing Behavior
Table of requirements inferred from tests and UI changes.
### 3.2 Supported Workflows
List of workflows validated by tests.
### 3.3 Scope Boundaries
What is and isn't included.
## 4. Architecture
### 4.1 System Diagram
ASCII diagram showing component relationships and data flow.
### 4.2 Data Lifecycle
Step-by-step flow from initial state through steady state.
## 5. Technical Design
Subsections for each major design decision:
- Feature flags and gating
- Data models / schema changes
- Key algorithms or patterns
- Integration patterns (how existing code was modified)
- Cache/performance design
- Error handling and fallbacks
## 6. New Files
Table: file path, purpose (one line each).
## 7. Modified Files (Key Changes)
Table: file path, what changed (one line each).
Include ALL files — even minor ones. The cross-check in Phase 3
catches files that agents missed.
## 8. Testing Strategy
### Unit Tests
### Integration / E2E Tests
### Instrumentation / Observability
## 9. Rollout Strategy
How the feature is gated, incremental rollout steps, kill switches.
## 10. Risks and Mitigations
Table: risk, mitigation.
## 11. Summary
Key metrics: files added/modified, lines changed, scope of impact.
Cross-check the spec against the branch:
git diff --stat should appear in Section 6 or 7See the canonical offload spec produced for the test-parity-mem-exp-99-with-pr16393 branch:
a 12-section document covering 74 changed files across 12 commits, with architecture diagrams,
IndexedDB schema documentation, proxy design details, cache eviction policies, testing strategy
against a real customer dataset, and a complete file inventory.
docs/: Write the spec to a docs/ directory in the repo so it's discoverable.