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
14 changes: 14 additions & 0 deletions .agents/skills/parallel/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: parallel
description: Plan, launch, inspect, reconcile, and remove isolated development lanes backed by Git worktrees and per-lane state sandboxes. Use when work can be split into disjoint file footprints, when the user requests parallel development, or when inspecting existing agent lanes.
---

# Parallel Development

1. Work from the repository root.
2. Read `config/dev-model.yaml` and `docs/agentic-dev-kit/workflows/parallel.md` completely.
3. Follow the requested action. With no action, show the read-only lane board.
4. Resolve engine paths from the repository root; support both `scripts/dev_session.sh` and a namespaced adopted path such as `scripts/devkit/dev_session.sh`.
5. Use the current runtime's supported parallel-task mechanism. Do not assume peer messaging, model selection, background execution, or automatic terminal launch unless the runtime exposes it.
6. Preserve the cockpit/lane ownership boundary and require disjoint source-file footprints before launch.
7. For behavioral changes to lane safety, read and apply `docs/agentic-dev-kit/safety-critical-changes.md`.
4 changes: 4 additions & 0 deletions .agents/skills/parallel/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Parallel Development"
short_description: "Plan and coordinate isolated work lanes"
default_prompt: "Use $parallel to plan or coordinate isolated development lanes with disjoint file ownership."
13 changes: 13 additions & 0 deletions .agents/skills/pr-watch/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: pr-watch
description: Drive a pull request through the deterministic poll, fix, acknowledge, and re-poll loop until CI is green and review findings are resolved. Use after opening or updating a pull request, when asked to watch CI or reviews, or when a task must continue until its PR is green and clean.
---

# PR Watch

1. Work from the repository root.
2. Read `config/dev-model.yaml` and `docs/agentic-dev-kit/workflows/pr-watch.md` completely.
3. Follow the workflow for the PR number in the user's request, or the current branch's PR when none is supplied.
4. Resolve the engine path from the repository root; support both `scripts/pr_watch.py` and a namespaced adopted path such as `scripts/devkit/pr_watch.py`.
5. Use `review.fallback_commands` for the current runtime when configured. Never treat an unavailable review bot as a review waiver.
6. For safety-critical changes, also read and apply `docs/agentic-dev-kit/safety-critical-changes.md` before recommending merge.
4 changes: 4 additions & 0 deletions .agents/skills/pr-watch/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "PR Watch"
short_description: "Drive a pull request to green"
default_prompt: "Use $pr-watch to monitor a pull request, address findings, and continue until it is green and clean."
13 changes: 13 additions & 0 deletions .agents/skills/session-start/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: session-start
description: Build a concise start-of-session briefing from the living handoff, friction log, repository state, open pull requests, CI, and configured tracker. Use at the beginning of a development session, when resuming work after a gap, or when asked what the repository should do next.
---

# Session Start

1. Work from the repository root.
2. Read `config/dev-model.yaml` and resolve configured paths from it.
3. Read `docs/agentic-dev-kit/workflows/session-start.md` completely.
4. Follow that workflow using the user's request as additional session context.
5. Use the current runtime's available tools for independent reads and delegation. Treat configured model names as capability guidance; do not claim a model switch the runtime cannot perform.
6. Keep the briefing read-only unless the user explicitly asks to begin the recommended work.
4 changes: 4 additions & 0 deletions .agents/skills/session-start/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Session Start"
short_description: "Brief the next development session"
default_prompt: "Use $session-start to inspect the repository and recommend the highest-priority next task."
13 changes: 13 additions & 0 deletions .agents/skills/wrap-up/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: wrap-up
description: Close a meaningful development session by updating the living handoff, capturing workflow friction, checking document budgets, and preserving one clear next step. Use when the user asks to wrap up, hand off, end a session, or record what shipped for the next agent.
---

# Wrap Up

1. Work from the repository root.
2. Read `config/dev-model.yaml` and resolve configured paths from it.
3. Read `docs/agentic-dev-kit/workflows/wrap-up.md` completely.
4. Follow that workflow using the current conversation and repository diff as the session record.
5. Preserve unrelated user changes. Do not claim that work shipped unless the repository and pull-request state support it.
6. Use the current runtime's review and commit mechanisms; require user authorization for external mutations not already requested.
4 changes: 4 additions & 0 deletions .agents/skills/wrap-up/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
interface:
display_name: "Wrap Up"
short_description: "Close a session and preserve context"
default_prompt: "Use $wrap-up to record what shipped, capture friction, and leave a clear next step."
22 changes: 13 additions & 9 deletions .claude/commands/adopt.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ the repo lacks, point the config at conventions it already has, and never clobbe
file. The counterpart to `init.sh` (which assumes a fresh/near-empty repo). Runs
non-destructively on a branch; the operator confirms the plan before anything is written.

> **Why a skill, not `cp -r`.** A blind copy-in clobbers an existing `.claude/`, config,
> **Why a skill, not `cp -r`.** A blind copy-in clobbers existing agent adapters, config,
> plan doc, and CI. Adopting into a mature repo is a *judgment* pass — which pieces are
> already present, where the scripts should live, what the config should point at — so
> it's a guided skill, not a script.
Expand All @@ -25,7 +25,8 @@ of it from the target repo's root.
Run these probes and record the answers — they drive the plan:

- **Living plan?** `ls ROADMAP.md PLAN.md docs/plan.md docs/handoff.md handoff.md 2>/dev/null`. If one exists, the repo already practices Principle #1 — you'll point the kit at it, not add a second plan.
- **Skill collisions?** `ls .claude/commands/ 2>/dev/null` — which of the kit's skills (`session-start`, `wrap-up`, `parallel`, `pr-watch`, `triage-friction-log`, `post-merge-systemize`) already exist? Keep theirs; install only the rest.
- **Skill collisions?** Inspect `.claude/commands/` and `.agents/skills/`. Which of the kit's workflows already exist for either runtime? Keep the adopter's implementation and install only the missing adapters.
- **Persistent agent rules?** Read `AGENTS.md` and `CLAUDE.md` when present. Merge the relevant snippets; never replace either file.
- **Config dir?** `ls -d config 2>/dev/null` — where `config/dev-model.yaml` goes (repo root if there's no `config/`).
- **`scripts/` layout?** `ls scripts 2>/dev/null` — if it's organized into subdirs, or has files that collide with the kit's script names, vendor the kit's under `scripts/devkit/`; otherwise `scripts/` is fine.
- **Tracker?** `gh issue list -L1 2>/dev/null` succeeds → GitHub Issues; else look for a Linear/Jira setup. Sets `tracker.backend`.
Expand All @@ -40,6 +41,7 @@ Present a table the operator confirms **before any write**:
|---|---|---|
| Living plan (#1) | e.g. has `ROADMAP.md` | **config-point** `paths.handoff` → it; keep it (or offer to rename → `handoff.md`) |
| `wrap-up` skill | has its own | **skip** |
| Codex adapters | none | **install** under `.agents/skills/` |
| friction-log (#2) | none | **install** |
| parallel + `state_paths` (#3) | none | **install** (under `scripts/devkit/` if `scripts/` is organized) |
| `pr-watch` (#5), safety rule (#6) | none | **install** |
Expand All @@ -57,20 +59,21 @@ git checkout -b chore/adopt-agentic-dev-kit

For each piece, **copy only if the target doesn't already exist**:

- **Skills** → `.claude/commands/` (skip any that collide with an existing one).
- **Engine scripts** → `scripts/devkit/` (or `scripts/` if clean). If you namespaced them, rewrite the `scripts/…` references in the copied skills to match (`sed -i '' 's#scripts/#scripts/devkit/#g' .claude/commands/<skill>.md`). The scripts find the repo root by walking up for `.git`, so they work at any depth.
- **`.claude/rules/safety-critical-changes.md`** (skip if present).
- **`config/dev-model.yaml`** — stamp the Step-1 values: `paths.handoff` → the existing plan (and `paths.handoff_history` / the `doc_budgets` entry to match), `tracker`, `review`, `models`.
- **Shared workflows** → `docs/agentic-dev-kit/workflows/`.
- **Runtime adapters** → `.claude/commands/` and `.agents/skills/` (skip any target that collides with an existing workflow).
- **Engine scripts** → `scripts/devkit/` (or `scripts/` if clean). Set `paths.engines` to that directory; do not rewrite prompt files. The scripts find the repo root by walking up for `.git`, so they work at any depth.
- **Safety doctrine** → `docs/agentic-dev-kit/safety-critical-changes.md`; install the thin `.claude/rules/safety-critical-changes.md` adapter when absent and merge `docs/AGENTS-sections.md` into an existing `AGENTS.md` when applicable.
- **`config/dev-model.yaml`** — stamp the Step-1 values: `paths.handoff` → the existing plan (and `paths.handoff_history` / the `doc_budgets` entry to match), `paths.engines`, `runtime`, `tracker`, `review`, and `models`.
- **`friction-log.md`** (seed only if absent).
- Append `state/` and `.devkit_state_root` to `.gitignore` if missing.
- Copy `PRINCIPLES.md` + `docs/parallel-dev.md` under `docs/agentic-dev-kit/` for reference.
- Copy `PRINCIPLES.md`, `docs/parallel-dev.md`, and the shared workflow/safety docs under `docs/agentic-dev-kit/` for reference.

**Never overwrite an existing file.** If something you didn't anticipate collides, stop
and ask the operator.

## Step 4 — Verify

- `state_paths` tests: `cd scripts/devkit/lib && python -m pytest state_paths/tests/ -q` — all pass (proves the sandbox resolves from the new location).
- Portability tests: run `python -m pytest scripts/devkit/lib/state_paths/tests/ scripts/devkit/tests/ -q` (adjust the prefix when engines live directly under `scripts/`).
- `check_doc_budget`: run it — it should read the configured plan via `config/dev-model.yaml`.
- Confirm the repo's CI/lint scope **skips** the kit files (or add a kit-dir exclude if lint is repo-wide).

Expand All @@ -84,5 +87,6 @@ issue upstream. This first entry *is* Principle #2 in action.
## Step 6 — Summarize + hand off

Report what was **installed / skipped / config-pointed**, open a **draft PR**, and
suggest the operator's first `/session-start`. Leave the merge to the operator — an
suggest the operator's first `/session-start` (Claude) or `$session-start` (Codex).
Leave the merge to the operator — an
adoption touches a lot of the repo and deserves a human review pass.
Loading
Loading