chore: tidy up old files
This commit is contained in:
59
get-shit-done/references/decimal-phase-calculation.md
Normal file
59
get-shit-done/references/decimal-phase-calculation.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# Decimal Phase Calculation
|
||||
|
||||
Calculate the next decimal phase number for urgent insertions.
|
||||
|
||||
## Find Existing Decimals
|
||||
|
||||
For a given integer phase, find all existing decimal phases:
|
||||
|
||||
```bash
|
||||
# Find decimal phases after integer phase N (e.g., 06.1, 06.2)
|
||||
AFTER_PHASE=$1 # e.g., 6
|
||||
|
||||
# Pad to 2 digits
|
||||
PADDED=$(printf "%02d" "$AFTER_PHASE")
|
||||
|
||||
# Find existing decimals
|
||||
EXISTING=$(ls -d .planning/phases/${PADDED}.*-* 2>/dev/null | \
|
||||
xargs -I{} basename {} | \
|
||||
grep -oE '^[0-9]+\.[0-9]+' | \
|
||||
sort -V)
|
||||
```
|
||||
|
||||
## Calculate Next Decimal
|
||||
|
||||
Find the highest decimal suffix and increment:
|
||||
|
||||
```bash
|
||||
if [ -z "$EXISTING" ]; then
|
||||
# No decimals exist, start at .1
|
||||
NEXT_DECIMAL="1"
|
||||
else
|
||||
# Get highest decimal suffix
|
||||
MAX_SUFFIX=$(echo "$EXISTING" | tail -1 | grep -oE '\.[0-9]+$' | tr -d '.')
|
||||
NEXT_DECIMAL=$((MAX_SUFFIX + 1))
|
||||
fi
|
||||
|
||||
# Format: 06.1, 06.2, etc.
|
||||
DECIMAL_PHASE="${PADDED}.${NEXT_DECIMAL}"
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
| Existing Phases | Next Phase |
|
||||
|-----------------|------------|
|
||||
| 06 only | 06.1 |
|
||||
| 06, 06.1 | 06.2 |
|
||||
| 06, 06.1, 06.2 | 06.3 |
|
||||
|
||||
## Directory Naming
|
||||
|
||||
Decimal phase directories use the full decimal number:
|
||||
|
||||
```bash
|
||||
SLUG=$(echo "$DESCRIPTION" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
||||
PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
|
||||
mkdir -p "$PHASE_DIR"
|
||||
```
|
||||
|
||||
Example: `.planning/phases/06.1-fix-critical-auth-bug/`
|
||||
50
get-shit-done/references/git-planning-commit.md
Normal file
50
get-shit-done/references/git-planning-commit.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Git Planning Commit
|
||||
|
||||
Check whether to commit planning artifacts, then commit if enabled.
|
||||
|
||||
## Check Configuration
|
||||
|
||||
```bash
|
||||
# Check config.json first
|
||||
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
||||
|
||||
# Auto-detect gitignored (overrides config)
|
||||
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
||||
```
|
||||
|
||||
Default: `true` if not set or config missing.
|
||||
|
||||
## Conditional Commit
|
||||
|
||||
Only run git operations if `COMMIT_PLANNING_DOCS=true`:
|
||||
|
||||
```bash
|
||||
if [ "$COMMIT_PLANNING_DOCS" = "true" ]; then
|
||||
git add .planning/STATE.md .planning/ROADMAP.md
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs({scope}): {description}
|
||||
|
||||
{optional body}
|
||||
|
||||
Co-Authored-By: Claude <noreply@anthropic.com>
|
||||
EOF
|
||||
)"
|
||||
fi
|
||||
```
|
||||
|
||||
## Commit Message Patterns
|
||||
|
||||
| Command | Scope | Example |
|
||||
|---------|-------|---------|
|
||||
| plan-phase | phase | `docs(phase-03): create authentication plans` |
|
||||
| execute-phase | phase | `docs(phase-03): complete authentication phase` |
|
||||
| new-milestone | milestone | `docs: start milestone v1.1` |
|
||||
| remove-phase | chore | `chore: remove phase 17 (dashboard)` |
|
||||
| insert-phase | phase | `docs: insert phase 16.1 (critical fix)` |
|
||||
| add-phase | phase | `docs: add phase 07 (settings page)` |
|
||||
|
||||
## When to Skip
|
||||
|
||||
- `commit_docs: false` in config
|
||||
- `.planning/` is gitignored
|
||||
- No changes to commit (check with `git status --porcelain .planning/`)
|
||||
32
get-shit-done/references/model-profile-resolution.md
Normal file
32
get-shit-done/references/model-profile-resolution.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Model Profile Resolution
|
||||
|
||||
Resolve model profile once at the start of orchestration, then use it for all Task spawns.
|
||||
|
||||
## Resolution Pattern
|
||||
|
||||
```bash
|
||||
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
||||
```
|
||||
|
||||
Default: `balanced` if not set or config missing.
|
||||
|
||||
## Lookup Table
|
||||
|
||||
@~/.claude/get-shit-done/references/model-profiles.md
|
||||
|
||||
Look up the agent in the table for the resolved profile. Pass the model parameter to Task calls:
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt="...",
|
||||
subagent_type="gsd-planner",
|
||||
model="{resolved_model}" # e.g., "opus" for quality profile
|
||||
)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
1. Resolve once at orchestration start
|
||||
2. Store the profile value
|
||||
3. Look up each agent's model from the table when spawning
|
||||
4. Pass model parameter to each Task call
|
||||
58
get-shit-done/references/phase-argument-parsing.md
Normal file
58
get-shit-done/references/phase-argument-parsing.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Phase Argument Parsing
|
||||
|
||||
Parse and normalize phase arguments for commands that operate on phases.
|
||||
|
||||
## Extraction
|
||||
|
||||
From `$ARGUMENTS`:
|
||||
- Extract phase number (first numeric argument)
|
||||
- Extract flags (prefixed with `--`)
|
||||
- Remaining text is description (for insert/add commands)
|
||||
|
||||
## Normalization
|
||||
|
||||
Zero-pad integer phases to 2 digits. Preserve decimal suffixes.
|
||||
|
||||
```bash
|
||||
# Normalize phase number
|
||||
if [[ "$PHASE" =~ ^[0-9]+$ ]]; then
|
||||
# Integer: 8 → 08
|
||||
PHASE=$(printf "%02d" "$PHASE")
|
||||
elif [[ "$PHASE" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
|
||||
# Decimal: 2.1 → 02.1
|
||||
PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
|
||||
fi
|
||||
```
|
||||
|
||||
## Auto-Detection
|
||||
|
||||
When no phase number provided, detect the next unplanned phase:
|
||||
|
||||
```bash
|
||||
# Find phases without PLAN.md files
|
||||
for dir in .planning/phases/*/; do
|
||||
if ! ls "$dir"/*-PLAN.md 2>/dev/null | head -1 >/dev/null; then
|
||||
PHASE=$(basename "$dir" | grep -oE '^[0-9.]+')
|
||||
break
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
||||
## Validation
|
||||
|
||||
After normalization, verify phase exists in ROADMAP.md:
|
||||
|
||||
```bash
|
||||
grep -q "### Phase ${PHASE}:" .planning/ROADMAP.md || {
|
||||
echo "ERROR: Phase ${PHASE} not found in roadmap"
|
||||
exit 1
|
||||
}
|
||||
```
|
||||
|
||||
## Directory Lookup
|
||||
|
||||
Find the phase directory using the normalized phase number:
|
||||
|
||||
```bash
|
||||
PHASE_DIR=$(ls -d .planning/phases/${PHASE}-* 2>/dev/null | head -1)
|
||||
```
|
||||
72
get-shit-done/workflows/research-phase.md
Normal file
72
get-shit-done/workflows/research-phase.md
Normal file
@@ -0,0 +1,72 @@
|
||||
<purpose>
|
||||
Research how to implement a phase. Spawns gsd-phase-researcher with phase context.
|
||||
|
||||
Standalone research command. For most workflows, use `/gsd:plan-phase` which integrates research automatically.
|
||||
</purpose>
|
||||
|
||||
<process>
|
||||
|
||||
## Step 0: Resolve Model Profile
|
||||
|
||||
@~/.claude/get-shit-done/references/model-profile-resolution.md
|
||||
|
||||
Resolve model for:
|
||||
- `gsd-phase-researcher`
|
||||
|
||||
## Step 1: Normalize and Validate Phase
|
||||
|
||||
@~/.claude/get-shit-done/references/phase-argument-parsing.md
|
||||
|
||||
```bash
|
||||
grep -A5 "Phase ${PHASE}:" .planning/ROADMAP.md 2>/dev/null
|
||||
```
|
||||
|
||||
If not found: Error and exit.
|
||||
|
||||
## Step 2: Check Existing Research
|
||||
|
||||
```bash
|
||||
ls .planning/phases/${PHASE}-*/RESEARCH.md 2>/dev/null
|
||||
```
|
||||
|
||||
If exists: Offer update/view/skip options.
|
||||
|
||||
## Step 3: Gather Phase Context
|
||||
|
||||
```bash
|
||||
grep -A20 "Phase ${PHASE}:" .planning/ROADMAP.md
|
||||
cat .planning/REQUIREMENTS.md 2>/dev/null
|
||||
cat .planning/phases/${PHASE}-*/*-CONTEXT.md 2>/dev/null
|
||||
grep -A30 "### Decisions Made" .planning/STATE.md 2>/dev/null
|
||||
```
|
||||
|
||||
## Step 4: Spawn Researcher
|
||||
|
||||
```
|
||||
Task(
|
||||
prompt="<objective>
|
||||
Research implementation approach for Phase {phase}: {name}
|
||||
</objective>
|
||||
|
||||
<context>
|
||||
Phase description: {description}
|
||||
Requirements: {requirements}
|
||||
Prior decisions: {decisions}
|
||||
Phase context: {context_md}
|
||||
</context>
|
||||
|
||||
<output>
|
||||
Write to: .planning/phases/${PHASE}-{slug}/${PHASE}-RESEARCH.md
|
||||
</output>",
|
||||
subagent_type="gsd-phase-researcher",
|
||||
model="{researcher_model}"
|
||||
)
|
||||
```
|
||||
|
||||
## Step 5: Handle Return
|
||||
|
||||
- `## RESEARCH COMPLETE` — Display summary, offer: Plan/Dig deeper/Review/Done
|
||||
- `## CHECKPOINT REACHED` — Present to user, spawn continuation
|
||||
- `## RESEARCH INCONCLUSIVE` — Show attempts, offer: Add context/Try different mode/Manual
|
||||
|
||||
</process>
|
||||
Reference in New Issue
Block a user