Skip to content

feat: Sprint 2 — plan-to-queue generator#45

Merged
egerev merged 15 commits intomainfrom
feat/auto-supervisor-sprint-2
Mar 25, 2026
Merged

feat: Sprint 2 — plan-to-queue generator#45
egerev merged 15 commits intomainfrom
feat/auto-supervisor-sprint-2

Conversation

@egerev
Copy link
Copy Markdown
Owner

@egerev egerev commented Mar 25, 2026

Summary

  • plan_to_queue() parses markdown plans into sprint-queue.json with heading format support (colon, em-dash, hyphen, no-title)
  • Cycle detection via topological sort (Kahn's algorithm), validation for duplicate IDs and missing dependencies
  • validate_queue_freshness() compares SHA-256 content hash to detect plan drift
  • SprintQueue.generated_from preserves provenance metadata through load/save round-trips
  • Absolute paths normalized to relative in plan_to_queue (Codex P1 fix)

Test plan

  • 302 tests passing (274 baseline + 28 new)
  • All 4 heading formats parsed correctly
  • Empty plans, duplicate IDs, circular deps rejected
  • SHA-256 hash detects modifications
  • generated_from preserved through load/save
  • Backward compatible (old queues without generated_from load fine)

Review

  • Claude Product: ACCEPTED
  • Codex Technical: APPROVE (P1 fixed — plan_path normalization)

🤖 Generated with Claude Code

egerev and others added 15 commits March 25, 2026 22:53
Phase 1 artifacts for the auto-supervisor feature: design spec,
product brief, implementation plan (4 sprints), and generated
sprint queue.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add validation in SprintQueue.load() to reject absolute paths and
path components containing '..' in sprint plan_file fields, with
fragment (#) support for anchored references.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove --telegram-token and --telegram-chat flags from run/resume
subcommands. _make_notifier() now reads exclusively from env vars.
Notifier.__init__() falls back to TELEGRAM_BOT_TOKEN/TELEGRAM_CHAT_ID
env vars when no args given. Remove unused generate_completion_report
import.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add .superflow/ directory and deduplicate .worktrees/ entry.
Also add .superflow/ to the gitignore template in stage4-setup.md
so onboarded projects include it from day one.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Validates that plan_file resolves within repo_root using os.path.realpath
before opening the file, preventing directory traversal attacks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Renames _DENIED_ENV_KEYS to _SPRINT_ENV_DENY_LIST and adds 12 new
sensitive keys (Telegram, Slack, Stripe, SSH, NPM, Docker, Heroku,
Sentry). ANTHROPIC_API_KEY and GITHUB_TOKEN remain excluded as they
are required by claude -p and gh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Create lib/planner.py with _parse_sprint_headings() supporting colon,
em-dash, and hyphen separator formats. Refactor _extract_plan_section()
in supervisor.py to delegate sprint-type fragments to the shared parser,
fixing boundary detection for em-dash and hyphen headings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Review finding: spec section 7.2 explicitly lists SECRET_KEY in the
Tier 2 deny-list but implementation omitted it.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude Product: ACCEPTED, Codex Technical: APPROVE
274 tests passing, review findings fixed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements plan_to_queue() that reads a markdown plan file, parses sprint
headings, extracts complexity and depends_on metadata, validates uniqueness
and dependency integrity (including cycle detection via topological sort),
computes SHA-256 content hash, and returns a queue dict matching the schema.

Also adds save_queue() for atomic JSON writes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds optional generated_from parameter to SprintQueue.__init__() and
updates load()/save() to round-trip the field. Old queue files without
generated_from continue to load without error (defaults to None).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds TestPlanToQueue (20 cases), TestSaveQueue (2 cases),
TestValidateQueueFreshness (3 cases), and TestSprintQueueGeneratedFrom
(3 cases) covering plan parsing, content hash verification, freshness
checking, and generated_from round-trip in SprintQueue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Review finding: absolute paths from CLI/tempfile callers would produce
queue entries rejected by SprintQueue.load() path validation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude Product: ACCEPTED, Codex Technical: APPROVE (P1 fixed)
302 tests passing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@egerev egerev merged commit 48a5e17 into main Mar 25, 2026
@egerev egerev deleted the feat/auto-supervisor-sprint-2 branch March 25, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant