Skip to content
Open
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
50 changes: 40 additions & 10 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
# Installation Guide

Complete installation instructions for the PARA-Programming Claude Code plugin.
Complete installation instructions for the PARA-Programming plugin (Claude Code and Cursor).

---

## Prerequisites
## Cursor IDE (Quick Setup)

Before installing, ensure you have:
To use PARA in [Cursor](https://cursor.com):

1. **Install from GitHub (no git clone)** – from your project root:
```bash
curl -fsSL https://raw.githubusercontent.com/brian-lai/para-programming-plugin/main/scripts/setup-cursor.sh | bash -s -- --from-github
```
2. **Or from this repo**, run (replace with your project path):
```bash
./scripts/setup-cursor.sh /path/to/your/project
```
3. **Or copy manually** into your project:
```bash
mkdir -p .cursor
cp -r /path/to/para-programming-plugin/cursor/commands .cursor/
cp -r /path/to/para-programming-plugin/cursor/rules .cursor/
```
4. In Cursor, open the project, type **/** in chat, and choose a **para-\*** command (e.g. **para-init**, **para-plan**).

See **[docs/cursor-setup.md](docs/cursor-setup.md)** for install from GitHub (no git clone), global install, verification, and uninstall.

---

## Claude Code – Prerequisites

Before installing the Claude Code plugin, ensure you have:

- ✅ **Claude Code CLI** installed ([Get it here](https://claude.ai/claude-code))
- ✅ **Git** installed (for project version control)
- ✅ **Terminal access** (bash, zsh, or PowerShell)

---

## Plugin Installation (Recommended)
## Claude Code – Plugin Installation (Recommended)

### Quick Install

Expand All @@ -40,6 +64,7 @@ claude
```

You should see commands prefixed with `/para:`:

- `/para:init`
- `/para:plan`
- `/para:execute`
Expand All @@ -59,6 +84,7 @@ claude
```

This command automatically:

- **Creates `~/.claude/CLAUDE.md`** (if it doesn't exist) - the global workflow methodology file
- Creates the `context/` directory structure in your project
- Creates a project-level `CLAUDE.md` for project-specific context
Expand Down Expand Up @@ -111,10 +137,10 @@ The plugin includes a **global workflow methodology file** that gets installed t

### How It's Installed

| Method | When Global File Is Created |
|--------|----------------------------|
| Plugin + `/para:init` | Automatically on first init (if missing) |
| Manual Installation | Via `cp resources/CLAUDE.md ~/.claude/CLAUDE.md` |
| Method | When Global File Is Created |
| --------------------- | ------------------------------------------------ |
| Plugin + `/para:init` | Automatically on first init (if missing) |
| Manual Installation | Via `cp resources/CLAUDE.md ~/.claude/CLAUDE.md` |

### Important Notes

Expand Down Expand Up @@ -195,6 +221,7 @@ claude
**Problem:** `/plugin install` shows "plugin not found"

**Solution:**

1. Verify marketplace is added:
```bash
/plugin marketplace list
Expand All @@ -209,6 +236,7 @@ claude
**Problem:** PARA commands don't show up in `/help`

**Solution:**

1. Check plugin is installed:
```bash
/plugin list
Expand All @@ -224,6 +252,7 @@ claude
**Problem:** "Permission denied" when installing

**Solution:**

```bash
# Ensure proper permissions on Claude directory
chmod -R u+rw ~/.claude
Expand Down Expand Up @@ -251,10 +280,11 @@ chmod -R u+rw ~/.claude

After successful installation:

1. **Initialize your project:** `/para:init`
1. **Initialize your project:** `/para:init` (Claude Code) or `/para-init` (Cursor)
2. **Try the example workflow:** See [examples/example-workflow.md](examples/example-workflow.md)
3. **Read the documentation:** [Main PARA Guide](https://github.com/brian-lai/para-programming)
4. **Start your first task:** `/para:plan "your task description"`
4. **Start your first task:** `/para:plan "your task description"` (Claude Code) or `/para-plan "your task description"` (Cursor)
5. **Using Cursor?** See [docs/cursor-setup.md](docs/cursor-setup.md) for setup and commands

---

Expand Down
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ claude
- Example workflows
- Documentation

### Cursor IDE

- **Slash commands** – Use PARA in [Cursor](https://cursor.com) via `/para-init`, `/para-plan`, etc. Type `/` in Cursor chat to see them.
- **Easy setup** – Copy `cursor/commands` and `cursor/rules` into your project’s `.cursor/` directory, or run `./scripts/setup-cursor.sh /path/to/your/project` from this repo.
- **Docs** – See [docs/cursor-setup.md](docs/cursor-setup.md) for step-by-step Cursor setup.

---

## 🔁 The PARA Workflow
Expand All @@ -89,12 +95,14 @@ claude
### When to Use

**✅ ALWAYS for:**

- Code changes (features, bugs, refactoring)
- Architecture decisions
- Configuration changes
- Database modifications

**❌ SKIP for:**

- Informational queries
- Code explanations
- Navigation
Expand Down Expand Up @@ -182,7 +190,7 @@ claude
para-programming-plugin/
├── .claude-plugin/
│ └── plugin.json # Plugin manifest
├── commands/ # Slash commands
├── commands/ # Claude Code slash commands
│ ├── init.md
│ ├── plan.md
│ ├── execute.md
Expand All @@ -191,6 +199,9 @@ para-programming-plugin/
│ ├── status.md
│ ├── check.md
│ └── help.md
├── cursor/ # Cursor IDE setup
│ ├── commands/ # Cursor slash commands (para-init.md, etc.)
│ └── rules/ # Cursor rules (para-workflow.mdc)
├── hooks/ # Event handlers
│ ├── hooks.json
│ └── para-session-start.sh
Expand All @@ -212,26 +223,34 @@ para-programming-plugin/
## 🎯 Key Features

### Structured Planning

Every task starts with a plan that includes:

- Clear objective
- Step-by-step approach
- Risk analysis
- Success criteria

### Persistent Context

Context persists across sessions:

- Active plans tracked in `context/context.md`
- Summaries document what was done
- Archives preserve historical state

### Git Integration

PARA workflow integrates with git:

- Creates feature branches automatically
- Tracks to-dos as commits
- Generates summaries from diffs

### Token Efficiency

Minimizes token usage through:

- Structured context files
- MCP preprocessing (optional)
- Selective loading of relevant context
Expand Down
23 changes: 23 additions & 0 deletions cursor/commands/para-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# PARA Archive – Archive context and reset for the next task

Archive the current context so you can start the next task with a clean slate.

## What to do

1. **Check** – Ensure `context/context.md` exists.

2. **Timestamp** – Use current time in `YYYY-MM-DD-HHMM` format.

3. **Move** – Move `context/context.md` to `context/archives/YYYY-MM-DD-HHMM-context.md`.

4. **New context** – Create a fresh `context/context.md` with:
- A short "Current Work Summary" (e.g. "Ready for next task.")
- JSON: `active_context: []`, `completed_summaries: []` (or carry forward recent summary paths if useful), `last_updated` (current ISO timestamp).

5. **Confirm** – Tell the user the previous context was archived and where. Remind them to run `/para-plan` for the next task and `/para-status` or `/para-help` as needed.

## When to use

- Work is done and summarized.
- Starting a new, unrelated task.
Do not archive if work is still in progress or you need the current context for the next message.
18 changes: 18 additions & 0 deletions cursor/commands/para-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PARA Check – Should we use the PARA workflow?

Decide whether the user’s request should go through the full PARA workflow or be answered directly.

## What to do

1. **Request** – Use the user’s last message or the request they pasted (e.g. "Add auth to the API" or "Where is the login handler?").

2. **Apply this decision tree**
- **Asking for code or file changes?** (features, bugs, refactors, config, DB, tests, docs that affect code) → **Use PARA**: create a plan, then execute, summarize, archive.
- **Otherwise, asking about this project’s code?** (where is X, how does Y work) → **Skip PARA**: answer directly with file references.
- **Otherwise** (general or off-topic) → **Skip PARA**: answer normally.

3. **Respond** – State clearly: "Use PARA workflow" or "Skip PARA; answer directly." Briefly say why (e.g. "This involves code changes" or "This is a read-only question"). If USE PARA, suggest running `/para-plan` with a short task description.

## Rule of thumb

If it would result in git changes to project files, use PARA. If it’s read-only or informational, skip PARA.
22 changes: 22 additions & 0 deletions cursor/commands/para-execute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# PARA Execute – Start execution with branch and to-dos

Execute the active plan: create a branch and turn the plan into a trackable to-do list in `context/context.md`.

## What to do

1. **Read context** – Open `context/context.md` and find the active plan(s). If there is a `phased_execution` block, treat this as a phased plan.

2. **Phased plan** – If phased, ask which phase to execute (or use the user’s choice). Create branch `para/{task-name}-phase-N`. Set that phase’s status to "in_progress" in context.

3. **Simple plan** – Create branch `para/{task-name}` (from the plan filename).

4. **Branch** – Create the git branch (e.g. `git checkout -b para/{task-name}`). If user said no branch or continue on current branch, skip branch creation.

5. **To-dos** – From the plan file(s), extract implementation steps into a clear to-do list. Update `context/context.md` with:
- Human-readable “Current Work Summary” describing the task.
- A to-do list (e.g. `- [ ] Step 1`, `- [ ] Step 2`).
- Ensure the JSON block has the active plan in `active_context` and updated `last_updated`.

6. **First commit** – Commit the updated `context/context.md` with a message like "chore: Initialize execution context".

7. **Remind** – Tell the user to work through the to-dos, mark items `[x]` as done, and **commit after each completed to-do** with the to-do text as the commit message. When done, run `/para-summarize`.
29 changes: 29 additions & 0 deletions cursor/commands/para-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# PARA Help – Full PARA-Programming guide

Give a concise but complete overview of PARA-Programming and how to use it in Cursor.

## What to include

1. **What is PARA** – Structured workflow for AI-assisted development: plan before coding, capture outcomes. Goals: accuracy, token efficiency, auditability.

2. **The workflow** – Plan → Review → Execute → Summarize → Archive. Briefly say what each step is for.

3. **When to use PARA**
- Use for: code changes, features, bugs, refactors, config, DB changes, tests, architecture decisions.
- Skip for: "Where is X?", "How does Y work?", explanations, navigation, simple questions.

4. **Cursor commands** – List these and one-line descriptions:
- `/para-init` – Initialize PARA in this project
- `/para-plan` – Create a plan (add task description)
- `/para-execute` – Start execution (branch + to-dos)
- `/para-summarize` – Write summary from current work
- `/para-archive` – Archive context for next task
- `/para-status` – Show current state
- `/para-check` – Decide: use PARA or answer directly
- `/para-help` – This guide

5. **Quick start** – If no `context/` yet: run `/para-init`. Then `/para-plan "your task"`, review the plan, `/para-execute`, work through to-dos (commit each), then `/para-summarize` and `/para-archive`.

6. **Rule of thumb** – If it results in git changes, use PARA. If it’s read-only, skip it.

Keep the reply scannable (short paragraphs, bullets, maybe a small table). Offer to run a specific command if the user wants to try one next.
29 changes: 29 additions & 0 deletions cursor/commands/para-init.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# PARA Init – Initialize PARA structure

Set up the complete PARA-Programming environment in this project.

## What to do

1. **Global methodology** – If `~/.claude/CLAUDE.md` does not exist, create `~/.claude` and copy or create the global PARA workflow file there (never overwrite if it exists).

2. **Project directories** – Create:

```
context/data
context/plans
context/summaries
context/archives
context/servers
```

3. **context/context.md** – Create with:
- A short "Current Work Summary" (e.g. "Ready to start first task.")
- A JSON block: `active_context: []`, `completed_summaries: []`, `last_updated` (current ISO timestamp).

4. **Project CLAUDE.md** – If the project root has no `CLAUDE.md`, create one that references the global workflow at `~/.claude/CLAUDE.md` and adds project-specific context (or leave placeholders).

5. **Confirm** – List what was created and suggest next steps: run `/para-plan` with a task description, then `/para-status` and `/para-help` as needed.

## After setup

Tell the user the PARA workflow is ready and remind them: **Plan → Review → Execute → Summarize → Archive**. Use PARA for code changes and file modifications; skip it for simple questions and navigation.
29 changes: 29 additions & 0 deletions cursor/commands/para-plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# PARA Plan – Create a plan for the current task

Create a planning document for the task the user describes (or ask for a task description if none was given).

## What to do

1. **Task** – Use the user’s task description from this chat, or ask for one.

2. **Scope** – Decide if this is a simple plan (one file) or a phased plan (master + sub-plans). Prefer a phased plan when:
- Many files or layers (e.g. DB → API → frontend)
- Multiple services or clear phases
- Work benefits from incremental review/merge

3. **Simple plan**
- Create `context/plans/YYYY-MM-DD-{task-name}.md` (sanitize task name: lowercase, hyphens).
- Sections: Objective, Approach, Risks, Data Sources, MCP Tools (if any), Success Criteria.
- Update `context/context.md`: add the plan path to `active_context`, set `last_updated`.

4. **Phased plan** (if you offered and user agreed)
- Create master: `context/plans/YYYY-MM-DD-{task-name}.md` with overall objective and phase list.
- Create one file per phase: `context/plans/YYYY-MM-DD-{task-name}-phase-1.md`, etc., with phase objective, steps, risks, success criteria.
- Update `context/context.md`: add all plan paths to `active_context` and add a `phased_execution` block (master_plan, phases array with phase number, plan path, status "pending", current_phase null).

5. **Review** – Tell the user where the plan(s) live and ask them to review before running `/para-execute`.

## Notes

- Always use a `YYYY-MM-DD` date prefix for plan filenames.
- If the project has no `context/` yet, run the PARA init steps first (create directories and `context/context.md`).
18 changes: 18 additions & 0 deletions cursor/commands/para-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PARA Status – Show current workflow state

Show where we are in the PARA workflow.

## What to do

1. **Read** – Open `context/context.md`. If it or the `context/` directory does not exist, say "PARA not initialized" and suggest running `/para-init`.

2. **Report** – Summarize in a clear, scannable format:
- **Current work** – The human-readable summary at the top of context.md.
- **Active plans** – List paths in `active_context` that are plans (in `context/plans/`).
- **Completed summaries** – List paths in `completed_summaries` (and any in the JSON).
- **Last updated** – The `last_updated` value from the JSON.
- **Phased execution** – If `phased_execution` exists, show current phase and phase statuses.

3. **Next action** – Suggest the next step (e.g. "Continue executing the plan and run /para-summarize when done" or "Run /para-plan to create a plan" if there are no active plans).

Use a simple layout (e.g. short headings and bullet lists) so the user can scan quickly.
Loading