Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cursor/rules/planforge-workflow.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ alwaysApply: true

# PlanForge Workflow

- **When the user uses /p or asks for a plan/design/structure:**
- **When the user uses /p:**
Using /p alone obliges you to run plan. Do not skip running `planforge plan` (or the plan script) by reclassifying the message as an "implementation request" based on its content. Treat the user's message as the goal and run the plan command first. Run **exactly one** of these with **no** `cd`, **no** `&&`, and no other prefix (terminal is already in workspace root): `planforge plan "<goal>"` or `.cursor/skills/p/scripts/run_plan.sh` (mac/Linux) or `.cursor/skills/p/scripts/run_plan.ps1` (Windows). Run it in the foreground so output streams in the agent terminal (sandbox). Do not write any plan/design output directly as a fallback. After the command succeeds, read `.cursor/plans/YYYY-MM-DD/{HHMM}-<summary>.plan.md` and summarize/reference it. If command execution fails, return the error and suggested fixes only.
- **When the user uses /i or asks for implementation:**
- **When the user uses /i:**
Run **exactly one** command with **no** `cd`, **no** `&&`, and no other prefix (terminal is already in workspace root): `planforge implement "<prompt>"` or `.cursor/skills/i/scripts/run_implement.sh` (mac/Linux) or `.cursor/skills/i/scripts/run_implement.ps1` (Windows). Run it in the foreground so output streams in the agent terminal (sandbox). Do not produce direct implementation output without running the command. Prefer the active plan in `.cursor/plans/index.json` (`activePlan`) or the latest `.plan.md`. After the command completes, on success summarize the result or suggest next steps; on failure return the error and suggested fixes only. If the command cannot be started, return the error and suggested fixes only.
49 changes: 49 additions & 0 deletions .cursor/rules/pr-writing.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
description: When the user asks for a PR, output markdown based on the template and session context
alwaysApply: false
---

# PR Writing Rules

When the user **requests a PR** (e.g. "Write a PR", "Create a PR"), follow the steps below.

## 1. Use the Template

- **File**: Read `.github/PULL_REQUEST_TEMPLATE.md` and follow its structure.
- Keep the template sections (Purpose, Description, How to test, Review Requirement, Additional Info) and replace placeholders (`_…_`) with actual content.

## 2. Writing Content

- **Session context**: Fill each section from the requests, changes, and decisions made in the current session.
- **Purpose**: State the goal of the PR in one or two clear sentences.
- **Description**: List modified/added files, a concise summary of changes, and any preserved behavior. Use lists and tables where helpful.
- **How to test**: Numbered steps for the reviewer to verify the changes locally or in the browser.
- **Review Requirement**: What the reviewer should pay extra attention to.
- **Additional Info**: Issue reference, **link to the related Notion page** (required), and any other links or notes.

## 2.5 Notion Link (Required)

- **Always** include a **link to the related Notion page** in the PR body.
- **Place**: In the Additional Info section as "Related Notion: [Page title](URL)". You may also put it at the top of Description.
- **URL**: Use the Notion URL shared in the conversation if available. Otherwise add a placeholder (e.g. `Related Notion: (add the Notion page URL for this work)`) and ask the user to fill it.

## 3. PR Title (Required)

- The PR title **must** include the **issue/PR number**. Use **`[NO-ISSUE]`** if the branch name does not contain one.
- **Extract the number from the current branch name**. Run `git branch --show-current` when writing the PR and use the number between slashes or hyphens (e.g. TSK-112, 110).
- e.g. `feature/TSK-112-add-feature` → `TSK-112`
- e.g. `fix/110-bug` → `110` or `TSK-110` (per project convention)
- e.g. `feature/add-something` (no number) → `[NO-ISSUE]`
- **Format**: `[number] Title` or `[NO-ISSUE] Title` — **Do not use commit-style prefixes** (feat:, refactor:, fix:). Use a short descriptive title only.
- e.g. `[TSK-112] Remove character IP and switch to logo and icon UI`
- e.g. `[NO-ISSUE] Documentation cleanup`

## 4. Output Format

- Output **markdown** so the user can **copy and paste** it into the GitHub PR body.
- **Always provide a PR title example** that includes the number from the current branch (or `[NO-ISSUE]`).
- Wrap the body in a markdown code block (```markdown ... ```) for easy copying.

## 5. Reference

- Follow `code-comments.mdc` for code and comment style.
2 changes: 1 addition & 1 deletion .cursor/skills/i/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ You must execute the PlanForge command path for every `/i` request. Do not imple
**When the user invokes /i with a prompt (e.g. "/i implement the login API"):**

1. **Summarize the conversation** - Summarize the current chat (goals, decisions, constraints, relevant files or tech) in a short paragraph and write/update a markdown file in the project's **context directory** (`.cursor/contexts`). Use a dated subdirectory and `HHMM-...` filename so plan/implement will read it, for example `.cursor/contexts/2026-03-10/1430-implement.md`. Keep it short and overwrite or append as needed.
2. **Run the implement script in the foreground (required)** - Run **one** command only: no `cd`, no `&&`. Terminal is already in workspace root. Use `.cursor/skills/i/scripts/run_implement.ps1 "<prompt>"` on Windows or `.cursor/skills/i/scripts/run_implement.sh` on mac/Linux. Run it **in the foreground** so that output streams in the Cursor chat sandbox terminal; do not run in the background. Never write final code as a substitute for script execution. The command runs `planforge implement` using `planforge.json`.
2. **Run the implement script in the foreground (required)** - **Before** running the command, output a one-line advisory in the **same language as the user's message** (e.g. if the user wrote in Korean, write in Korean; if in English, in English). Example: "Expand the sandbox and check the output logs." Then run **one** command only: no `cd`, no `&&`. Terminal is already in workspace root. Use `.cursor/skills/i/scripts/run_implement.ps1 "<prompt>"` on Windows or `.cursor/skills/i/scripts/run_implement.sh` on mac/Linux. Run it **in the foreground** so that output streams in the Cursor chat sandbox terminal; do not run in the background. Never write final code as a substitute for script execution. The command runs `planforge implement` using `planforge.json`.
3. **After it completes** - On success, summarize the result or suggest next steps. On failure, report the error output and suggest fixes. Do not produce implementation output in chat without having run the command.

If script execution is blocked or fails, stop and return an error-focused response. Do not provide a substitute direct implementation.
2 changes: 1 addition & 1 deletion .cursor/skills/p/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ You must execute the PlanForge command path for every `/p` request. Do not draft
```
If you fetched URL content in step 0, append it as a separate section (e.g. `## Fetched URLs` or per-URL headings) in the **same** file. Create the dated subdirectory if it does not exist.

2. **Run the plan script in the foreground (required)** - Run **one** command only: no `cd`, no `&&` (PowerShell does not support `&&`). Terminal is already in workspace root. Use `.cursor/skills/p/scripts/run_plan.ps1 "<goal>"` on Windows or `.cursor/skills/p/scripts/run_plan.sh` on mac/Linux, or `planforge plan "<goal>"`. Run it **in the foreground** so that output streams in the Cursor chat sandbox terminal; do not run in the background. Pass the **same slug** so the plan output filename matches the context file: invoke as `planforge plan "<goal>" --slug <slug>` (or ensure the script forwards `--slug <slug>`). The command generates `.cursor/plans/YYYY-MM-DD/{HHMM}-<slug>.plan.md` so that context file `HHMM-<slug>.md` and plan file `HHMM-<slug>.plan.md` use the same slug. Never create `.plan.md` content directly in chat.
2. **Run the plan script in the foreground (required)** - **Before** running the command, output a one-line advisory in the **same language as the user's message** (e.g. if the user wrote in Korean, write in Korean; if in English, in English). Example: "This may take a while. Please wait." Then run **one** command only: no `cd`, no `&&` (PowerShell does not support `&&`). Terminal is already in workspace root. Use `.cursor/skills/p/scripts/run_plan.ps1 "<goal>"` on Windows or `.cursor/skills/p/scripts/run_plan.sh` on mac/Linux, or `planforge plan "<goal>"`. Run it **in the foreground** so that output streams in the Cursor chat sandbox terminal; do not run in the background. Pass the **same slug** so the plan output filename matches the context file: invoke as `planforge plan "<goal>" --slug <slug>` (or ensure the script forwards `--slug <slug>`). The command generates `.cursor/plans/YYYY-MM-DD/{HHMM}-<slug>.plan.md` so that context file `HHMM-<slug>.md` and plan file `HHMM-<slug>.plan.md` use the same slug. Never create `.plan.md` content directly in chat.

3. **After it completes** - Read the generated `.plan.md` file and summarize/reference it in your reply. Do not start implementation. If execution fails, report the error output and suggest concrete fixes (for example `planforge init` or installing the configured provider CLI).

Expand Down
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Shell scripts must use LF so they run on Mac/Linux (e.g. .cursor/skills/*/scripts/*.sh).
*.sh text eol=lf
# Cursor rules/skills: keep LF for cross-platform and CI (template–runtime comparison, script execution).
.cursor/rules/*.mdc text eol=lf
.cursor/skills/**/*.md text eol=lf
.cursor/skills/**/*.py text eol=lf
.cursor/skills/**/*.ps1 text eol=lf
templates/cursor/rules/*.mdc text eol=lf
templates/cursor/skills/**/*.md text eol=lf
templates/cursor/skills/**/*.py text eol=lf
templates/cursor/skills/**/*.ps1 text eol=lf
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ planforge.json
.cursor/contexts
.cursor/rules/code-comments.mdc
.cursor/rules/notion.mdc
.cursor/rules/pr-writing.mdc

# logs
*.log
Expand Down
2 changes: 1 addition & 1 deletion packages/cli-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "planforge",
"version": "0.1.7",
"version": "0.1.8",
"type": "module",
"description": "PlanForge CLI - Bring your own AI to Cursor",
"keywords": ["cursor", "claude", "codex", "ai", "cli", "planning", "planforge"],
Expand Down
Loading
Loading