Skip to content

[PF-18] PlanForge rules prefix, doctor rule checks, and static doctor exit - #32

Merged
chucoding merged 7 commits into
developfrom
refactor/PF-18
Mar 14, 2026
Merged

[PF-18] PlanForge rules prefix, doctor rule checks, and static doctor exit#32
chucoding merged 7 commits into
developfrom
refactor/PF-18

Conversation

@chucoding

Copy link
Copy Markdown
Owner

Purpose

  • Give PlanForge-related Cursor rules a consistent planforge- filename prefix and ensure they are installed on init and checked by doctor.
  • Remove obsolete .planforge/plans and references; add explicit process exit after static doctor checks.

Description

  • Rule naming and templates

    • Renamed workflow.mdcplanforge-workflow.mdc in .cursor/rules and templates/cursor/rules.
    • Added planforge-cursor-agent-terminal.mdc (timeout guidance for plan/implement) to templates and to .cursor/rules; content in English.
    • Updated descriptions/titles to use a "PlanForge" prefix where relevant.
  • Doctor

    • Load workflow rule from planforge-workflow.mdc (no longer workflow.mdc) in both cli-js and cli-py.
    • Added static checks for presence of .cursor/rules/planforge-workflow.mdc and .cursor/rules/planforge-cursor-agent-terminal.mdc; missing → warn with "run planforge install".
    • After static doctor runs, process now exits explicitly: process.exit(0) (cli-js) and sys.exit(0) (cli-py) when there is no error; existing exit(1) on error unchanged.
  • Templates and repo

    • packages/cli-js/scripts/check-templates.js: required list updated to planforge-workflow.mdc and planforge-cursor-agent-terminal.mdc (replacing workflow.mdc).
    • Removed .planforge/plans/ and .planforge/plans/index.json; removed .planforge from skip lists and glob excludes in packages/cli-js/src/utils/repo-context.ts.
Area Files
Rules (project + template) planforge-workflow.mdc, planforge-cursor-agent-terminal.mdc; deleted workflow.mdc, cursor-agent-terminal.mdc
Doctor packages/cli-js/src/commands/doctor.ts, packages/cli-py/planforge/commands/doctor.py
Templates / build packages/cli-js/scripts/check-templates.js, templates/cursor/rules/*
Repo context packages/cli-js/src/utils/repo-context.ts

How to test

  1. From repo root, run planforge doctor static (or planforge doctor in a non-TTY) and confirm the process exits with code 0 when all checks pass, and with code 1 when any check has status error.
  2. Confirm doctor output includes two rule checks: .cursor/rules/planforge-workflow.mdc and .cursor/rules/planforge-cursor-agent-terminal.mdc (ok if present, warn + "run planforge install" if missing).
  3. Run planforge install in a test project and verify .cursor/rules/planforge-workflow.mdc and planforge-cursor-agent-terminal.mdc are created.
  4. In packages/cli-js, run pnpm run check:templates and confirm it passes (required templates include the two planforge rule files).
  5. Optionally run doctor AI workflow tests (planforge doctor ai) and confirm workflow content is still loaded from planforge-workflow.mdc.

Review Requirement

  • Symmetry between cli-js and cli-py for doctor (rule paths, static exit behavior).
  • Confirm that init/install still install both planforge rule files and that no code path still expects workflow.mdc or creates .planforge/plans.

Additional Info

  • Related Notion: rule

@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 720160f into develop Mar 14, 2026
1 check passed
@chucoding
chucoding deleted the refactor/PF-18 branch March 14, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant