Compare commits

...
22 Commits
Author SHA1 Message Date
OthmanAdi 24442f5c8c docs: add CHANGELOG for v2.20.0 and expand @tt-a1i contributor entry
- Add v2.20.0 changelog covering PR #99 and PR #100 (docs consistency, Codex catchup fix)
- Expand @tt-a1i entry in CONTRIBUTORS.md to include all three PRs (#92, #99, #100) with full detail
2026-03-04 20:19:58 +01:00
Ahmad Othman Ammar Adi. c411434de7 fix: docs consistency, examples naming, sync CLI help behavior (#99)
Fix docs path issues, examples naming, and sync CLI help behavior
2026-03-04 20:17:57 +01:00
Ahmad Othman Ammar Adi. d5dee9b4f6 fix(codex): avoid silent failure when session-catchup scans Claude path (#100)
Codex catchup: avoid Claude-path silent failure
2026-03-04 20:17:41 +01:00
OthmanAdi 23e1c15309 chore: add CHANGELOG entry for v2.19.0 and update contributor date
- Add v2.19.0 changelog entry for PR #92 (Codex broken links fix by @tt-a1i)
- Update CONTRIBUTORS.md last-updated date to March 4, 2026
2026-03-04 20:08:41 +01:00
tt-a1i 50dff177f2 Codex: avoid scanning Claude session path in catchup 2026-03-04 10:16:28 +08:00
tt-a1i dbfe812adc Fix docs links and sync tooling consistency 2026-03-04 10:12:13 +08:00
OthmanAdi b9da30cc2a docs: add tt-a1i and msuadOf to CONTRIBUTORS.md 2026-03-03 11:43:17 +01:00
Ahmad Othman Ammar Adi. cbf4de43b8 Merge pull request #92 from tt-a1i/fix/codex-skill-reference-links
fix(codex): correct broken Advanced Topics links in planning-with-files SKILL
2026-03-03 11:39:53 +01:00
tt-a1i ada9ff4212 fix(codex): correct planning-with-files advanced-topic links 2026-03-03 15:59:56 +08:00
Ahmad Othman Ammar Adi. 8004498f35 docs: replace documentation table in README with link to docs/ folder 2026-02-28 13:58:24 +01:00
Ahmad Othman Ammar Adi. 6e9d9360e4 docs: replace contributors table in README with link to CONTRIBUTORS.md 2026-02-28 13:29:41 +01:00
Ahmad Othman Ammar Adi. e42a251cea docs: add 11 missing contributors from merged PRs 2026-02-28 01:11:16 +01:00
Ahmad Othman Ammar Adi. 17029df2f0 docs: add raykuo998 to contributors (PR #86, PR #88) 2026-02-28 01:08:22 +01:00
Ahmad Othman Ammar Adi. d8e7837d2b docs: add v2.18.3 changelog entry (Windows hook fixes by raykuo998) 2026-02-28 01:08:21 +01:00
Ahmad Othman Ammar Adi. 65e0fcf42d fix: Stop hook multiline YAML command not parsed by Git Bash on Windows
fix: Stop hook fails on Windows — multiline YAML command not parsed by Git Bash
2026-02-28 01:07:08 +01:00
Ahmad Othman Ammar Adi. 5f41ac00fe Merge pull request #88 from raykuo998/fix/check-complete-ps1-parsing 2026-02-27 10:48:27 +01:00
guo-feng-rui 7cfa786e35 fix: check-complete.ps1 fails to parse on PowerShell due to special characters
PowerShell's parser fails on three categories of special characters inside
double-quoted strings in check-complete.ps1:

1. UTF-8 em-dash (U+2014) in comments — misinterpreted as code tokens
2. Square brackets [planning-with-files] — parsed as array index syntax
3. Parentheses ($COMPLETE/$TOTAL) and phase(s) — parsed as subexpressions

Fix: replace double-quoted Write-Host strings with single-quoted strings
and string concatenation, and replace em-dashes with ASCII double-hyphens.

Applied to all 12 tool variant copies (adal, codebuddy, codex, continue,
gemini, kiro, mastracode, openclaw, opencode, pi, scripts, skills).

Verified on Windows 11 with PowerShell 5.1 — all scenarios pass.

Closes #87
2026-02-27 16:17:24 +08:00
guo-feng-rui 6cc1584671 fix: restore mastracode relative-path fallback for project-local installs
The original mastracode variant had a two-step path resolution that fell
back to a project-relative path if the $HOME-based path didn't exist.
This was dropped in the previous commit. Restore it to preserve support
for project-local mastracode installations.
2026-02-27 12:09:35 +08:00
guo-feng-rui f2f05478bb fix: Stop hook fails on Windows — multiline YAML command not parsed by Git Bash
The Stop hook used a YAML multiline block (command: |) with a 25-line bash
script for OS detection and script dispatch. On Windows, Claude Code passes
hook commands through Git Bash, which fails to parse the multiline content —
the SCRIPT_DIR=... variable assignment is interpreted as a command name rather
than a shell assignment, producing:

  bash: SCRIPT_DIR=/c/Users/.../scripts: No such file or directory
  sh: /check-complete.sh: No such file or directory

Replace the multiline block with a single-line command that:
1. Sets SD variable inline (works in all sh-compatible shells)
2. Tries powershell.exe first (covers Windows)
3. Falls back to sh (covers Linux/macOS)

This eliminates the OS-detection logic entirely — the fallback chain handles
platform differences implicitly. Applied to all 7 tool variants (claude,
cursor, codex, codebuddy, kilocode, mastracode, opencode).
2026-02-27 12:04:16 +08:00
OthmanAdi acfd2f0c74 fix(mastra): add hooks.json, fix SKILL.md path var, correct docs
Mastra Code reads hooks from .mastracode/hooks.json, not SKILL.md
frontmatter. All three hooks (PreToolUse, PostToolUse, Stop) were
silently non-functional. Added hooks.json with proper Mastra format
including matchers and timeouts. Fixed MASTRACODE_SKILL_ROOT env var
(does not exist in Mastra Code). Corrected docs/mastra.md to accurately
describe the hooks.json system and fixed personal install instructions
to include the hooks file.
2026-02-26 19:43:46 +01:00
OthmanAdi 931bb545ab fix: stretch Star History chart to full width 2026-02-26 19:01:16 +01:00
OthmanAdi 15e33d261a fix(copilot): complete PS1 encoding fix - Get-Content UTF8 + no-BOM (Issue #82)
v2.16.1 fixed the output pipe encoding but missed the read side.
Get-Content without -Encoding in PS5 reads files with the system ANSI
code page (Windows-1252), corrupting non-ASCII characters in
task_plan.md and SKILL.md before they reach the output pipe.

Changes to pre-tool-use.ps1, session-start.ps1, agent-stop.ps1:
- All Get-Content calls: added -Encoding UTF8
- [System.Text.Encoding]::UTF8 replaced with
  [System.Text.UTF8Encoding]::new($false) — UTF-8 without BOM,
  preventing stray 0xEF 0xBB 0xBF preamble in JSON output

Closes #82
2026-02-26 18:59:05 +01:00
45 changed files with 421 additions and 400 deletions
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
+1 -25
View File
@@ -17,31 +17,7 @@ hooks:
Stop:
- hooks:
- type: command
command: |
SCRIPT_DIR="${CODEBUDDY_PLUGIN_ROOT:-$HOME/.codebuddy/skills/planning-with-files}/scripts"
IS_WINDOWS=0
if [ "${OS-}" = "Windows_NT" ]; then
IS_WINDOWS=1
else
UNAME_S="$(uname -s 2>/dev/null || echo '')"
case "$UNAME_S" in
CYGWIN*|MINGW*|MSYS*) IS_WINDOWS=1 ;;
esac
fi
if [ "$IS_WINDOWS" -eq 1 ]; then
if command -v pwsh >/dev/null 2>&1; then
pwsh -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
else
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
fi
else
sh "$SCRIPT_DIR/check-complete.sh"
fi
command: "SD=\"${CODEBUDDY_PLUGIN_ROOT:-$HOME/.codebuddy/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
metadata:
version: "2.16.1"
---
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
+3 -27
View File
@@ -17,31 +17,7 @@ hooks:
Stop:
- hooks:
- type: command
command: |
SCRIPT_DIR="${CODEX_SKILL_ROOT:-$HOME/.codex/skills/planning-with-files}/scripts"
IS_WINDOWS=0
if [ "${OS-}" = "Windows_NT" ]; then
IS_WINDOWS=1
else
UNAME_S="$(uname -s 2>/dev/null || echo '')"
case "$UNAME_S" in
CYGWIN*|MINGW*|MSYS*) IS_WINDOWS=1 ;;
esac
fi
if [ "$IS_WINDOWS" -eq 1 ]; then
if command -v pwsh >/dev/null 2>&1; then
pwsh -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
else
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
fi
else
sh "$SCRIPT_DIR/check-complete.sh"
fi
command: "SD=\"${CODEX_SKILL_ROOT:-$HOME/.codex/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
metadata:
version: "2.16.1"
---
@@ -225,8 +201,8 @@ Helper scripts for automation:
## Advanced Topics
- **Manus Principles:** See [reference.md](reference.md)
- **Real Examples:** See [examples.md](examples.md)
- **Manus Principles:** See [references/reference.md](references/reference.md)
- **Real Examples:** See [references/examples.md](references/examples.md)
## Anti-Patterns
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
@@ -13,18 +13,31 @@ import sys
import os
from pathlib import Path
from typing import List, Dict, Optional, Tuple
from datetime import datetime
PLANNING_FILES = ['task_plan.md', 'progress.md', 'findings.md']
def get_project_dir(project_path: str) -> Path:
"""Convert project path to Claude's storage path format."""
def get_project_dir(project_path: str) -> Tuple[Optional[Path], Optional[str]]:
"""Resolve session storage path for the current runtime variant."""
sanitized = project_path.replace('/', '-')
if not sanitized.startswith('-'):
sanitized = '-' + sanitized
sanitized = sanitized.replace('_', '-')
return Path.home() / '.claude' / 'projects' / sanitized
claude_path = Path.home() / '.claude' / 'projects' / sanitized
# Codex stores sessions in ~/.codex/sessions with a different format.
# Avoid silently scanning Claude paths when running from Codex skill folder.
script_path = Path(__file__).as_posix().lower()
is_codex_variant = '/.codex/' in script_path
codex_sessions_dir = Path.home() / '.codex' / 'sessions'
if is_codex_variant and codex_sessions_dir.exists() and not claude_path.exists():
return None, (
"[planning-with-files] Session catchup skipped: Codex stores sessions "
"in ~/.codex/sessions and native Codex parsing is not implemented yet."
)
return claude_path, None
def get_sessions_sorted(project_dir: Path) -> List[Path]:
@@ -140,7 +153,6 @@ def extract_messages_after(messages: List[Dict], after_line: int) -> List[Dict]:
def main():
project_path = sys.argv[1] if len(sys.argv) > 1 else os.getcwd()
project_dir = get_project_dir(project_path)
# Check if planning files exist (indicates active task)
has_planning_files = any(
@@ -150,6 +162,11 @@ def main():
# No planning files in this project; skip catchup to avoid noise.
return
project_dir, skip_reason = get_project_dir(project_path)
if skip_reason:
print(skip_reason)
return
if not project_dir.exists():
# No previous sessions, nothing to catch up on
return
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
+1 -25
View File
@@ -17,31 +17,7 @@ hooks:
Stop:
- hooks:
- type: command
command: |
SCRIPT_DIR="${CURSOR_SKILL_ROOT:-.cursor/skills/planning-with-files}/scripts"
IS_WINDOWS=0
if [ "${OS-}" = "Windows_NT" ]; then
IS_WINDOWS=1
else
UNAME_S="$(uname -s 2>/dev/null || echo '')"
case "$UNAME_S" in
CYGWIN*|MINGW*|MSYS*) IS_WINDOWS=1 ;;
esac
fi
if [ "$IS_WINDOWS" -eq 1 ]; then
if command -v pwsh >/dev/null 2>&1; then
pwsh -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
else
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
fi
else
sh "$SCRIPT_DIR/check-complete.sh"
fi
command: "SD=\"${CURSOR_SKILL_ROOT:-.cursor/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
metadata:
version: "2.16.1"
---
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
+3 -3
View File
@@ -4,8 +4,8 @@
# Always exits 0 — outputs JSON to stdout.
# Read stdin (required — Copilot pipes JSON to stdin)
$OutputEncoding = [System.Text.Encoding]::UTF8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
$InputData = [Console]::In.ReadToEnd()
$PlanFile = "task_plan.md"
@@ -15,7 +15,7 @@ if (-not (Test-Path $PlanFile)) {
exit 0
}
$content = Get-Content $PlanFile -Raw
$content = Get-Content $PlanFile -Raw -Encoding UTF8
# Count total phases
$TOTAL = ([regex]::Matches($content, "### Phase")).Count
+3 -3
View File
@@ -4,8 +4,8 @@
# Always exits 0 — outputs JSON to stdout.
# Read stdin (required — Copilot pipes JSON to stdin)
$OutputEncoding = [System.Text.Encoding]::UTF8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
$InputData = [Console]::In.ReadToEnd()
$PlanFile = "task_plan.md"
@@ -15,7 +15,7 @@ if (-not (Test-Path $PlanFile)) {
exit 0
}
$Context = (Get-Content $PlanFile -TotalCount 30 -ErrorAction SilentlyContinue) -join "`n"
$Context = (Get-Content $PlanFile -TotalCount 30 -Encoding UTF8 -ErrorAction SilentlyContinue) -join "`n"
if (-not $Context) {
Write-Output '{"hookSpecificOutput":{"hookEventName":"PreToolUse","permissionDecision":"allow"}}'
+4 -4
View File
@@ -4,8 +4,8 @@
# Always exits 0 — outputs JSON to stdout.
# Read stdin (required — Copilot pipes JSON to stdin)
$OutputEncoding = [System.Text.Encoding]::UTF8
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
$InputData = [Console]::In.ReadToEnd()
$PlanFile = "task_plan.md"
@@ -26,12 +26,12 @@ if (Test-Path $PlanFile) {
if ($Catchup) {
$Context = $Catchup -join "`n"
} else {
$Context = (Get-Content $PlanFile -TotalCount 5 -ErrorAction SilentlyContinue) -join "`n"
$Context = (Get-Content $PlanFile -TotalCount 5 -Encoding UTF8 -ErrorAction SilentlyContinue) -join "`n"
}
} else {
# No plan yet — inject SKILL.md so Copilot knows the planning workflow and templates
if (Test-Path "$SkillDir/SKILL.md") {
$Context = Get-Content "$SkillDir/SKILL.md" -Raw -ErrorAction SilentlyContinue
$Context = Get-Content "$SkillDir/SKILL.md" -Raw -Encoding UTF8 -ErrorAction SilentlyContinue
}
}
+1 -25
View File
@@ -17,31 +17,7 @@ hooks:
Stop:
- hooks:
- type: command
command: |
SCRIPT_DIR="${KILOCODE_SKILL_ROOT:-$HOME/.kilocode/skills/planning-with-files}/scripts"
IS_WINDOWS=0
if [ "${OS-}" = "Windows_NT" ]; then
IS_WINDOWS=1
else
UNAME_S="$(uname -s 2>/dev/null || echo '')"
case "$UNAME_S" in
CYGWIN*|MINGW*|MSYS*) IS_WINDOWS=1 ;;
esac
fi
if [ "$IS_WINDOWS" -eq 1 ]; then
if command -v pwsh >/dev/null 2>&1; then
pwsh -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
else
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
fi
else
sh "$SCRIPT_DIR/check-complete.sh"
fi
command: "SD=\"${KILOCODE_SKILL_ROOT:-$HOME/.kilocode/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
metadata:
version: "2.16.1"
---
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
+7 -7
View File
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
+27
View File
@@ -0,0 +1,27 @@
{
"PreToolUse": [
{
"type": "command",
"command": "cat task_plan.md 2>/dev/null | head -30 || true",
"matcher": { "tool_name": "Write|Edit|Bash|Read|Glob|Grep" },
"timeout": 5000,
"description": "Read plan before tool use to keep goals in active context"
}
],
"PostToolUse": [
{
"type": "command",
"command": "echo '[planning-with-files] File updated. If this completes a phase, update task_plan.md status.'",
"matcher": { "tool_name": "Write|Edit" },
"description": "Remind agent to update plan status after file changes"
}
],
"Stop": [
{
"type": "command",
"command": "sh .mastracode/skills/planning-with-files/scripts/check-complete.sh 2>/dev/null || sh ~/.mastracode/skills/planning-with-files/scripts/check-complete.sh 2>/dev/null || true",
"timeout": 10000,
"description": "Check all phases are complete before the agent stops"
}
]
}
@@ -17,33 +17,9 @@ hooks:
Stop:
- hooks:
- type: command
command: |
SCRIPT_DIR="${MASTRACODE_SKILL_ROOT:-$HOME/.mastracode/skills/planning-with-files}/scripts"
IS_WINDOWS=0
if [ "${OS-}" = "Windows_NT" ]; then
IS_WINDOWS=1
else
UNAME_S="$(uname -s 2>/dev/null || echo '')"
case "$UNAME_S" in
CYGWIN*|MINGW*|MSYS*) IS_WINDOWS=1 ;;
esac
fi
if [ "$IS_WINDOWS" -eq 1 ]; then
if command -v pwsh >/dev/null 2>&1; then
pwsh -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
else
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
fi
else
sh "$SCRIPT_DIR/check-complete.sh"
fi
command: "SD=\"$HOME/.mastracode/skills/planning-with-files/scripts\"; [ -f \"$SD/check-complete.sh\" ] || SD=\".mastracode/skills/planning-with-files/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
metadata:
version: "2.16.1"
version: "2.18.1"
---
# Planning with Files
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
+1 -25
View File
@@ -17,31 +17,7 @@ hooks:
Stop:
- hooks:
- type: command
command: |
SCRIPT_DIR="${OPENCODE_SKILL_ROOT:-$HOME/.config/opencode/skills/planning-with-files}/scripts"
IS_WINDOWS=0
if [ "${OS-}" = "Windows_NT" ]; then
IS_WINDOWS=1
else
UNAME_S="$(uname -s 2>/dev/null || echo '')"
case "$UNAME_S" in
CYGWIN*|MINGW*|MSYS*) IS_WINDOWS=1 ;;
esac
fi
if [ "$IS_WINDOWS" -eq 1 ]; then
if command -v pwsh >/dev/null 2>&1; then
pwsh -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
else
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
fi
else
sh "$SCRIPT_DIR/check-complete.sh"
fi
command: "SD=\"${OPENCODE_SKILL_ROOT:-$HOME/.config/opencode/skills/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
metadata:
version: "2.16.1"
---
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
+4 -4
View File
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
+93
View File
@@ -2,6 +2,99 @@
All notable changes to this project will be documented in this file.
## [2.20.0] - 2026-03-04
### Fixed
- **Codex session-catchup silent failure** (PR #100 by @tt-a1i, fixes #94)
- `session-catchup.py` in the Codex variant was silently scanning `~/.claude/projects` even when running from a Codex context, where sessions live under `~/.codex/sessions` in a different format
- Now detects the Codex runtime from `__file__` path and prints a clear fallback message instead of a silent no-op
- **Docs broken links** (PR #99 by @tt-a1i, fixes #95)
- `docs/opencode.md` linked to `.opencode/INSTALL.md` which does not exist — corrected to `docs/installation.md`
- `docs/factory.md` See Also links used `../skills/planning-with-files/` paths — corrected to `../.factory/skills/planning-with-files/`
- **Examples used stale `notes.md` filename** (PR #99 by @tt-a1i, fixes #96)
- All `examples.md` files across 16 IDE copies referenced `notes.md` which was renamed to `findings.md` — updated consistently everywhere
- **`sync-ide-folders.py --help` ran a sync instead of printing usage** (PR #99 by @tt-a1i, fixes #98)
- Replaced manual `sys.argv` parsing with `argparse` — `--help` now exits cleanly with usage information
### Changed
- **OpenCode README support label corrected** (PR #99 by @tt-a1i, fixes #97)
- Changed from `Full Support` to `Partial Support` with a note about session catchup limitations — aligns README with what `docs/opencode.md` actually says
### Thanks
- @tt-a1i for the full consistency sweep (PR #99, PR #100)
---
## [2.19.0] - 2026-03-04
### Fixed
- **Codex Advanced Topics broken links** (PR #92 by @tt-a1i, fixes #91)
- Corrected two dead links in `.codex/skills/planning-with-files/SKILL.md`
- `reference.md` → `references/reference.md`
- `examples.md` → `references/examples.md`
### Thanks
- @tt-a1i for identifying and fixing the broken Codex links (PR #92)
---
## [2.18.3] - 2026-02-28
### Fixed
- **Stop hook multiline YAML command fails under Git Bash on Windows** (PR #86 by @raykuo998)
- Root cause: YAML `command: |` multiline blocks are not reliably parsed by Git Bash on Windows. The shell received the first line (`SCRIPT_DIR=...`) as a command name rather than a variable assignment, crashing the hook before it could do anything.
- Replaced 25-line OS detection scripts with a single-line implicit platform fallback chain: `powershell.exe` first, `sh` as fallback. Applied to all 7 SKILL.md variants with Stop hooks.
- Added `-NoProfile` to PowerShell invocation for faster startup
- **`check-complete.ps1` completely failing on PowerShell 5.1** (PR #88 by @raykuo998)
- Root cause: Special characters inside double-quoted `Write-Host` strings (`[`, `(`, em-dash) caused parse errors in Windows PowerShell 5.1
- Replaced double-quoted strings with single-quoted strings plus explicit concatenation for variable interpolation. Applied to all 12 platform copies.
### Thanks
- @raykuo998 for both Windows compatibility fixes (PR #86, PR #88)
---
## [2.18.2] - 2026-02-26
### Fixed
- **Mastra Code hooks were silently doing nothing**
- Root cause: Mastra Code reads hooks from `.mastracode/hooks.json`, not from SKILL.md frontmatter. The existing integration had hooks defined only in SKILL.md (Claude Code format), which Mastra Code ignores entirely. All three hooks (PreToolUse, PostToolUse, Stop) were non-functional.
- Added `.mastracode/hooks.json` with proper Mastra Code format including `matcher`, `timeout`, and `description` fields
- Fixed `MASTRACODE_SKILL_ROOT` env var in SKILL.md Stop hook (variable does not exist in Mastra Code, replaced with `$HOME` fallback to local path)
- Bumped `.mastracode/skills/planning-with-files/SKILL.md` metadata version from 2.16.1 to 2.18.1
- Corrected `docs/mastra.md` to accurately describe hooks.json (removed false claim that Mastra Code uses the same hook system as Claude Code)
- Fixed personal installation instructions to include hooks.json copy step
---
## [2.18.1] - 2026-02-26
### Fixed
- **Copilot hooks garbled characters — still broken after v2.16.1** (Issue #82, confirmed by @Hexiaopi)
- Root cause: `Get-Content` in all PS1 scripts had no `-Encoding` parameter — PowerShell 5.x reads files using the system ANSI code page (Windows-1252) by default, corrupting any non-ASCII character in `task_plan.md` or `SKILL.md` before it reaches the output pipe. The v2.16.1 fix was correct but fixed only the output side, not the read side.
- Secondary fix: `[System.Text.Encoding]::UTF8` returns UTF-8 with BOM — replaced with `[System.Text.UTF8Encoding]::new($false)` (UTF-8 without BOM) in all four PS1 scripts to prevent JSON parsers from receiving a stray `0xEF 0xBB 0xBF` preamble
- Fixed files: `pre-tool-use.ps1`, `session-start.ps1`, `agent-stop.ps1`, `post-tool-use.ps1`
- Bash scripts were already correct from v2.16.1
### Thanks
- @Hexiaopi for confirming the issue persisted after v2.16.1 (Issue #82)
---
## [2.18.0] - 2026-02-26
### Added
+57 -2
View File
@@ -59,8 +59,53 @@ These amazing people have contributed code, documentation, or significant improv
- Created `docs/codebuddy.md` installation guide
- **Impact:** Expands IDE support to CodeBuddy ecosystem
- **[@lincolnwan](https://github.com/lincolnwan)** - [PR #80](https://github.com/OthmanAdi/planning-with-files/pull/80)
- Added native GitHub Copilot hooks integration using the early 2026 hooks system
- Created `.github/hooks/planning-with-files.json` with full hook scripts in `.github/hooks/scripts/`
- Full cross-platform support (bash + PowerShell) and `docs/copilot.md` installation guide
- **Impact:** Brought total supported platforms to 15, expanding the skill to the GitHub Copilot ecosystem
- **[@ciberponk](https://github.com/ciberponk)** - [PR #77](https://github.com/OthmanAdi/planning-with-files/pull/77)
- Added isolated `.planning/{uuid}/` plan sessions with UUID generation and PLAN_ID pinning
- Enables parallel planning sessions in separate terminals without state collision
- Cross-platform scripts (bash + PowerShell) with full backward compatibility for single-session users
- **Impact:** Unlocks parallel planning workflows, shipped to experimental branch ahead of master
- **[@ttttmr](https://github.com/ttttmr)** - [PR #67](https://github.com/OthmanAdi/planning-with-files/pull/67)
- Added Pi Agent support with full skill integration
- **Impact:** Expands the skill to the Pi Agent ecosystem
### Other Contributors
- **[@popey](https://github.com/popey)** - [PR #83](https://github.com/OthmanAdi/planning-with-files/pull/83)
- Fixed `allowed-tools` YAML list (invalid per Anthropic skill spec, silently killing discoverability)
- Fixed `metadata.version` placement and added trigger terms for better skill matching
- Applied across the canonical SKILL.md file
- **[@jonthebeef](https://github.com/jonthebeef)** - [PR #75](https://github.com/OthmanAdi/planning-with-files/pull/75)
- Added `/plan:status` command for quick planning progress display without reading through all planning files
- **[@codelyc](https://github.com/codelyc)** - [PR #66](https://github.com/OthmanAdi/planning-with-files/pull/66), [PR #70](https://github.com/OthmanAdi/planning-with-files/pull/70), [PR #76](https://github.com/OthmanAdi/planning-with-files/pull/76)
- Fixed Codex skill path references and replaced CLAUDE_PLUGIN_ROOT with correct absolute paths (PR #66)
- Fixed CodeBuddy skill path references and environment variables (PR #70)
- Added OpenCode scripts for the planning-with-files skill (PR #76)
- **[@Guozihong](https://github.com/Guozihong)** - [PR #51](https://github.com/OthmanAdi/planning-with-files/pull/51)
- Added `/planning-with-files:start` command, enabling skill activation without copying files manually
- **[@fahmyelraie](https://github.com/fahmyelraie)** - [PR #49](https://github.com/OthmanAdi/planning-with-files/pull/49)
- Fixed Stop hook path resolution when CLAUDE_PLUGIN_ROOT is not set in the environment
- **[@olgasafonova](https://github.com/olgasafonova)** - [PR #46](https://github.com/OthmanAdi/planning-with-files/pull/46)
- Added SkillCheck validation badge after running the skill through spec validation
- **[@AZLabsAI](https://github.com/AZLabsAI)** - [PR #65](https://github.com/OthmanAdi/planning-with-files/pull/65)
- Updated OpenClaw docs to reflect the product rename from Moltbot, correcting all paths and CLI commands
- **[@raykuo998](https://github.com/raykuo998)** - [PR #88](https://github.com/OthmanAdi/planning-with-files/pull/88), [PR #86](https://github.com/OthmanAdi/planning-with-files/pull/86)
- Fixed `check-complete.ps1` completely failing on PowerShell 5.1 due to special character parse errors in double-quoted strings; switched to single-quoted strings with concatenation across all 12 platform copies (PR #88)
- Fixed Stop hook YAML multiline command block failing under Git Bash on Windows; collapsed 25-line OS detection to single-line implicit platform fallback chain across all 7 SKILL.md variants (PR #86)
- **[@gydx6](https://github.com/gydx6)** - [PR #79](https://github.com/OthmanAdi/planning-with-files/pull/79)
- Fixed session-catchup false positives in all 9 skill-distributed copies
- Added early return guards for non-planning projects
@@ -80,10 +125,19 @@ These amazing people have contributed code, documentation, or significant improv
- Added `assets` field to ensure templates copy to cache
- **Impact:** Resolved template path issues
- **[@tt-a1i](https://github.com/tt-a1i)** - [PR #92](https://github.com/OthmanAdi/planning-with-files/pull/92), [PR #99](https://github.com/OthmanAdi/planning-with-files/pull/99), [PR #100](https://github.com/OthmanAdi/planning-with-files/pull/100)
- Fixed broken Advanced Topics links in Codex SKILL.md (PR #92)
- Fixed 5 consistency issues across docs: broken links in opencode.md and factory.md, stale `notes.md` references replaced with `findings.md` across all 16 IDE copies, OpenCode support label corrected in README, `--help` in sync-ide-folders.py no longer runs a sync (PR #99)
- Fixed Codex session-catchup silently scanning Claude session paths; now prints an explicit fallback message when running from Codex context (PR #100)
- **Impact:** Significant docs and tooling consistency sweep across the entire multi-IDE surface
## Community Forks
These developers have created forks that extend the functionality:
- **[@RioTheGreat-ai](https://github.com/RioTheGreat-ai)** - [agentfund-skill](https://github.com/RioTheGreat-ai/agentfund-skill)
- Crowdfunding platform for AI agents using milestone-based escrow on Base, built with planning-with-files
- **[@kmichels](https://github.com/kmichels)** - [multi-manus-planning](https://github.com/kmichels/multi-manus-planning)
- Multi-project support
- SessionStart git sync integration
@@ -92,6 +146,7 @@ These developers have created forks that extend the functionality:
Thank you to everyone who reported issues, provided feedback, and helped test fixes:
- [@msuadOf](https://github.com/msuadOf) - Issue #93 (TMPDIR environment fix for plugin install)
- [@DorianZheng](https://github.com/DorianZheng) - Issue #84 (BoxLite sandbox integration proposal)
- [@mtuwei](https://github.com/mtuwei) - Issue #32 (Windows hook error)
- [@JianweiWangs](https://github.com/JianweiWangs) - Issue #31 (Skill activation)
@@ -119,6 +174,6 @@ If you've contributed and don't see your name here, please open an issue! We wan
---
**Total Contributors:** 13+ and growing!
**Total Contributors:** 25+ and growing!
*Last updated: February 26, 2026*
*Last updated: March 4, 2026*
+8 -48
View File
@@ -31,37 +31,19 @@ If this skill helps you work smarter, that's all I wanted.
<details>
<summary><strong>🤝 Contributors</strong></summary>
Everyone who made this project better — bug reports, PRs, and integrations.
| Contributor | Contribution |
|-------------|-------------|
| [@popey](https://github.com/popey) | Skill metadata & discoverability fixes (PR #83) |
| [@lincolnwan](https://github.com/lincolnwan) | GitHub Copilot hooks support (PR #80) |
| [@gydx6](https://github.com/gydx6) | Session catchup false-positive fix (PR #79) |
| [@ciberponk](https://github.com/ciberponk) | Isolated plan sessions with UUID pinning (PR #77) |
| [@jonthebeef](https://github.com/jonthebeef) | `/plan:status` command (PR #75) |
| [@codelyc](https://github.com/codelyc) | OpenCode scripts + CodeBuddy path fixes (PRs #76, #70, #66) |
| [@ttttmr](https://github.com/ttttmr) | Pi Agent integration (PR #67) |
| [@AZLabsAI](https://github.com/AZLabsAI) | OpenClaw docs update (PR #65) |
| [@ZWkang](https://github.com/ZWkang) | CodeBuddy integration (PR #60) |
| [@SaladDay](https://github.com/SaladDay) | POSIX stop hook fix (PR #57) |
| [@murphyXu](https://github.com/murphyXu) | Continue IDE integration (PR #56) |
| [@Guozihong](https://github.com/Guozihong) | Start command (PR #51) |
| [@fahmyelraie](https://github.com/fahmyelraie) | Stop hook path resolution fix (PR #49) |
| [@olgasafonova](https://github.com/olgasafonova) | SkillCheck validation badge (PR #46) |
| [@lasmarois](https://github.com/lasmarois) | Session catchup cross-session improvements (PRs #37, #34) |
| [@RioTheGreat-ai](https://github.com/RioTheGreat-ai) | AgentFund community extension (PR #72) |
| [@Hexiaopi](https://github.com/Hexiaopi) | Copilot garbled characters bug report (Issue #82) |
See the full list of everyone who made this project better in [CONTRIBUTORS.md](./CONTRIBUTORS.md).
</details>
<details>
<summary><strong>📦 Releases & Session Recovery</strong></summary>
### Current Version: v2.17.0
### Current Version: v2.18.2
| Version | Highlights |
|---------|------------|
| **v2.18.2** | Mastra Code hooks fix (hooks.json + docs accuracy) |
| **v2.18.1** | Copilot garbled characters complete fix |
| **v2.18.0** | BoxLite sandbox runtime integration |
| **v2.17.0** | Mastra Code support + all IDE SKILL.md spec fixes |
| **v2.16.1** | Copilot garbled characters fix — PS1 UTF-8 encoding + bash ensure_ascii (thanks @Hexiaopi!) |
@@ -109,7 +91,7 @@ When your context fills up and you run `/clear`, this skill **automatically reco
| Cursor | ✅ Full Support | [Cursor Setup](docs/cursor.md) | Skills + Hooks |
| Continue | ✅ Full Support | [Continue Setup](docs/continue.md) | Skills + Prompt files |
| Kilocode | ✅ Full Support | [Kilocode Setup](docs/kilocode.md) | Skills |
| OpenCode | ✅ Full Support | [OpenCode Setup](docs/opencode.md) | Personal/Project Skill |
| OpenCode | ⚠️ Partial Support | [OpenCode Setup](docs/opencode.md) | Personal/Project Skill (session catchup limited) |
| Codex | ✅ Full Support | [Codex Setup](docs/codex.md) | Personal Skill |
| FactoryAI Droid | ✅ Full Support | [Factory Setup](docs/factory.md) | Workspace/Personal Skill |
| Antigravity | ✅ Full Support | [Antigravity Setup](docs/antigravity.md) | Workspace/Personal Skill |
@@ -151,7 +133,7 @@ A Claude Code plugin that transforms your workflow to use persistent markdown fi
[![GitHub Copilot](https://img.shields.io/badge/GitHub%20Copilot-Hooks-000000)](https://docs.github.com/en/copilot/reference/hooks-configuration)
[![Mastra Code](https://img.shields.io/badge/Mastra%20Code-Skills-00BCD4)](https://code.mastra.ai)
[![BoxLite](https://img.shields.io/badge/BoxLite-Sandbox-6C3483)](https://boxlite.ai)
[![Version](https://img.shields.io/badge/version-2.18.0-brightgreen)](https://github.com/OthmanAdi/planning-with-files/releases)
[![Version](https://img.shields.io/badge/version-2.18.2-brightgreen)](https://github.com/OthmanAdi/planning-with-files/releases)
[![SkillCheck Validated](https://img.shields.io/badge/SkillCheck-Validated-4c1)](https://getskillcheck.com)
## Quick Install
@@ -344,29 +326,7 @@ planning-with-files/
## Documentation
| Document | Description |
|----------|-------------|
| [Installation Guide](docs/installation.md) | All installation methods (plugin, manual, Cursor, Windows) |
| [Quick Start](docs/quickstart.md) | 5-step guide to using the pattern |
| [Workflow Diagram](docs/workflow.md) | Visual diagram of how files and hooks interact |
| [Troubleshooting](docs/troubleshooting.md) | Common issues and solutions |
| [Gemini CLI Setup](docs/gemini.md) | Google Gemini CLI integration guide |
| [OpenClaw Setup](docs/openclaw.md) | OpenClaw integration guide |
| [Kiro Setup](docs/kiro.md) | Kiro steering files integration |
| [Cursor Setup](docs/cursor.md) | Cursor IDE-specific instructions |
| [Continue Setup](docs/continue.md) | Continue integration guide (skills + slash prompt) |
| [Windows Setup](docs/windows.md) | Windows-specific notes |
| [Kilo Code Support](docs/kilocode.md) | Kilo Code integration guide |
| [Codex Setup](docs/codex.md) | Codex IDE installation and usage |
| [OpenCode Setup](docs/opencode.md) | OpenCode IDE installation, oh-my-opencode config |
| [FactoryAI Droid Setup](docs/factory.md) | FactoryAI Droid integration guide |
| [Antigravity Setup](docs/antigravity.md) | Antigravity IDE integration guide |
| [CodeBuddy Setup](docs/codebuddy.md) | CodeBuddy IDE integration guide |
| [AdaL CLI Setup](docs/adal.md) | AdaL CLI / Sylph AI integration guide |
| [Pi Agent Setup](docs/pi-agent.md) | Pi Agent integration guide |
| [Copilot Setup](docs/copilot.md) | GitHub Copilot hooks integration guide |
| [Mastra Setup](docs/mastra.md) | Mastra Code integration guide |
| [BoxLite Setup](docs/boxlite.md) | BoxLite micro-VM sandbox integration guide |
All platform setup guides and documentation are in the [docs/](./docs/) folder.
## Acknowledgments
@@ -393,4 +353,4 @@ MIT License — feel free to use, modify, and distribute.
## Star History
[![RepoStars](https://repostars.dev/api/embed?repo=OthmanAdi%2Fplanning-with-files&theme=copper)](https://repostars.dev/?repos=OthmanAdi%2Fplanning-with-files&theme=copper)
<a href="https://repostars.dev/?repos=OthmanAdi%2Fplanning-with-files&theme=copper"><img src="https://repostars.dev/api/embed?repo=OthmanAdi%2Fplanning-with-files&theme=copper" width="100%" alt="Star History Chart" /></a>
+2 -2
View File
@@ -248,5 +248,5 @@ Factory Droid will reference them automatically.
- [Quick Start Guide](quickstart.md)
- [Workflow Diagram](workflow.md)
- [Manus Principles](../skills/planning-with-files/references.md)
- [Real Examples](../skills/planning-with-files/examples.md)
- [Manus Principles](../.factory/skills/planning-with-files/references.md)
- [Real Examples](../.factory/skills/planning-with-files/examples.md)
+25 -10
View File
@@ -40,14 +40,20 @@ Install just for yourself:
# Clone the repo
git clone https://github.com/OthmanAdi/planning-with-files.git /tmp/planning-with-files
# Copy to your personal Mastra Code skills folder
# Copy skill to your personal Mastra Code skills folder
mkdir -p ~/.mastracode/skills
cp -r /tmp/planning-with-files/.mastracode/skills/planning-with-files ~/.mastracode/skills/
# Copy hooks (required for plan enforcement)
# If you already have ~/.mastracode/hooks.json, merge the entries manually
cp /tmp/planning-with-files/.mastracode/hooks.json ~/.mastracode/hooks.json
# Clean up
rm -rf /tmp/planning-with-files
```
> **Note:** If you already have a `~/.mastracode/hooks.json`, do not overwrite it. Instead, merge the PreToolUse, PostToolUse, and Stop entries from the skill's hooks.json into your existing file.
### Verification
```bash
@@ -60,15 +66,20 @@ Restart your Mastra Code session. The skill auto-activates when you work on comp
## How It Works
### Hooks (Native Support)
### Hooks (via hooks.json)
Mastra Code supports the same hook system as Claude Code. This integration includes:
Mastra Code uses a separate `hooks.json` file for lifecycle hooks. This is different from Claude Code, which defines hooks in SKILL.md frontmatter. Mastra Code reads hooks from:
| Hook | Trigger | What It Does |
1. `.mastracode/hooks.json` (project-level, highest priority)
2. `~/.mastracode/hooks.json` (global)
This integration includes a pre-configured `hooks.json` with all three hooks:
| Hook | Matcher | What It Does |
|------|---------|--------------|
| **PreToolUse** | Before Write, Edit, Bash, Read, Glob, Grep | Reads first 30 lines of `task_plan.md` — keeps goals in attention |
| **PostToolUse** | After Write, Edit | Reminds you to update plan status |
| **Stop** | When agent finishes | Runs completion check script |
| **PreToolUse** | Write, Edit, Bash, Read, Glob, Grep | Reads first 30 lines of `task_plan.md` to keep goals in attention |
| **PostToolUse** | Write, Edit | Reminds you to update plan status after file changes |
| **Stop** | (all) | Runs `check-complete.sh` to verify all phases are done |
### Auto-Activation
@@ -94,8 +105,8 @@ Once activated, the skill creates:
Mastra Code reads from `.claude/skills/` as a fallback. If you already have planning-with-files installed for Claude Code, it will work — but the dedicated `.mastracode/` installation gives you:
- Native hooks integration (PreToolUse, PostToolUse, Stop)
- Correct script path resolution
- Native hooks via `hooks.json` (PreToolUse, PostToolUse, Stop)
- Correct script path resolution for Mastra Code directories
- No path conflicts with Claude Code plugin root
---
@@ -147,7 +158,11 @@ With personal installation (`~/.mastracode/skills/`):
### Hooks Not Running?
Check `.mastracode/hooks.json` for conflicts. The skill's hooks are defined in SKILL.md frontmatter and should work automatically.
Mastra Code reads hooks from `hooks.json`, not from SKILL.md frontmatter. Verify:
1. Check that `.mastracode/hooks.json` exists in your project root (workspace install) or `~/.mastracode/hooks.json` (personal install)
2. Verify the file contains PreToolUse, PostToolUse, and Stop entries
3. Restart Mastra Code after adding or modifying hooks.json
### Already Using Claude Code?
+1 -1
View File
@@ -6,7 +6,7 @@ planning-with-files works with OpenCode as a personal or project skill.
## Installation
See [.opencode/INSTALL.md](../.opencode/INSTALL.md) for detailed installation instructions.
See [docs/installation.md](installation.md) for detailed installation instructions.
### Quick Install (Global)
+7 -7
View File
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0
+26 -4
View File
@@ -19,7 +19,7 @@ Use --dry-run to preview changes without writing anything.
Use --verify to check for drift without making changes (exits 1 if drift found).
"""
import os
import argparse
import shutil
import sys
import hashlib
@@ -226,9 +226,31 @@ def sync_file(src, dst, *, dry_run=False):
# ─── Main ──────────────────────────────────────────────────────────
def main():
dry_run = "--dry-run" in sys.argv
verify = "--verify" in sys.argv
def parse_args(argv=None):
"""Parse CLI arguments for sync behavior."""
parser = argparse.ArgumentParser(
description=(
"Sync shared planning-with-files assets from canonical source "
"to IDE-specific folders."
)
)
parser.add_argument(
"--dry-run",
action="store_true",
help="Preview changes without writing files.",
)
parser.add_argument(
"--verify",
action="store_true",
help="Check for drift only; exit with code 1 if drift is found.",
)
return parser.parse_args(argv)
def main(argv=None):
args = parse_args(argv)
dry_run = args.dry_run
verify = args.verify
# Must run from repo root
if not CANONICAL.exists():
+1 -25
View File
@@ -17,31 +17,7 @@ hooks:
Stop:
- hooks:
- type: command
command: |
SCRIPT_DIR="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/planning-with-files}/scripts"
IS_WINDOWS=0
if [ "${OS-}" = "Windows_NT" ]; then
IS_WINDOWS=1
else
UNAME_S="$(uname -s 2>/dev/null || echo '')"
case "$UNAME_S" in
CYGWIN*|MINGW*|MSYS*) IS_WINDOWS=1 ;;
esac
fi
if [ "$IS_WINDOWS" -eq 1 ]; then
if command -v pwsh >/dev/null 2>&1; then
pwsh -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
else
powershell -ExecutionPolicy Bypass -File "$SCRIPT_DIR/check-complete.ps1" 2>/dev/null ||
sh "$SCRIPT_DIR/check-complete.sh"
fi
else
sh "$SCRIPT_DIR/check-complete.sh"
fi
command: "SD=\"${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/planning-with-files}/scripts\"; powershell.exe -NoProfile -ExecutionPolicy Bypass -File \"$SD/check-complete.ps1\" 2>/dev/null || sh \"$SD/check-complete.sh\""
metadata:
version: "2.16.1"
---
+4 -4
View File
@@ -34,14 +34,14 @@ Create a research summary on the benefits of morning exercise.
```bash
Read task_plan.md # Refresh goals
WebSearch "morning exercise benefits"
Write notes.md # Store findings
Write findings.md # Store findings
Edit task_plan.md # Mark Phase 2 complete
```
### Loop 3: Synthesize
```bash
Read task_plan.md # Refresh goals
Read notes.md # Get findings
Read findings.md # Get findings
Write morning_exercise_summary.md
Edit task_plan.md # Mark Phase 3 complete
```
@@ -120,9 +120,9 @@ Add functional dark mode toggle to settings.
**Currently in Phase 3** - Building toggle component
```
**notes.md:**
**findings.md:**
```markdown
# Notes: Dark Mode Implementation
# Findings: Dark Mode Implementation
## Existing Theme System
- Located in: src/styles/theme.ts
@@ -1,5 +1,5 @@
# Check if all phases in task_plan.md are complete
# Always exits 0 — uses stdout for status reporting
# Always exits 0 -- uses stdout for status reporting
# Used by Stop hook to report task completion status
param(
@@ -7,7 +7,7 @@ param(
)
if (-not (Test-Path $PlanFile)) {
Write-Host "[planning-with-files] No task_plan.md found — no active planning session."
Write-Host '[planning-with-files] No task_plan.md found -- no active planning session.'
exit 0
}
@@ -29,16 +29,16 @@ if ($COMPLETE -eq 0 -and $IN_PROGRESS -eq 0 -and $PENDING -eq 0) {
$PENDING = ([regex]::Matches($content, "\[pending\]")).Count
}
# Report status (always exit 0 — incomplete task is a normal state)
# Report status -- always exit 0, incomplete task is a normal state
if ($COMPLETE -eq $TOTAL -and $TOTAL -gt 0) {
Write-Host "[planning-with-files] ALL PHASES COMPLETE ($COMPLETE/$TOTAL)"
Write-Host ('[planning-with-files] ALL PHASES COMPLETE (' + $COMPLETE + '/' + $TOTAL + ')')
} else {
Write-Host "[planning-with-files] Task in progress ($COMPLETE/$TOTAL phases complete)"
Write-Host ('[planning-with-files] Task in progress (' + $COMPLETE + '/' + $TOTAL + ' phases complete)')
if ($IN_PROGRESS -gt 0) {
Write-Host "[planning-with-files] $IN_PROGRESS phase(s) still in progress."
Write-Host ('[planning-with-files] ' + $IN_PROGRESS + ' phase(s) still in progress.')
}
if ($PENDING -gt 0) {
Write-Host "[planning-with-files] $PENDING phase(s) pending."
Write-Host ('[planning-with-files] ' + $PENDING + ' phase(s) pending.')
}
}
exit 0