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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ context/
.obsidian/
skills/
plane-cli-*.tgz
.mimosa/
.video_agent/
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Added support for the project-page operations documented at the time for Plane C

## 0.4.4

Closes the two verification items left open by v0.4.3 (both implemented offline against documented field names, never confirmed live) plus one agent-facing discovery nicety. See [pages-support-root-cause.md](context/research/lessons-learned/pages-support-root-cause.md) and [production-use-gap-report.md](context/research/lessons-learned/production-use-gap-report.md).
Closes the two verification items left open by v0.4.3 (both implemented offline against documented field names, never confirmed live) plus one agent-facing discovery nicety. The local research notes are `context/research/lessons-learned/pages-support-root-cause.md` and `context/research/lessons-learned/production-use-gap-report.md`.

### Polish
- **`discover` advertises Plane Pages (un)support** — `discover context` and `discover issue-inputs` now include an additive `capabilities.pages` field (`{ supported, reason }`) so AI agents can skip the Pages surface instead of probing and hitting a 404. The probe is a lightweight, non-fatal GET of the project-pages endpoint: a 404 reports `supported: false`, a success reports `supported: true`, and any probe error (or no project in context) reports `supported: null` — the probe can never make `discover` fail, and `--json` output stays pure JSON.
Expand All @@ -56,7 +56,7 @@ Closes the two verification items left open by v0.4.3 (both implemented offline

## 0.4.3

Clears the actionable items from the 2026-07-10 production-use gap report. See [production-use-gap-report.md](context/research/lessons-learned/production-use-gap-report.md).
Clears the actionable items from the 2026-07-10 production-use gap report. The local research note is `context/research/lessons-learned/production-use-gap-report.md`.

### Bug fixes
- **Ambiguous sequence refs no longer resolve to the wrong issue** — `findIssueBySeq` picked the first of any issues sharing a `sequence_id` (real in migrated/imported projects) and mutated it while reporting success. It now aborts on duplicates, listing every candidate by UUID + state + title, and requires an unambiguous UUID. **P1 / data-integrity.**
Expand All @@ -78,7 +78,7 @@ Clears the actionable items from the 2026-07-10 production-use gap report. See [

## 0.4.2

Stability + clean-workflow release. Clears confirmed open bugs and the missing idempotent label command, and hardens CI and the release process. (Shipped to `main`; see the git history and `docs/roadmap.md`.)
Stability and workflow release. Clears confirmed open bugs, adds idempotent label creation, and hardens CI and the release process.

### Bug fixes
- Fixed the doubled identifier on `issue close` / `reopen` / `delete` — confirmation strings now print `PROJ-N` once, derived from the resolved sequence id instead of the raw argument
Expand Down
34 changes: 6 additions & 28 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,11 @@
# CLAUDE.md
# Working on Plane CLI

Entry point for AI agents working on `plane-cli`. Read the canonical context before touching code.
Read the [contributor guide](CONTRIBUTING.md) for setup and verification. The [architecture guide](docs/architecture.md) explains command registration, context resolution, and API compatibility. The [roadmap](docs/roadmap.md) and [changelog](CHANGELOG.md) cover plans and release history.

## Start here
## Local checkout guidance

- **[context/docs/briefs/agent.md](context/docs/briefs/agent.md)** — full briefing: what the project is, tech stack, architecture, Plane API quirks (issues vs work-items), config storage, command-resolution rules, and the release checklist. **Read this first.**
- **[context/docs/project/current-state.md](context/docs/project/current-state.md)** — living summary of the current repo state: version, command surface, behavioral guarantees, and where planning lives.
- **[docs/roadmap.md](docs/roadmap.md)** — shipped releases and the planned backlog.
- **[CHANGELOG.md](CHANGELOG.md)** — release history.
Read `context/docs/briefs/agent.md` before editing code when it is available. Check `context/docs/project/current-state.md` for the local project summary.

## How work flows here
Follow `AGENTS.md` and `skills/capture-user-report/SKILL.md` when present. Capture reports verbatim in `context/research/user-reports/` before triage.

- **User reports / feedback** → capture verbatim first with the `capture-user-report` skill ([skills/capture-user-report/SKILL.md](skills/capture-user-report/SKILL.md)) into `context/research/user-reports/`, then triage to `context/research/lessons-learned/`, then (optionally) a roadmap entry. See [AGENTS.md](AGENTS.md).
- **Cutting a release** → use the `release-plane-cli` skill ([skills/release-plane-cli/SKILL.md](skills/release-plane-cli/SKILL.md)). Prepare the edits, commit, and push a `vX.Y.Z` tag; the release workflow builds, verify-packs, creates the release, and uploads the `.tgz`.
- **Context folder** → `context/` is local working memory (research, plans, references), separate from the source tree. See [context/README.md](context/README.md).

## Dev quickstart

```bash
bun install # or: npm install
bun run typecheck
bun run lint
bun run format:check
bun run build
bun test
```

CI (`.github/workflows/ci.yml`) runs typecheck, lint, format:check, build, and test on every push and PR. Keep `src/` prettier-clean or CI fails.

## Boundaries

Commands live in `src/commands/` (thin handlers); shared logic in `src/core/`. No npm-registry publish, no standalone binaries, no server/infra management. Install is always from a GitHub release `.tgz` asset — never the bare `github:` form (broken Windows junctions).
For an authorized release, follow `skills/release-plane-cli/SKILL.md` if present. The [release workflow](.github/workflows/release.yml) builds, validates, and uploads the npm tarball when a version tag is pushed. Installation uses that GitHub release asset.
55 changes: 23 additions & 32 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,36 @@
# Contributing
# Contributing to Plane CLI

Thanks for contributing to `plane-cli`.
[Documentation](docs/README.md) · [Architecture](docs/architecture.md) · [Roadmap](docs/roadmap.md)

Bun is used for local development. Node.js 20+ is required for users installing the CLI — Bun is only needed if you are working on the source.
## Develop locally

## Principles

- Keep the CLI API-driven
- Avoid Plane-server-specific assumptions
- Prefer stable command verbs over ad hoc flags
- Keep human-readable output clean and add machine-readable output deliberately

## Development
Use Node.js 20 or later. Install dependencies with npm and run the compiled CLI from the checkout.

```bash
bun install
bun run typecheck
bun run build
bun test
npm ci
npm run build
node dist/cli.js --help
```

## Testing
If you use Bun, `bun install` installs dependencies and `bun run dev --help` runs the CLI directly from TypeScript. Use `bun run test` to run the repository's Vitest script.

Tests are organized in `tests/`:
## Verify changes

```
tests/
├── core/
│ ├── api-client.test.ts # HTTP client, retry logic, pagination (24 tests)
│ ├── config-store.test.ts # Config loading/saving, env vars (18 tests)
│ └── resolvers.test.ts # Issue ref parsing, name resolution (21 tests)
└── smoke/
└── cli-smoke.test.ts # Version, help, command presence (3 tests)
Run the CI checks from the repository root.

```bash
npm run typecheck
npm run lint
npm run format:check
npm run build
npm test
```

Run tests: `npm test` or `bun test`
Run with coverage: `npm run test -- --coverage`
The build refreshes `dist/cli.js` before the CLI smoke tests use it. Test suites under `tests/core/` exercise shared utilities, `tests/commands/` cover command behavior, and `tests/smoke/` cover the compiled entry point and opt-in live checks. Live tests create or modify issues. They require `PLANE_CLI_LIVE_TESTS=1` and a dedicated `PLANE_TEST_PROJECT`. See the individual tests for additional variables.

## Project Boundaries
## Work on commands

- Commands live in `src/commands/`
- Shared logic belongs in `src/core/`
- Avoid coupling command handlers directly to HTTP details
- Keep auth/context behavior reusable across command groups
- Keep command registration and orchestration in `src/commands/` and reusable behavior in `src/core/`.
- Use the Plane public API and account for the supported issue endpoint styles.
- Preserve existing command syntax and machine-readable output when adding options.
- Update command help and the relevant guide when behavior changes. Record user-facing changes in the changelog.
Loading
Loading