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
6 changes: 0 additions & 6 deletions .claude/skills/new-plugin/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,12 @@ Only include if the plugin registers hooks.
}
```

**`ralph.yml`** — copy from `apps/claude-code/auto-format/ralph.yml`, replace the comment header plugin name.

**`PROMPT.md`** — minimal stub: `# <Plugin Name> — Ralph Prompt\n\nDescribe the task here.`

**`CHANGELOG.md`** — use the exact format from `apps/claude-code/auto-format/CHANGELOG.md` as template. Include only `## [Unreleased]` with empty Breaking/Added/Fixed subsections — no historical version entry yet.

**`README.md`** — one-paragraph description of what the plugin does.

**`CLAUDE.md`** — plugin-specific guidance (not a symlink at the plugin level; see `auto-format/CLAUDE.md` for structure).

**`docs/plans/README.md`** — stub with: `# Spec Roadmap\n\nSpec files for this plugin go here.`

**`scripts/`** and **`tests/`** — empty directories, only if the plugin has scripts or tests.

## Bundled resources
Expand Down
8 changes: 2 additions & 6 deletions .claude/skills/new-plugin/references/package-json-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ Use this as the starting shape for a new plugin's `package.json`. Copy `packageM
"bump": "unic-bump",
"sync-version": "unic-sync-version",
"tag": "unic-tag",
"verify:changelog": "unic-verify-changelog",
"ralph": "ralph run -c ralph.yml -H builtin:code-assist"
"verify:changelog": "unic-verify-changelog"
},
"devDependencies": {
"@ralph-orchestrator/ralph-cli": "catalog:",
"@types/node": "catalog:",
"@unic/release-tools": "workspace:*",
"@unic/tsconfig": "workspace:*",
Expand Down Expand Up @@ -51,11 +49,9 @@ Omit `test`, `typecheck`, and the `@types/node`/`@unic/tsconfig`/`typescript` de
"bump": "unic-bump",
"sync-version": "unic-sync-version",
"tag": "unic-tag",
"verify:changelog": "unic-verify-changelog",
"ralph": "ralph run -c ralph.yml -H builtin:code-assist"
"verify:changelog": "unic-verify-changelog"
},
"devDependencies": {
"@ralph-orchestrator/ralph-cli": "catalog:",
"@unic/release-tools": "workspace:*"
}
}
Expand Down
41 changes: 14 additions & 27 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,20 @@ packages/
├── tsconfig/ # @unic/tsconfig
└── release-tools/ # @unic/release-tools (bump / sync-version / tag / verify-changelog)
docs/
└── plans/ # Monorepo-level Spec Runner roadmap (specs 00–14)
├── adr/ # Architectural Decision Records
├── agents/ # Agent skill documentation
├── inbox/ # Raw ideas pending triage
├── issues/ # Grilled and scoped feature issues
├── plans/ # Retired spec files (historical)
├── process/ # Process and workflow guides
└── research/ # Research notes and explorations
```

Each plugin under `apps/<agent>/` also has its own `docs/plans/` for plugin-specific future work.

## Navigation

- Plugin manifests: `apps/<agent>/<plugin>/.claude-plugin/plugin.json` and `marketplace.json`
- Shared release scripts: `packages/release-tools/scripts/`
- Monorepo roadmap: `docs/plans/`
- Architectural decisions: `docs/adr/`
- Process templates: `docs/process/`

## Commands
Expand All @@ -42,12 +46,10 @@ pnpm format # Biome + Prettier fix (whole tree)
pnpm ci:check # same as check, non-interactive (for CI)
pnpm test # run tests across all packages
pnpm typecheck # type-check across all packages
pnpm ralph # run the monorepo Spec Runner loop (specs 00–14)

# Per-plugin operations (after spec 03 sets up release-tools)
# Per-plugin operations
pnpm --filter <name> bump patch # bump plugin version
pnpm --filter <name> verify:changelog # check changelog
pnpm --filter <name> ralph # run that plugin's own Spec Runner loop
```

## Tech stack
Expand Down Expand Up @@ -79,7 +81,7 @@ Tag scheme: `<plugin-name>@<version>` (e.g. `auto-format@0.5.5`).

## Conventional commits

Use package scope: `feat(auto-format): …`, `fix(pr-review): …`, `chore(release-tools): …`, `chore(spec-NN): …`.
Use package scope: `feat(auto-format): …`, `fix(pr-review): …`, `chore(release-tools): …`, `chore(unic-archon-dlc): …`.

## Git branching (Gitflow)

Expand Down Expand Up @@ -110,34 +112,19 @@ To ship a new plugin version:
| Push to `develop` | ✓ | ✓ (changed packages) | — |
| Push to `main` | ✓ | ✓ (changed packages) | — |

## Spec-driven development

All work starts with a spec file under `docs/plans/`. Specs follow this format:

```
# NN. Title
**Priority:** / **Effort:** / **Version impact:** / **Depends on:** / **Touches:**
## Context
## Current behaviour
## Target behaviour
## Affected files
## Implementation steps
## Verification
## Acceptance criteria
## Out of scope
```
## Feature-driven development

`pnpm ralph` runs the Spec Runner (currently `ralph-orchestrator`), which implements specs one at a time in a loop.
New work enters through the issue tracker as Features. Use `/tdd` to implement individual issues, or `unic-dlc-build` (via `unic-archon-dlc`) once the harness is set up in this repo.

## Do not add

- External runtime deps to plugins unless truly essential (`auto-format` has zero; that's the bar)
- Turborepo or other build orchestrators — plain pnpm workspaces is the current choice
- Features not described in an open spec file — open a spec first
- Features not tracked in the issue tracker — open a Feature first

## LICENSE files

**Never create, copy, or delete `LICENSE` files.** The maintainer manages these manually in every package and plugin directory. If a spec step or acceptance criterion requires a `LICENSE` file to exist, warn the maintainer to add it themselves before continuing.
**Never create, copy, or delete `LICENSE` files.** The maintainer manages these manually in every package and plugin directory. If an acceptance criterion requires a `LICENSE` file to exist, warn the maintainer to add it themselves before continuing.

## Skill summary

Expand Down
2 changes: 1 addition & 1 deletion CONTEXT-MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Shared vocabulary

- [Monorepo](./CONTEXT.md) — Plugin, Workspace Package, Release, Spec, Spec Runner, Consumer
- [Monorepo](./CONTEXT.md) — Plugin, Workspace Package, Release, Feature, Feature Runner, Consumer

## Plugin contexts

Expand Down
16 changes: 2 additions & 14 deletions CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,12 @@ _Avoid_: package (too generic), library, module
A versioned, tagged snapshot of a single Plugin published to `main`. A per-Plugin event — there is no monorepo-wide release.
_Avoid_: deploy, publish, version bump

**Spec**:
A structured markdown file under `docs/plans/` that defines a unit of work with context, target behaviour, and acceptance criteria. The atomic input to the Spec Runner.
_Avoid_: ticket, task, issue, story

**Spec Runner**:
The agent automation that reads Specs and implements them one at a time. Currently backed by `ralph-orchestrator` but the concept is tool-agnostic.
_Avoid_: Ralph, Ralph Orchestrator (tool-specific, not domain terms)

**Feature**:
A self-contained unit of work tracked as a directory under `docs/issues/<slug>/`, containing a PRD and numbered implementation issues. The atomic input to the Feature Runner.
_Avoid_: ticket, epic, story

**Feature Runner**:
The skill that implements a Feature's issues end-to-end in one worktree, branch, and pull request. Parallel concept to Spec Runner, but driven by the issue tracker rather than `docs/plans/`.
The skill that implements a Feature's issues end-to-end in one worktree, branch, and pull request. Backed by `unic-dlc-build`.
_Avoid_: issue runner, queue runner

**Consumer**:
Expand All @@ -45,8 +37,7 @@ _Avoid_: client, user repo, target repo, host repo
- A **Plugin** belongs to one agent ecosystem (e.g., Claude Code) and has zero or more **Releases**
- A **Claude Code Plugin** is a **Plugin** — the inverse is not always true
- A **Workspace Package** supports **Plugin** development but is not itself a **Plugin**
- A **Spec** drives exactly one **Spec Runner** iteration
- A **Feature** drives one **Feature Runner** execution — a Feature is to the Feature Runner what a Spec is to the Spec Runner
- A **Feature** drives one **Feature Runner** execution
- A **Consumer** installs one or more **Plugins**

## Example dialogue
Expand All @@ -56,6 +47,3 @@ _Avoid_: client, user repo, target repo, host repo

> **Dev:** "A Consumer reported the auto-format Plugin failing on Windows."
> **Domain expert:** "That's a cross-platform gap. Plugins must use Node.js APIs — no shell commands or POSIX paths."

> **Dev:** "Can I use Ralph to implement this Spec?"
> **Domain expert:** "You mean the Spec Runner — Ralph is just the current tool backing it."
92 changes: 17 additions & 75 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Contributing

This monorepo uses a spec-driven development workflow. For the full lifecycle — from idea capture through grilling, PRD, issues, execution, and QA — see **[`docs/process/development-workflow.md`](docs/process/development-workflow.md)**.
This monorepo uses a Feature-driven development workflow. For the full lifecycle — from idea capture through grilling, PRD, issues, execution, and QA — see **[`docs/process/development-workflow.md`](docs/process/development-workflow.md)**.

New features and fixes are described in self-contained spec files under `docs/plans/`. Implementation is automated with the **Spec Runner** (`pnpm ralph`, currently backed by `ralph-orchestrator`) or done by hand following the same steps.
New features and fixes are tracked as Features in the issue tracker under `docs/issues/<slug>/`. Implementation is driven by the **Feature Runner** (`/implement-feature`) or done manually using `/tdd` for individual issues.

## Cross-cutting standards

Expand Down Expand Up @@ -48,95 +48,37 @@ Enforced by Biome (`pnpm ci:check`) for `.mjs`/`.js`/`.ts`/`.json`/`.css` and Pr

- Zero external runtime deps unless essential (`auto-format` ships zero; `unic-confluence` has `marked` — that's the bar).
- Zero-config from the user's perspective: no configuration files users must create beyond credentials.
- Every plugin uses the spec-driven workflow: `docs/plans/` + `ralph.yml` + `PROMPT.md` per the template in `docs/process/`.
- New plugin work enters through the issue tracker as Features — open a Feature before starting implementation.

### License

LGPL-3.0-or-later for all packages in this monorepo.

## Prerequisites

| Tool | Version | How to get it |
| --------------- | ----------------------------------------------- | -------------------------------------------------------------------------------- |
| Node.js | ≥ 22 (see `.nvmrc` for the recommended version) | [nodejs.org](https://nodejs.org) |
| pnpm | ≥ 10 | `npm install -g pnpm` |
| Claude Code CLI | latest | [claude.ai/code](https://claude.ai/code) — required as the Spec Runner's backend |
| Tool | Version | How to get it |
| --------------- | ----------------------------------------------- | ---------------------------------------- |
| Node.js | ≥ 22 (see `.nvmrc` for the recommended version) | [nodejs.org](https://nodejs.org) |
| pnpm | ≥ 10 | `npm install -g pnpm` |
| Claude Code CLI | latest | [claude.ai/code](https://claude.ai/code) |

Everything else (ralph-orchestrator, Biome, Prettier, TypeScript) is a workspace devDependency and installs with:
Everything else (Biome, Prettier, TypeScript) is a workspace devDependency and installs with:

```sh
pnpm install
```

**ralph-loop** is a Claude Code plugin and must be installed once globally:
## Starting new work

```sh
claude plugins install anthropics/claude-plugins-official/plugins/ralph-loop
```

## Writing a spec

All work starts with a spec file. See the existing specs under `docs/plans/` for examples.

### 1. Pick a number

Check `docs/plans/README.md` for the current highest spec number. Create `docs/plans/NN-short-slug.md`.

### 2. Required metadata

```markdown
# NN. Title

**Priority:** P0 | P1 | P2
**Effort:** XS | S | M | L
**Version impact:** none | patch (plugin: <name>) | minor (plugin: <name>) | major (plugin: <name>)
**Depends on:** (spec numbers, or "none")
**Touches:** (comma-separated files/dirs)
```

### 3. Required sections

| Section | What to write |
| ------------------------- | ---------------------------------------- |
| `## Context` | Why this change is needed |
| `## Current behaviour` | Exact code/behaviour _before_ the change |
| `## Target behaviour` | What it should look like _after_ |
| `## Affected files` | Table: path → Create / Modify / Delete |
| `## Implementation steps` | Numbered steps with before → after diffs |
| `## Verification` | Shell commands + expected output |
| `## Acceptance criteria` | Checkbox list |
| `## Out of scope` | Explicit list of things NOT to change |

Good specs are **self-contained** — the Spec Runner has no memory of prior runs. Include actual code snapshots.
All work enters through the issue tracker as a Feature. The recommended flow:

### 4. Register the spec
1. Capture the idea with `/inbox <one-liner>` or open a GitHub Issue directly.
2. Grill the design with `/grill-me` or `/grill-with-docs` until the problem and solution are clear.
3. Create a PRD and issues with `/to-prd` → `/to-issues`.
4. Implement: `/implement-feature <slug>` for automated AFK execution, or `/tdd` manually for individual issues.
5. Open a PR targeting `develop`.

Add a row to the execution order table in `docs/plans/README.md`.

## Running the Spec Runner

```sh
pnpm ralph
```

The Spec Runner reads `ralph.yml`, which points to `PROMPT.md`. Each iteration implements one spec, commits, and stops. Run `pnpm ralph` again for the next spec.

- **Stop early**: `Ctrl+C`
- **Resume**: `pnpm ralph` again — it finds the first unfinished spec
- **Paused for review**: a `## Questions` section in a spec means the Spec Runner emitted `LOOP_COMPLETE` — answer the question, remove the section, re-run

## Running manually (without the Spec Runner)

Follow the steps in `PROMPT.md` yourself, replacing the Spec Runner's role.

## Running per-plugin Spec Runner loops

Each plugin also has its own `ralph.yml` + `PROMPT.md` for plugin-specific development. Run from inside the plugin directory:

```sh
cd apps/claude-code/pr-review
pnpm ralph
```
See [`docs/process/development-workflow.md`](docs/process/development-workflow.md) for the full 8-phase lifecycle.

## Verification commands

Expand Down
Loading
Loading