Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Structured planning workflow that uses files to track tasks, decisions, and project progress.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
scripts/init-session.ps1
1# Initialize planning files for a new session2# Usage: .\init-session.ps1 [-Template TYPE] [project-name]3# Templates: default, analytics45param(6[string]$ProjectName = "project",7[string]$Template = "default"8)910$DATE = Get-Date -Format "yyyy-MM-dd"1112# Resolve template directory (skill root is one level up from scripts/)13$ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path14$SkillRoot = Split-Path -Parent $ScriptDir15$TemplateDir = Join-Path $SkillRoot "templates"1617Write-Host "Initializing planning files for: $ProjectName (template: $Template)"1819# Validate template20if ($Template -ne "default" -and $Template -ne "analytics") {21Write-Host "Unknown template: $Template (available: default, analytics). Using default."22$Template = "default"23}2425# Create task_plan.md if it doesn't exist26if (-not (Test-Path "task_plan.md")) {27$AnalyticsPlan = Join-Path $TemplateDir "analytics_task_plan.md"28if ($Template -eq "analytics" -and (Test-Path $AnalyticsPlan)) {29Copy-Item $AnalyticsPlan "task_plan.md"30} else {31@"32# Task Plan: [Brief Description]3334## Goal35[One sentence describing the end state]3637## Current Phase38Phase 13940## Phases4142### Phase 1: Requirements & Discovery43- [ ] Understand user intent44- [ ] Identify constraints45- [ ] Document in findings.md46- **Status:** in_progress4748### Phase 2: Planning & Structure49- [ ] Define approach50- [ ] Create project structure51- **Status:** pending5253### Phase 3: Implementation54- [ ] Execute the plan55- [ ] Write to files before executing56- **Status:** pending5758### Phase 4: Testing & Verification59- [ ] Verify requirements met60- [ ] Document test results61- **Status:** pending6263### Phase 5: Delivery64- [ ] Review outputs65- [ ] Deliver to user66- **Status:** pending6768## Decisions Made69| Decision | Rationale |70|----------|-----------|7172## Errors Encountered73| Error | Resolution |74|-------|------------|75"@ | Out-File -FilePath "task_plan.md" -Encoding UTF876}77Write-Host "Created task_plan.md"78} else {79Write-Host "task_plan.md already exists, skipping"80}8182# Create findings.md if it doesn't exist83if (-not (Test-Path "findings.md")) {84$AnalyticsFindings = Join-Path $TemplateDir "analytics_findings.md"85if ($Template -eq "analytics" -and (Test-Path $AnalyticsFindings)) {86Copy-Item $AnalyticsFindings "findings.md"87} else {88@"89# Findings & Decisions9091## Requirements92-9394## Research Findings95-9697## Technical Decisions98| Decision | Rationale |99|----------|-----------|100101## Issues Encountered102| Issue | Resolution |103|-------|------------|104105## Resources106-107"@ | Out-File -FilePath "findings.md" -Encoding UTF8108}109Write-Host "Created findings.md"110} else {111Write-Host "findings.md already exists, skipping"112}113114# Create progress.md if it doesn't exist115if (-not (Test-Path "progress.md")) {116if ($Template -eq "analytics") {117@"118# Progress Log119120## Session: $DATE121122### Current Status123- **Phase:** 1 - Data Discovery124- **Started:** $DATE125126### Actions Taken127-128129### Query Log130| Query | Result Summary | Interpretation |131|-------|---------------|----------------|132133### Errors134| Error | Resolution |135|-------|------------|136"@ | Out-File -FilePath "progress.md" -Encoding UTF8137} else {138@"139# Progress Log140141## Session: $DATE142143### Current Status144- **Phase:** 1 - Requirements & Discovery145- **Started:** $DATE146147### Actions Taken148-149150### Test Results151| Test | Expected | Actual | Status |152|------|----------|--------|--------|153154### Errors155| Error | Resolution |156|-------|------------|157"@ | Out-File -FilePath "progress.md" -Encoding UTF8158}159Write-Host "Created progress.md"160} else {161Write-Host "progress.md already exists, skipping"162}163164Write-Host ""165Write-Host "Planning files initialized!"166Write-Host "Files: task_plan.md, findings.md, progress.md"167