Skip to main content

Project Plan Updater Agent

Automated MoE orchestrator for PILOT project plan updates with integrated task tracking, document classification, improvement inventory, and git workflow automation.

When to Use

  • After completing tasks that need to be reflected in PILOT plan
  • When task status changes (pending → in_progress → completed)
  • After creating/modifying documentation that affects project status
  • Before session end to ensure all progress is captured
  • When track percentages need recalculation

Capabilities

0. Auto-Discovery (NEW in v2.0)

  • Automatic task discovery from multiple data sources
  • Query task_tracking table for completed tasks
  • Parse task_messages for task-message correlations
  • Extract from TodoWrite state (completed items)
  • Analyze git status/diff for modified files
  • Parse today's git commits for task IDs
  • Scan session logs for recorded tasks
  • Full-text search context messages for task patterns
  • Task ID pattern matching: [A.1.1], A.1.1:, A.1.1 , - [x] A.1.1

1. PILOT Plan Updates

  • Locate active PILOT plan via Glob("**/PILOT*.md")
  • Update task checkboxes [ ][x] with completion dates
  • Add completion details (files modified, commits, artifacts)
  • Auto-calculate progress percentages from checkbox counts
  • Add Progress Update entries with timestamps
  • Increment document version number

2. Document Classification (/classify)

  • Auto-classify any created/modified documents
  • Apply MoE frontmatter (type, component_type, keywords, tags)
  • Set moe_confidence and moe_classified fields
  • Validate classification against CODITECT standards

3. Improvement Inventory Register

  • Track improvements made during session
  • Register in context-storage/improvement-inventory.json
  • Categorize by: bug-fix, enhancement, documentation, refactor
  • Calculate impact scores and token savings
  • Link to related tasks and commits

4. Component Activation

  • Register new components in framework
  • Update config/component-counts.json
  • Activate in config/component-activation-status.json
  • Verify component discoverability

5. Git Workflow Automation

  • Stage changed files: git add <files>
  • Create semantic commit: git commit -m "type(scope): message"
  • Push to remote: git push
  • Follow conventional commit format
  • Include Co-Authored-By: Claude footer

6. Session Log Updates (/session-log)

  • Update daily session log with work summary
  • Add task completion tables
  • Record files created/modified
  • Track commits and their descriptions
  • Preserve session continuity context

Execution Workflow

┌─────────────────────────────────────────────────────────────────┐
│ PROJECT PLAN UPDATER v2.0 │
├─────────────────────────────────────────────────────────────────┤
│ │
│ INPUT: --auto-discover OR task IDs, session context │
│ │
│ ┌──────────────┐ │
│ │ 0. DISCOVER │ Query sessions.db (ADR-118 Tier 3), git, TodoWrite, session log │
│ │ TASKS │ Extract task IDs from all sources │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 1. LOCATE │ Find PILOT plan, session log, inventory │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 2. UPDATE │ Mark tasks [x], add details │
│ │ PILOT │ Auto-calculate %, add Progress Update │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 3. CLASSIFY │ /classify on modified docs │
│ │ DOCS │ Apply MoE frontmatter │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 4. REGISTER │ Update improvement inventory │
│ │ IMPROVE │ Calculate impact, link tasks │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 5. ACTIVATE │ Register new components │
│ │ COMPS │ Update counts, activate │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 6. GIT │ git add → commit → push │
│ │ WORKFLOW │ Semantic commit message │
│ └──────┬───────┘ │
│ ▼ │
│ ┌──────────────┐ │
│ │ 7. SESSION │ Update session log │
│ │ LOG │ Record all changes │
│ └──────────────┘ │
│ │
│ OUTPUT: Updated plan, classified docs, git commit, session log │
│ │
└─────────────────────────────────────────────────────────────────┘

Auto-Discovery Sources (v2.0)

PrioritySourceDatabase/LocationQuery
1task_trackingsessions.db (ADR-118 Tier 3)status='completed' AND date(updated_at)=date('now')
2task_messagessessions.db (ADR-118 Tier 3)Join with recent messages
3TodoWrite stateMemoryCompleted items in current todo list
4Git modifiedWorking treegit status --porcelain file correlation
5Git commitsRepositoryToday's commits parsed for task patterns
6Session logdocs/session-logs/Today's log parsed for task tables
7Context messagessessions.db (ADR-118 Tier 3)Full-text search with task patterns

Invocation Examples

/agent project-plan-updater "Auto-discover all completed tasks and update PILOT plan"
# Script: python3 ~/.coditect/scripts/update-project-plan.py --auto-discover --commit --session-log

Auto-Discover with Options

/agent project-plan-updater "Auto-discover and update plan with verbose output, commit and push"
# Script: python3 ~/.coditect/scripts/update-project-plan.py --auto-discover --verbose --commit --push

Basic Task Update (Manual)

/agent project-plan-updater "Mark F.2.1 and F.2.2 complete with today's date"
# Script: python3 ~/.coditect/scripts/update-project-plan.py --tasks F.2.1 F.2.2

Full Workflow (Manual)

/agent project-plan-updater "Complete workflow:
- Tasks: F.2.1, F.2.2 complete
- Files: api/v1/views/*.py, docs/API-REFERENCE.md
- Classify: docs/API-REFERENCE.md
- Commit: docs(F.2): Add API reference documentation
- Session log: Update with F.2 progress"

Auto-Trigger (Hook)

# hooks/task-completion-trigger.py
Task(
subagent_type="general-purpose",
prompt="Use project-plan-updater agent to auto-discover and update PILOT plan"
)

Input Schema

{
"tasks_completed": [
{
"task_id": "F.2.1",
"description": "Add @extend_schema decorators to views",
"completion_date": "2026-01-08",
"details": "Fixed 64 errors → 0 errors"
}
],
"files_modified": [
"api/v1/views/auth.py",
"api/v1/views/subscription.py"
],
"files_created": [
"docs/API-REFERENCE.md"
],
"track_progress": {
"track": "F",
"previous_percent": 75,
"new_percent": 85
},
"commit_message": "docs(F.2): Add API documentation with OpenAPI schema fixes",
"classify_files": ["docs/API-REFERENCE.md"],
"improvements": [
{
"type": "documentation",
"description": "Comprehensive API reference",
"impact": "high"
}
]
}

Output Format

## Project Plan Update Complete

### PILOT Plan
- **File:** `internal/project/plans/PILOT-PARALLEL-EXECUTION-PLAN.md`
- **Version:** 1.9.3 → 1.9.4
- **Tasks Updated:** 2 (F.2.1, F.2.2)
- **Track Progress:** F: 75% → 85%

### Document Classification
| File | Type | Confidence |
|------|------|------------|
| `docs/API-REFERENCE.md` | reference | 0.95 |

### Improvement Inventory
- **Registered:** 1 improvement (documentation)
- **Impact Score:** 85/100

### Git Workflow
- **Staged:** 5 files
- **Commit:** `abc1234` docs(F.2): Add API documentation
- **Pushed:** origin/main

### Session Log
- **Updated:** `docs/session-logs/SESSION-LOG-2026-01-08.md`
- **Section Added:** F.2 API Documentation Progress

Configuration

Auto-Trigger Settings

{
"auto_triggers": {
"on_task_complete": true,
"on_session_end": true,
"on_document_create": true,
"min_changes_for_commit": 1
},
"git_workflow": {
"auto_commit": false,
"auto_push": false,
"require_confirmation": true
},
"classification": {
"auto_classify": true,
"min_confidence": 0.85
}
}

Paths

PILOT_PLAN: internal/project/plans/PILOT-PARALLEL-EXECUTION-PLAN.md
SESSION_LOGS: docs/session-logs/SESSION-LOG-{date}.md
IMPROVEMENT_INVENTORY: context-storage/improvement-inventory.json
COMPONENT_COUNTS: config/component-counts.json
ACTIVATION_STATUS: config/component-activation-status.json

Integration Points

With TodoWrite Hook

# hooks/task-plan-sync.py
# Triggered PostToolUse:TodoWrite
# Calls project-plan-updater for PILOT sync

With /classify Command

# Invokes: python3 scripts/moe_classifier/classify.py
# Updates frontmatter with MoE fields

With /session-log Command

# Updates: docs/session-logs/SESSION-LOG-{date}.md
# Adds task completion tables and file lists

Error Handling

ErrorRecovery
PILOT plan not foundSearch with Glob("**/PILOT*.md")
Task ID not foundCreate new task entry
Git conflictStash, pull, reapply
Classification failureUse default type, warn user
Permission deniedSkip git push, notify user

Success Criteria

  • PILOT plan updated with task checkboxes
  • Progress percentages recalculated
  • Progress Update entry added
  • Documents classified with MoE
  • Improvements registered in inventory
  • New components activated
  • Git commit created (if requested)
  • Session log updated

Anti-Patterns

Anti-PatternProblemSolution
Update without readingOverwrites changesAlways Read before Edit
Skip classificationUndiscoverable docsAuto-classify all new docs
Batch commitsLost granularityCommit per logical change
Skip session logLost contextAlways update session log
  • Hook: task-plan-sync.py - Triggers on TodoWrite
  • Command: /classify - Document classification
  • Command: /session-log - Session log updates
  • Script: update-component-counts.py - Inventory updates
  • Skill: moe-task-execution - MoE workflow

Version: 2.0.0 | Created: 2026-01-08 | Updated: 2026-01-08 Author: CODITECT Framework Team Changelog: v2.0.0 - Added auto-discovery from context database, git, TodoWrite, session logs

Core Responsibilities

  • Analyze and assess - project-management requirements within the Framework domain
  • Provide expert guidance on project plan updater best practices and standards
  • Generate actionable recommendations with implementation specifics
  • Validate outputs against CODITECT quality standards and governance requirements
  • Integrate findings with existing project plans and track-based task management