oden-forge 2.0.0
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/.claude/CLAUDE.md +75 -0
- package/.claude/commands/oden/architect.md +204 -0
- package/.claude/commands/oden/checklist.md +199 -0
- package/.claude/commands/oden/daily.md +223 -0
- package/.claude/commands/oden/debug.md +203 -0
- package/.claude/commands/oden/epic.md +224 -0
- package/.claude/commands/oden/git.md +259 -0
- package/.claude/commands/oden/help.md +304 -0
- package/.claude/commands/oden/init-agents.md +268 -0
- package/.claude/commands/oden/init-mcp.md +460 -0
- package/.claude/commands/oden/init.md +495 -0
- package/.claude/commands/oden/mcp.md +585 -0
- package/.claude/commands/oden/prd.md +134 -0
- package/.claude/commands/oden/research.md +207 -0
- package/.claude/commands/oden/review.md +146 -0
- package/.claude/commands/oden/spec.md +539 -0
- package/.claude/commands/oden/sync.md +286 -0
- package/.claude/commands/oden/tasks.md +156 -0
- package/.claude/commands/oden/test.md +200 -0
- package/.claude/commands/oden/work.md +791 -0
- package/.claude/epics/.gitkeep +0 -0
- package/.claude/hooks/README.md +130 -0
- package/.claude/hooks/bash-worktree-fix.sh +189 -0
- package/.claude/prds/.gitkeep +0 -0
- package/.claude/rules/agent-coordination.md +224 -0
- package/.claude/rules/branch-operations.md +147 -0
- package/.claude/rules/datetime.md +118 -0
- package/.claude/rules/frontmatter-operations.md +58 -0
- package/.claude/rules/github-operations.md +89 -0
- package/.claude/rules/oden-methodology.md +111 -0
- package/.claude/rules/path-standards.md +155 -0
- package/.claude/rules/standard-patterns.md +174 -0
- package/.claude/rules/strip-frontmatter.md +82 -0
- package/.claude/rules/worktree-operations.md +136 -0
- package/.claude/scripts/oden/blocked.sh +72 -0
- package/.claude/scripts/oden/epic-list.sh +101 -0
- package/.claude/scripts/oden/epic-show.sh +91 -0
- package/.claude/scripts/oden/epic-status.sh +90 -0
- package/.claude/scripts/oden/help.sh +71 -0
- package/.claude/scripts/oden/in-progress.sh +74 -0
- package/.claude/scripts/oden/init.sh +192 -0
- package/.claude/scripts/oden/next.sh +65 -0
- package/.claude/scripts/oden/prd-list.sh +89 -0
- package/.claude/scripts/oden/prd-status.sh +63 -0
- package/.claude/scripts/oden/search.sh +71 -0
- package/.claude/scripts/oden/standup.sh +89 -0
- package/.claude/scripts/oden/status.sh +42 -0
- package/.claude/scripts/oden/validate.sh +101 -0
- package/.claude/settings.json +27 -0
- package/MIGRATION.md +217 -0
- package/README.md +368 -0
- package/bin/install.js +155 -0
- package/bin/migrate.js +191 -0
- package/bin/oden-forge.js +114 -0
- package/bin/post-install.js +47 -0
- package/bin/pre-uninstall.js +108 -0
- package/install.sh +231 -0
- package/package.json +76 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# DateTime Rule
|
|
2
|
+
|
|
3
|
+
## Getting Current Date and Time
|
|
4
|
+
|
|
5
|
+
When any command requires the current date/time (for frontmatter, timestamps, or logs), you MUST obtain the REAL current date/time from the system rather than estimating or using placeholder values.
|
|
6
|
+
|
|
7
|
+
### How to Get Current DateTime
|
|
8
|
+
|
|
9
|
+
Use the `date` command to get the current ISO 8601 formatted datetime:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Get current datetime in ISO 8601 format (works on Linux/Mac)
|
|
13
|
+
date -u +"%Y-%m-%dT%H:%M:%SZ"
|
|
14
|
+
|
|
15
|
+
# Alternative for systems that support it
|
|
16
|
+
date --iso-8601=seconds
|
|
17
|
+
|
|
18
|
+
# For Windows (if using PowerShell)
|
|
19
|
+
Get-Date -Format "yyyy-MM-ddTHH:mm:ssZ"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Required Format
|
|
23
|
+
|
|
24
|
+
All dates in frontmatter MUST use ISO 8601 format with UTC timezone:
|
|
25
|
+
- Format: `YYYY-MM-DDTHH:MM:SSZ`
|
|
26
|
+
- Example: `2024-01-15T14:30:45Z`
|
|
27
|
+
|
|
28
|
+
### Usage in Frontmatter
|
|
29
|
+
|
|
30
|
+
When creating or updating frontmatter in any file (PRD, Epic, Task, Progress), always use the real current datetime:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
---
|
|
34
|
+
name: feature-name
|
|
35
|
+
created: 2024-01-15T14:30:45Z # Use actual output from date command
|
|
36
|
+
updated: 2024-01-15T14:30:45Z # Use actual output from date command
|
|
37
|
+
---
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Implementation Instructions
|
|
41
|
+
|
|
42
|
+
1. **Before writing any file with frontmatter:**
|
|
43
|
+
- Run: `date -u +"%Y-%m-%dT%H:%M:%SZ"`
|
|
44
|
+
- Store the output
|
|
45
|
+
- Use this exact value in the frontmatter
|
|
46
|
+
|
|
47
|
+
2. **For commands that create files:**
|
|
48
|
+
- PRD creation: Use real date for `created` field
|
|
49
|
+
- Epic creation: Use real date for `created` field
|
|
50
|
+
- Task creation: Use real date for both `created` and `updated` fields
|
|
51
|
+
- Progress tracking: Use real date for `started` and `last_sync` fields
|
|
52
|
+
|
|
53
|
+
3. **For commands that update files:**
|
|
54
|
+
- Always update the `updated` field with current real datetime
|
|
55
|
+
- Preserve the original `created` field
|
|
56
|
+
- For sync operations, update `last_sync` with real datetime
|
|
57
|
+
|
|
58
|
+
### Examples
|
|
59
|
+
|
|
60
|
+
**Creating a new PRD:**
|
|
61
|
+
```bash
|
|
62
|
+
# First, get current datetime
|
|
63
|
+
CURRENT_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
64
|
+
# Output: 2024-01-15T14:30:45Z
|
|
65
|
+
|
|
66
|
+
# Then use in frontmatter:
|
|
67
|
+
---
|
|
68
|
+
name: user-authentication
|
|
69
|
+
description: User authentication and authorization system
|
|
70
|
+
status: backlog
|
|
71
|
+
created: 2024-01-15T14:30:45Z # Use the actual $CURRENT_DATE value
|
|
72
|
+
---
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Updating an existing task:**
|
|
76
|
+
```bash
|
|
77
|
+
# Get current datetime for update
|
|
78
|
+
UPDATE_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
|
|
79
|
+
|
|
80
|
+
# Update only the 'updated' field:
|
|
81
|
+
---
|
|
82
|
+
name: implement-login-api
|
|
83
|
+
status: in-progress
|
|
84
|
+
created: 2024-01-10T09:15:30Z # Keep original
|
|
85
|
+
updated: 2024-01-15T14:30:45Z # Use new $UPDATE_DATE value
|
|
86
|
+
---
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Important Notes
|
|
90
|
+
|
|
91
|
+
- **Never use placeholder dates** like `[Current ISO date/time]` or `YYYY-MM-DD`
|
|
92
|
+
- **Never estimate dates** - always get the actual system time
|
|
93
|
+
- **Always use UTC** (the `Z` suffix) for consistency across timezones
|
|
94
|
+
- **Preserve timezone consistency** - all dates in the system use UTC
|
|
95
|
+
|
|
96
|
+
### Cross-Platform Compatibility
|
|
97
|
+
|
|
98
|
+
If you need to ensure compatibility across different systems:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Try primary method first
|
|
102
|
+
date -u +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || \
|
|
103
|
+
# Fallback for systems without -u flag
|
|
104
|
+
date +"%Y-%m-%dT%H:%M:%SZ" 2>/dev/null || \
|
|
105
|
+
# Last resort: use Python if available
|
|
106
|
+
python3 -c "from datetime import datetime; print(datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'))" 2>/dev/null || \
|
|
107
|
+
python -c "from datetime import datetime; print(datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'))" 2>/dev/null
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Rule Priority
|
|
111
|
+
|
|
112
|
+
This rule has **HIGHEST PRIORITY** and must be followed by all commands that:
|
|
113
|
+
- Create new files with frontmatter
|
|
114
|
+
- Update existing files with frontmatter
|
|
115
|
+
- Track timestamps or progress
|
|
116
|
+
- Log any time-based information
|
|
117
|
+
|
|
118
|
+
Commands affected: prd-new, prd-parse, epic-decompose, epic-sync, issue-start, issue-sync, and any other command that writes timestamps.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Frontmatter Operations Rule
|
|
2
|
+
|
|
3
|
+
Standard patterns for working with YAML frontmatter in markdown files.
|
|
4
|
+
|
|
5
|
+
## Reading Frontmatter
|
|
6
|
+
|
|
7
|
+
Extract frontmatter from any markdown file:
|
|
8
|
+
1. Look for content between `---` markers at start of file
|
|
9
|
+
2. Parse as YAML
|
|
10
|
+
3. If invalid or missing, use sensible defaults
|
|
11
|
+
|
|
12
|
+
## Updating Frontmatter
|
|
13
|
+
|
|
14
|
+
When updating existing files:
|
|
15
|
+
1. Preserve all existing fields
|
|
16
|
+
2. Only update specified fields
|
|
17
|
+
3. Always update `updated` field with current datetime (see `/rules/datetime.md`)
|
|
18
|
+
|
|
19
|
+
## Standard Fields
|
|
20
|
+
|
|
21
|
+
### All Files
|
|
22
|
+
```yaml
|
|
23
|
+
---
|
|
24
|
+
name: {identifier}
|
|
25
|
+
created: {ISO datetime} # Never change after creation
|
|
26
|
+
updated: {ISO datetime} # Update on any modification
|
|
27
|
+
---
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Status Values
|
|
31
|
+
- PRDs: `backlog`, `in-progress`, `complete`
|
|
32
|
+
- Epics: `backlog`, `in-progress`, `completed`
|
|
33
|
+
- Tasks: `open`, `in-progress`, `closed`
|
|
34
|
+
|
|
35
|
+
### Progress Tracking
|
|
36
|
+
```yaml
|
|
37
|
+
progress: {0-100}% # For epics
|
|
38
|
+
completion: {0-100}% # For progress files
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Creating New Files
|
|
42
|
+
|
|
43
|
+
Always include frontmatter when creating markdown files:
|
|
44
|
+
```yaml
|
|
45
|
+
---
|
|
46
|
+
name: {from_arguments_or_context}
|
|
47
|
+
status: {initial_status}
|
|
48
|
+
created: {current_datetime}
|
|
49
|
+
updated: {current_datetime}
|
|
50
|
+
---
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Important Notes
|
|
54
|
+
|
|
55
|
+
- Never modify `created` field after initial creation
|
|
56
|
+
- Always use real datetime from system (see `/rules/datetime.md`)
|
|
57
|
+
- Validate frontmatter exists before trying to parse
|
|
58
|
+
- Use consistent field names across all files
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# GitHub Operations Rule
|
|
2
|
+
|
|
3
|
+
Standard patterns for GitHub CLI operations across all commands.
|
|
4
|
+
|
|
5
|
+
## CRITICAL: Repository Protection
|
|
6
|
+
|
|
7
|
+
**Before ANY GitHub operation that creates/modifies issues or PRs:**
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Check if remote origin is the CCPM template repository
|
|
11
|
+
remote_url=$(git remote get-url origin 2>/dev/null || echo "")
|
|
12
|
+
if [[ "$remote_url" == *"automazeio/ccpm"* ]] || [[ "$remote_url" == *"automazeio/ccpm.git"* ]]; then
|
|
13
|
+
echo "❌ ERROR: You're trying to sync with the CCPM template repository!"
|
|
14
|
+
echo ""
|
|
15
|
+
echo "This repository (automazeio/ccpm) is a template for others to use."
|
|
16
|
+
echo "You should NOT create issues or PRs here."
|
|
17
|
+
echo ""
|
|
18
|
+
echo "To fix this:"
|
|
19
|
+
echo "1. Fork this repository to your own GitHub account"
|
|
20
|
+
echo "2. Update your remote origin:"
|
|
21
|
+
echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git"
|
|
22
|
+
echo ""
|
|
23
|
+
echo "Or if this is a new project:"
|
|
24
|
+
echo "1. Create a new repository on GitHub"
|
|
25
|
+
echo "2. Update your remote origin:"
|
|
26
|
+
echo " git remote set-url origin https://github.com/YOUR_USERNAME/YOUR_REPO.git"
|
|
27
|
+
echo ""
|
|
28
|
+
echo "Current remote: $remote_url"
|
|
29
|
+
exit 1
|
|
30
|
+
fi
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
This check MUST be performed in ALL commands that:
|
|
34
|
+
- Create issues (`gh issue create`)
|
|
35
|
+
- Edit issues (`gh issue edit`)
|
|
36
|
+
- Comment on issues (`gh issue comment`)
|
|
37
|
+
- Create PRs (`gh pr create`)
|
|
38
|
+
- Any other operation that modifies the GitHub repository
|
|
39
|
+
|
|
40
|
+
## Authentication
|
|
41
|
+
|
|
42
|
+
**Don't pre-check authentication.** Just run the command and handle failure:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
gh {command} || echo "❌ GitHub CLI failed. Run: gh auth login"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Common Operations
|
|
49
|
+
|
|
50
|
+
### Get Issue Details
|
|
51
|
+
```bash
|
|
52
|
+
gh issue view {number} --json state,title,labels,body
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Create Issue
|
|
56
|
+
```bash
|
|
57
|
+
# Always specify repo to avoid defaulting to wrong repository
|
|
58
|
+
remote_url=$(git remote get-url origin 2>/dev/null || echo "")
|
|
59
|
+
REPO=$(echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||')
|
|
60
|
+
[ -z "$REPO" ] && REPO="user/repo"
|
|
61
|
+
gh issue create --repo "$REPO" --title "{title}" --body-file {file} --label "{labels}"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Update Issue
|
|
65
|
+
```bash
|
|
66
|
+
# ALWAYS check remote origin first!
|
|
67
|
+
gh issue edit {number} --add-label "{label}" --add-assignee @me
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Add Comment
|
|
71
|
+
```bash
|
|
72
|
+
# ALWAYS check remote origin first!
|
|
73
|
+
gh issue comment {number} --body-file {file}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Error Handling
|
|
77
|
+
|
|
78
|
+
If any gh command fails:
|
|
79
|
+
1. Show clear error: "❌ GitHub operation failed: {command}"
|
|
80
|
+
2. Suggest fix: "Run: gh auth login" or check issue number
|
|
81
|
+
3. Don't retry automatically
|
|
82
|
+
|
|
83
|
+
## Important Notes
|
|
84
|
+
|
|
85
|
+
- **ALWAYS** check remote origin before ANY write operation to GitHub
|
|
86
|
+
- Trust that gh CLI is installed and authenticated
|
|
87
|
+
- Use --json for structured output when parsing
|
|
88
|
+
- Keep operations atomic - one gh command per action
|
|
89
|
+
- Don't check rate limits preemptively
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Metodología Oden
|
|
2
|
+
|
|
3
|
+
## Filosofía: Documentation-First Development
|
|
4
|
+
|
|
5
|
+
La metodología Oden se basa en documentar y diseñar COMPLETAMENTE antes de escribir código.
|
|
6
|
+
|
|
7
|
+
### Principios Core
|
|
8
|
+
|
|
9
|
+
1. **Documentation-First**: Todo se documenta antes de codificar
|
|
10
|
+
2. **Design Sprint Adaptado**: Diseño rápido → Validación → Iteración
|
|
11
|
+
3. **Entrega Incremental**: Valor tangible cada semana
|
|
12
|
+
|
|
13
|
+
## Fases del Proyecto
|
|
14
|
+
|
|
15
|
+
### FASE 1: Pre-Desarrollo
|
|
16
|
+
|
|
17
|
+
**Duración:** 1-2 semanas
|
|
18
|
+
|
|
19
|
+
1. **Technical Architect** (`/oden:architect`)
|
|
20
|
+
- technical-decisions.md (2000-4000 líneas)
|
|
21
|
+
- Schema de BD completo
|
|
22
|
+
- Interfaces TypeScript
|
|
23
|
+
|
|
24
|
+
2. **Domain Expert** (`/oden:analyze`)
|
|
25
|
+
- Análisis de 3-5 competidores
|
|
26
|
+
- User personas y stories
|
|
27
|
+
- Priorización de features
|
|
28
|
+
|
|
29
|
+
3. **Spec Writer** (`/oden:spec`)
|
|
30
|
+
- Specs de 800-1200 líneas por módulo
|
|
31
|
+
- Máquinas de estado
|
|
32
|
+
- Validaciones y edge cases
|
|
33
|
+
|
|
34
|
+
4. **Implementation Planner** (`/oden:plan`)
|
|
35
|
+
- Plan semana por semana
|
|
36
|
+
- Estimaciones con buffers
|
|
37
|
+
- Milestones y criterios
|
|
38
|
+
|
|
39
|
+
### FASE 2: Implementación
|
|
40
|
+
|
|
41
|
+
**Duración:** 8-18 semanas según scope
|
|
42
|
+
|
|
43
|
+
- Seguir specs al pie de la letra
|
|
44
|
+
- Daily logging (`/oden:daily`)
|
|
45
|
+
- Validación contra specs
|
|
46
|
+
|
|
47
|
+
### FASE 3: Post-Desarrollo
|
|
48
|
+
|
|
49
|
+
- Mover docs a completed/
|
|
50
|
+
- Crear guías de usuario
|
|
51
|
+
- Archivar docs obsoletos
|
|
52
|
+
|
|
53
|
+
## Métricas de Éxito
|
|
54
|
+
|
|
55
|
+
### Durante Desarrollo
|
|
56
|
+
- 100% módulos definidos antes de codificar
|
|
57
|
+
- 0 dependencias circulares
|
|
58
|
+
- Documentación > 8,000 líneas antes de código
|
|
59
|
+
- Progreso diario documentado
|
|
60
|
+
|
|
61
|
+
### Post-Lanzamiento
|
|
62
|
+
- Performance: < 100ms latencia crítica
|
|
63
|
+
- Uptime: 99.9%
|
|
64
|
+
- NPS: > 50
|
|
65
|
+
|
|
66
|
+
## Reglas de Oro
|
|
67
|
+
|
|
68
|
+
### ✅ SIEMPRE
|
|
69
|
+
1. Documenta TODO antes de codificar
|
|
70
|
+
2. Analiza 3+ competidores
|
|
71
|
+
3. Crea specs de 800+ líneas por módulo
|
|
72
|
+
4. Registra progreso diario
|
|
73
|
+
5. Define máquinas de estado para entidades complejas
|
|
74
|
+
6. Especifica edge cases y manejo de errores
|
|
75
|
+
|
|
76
|
+
### ❌ NUNCA
|
|
77
|
+
1. No empieces sin specs completas
|
|
78
|
+
2. No documentes cambios triviales
|
|
79
|
+
3. No dupliques información
|
|
80
|
+
4. No dejes temp/ con más de 5 archivos
|
|
81
|
+
|
|
82
|
+
## Decisión: MVP vs Modo Turbo
|
|
83
|
+
|
|
84
|
+
### MVP (8-10 semanas)
|
|
85
|
+
- 30-40% de features
|
|
86
|
+
- Rápido al mercado
|
|
87
|
+
- Mayor deuda técnica
|
|
88
|
+
- Para: Startups, validación de ideas
|
|
89
|
+
|
|
90
|
+
### Modo Turbo (14-20 semanas)
|
|
91
|
+
- 100% features profesionales
|
|
92
|
+
- Enterprise-ready desde día 1
|
|
93
|
+
- Menor deuda técnica
|
|
94
|
+
- Para: Productos establecidos, B2B
|
|
95
|
+
|
|
96
|
+
## Checklist Pre-Código
|
|
97
|
+
|
|
98
|
+
Antes de escribir la primera línea:
|
|
99
|
+
|
|
100
|
+
- [ ] technical-decisions.md > 2000 líneas
|
|
101
|
+
- [ ] Schema de BD completo
|
|
102
|
+
- [ ] Análisis de 3+ competidores
|
|
103
|
+
- [ ] Specs de módulos > 800 líneas c/u
|
|
104
|
+
- [ ] Plan semana por semana
|
|
105
|
+
- [ ] Estructura docs/ creada
|
|
106
|
+
- [ ] Decisión MVP/Turbo documentada
|
|
107
|
+
- [ ] Stack tecnológico justificado
|
|
108
|
+
- [ ] Máquinas de estado definidas
|
|
109
|
+
- [ ] Edge cases documentados
|
|
110
|
+
|
|
111
|
+
**Solo cuando TODO esté ✅, empezar a codificar.**
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Path Standards Specification
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
This specification defines file path usage standards within the Claude Code PM system to ensure document portability, privacy protection, and consistency.
|
|
5
|
+
|
|
6
|
+
## Core Principles
|
|
7
|
+
|
|
8
|
+
### 1. Privacy Protection
|
|
9
|
+
- **Prohibit** absolute paths containing usernames
|
|
10
|
+
- **Prohibit** exposing local directory structure in public documentation
|
|
11
|
+
- **Prohibit** including complete local paths in GitHub Issue comments
|
|
12
|
+
|
|
13
|
+
### 2. Portability Principles
|
|
14
|
+
- **Prefer** relative paths for referencing project files
|
|
15
|
+
- **Ensure** documentation works across different development environments
|
|
16
|
+
- **Avoid** environment-specific path formats
|
|
17
|
+
|
|
18
|
+
## Path Format Standards
|
|
19
|
+
|
|
20
|
+
### Project File References ✅
|
|
21
|
+
```markdown
|
|
22
|
+
# Correct Examples
|
|
23
|
+
- `internal/auth/server.go`
|
|
24
|
+
- `cmd/server/main.go`
|
|
25
|
+
- `.claude/commands/pm/sync.md`
|
|
26
|
+
|
|
27
|
+
# Incorrect Examples ❌
|
|
28
|
+
- `/Users/username/project/internal/auth/server.go`
|
|
29
|
+
- `C:\Users\username\project\cmd\server\main.go`
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Cross-Project/Worktree References ✅
|
|
33
|
+
```markdown
|
|
34
|
+
# Correct Examples
|
|
35
|
+
- `../project-name/internal/auth/server.go`
|
|
36
|
+
- `../worktree-name/src/components/Button.tsx`
|
|
37
|
+
|
|
38
|
+
# Incorrect Examples ❌
|
|
39
|
+
- `/Users/username/parent-dir/project-name/internal/auth/server.go`
|
|
40
|
+
- `/home/user/projects/worktree-name/src/components/Button.tsx`
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Code Comment File References ✅
|
|
44
|
+
```go
|
|
45
|
+
// Correct Examples
|
|
46
|
+
// See internal/processor/converter.go for data transformation
|
|
47
|
+
// Configuration loaded from configs/production.yml
|
|
48
|
+
|
|
49
|
+
// Incorrect Examples ❌
|
|
50
|
+
// See /Users/username/parent-dir/project-name/internal/processor/converter.go
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Implementation Rules
|
|
54
|
+
|
|
55
|
+
### Documentation Generation Rules
|
|
56
|
+
1. **Issue sync templates**: Use relative path template variables
|
|
57
|
+
2. **Progress reports**: Automatically convert absolute paths to relative paths
|
|
58
|
+
3. **Technical documentation**: Use project root relative paths consistently
|
|
59
|
+
|
|
60
|
+
### Path Variable Standards
|
|
61
|
+
```yaml
|
|
62
|
+
# Template variable definitions
|
|
63
|
+
project_root: "." # Current project root directory
|
|
64
|
+
worktree_path: "../{name}" # Worktree relative path
|
|
65
|
+
internal_path: "internal/" # Internal modules directory
|
|
66
|
+
config_path: "configs/" # Configuration files directory
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Automatic Cleanup Rules
|
|
70
|
+
```bash
|
|
71
|
+
# Path normalization function
|
|
72
|
+
normalize_paths() {
|
|
73
|
+
local content="$1"
|
|
74
|
+
# Remove user-specific paths (generic patterns)
|
|
75
|
+
content=$(echo "$content" | sed "s|/Users/[^/]*/[^/]*/|../|g")
|
|
76
|
+
content=$(echo "$content" | sed "s|/home/[^/]*/[^/]*/|../|g")
|
|
77
|
+
content=$(echo "$content" | sed "s|C:\\\\Users\\\\[^\\\\]*\\\\[^\\\\]*\\\\|..\\\\|g")
|
|
78
|
+
echo "$content"
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## PM Command Integration
|
|
83
|
+
|
|
84
|
+
### issue-sync Command Updates
|
|
85
|
+
- Automatically clean path formats before sync
|
|
86
|
+
- Use relative path templates for generating comments
|
|
87
|
+
- Record deliverables using standardized paths
|
|
88
|
+
|
|
89
|
+
### epic-sync Command Updates
|
|
90
|
+
- Standardize task file paths
|
|
91
|
+
- Clean GitHub issue body paths
|
|
92
|
+
- Use relative paths in mapping files
|
|
93
|
+
|
|
94
|
+
## Validation Checks
|
|
95
|
+
|
|
96
|
+
### Automated Check Script
|
|
97
|
+
```bash
|
|
98
|
+
# Check for absolute path violations
|
|
99
|
+
check_absolute_paths() {
|
|
100
|
+
echo "Checking for absolute path violations..."
|
|
101
|
+
rg -n "/Users/|/home/|C:\\\\\\\\" .claude/ || echo "✅ No absolute paths found"
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# Check GitHub sync content
|
|
105
|
+
check_sync_content() {
|
|
106
|
+
echo "Checking sync content path formats..."
|
|
107
|
+
# Implement specific check logic
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Manual Review Checklist
|
|
112
|
+
- [ ] GitHub Issue comments contain no absolute paths
|
|
113
|
+
- [ ] Local documentation uses relative paths consistently
|
|
114
|
+
- [ ] Code comment paths follow standards
|
|
115
|
+
- [ ] Configuration file paths are standardized
|
|
116
|
+
|
|
117
|
+
## Error Handling
|
|
118
|
+
|
|
119
|
+
### When Absolute Paths Are Found
|
|
120
|
+
1. **Immediate Action**: Clean published public content
|
|
121
|
+
2. **Batch Fix**: Update local documentation formats
|
|
122
|
+
3. **Prevention**: Update generation templates
|
|
123
|
+
|
|
124
|
+
### Emergency Procedures
|
|
125
|
+
If privacy information has been leaked:
|
|
126
|
+
1. Immediately edit GitHub Issues/comments
|
|
127
|
+
2. Clean Git history if necessary
|
|
128
|
+
3. Update related documentation and templates
|
|
129
|
+
4. Establish monitoring to prevent recurrence
|
|
130
|
+
|
|
131
|
+
## Example Comparisons
|
|
132
|
+
|
|
133
|
+
### Documentation Before/After
|
|
134
|
+
```markdown
|
|
135
|
+
# Before ❌
|
|
136
|
+
- ✅ Implemented `/Users/username/parent-dir/project-name/internal/auth/server.go` core logic
|
|
137
|
+
|
|
138
|
+
# After ✅
|
|
139
|
+
- ✅ Implemented `../project-name/internal/auth/server.go` core logic
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### GitHub Comment Format
|
|
143
|
+
```markdown
|
|
144
|
+
# Correct Format ✅
|
|
145
|
+
## 📦 Deliverables
|
|
146
|
+
- `internal/formatter/batch.go` - Batch formatter
|
|
147
|
+
- `internal/processor/sorter.go` - Sorting algorithm
|
|
148
|
+
- `cmd/server/main.go` - Server entry point
|
|
149
|
+
|
|
150
|
+
# Incorrect Format ❌
|
|
151
|
+
## 📦 Deliverables
|
|
152
|
+
- `/Users/username/parent-dir/project-name/internal/formatter/batch.go`
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
This specification ensures project documentation maintains professionalism, portability, and privacy security.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Standard Patterns for Commands
|
|
2
|
+
|
|
3
|
+
This file defines common patterns that all commands should follow to maintain consistency and simplicity.
|
|
4
|
+
|
|
5
|
+
## Core Principles
|
|
6
|
+
|
|
7
|
+
1. **Fail Fast** - Check critical prerequisites, then proceed
|
|
8
|
+
2. **Trust the System** - Don't over-validate things that rarely fail
|
|
9
|
+
3. **Clear Errors** - When something fails, say exactly what and how to fix it
|
|
10
|
+
4. **Minimal Output** - Show what matters, skip decoration
|
|
11
|
+
|
|
12
|
+
## Standard Validations
|
|
13
|
+
|
|
14
|
+
### Minimal Preflight
|
|
15
|
+
Only check what's absolutely necessary:
|
|
16
|
+
```markdown
|
|
17
|
+
## Quick Check
|
|
18
|
+
1. If command needs specific directory/file:
|
|
19
|
+
- Check it exists: `test -f {file} || echo "❌ {file} not found"`
|
|
20
|
+
- If missing, tell user exact command to fix it
|
|
21
|
+
2. If command needs GitHub:
|
|
22
|
+
- Assume `gh` is authenticated (it usually is)
|
|
23
|
+
- Only check on actual failure
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### DateTime Handling
|
|
27
|
+
```markdown
|
|
28
|
+
Get current datetime: `date -u +"%Y-%m-%dT%H:%M:%SZ"`
|
|
29
|
+
```
|
|
30
|
+
Don't repeat full instructions - just reference `/rules/datetime.md` once.
|
|
31
|
+
|
|
32
|
+
### Error Messages
|
|
33
|
+
Keep them short and actionable:
|
|
34
|
+
```markdown
|
|
35
|
+
❌ {What failed}: {Exact solution}
|
|
36
|
+
Example: "❌ Epic not found: Run /pm:prd-parse feature-name"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Standard Output Formats
|
|
40
|
+
|
|
41
|
+
### Success Output
|
|
42
|
+
```markdown
|
|
43
|
+
✅ {Action} complete
|
|
44
|
+
- {Key result 1}
|
|
45
|
+
- {Key result 2}
|
|
46
|
+
Next: {Single suggested action}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### List Output
|
|
50
|
+
```markdown
|
|
51
|
+
{Count} {items} found:
|
|
52
|
+
- {item 1}: {key detail}
|
|
53
|
+
- {item 2}: {key detail}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Progress Output
|
|
57
|
+
```markdown
|
|
58
|
+
{Action}... {current}/{total}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## File Operations
|
|
62
|
+
|
|
63
|
+
### Check and Create
|
|
64
|
+
```markdown
|
|
65
|
+
# Don't ask permission, just create what's needed
|
|
66
|
+
mkdir -p .claude/{directory} 2>/dev/null
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Read with Fallback
|
|
70
|
+
```markdown
|
|
71
|
+
# Try to read, continue if missing
|
|
72
|
+
if [ -f {file} ]; then
|
|
73
|
+
# Read and use file
|
|
74
|
+
else
|
|
75
|
+
# Use sensible default
|
|
76
|
+
fi
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## GitHub Operations
|
|
80
|
+
|
|
81
|
+
### Trust gh CLI
|
|
82
|
+
```markdown
|
|
83
|
+
# Don't pre-check auth, just try the operation
|
|
84
|
+
gh {command} || echo "❌ GitHub CLI failed. Run: gh auth login"
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Simple Issue Operations
|
|
88
|
+
```markdown
|
|
89
|
+
# Get what you need in one call
|
|
90
|
+
gh issue view {number} --json state,title,body
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Common Patterns to Avoid
|
|
94
|
+
|
|
95
|
+
### DON'T: Over-validate
|
|
96
|
+
```markdown
|
|
97
|
+
# Bad - too many checks
|
|
98
|
+
1. Check directory exists
|
|
99
|
+
2. Check permissions
|
|
100
|
+
3. Check git status
|
|
101
|
+
4. Check GitHub auth
|
|
102
|
+
5. Check rate limits
|
|
103
|
+
6. Validate every field
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### DO: Check essentials
|
|
107
|
+
```markdown
|
|
108
|
+
# Good - just what's needed
|
|
109
|
+
1. Check target exists
|
|
110
|
+
2. Try the operation
|
|
111
|
+
3. Handle failure clearly
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### DON'T: Verbose output
|
|
115
|
+
```markdown
|
|
116
|
+
# Bad - too much information
|
|
117
|
+
🎯 Starting operation...
|
|
118
|
+
📋 Validating prerequisites...
|
|
119
|
+
✅ Step 1 complete
|
|
120
|
+
✅ Step 2 complete
|
|
121
|
+
📊 Statistics: ...
|
|
122
|
+
💡 Tips: ...
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### DO: Concise output
|
|
126
|
+
```markdown
|
|
127
|
+
# Good - just results
|
|
128
|
+
✅ Done: 3 files created
|
|
129
|
+
Failed: auth.test.js (syntax error - line 42)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### DON'T: Ask too many questions
|
|
133
|
+
```markdown
|
|
134
|
+
# Bad - too interactive
|
|
135
|
+
"Continue? (yes/no)"
|
|
136
|
+
"Overwrite? (yes/no)"
|
|
137
|
+
"Are you sure? (yes/no)"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### DO: Smart defaults
|
|
141
|
+
```markdown
|
|
142
|
+
# Good - proceed with sensible defaults
|
|
143
|
+
# Only ask when destructive or ambiguous
|
|
144
|
+
"This will delete 10 files. Continue? (yes/no)"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Quick Reference
|
|
148
|
+
|
|
149
|
+
### Essential Tools Only
|
|
150
|
+
- Read/List operations: `Read, LS`
|
|
151
|
+
- File creation: `Read, Write, LS`
|
|
152
|
+
- GitHub operations: Add `Bash`
|
|
153
|
+
- Complex analysis: Add `Task` (sparingly)
|
|
154
|
+
|
|
155
|
+
### Status Indicators
|
|
156
|
+
- ✅ Success (use sparingly)
|
|
157
|
+
- ❌ Error (always with solution)
|
|
158
|
+
- ⚠️ Warning (only if action needed)
|
|
159
|
+
- No emoji for normal output
|
|
160
|
+
|
|
161
|
+
### Exit Strategies
|
|
162
|
+
- Success: Brief confirmation
|
|
163
|
+
- Failure: Clear error + exact fix
|
|
164
|
+
- Partial: Show what worked, what didn't
|
|
165
|
+
|
|
166
|
+
## Remember
|
|
167
|
+
|
|
168
|
+
**Simple is not simplistic** - We still handle errors properly, we just don't try to prevent every possible edge case. We trust that:
|
|
169
|
+
- The file system usually works
|
|
170
|
+
- GitHub CLI is usually authenticated
|
|
171
|
+
- Git repositories are usually valid
|
|
172
|
+
- Users know what they're doing
|
|
173
|
+
|
|
174
|
+
Focus on the happy path, fail gracefully when things go wrong.
|