Skip to content

[PF-19] Rollback to .cursor/plans and .cursor/contexts with HHMM-slug plan filenames - #27

Merged
chucoding merged 1 commit into
developfrom
feature/PF-19_rollback
Mar 14, 2026
Merged

[PF-19] Rollback to .cursor/plans and .cursor/contexts with HHMM-slug plan filenames#27
chucoding merged 1 commit into
developfrom
feature/PF-19_rollback

Conversation

@chucoding

Copy link
Copy Markdown
Owner

Purpose

Roll back plan and context storage from .planforge/plans and .planforge/contexts to .cursor/plans and .cursor/contexts so that opening a *.plan.md file in Cursor shows the Build button (which only appears for files under .cursor). Unify plan filenames to {HHMM}-{slug}.plan.md (time 24h + slug, hash removed) and drop legacy support (.planforge path detection, migration warnings, getLegacyContextDir) to keep the codebase simple.

Description

  • Paths

    • cli-js packages/cli-js/src/utils/paths.ts: getPlansDir.cursor/plans, getContextsDir.cursor/contexts. getProjectRoot now treats planforge.json or .cursor/plans / .cursor/contexts as root (.planforge root marker removed). getLegacyContextDir removed. getDateParts extended with hhmm (HHMM).
    • cli-py packages/cli-py/planforge/utils/paths.py: Same path changes; get_legacy_context_dir removed; get_date_parts returns (yyyy_mm_dd, mmdd, hhmm).
  • Plan command (filename rule)

    • cli-js packages/cli-js/src/commands/plan.ts: Plan file name changed from MMDD-{slug}-{hash}.plan.md to {HHMM}-{slug}.plan.md. shortHash() and randomBytes import removed.
    • cli-py packages/cli-py/planforge/commands/plan.py: Same; _short_hash() and secrets import removed; get_date_parts now used for hhmm.
  • Init

    • cli-js packages/cli-js/src/commands/init.ts: Creates .cursor/plans and .cursor/contexts; messages updated. No legacy migration option.
    • cli-py packages/cli-py/planforge/commands/init.py: Same.
  • Doctor

    • cli-js packages/cli-js/src/commands/doctor.ts: Checks only .cursor/plans and .cursor/contexts; labels updated; legacy block removed (no getLegacyContextDir, no legacy context or flat-plan warnings).
    • cli-py packages/cli-py/planforge/commands/doctor.py: Same; get_legacy_context_dir import and legacy checks removed.
  • Docs and rules

    • .cursor/rules/workflow.mdc, .cursor/skills/p/SKILL.md, .cursor/skills/i/SKILL.md: Paths updated to .cursor/plans/YYYY-MM-DD/{HHMM}-<summary>.plan.md, .cursor/contexts; context filenames described as HHMM-....
    • templates/cursor/: Same updates in rules/workflow.mdc, skills/p/SKILL.md, skills/i/SKILL.md.
    • README.md, packages/cli-js/README.md: All path references and example structure updated; note added about intermittent unreadability of files under .cursor (reopen file or run planforge implement).
    • packages/cli-js/src/index.ts, packages/cli-py/planforge/cli.py: Command descriptions and --context-dir help text updated to .cursor/plans, .cursor/contexts.
  • Migration

    • No code support for legacy: CLI does not read or write .planforge. Manual migration only (documented in README): copy .planforge/plans.cursor/plans/, .planforge/contexts.cursor/contexts/, rename files to {HHMM}-{slug}.plan.md, update index.json.

How to test

  1. From repo root, run planforge init (or use existing project with planforge.json). Confirm it creates .cursor/plans and .cursor/contexts and prints "Created .cursor/plans", "Created .cursor/contexts".
  2. Run planforge plan "add login page". Confirm the plan file is created under .cursor/plans/YYYY-MM-DD/ with filename like 1430-add-login-page.plan.md (HHMM-slug, no hash).
  3. Open that .plan.md file in Cursor and confirm the Build button appears (top right).
  4. Run planforge doctor. Confirm it reports .cursor/plans and .cursor/contexts only; no legacy path warnings.
  5. Run planforge implement "implement the login form" and confirm it uses the active plan from .cursor/plans/index.json and context from .cursor/contexts.

Review Requirement

  • Paths (cli-js and cli-py): Ensure both CLIs use exactly .cursor/plans and .cursor/contexts and that project root detection no longer depends on .planforge.
  • Plan filename: Confirm HHMM is 24h time (e.g. 1430) and that hash is fully removed in both Node and Python plan commands.
  • Legacy: Confirm no remaining references to getLegacyContextDir / get_legacy_context_dir or legacy migration logic in doctor/init.

Additional Info

  • Related Notion: .planforge (planforge) — §9 documents this change (2026-03-14).
  • Design: Rollback to main-era layout (.cursor/plans, .cursor/contexts) for Build button; date subfolders (YYYY-MM-DD) kept; filename rule set to {HHMM}-{slug}.plan.md; legacy support intentionally dropped.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@chucoding chucoding self-assigned this Mar 14, 2026
@chucoding
chucoding merged commit da95414 into develop Mar 14, 2026
1 check passed
@chucoding
chucoding deleted the feature/PF-19_rollback branch March 14, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant