Skip to content

Conversation

@rpothin
Copy link
Owner

@rpothin rpothin commented Jan 28, 2026

Summary

This release addresses 6 issues discovered during v0.1.2 testing, organized into 3 phases: Critical Fixes, Reliability Improvements, and UX Polish.

Issues Fixed

Issue Problem Solution
1 Progress file not persisting task history Session-based multi-task tracking with RunSession and TaskResult
2 CLI doesn't push changes to remote Configurable pushStrategy option (per-task/per-run/manual)
3 Git lock race conditions causing failures Mutex-protected git operations via async-mutex
4 AI claims COMPLETE despite command failures Honesty guidance in prompts + failure warning in executor
5 Insufficient iteration log detail Configurable progressVerbosity option (minimal/standard/full)
6 Confusing "iteration 1" on every task Task X/Y numbering in commit messages

New Configuration Options

Option Type Default Description
pushStrategy 'per-task' | 'per-run' | 'manual' 'per-task' When to push to remote
progressVerbosity 'minimal' | 'standard' | 'full' 'standard' Progress file detail level

Changes

Phase 1: Critical Fixes

  • Progress file persistence: Full task history preserved across multi-task runs
  • Git lock prevention: All git operations serialized via mutex

Phase 2: Reliability Improvements

  • Honesty guidance: Enhanced prompts encourage honest completion reporting
  • STUCK action guidance: Better examples for graceful failure
  • Push strategy: Configurable auto-push behavior
  • Failure warning: Warns when COMPLETE used despite failed commands

Phase 3: UX Polish

  • Commit messages: Format changed to ghcralph: task X/Y iter N - summary
  • Progress verbosity: Configurable detail level for debugging
  • Documentation: README, architecture.md, and cookbook.md updated

Files Changed

  • 19 files changed, +2,229 lines, -261 lines
  • New dependency: async-mutex for git operation serialization
  • Tests: 311 passing (6 new tests for session tracking)

Breaking Changes

None. All changes are backward compatible.

Testing

  • npm run typecheck passes
  • npm test passes (311 tests)
  • npm run build succeeds

Documentation

  • README.md updated with new config options
  • docs/architecture.md updated with v0.1.3 enhancements
  • docs/cookbook.md updated with troubleshooting guides
  • JOURNAL.md updated with implementation details

- Issue #1: Implemented session-based multi-task progress tracking
  - Added RunSession and TaskResult interfaces
  - New startSession(), recordTaskCompletion(), getSession() methods
  - generateFullSessionMarkdown() preserves complete task history
  - Progress file now includes all task iterations across the run

- Issue #3: Added mutex protection for git operations
  - All CheckpointManager git operations now use async-mutex
  - Prevents concurrent access causing index.lock errors
  - Internal *Unsafe() methods for already-locked contexts

Added async-mutex dependency and 6 new tests for progress tracking.

Part of v0.1.3 remediation plan.
…gy, failure warning

Issue #4: Enhanced prompt engineering for honesty
- Added HONESTY_GUIDANCE section to context-builder with completion integrity rules
- Added STUCK_EXAMPLE to prompt-examples showing proper stuck action format
- Updated FORMAT_INSTRUCTIONS and MINIMAL_EXAMPLES to include STUCK action
- Added failure warning in ActionExecutor when COMPLETE used despite failed commands

Issue #2: Git push implementation with configurable pushStrategy
- Added pushStrategy config option: 'per-task' | 'per-run' | 'manual'
- per-task (default): Push after each task completes
- per-run: Push once at the end of the run
- manual: No automatic push

Files modified:
- src/core/context-builder.ts - HONESTY_GUIDANCE enhancement
- src/core/prompt-examples.ts - STUCK_EXAMPLE and format updates
- src/core/action-executor.ts - Failed command tracking and warning
- src/core/config-schema.ts - pushStrategy option
- src/commands/run.ts - pushStrategy implementation
…tion

Issue #6: Git commit message format with task X/Y numbering
- Added TaskContext interface for commit message context
- Updated createCheckpoint: 'ghcralph: task X/Y iter N - summary'
- Updated createTaskCheckpoint: 'ghcralph: task X/Y complete - title'
- Compute totalTasksInPlan from planManager.getTasks()

Issue #5: Progress file verbosity configuration
- Added progressVerbosity: 'minimal' | 'standard' | 'full' config option
- minimal: Just iteration header (for CI)
- standard (default): Tokens, summary, error, duration
- full: Standard + raw response + actions executed
- Extended IterationRecord with rawResponse and actions fields

Documentation: Updated README with new config options
- Added pushStrategy and progressVerbosity to config table
- Updated environment variables section
- Updated example config file
- Updated checkpoint message format description

Files modified:
- src/core/checkpoint-manager.ts - TaskContext and updated formatting
- src/core/config-schema.ts - progressVerbosity option
- src/core/progress-tracker.ts - verbosity-aware formatting
- src/core/loop-state.ts - extended IterationRecord
- src/commands/run.ts - task context and verbosity wiring
- README.md - documentation updates

Completes v0.1.3 remediation plan (all 6 issues addressed)
architecture.md:
- Added v0.1.3 issues to identified issues table (6 new items)
- Added v0.1.3 Enhancements section with detailed documentation:
  - Session-based progress tracking (RunSession, TaskResult)
  - Git mutex protection (async-mutex)
  - Configurable push strategy (per-task/per-run/manual)
  - Progress verbosity configuration (minimal/standard/full)
  - Task-numbered commit messages (task X/Y format)
  - Honesty guidance and failure warnings
- Updated Summary section with new capabilities

cookbook.md:
- Updated configuration example with new options
- Added Push Strategies documentation
- Added Progress Verbosity documentation
- Added troubleshooting sections:
  - Git lock errors (now fixed with mutex)
  - Push to remote configuration
  - Progress file verbosity settings
@rpothin rpothin self-assigned this Jan 28, 2026
@rpothin rpothin added bug Something isn't working enhancement New feature or request labels Jan 28, 2026
…tion guidance

- Fixed 3 lint errors in progress-tracker.ts by using type assertions
- Updated AGENT.md with explicit lint guidance:
  - Emphasized running lint before every commit
  - Updated Validate section with explicit command
@rpothin rpothin merged commit e21b96d into main Jan 28, 2026
10 checks passed
@rpothin rpothin deleted the v0.1.3-preparation branch January 28, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant