8000 Contributor workflow: AGENTS.md, DEVELOPMENT.md, .specs/ and start-issue skill by simon-inkie · Pull Request #40 · simon-inkie/inkie-deck · GitHub
[go: up one dir, main page]

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
123 changes: 123 additions & 0 deletions .agents/skills/start-issue/SKILL.md
8000
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
name: start-issue
description: Start work on a GitHub issue in this repository. Use when the user says "start issue N", "pick up issue N", "start #N", or asks to begin a new piece of work that needs an issue, a branch and a SPEC. Creates the branch and the .specs/<issue>-<slug>/SPEC.md skeleton, pre-filled from the issue, and commits it signed off as the branch's first commit.
---

# start-issue

Creates the branch and the SPEC skeleton for one GitHub issue, so the first
commit on a branch is the SPEC rather than the code. The convention this
implements is in [DEVELOPMENT.md](../../DEVELOPMENT.md) at the repository root;
read that, and [CONTRIBUTING.md](../../CONTRIBUTING.md), if you have not.

## What it produces

For issue number `N` with title `T`:

- A branch off an up-to-date `origin/main`, named `N-<slug>`, where `<slug>`
is the issue title lowercased, with anything that is not a letter or digit
replaced by a hyphen, collapsed and trimmed of leading and trailing hyphens,
truncated to keep the whole branch name under about 60 characters.
- `.specs/N-<slug>/SPEC.md`, filled from the template below with the issue
number, title and link.
- One signed-off commit on the new branch:
`docs(spec): start #N <slug> (#N)`.

It does not write any code, does not push, and does not open the pull request.
Those are yours, and the SPEC's Log records when they happen.

## How to run it

The mechanical steps, in order:

1. Check the working tree is clean (`git status --porcelain` is empty). If it
is not, stop and tell the user; starting a branch on top of uncommitted work
mixes two changes into one review.
2. Read the issue with the GitHub CLI, so the SPEC carries the real title:

```sh
gh issue view <N> --json number,title,body
```

If `gh` is not available or not authenticated, ask the user for the issue
title and continue; the SPEC still needs one.
3. Fetch and branch:

```sh
git fetch origin main
git switch -c <N>-<slug> origin/main
```

4. Create the folder and the SPEC:

```sh
mkdir -p .specs/<N>-<slug>
```

Write `.specs/<N>-<slug>/SPEC.md` from the template below, substituting the
issue number, title and link. Leave the sections that only the work can fill
in (Scope, Test plan, Follow-ups) as the skeleton text plus a single
`- To be decided.` line, or fill them from the issue body if it already
states scope and acceptance criteria clearly.
5. Commit:

```sh
git add .specs/<N>-<slug>/SPEC.md
git commit -s -m "docs(spec): start #<N> <slug> (#<N>)"
```

The `-s` adds the `Signed-off-by:` trailer that
[CONTRIBUTING.md](../../CONTRIBUTING.md) requires of every commit (the
Developer Certificate of Origin). Do not omit it; an unsigned commit fails
the DCO gate.

6. Tell the user the branch name and the SPEC path, and that the next step is
to fill in Scope and Test plan as the approach settles, in the same commits
as the code.

## SPEC template

```markdown
# #<N>: <title>

- Issue: #<N>
- Branch: <N>-<slug>
- Started: <YYYY-MM-DD>

## TL;DR
One or two sentences: what is changing and why. This becomes the pull request
description, so keep it true as the work moves.

## Scope
In scope:
- To be decided.

Out of scope (and where it goes instead):
- To be decided.

## Test plan
To be filled in as the approach settles: the automated tests added or changed,
and any manual check with the exact command.

## Follow-ups
Anything found but deliberately not done here, each with an issue link once
filed.

## Log

### <YYYY-MM-DD>: branch and SPEC skeleton
- What changed: started the branch from `origin/main` and created this SPEC.
- Why: every change starts from an issue, and the SPEC is the first commit.
- Supersedes: nothing, additive.
- Commits: (this commit)
```

## Notes

- If a branch named `<N>-<slug>` already exists locally or on `origin`, do not
create a new one. Say so, and offer to check it out and read its SPEC, which
is the "picking up someone else's work" path in DEVELOPMENT.md section 6.
- If a SPEC already exists for this issue on another branch, say so rather than
creating a second one; one issue has one SPEC.
- The SPEC is public text and goes through the same leak gate and dash check as
the code. Link issues by number (`#<N>`), and keep the file ASCII.
1 change: 1 addition & 0 deletions .claude/skills/start-issue
89 changes: 89 additions & 0 deletions .specs/39-contributor-workflow/SPEC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# #39: Contributor workflow: AGENTS.md, DEVELOPMENT.md, .specs/ and a start-issue skill

- Issue: #39
- Branch: 39-contributor-workflow
- Started: 2026-09-27

## TL;DR

Adds a written contributor workflow that works on any coding-agent runtime, not
just one: a `DEVELOPMENT.md` describing the issue, branch, SPEC and review flow,
the `.specs/<issue>-<slug>/SPEC.md` convention, and a `start-issue` skill that
scaffolds the branch and the SPEC skeleton from an issue number. `AGENTS.md` and
`CLAUDE.md` are pointers to [CONTRIBUTING.md](CONTRIBUTING.md), which is the
single source of the contributing rules, the checks and the Developer
Certificate of Origin; they do not restate those rules. The skill lives once in
`.agents/skills/` and is reachable from Claude Code through a symlinked
`.claude/skills/`. A fresh agent on either runtime, asked to "start issue N",
produces the branch and the SPEC skeleton without reading anything outside the
repo.

## Scope

In scope:
- Root `AGENTS.md` and `CLAUDE.md` reduced to pointers to `CONTRIBUTING.md` and
`DEVELOPMENT.md`; the contributing rules (branch naming, issue-first, DCO)
stay in one place and are not restated.
- `DEVELOPMENT.md`, adapted from the draft in the issue brief.
- The `.specs/<issue>-<slug>/SPEC.md` convention for non-trivial work,
documented and scaffolded.
- `.agents/skills/start-issue/SKILL.md` plus `.claude/skills/start-issue` as a
symlink to it; the skill signs off its first commit and uses the
`type(scope): summary (#issue)` commit-title style.
- README cross-links so a reader arrives at the workflow from the front door.
- The two small in-repo fixes needed to keep the repo's own gates green with
this change: the leak-gate rule that would block a `.agents/` path, and the
`check:dashes` scope. Both are now already on `main`, so this branch does not
repeat them; the branch is documentation only.

Out of scope (and where it goes instead):
- Mirroring this into the memory-layer repository. Filed as a follow-up issue;
the issue text says so explicitly.
- Any change to the install path, the brain integration (#21) or the other
install-test findings.
- Changing `bin/` behaviour. This issue is the workflow, not the tooling.

## Test plan

- The repository's own gates, run on a clean tree:
`pnpm install`, `pnpm typecheck`, `pnpm test`, `pnpm check:boundaries`,
`pnpm check:leaks`, `pnpm check:licence`, and `pnpm check:dashes` in
`packages/deck`.
- Acceptance check by hand: in a clone of the branch, with no other context,
follow `.agents/skills/start-issue/SKILL.md` for a sample issue number and
confirm the branch name, the `.specs/` folder and a filled SPEC skeleton come
out, with no reference to anything outside the repo.
- Confirm `CLAUDE.md` and `AGENTS.md` cannot drift: the pointer is checked by a
test rather than by convention (see Log).

## Follow-ups

- Mirror `AGENTS.md`, `DEVELOPMENT.md` and the skill into the memory-layer
repository. Filed as an issue on that repo, linked from here once it exists.

## Log

### 2026-09-27: branch and SPEC skeleton
- What changed: started the branch from `origin/main` and created this
SPEC.
- Why: every change starts from an issue, and the SPEC is the first commit.
- Supersedes: nothing, additive.
- Commits: (this commit)

### 2026-10-04: rework against CONTRIBUTING.md, with DCO sign-off
- What changed: rebased the branch on `main` (which now carries
`CONTRIBUTING.md` from #45) and signed off every commit. `AGENTS.md` and
`CLAUDE.md` are now pure pointers to `CONTRIBUTING.md` and
`DEVELOPMENT.md`, with the branch-naming and issue-first rules stated in one
place only (`CONTRIBUTING.md`). Added the Developer Certificate of Origin to
`DEVELOPMENT.md` and to the `start-issue` skill's commit step
(`git commit -s`). The skill's first commit is now
`docs(spec): start #N <slug> (#N)`, matching `CONTRIBUTING.md`'s
`type(scope): summary (#issue)` convention. The SPEC rule is scoped to
non-trivial work, matching `CONTRIBUTING.md`.
- Why: model-diverse review found DCO violations, a split source of truth
between `AGENTS.md` and `CONTRIBUTING.md`, a commit-title conflict in the
skill, and an unconditional SPEC rule that disagreed with `CONTRIBUTING.md`.
- Supersedes: the "shared rules file" framing of `AGENTS.md` in the 2026-09-27
entry.
- Commits: (this commit)
32 changes: 32 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# inkie-deck

A web control plane for a fleet of AI agents, copied in from the working
platform and cleaned.

This file is the runtime instruction file for AI coding agents. It is a pointer,
not a second rulebook: the contributing rules live in
[CONTRIBUTING.md](CONTRIBUTING.md), and the full workflow lives in
[DEVELOPMENT.md](DEVELOPMENT.md). Read both before your first change. Keeping
the rules in one place is deliberate, so nothing here can drift out of step with
what the other runtimes read.

If you are starting work on an issue, the `start-issue` skill does the
mechanical part: it creates the branch and the SPEC skeleton for you. See
[.agents/skills/start-issue/SKILL.md](.agents/skills/start-issue/SKILL.md).

For setting up a machine and running the checks, see [README.md](README.md)
("Development") and [INSTALL.md](INSTALL.md).

## House rules for agents

- No internal material (names, hosts, paths, ticket ids, addresses) may enter
the repository. `pnpm check:leaks` enforces it; read the rule comments before
extending the denylist.
- ASCII only, no em-dashes or en-dashes anywhere in the tree. This is not style:
U+2014 is the field separator in the message protocol, so a literal one in a
file is a parsing hazard. `pnpm check:dashes` enforces it.
- Sign off every commit (`git commit -s`), as [CONTRIBUTING.md](CONTRIBUTING.md)
requires; an unsigned commit fails the DCO gate.
- If you are an agent: do not push to `main`, force-push a shared branch, merge
your own pull request, or create a release unless a maintainer asked you to
in the issue or pull request.
17 changes: 11 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# inkie-deck

A web control plane for a fleet of AI agents, copied in from the working platform and cleaned.
A web control plane for a fleet of AI agents, copied in from the working
platform and cleaned.

## Git workflow
## Shared rules

Branch off `main` for every change, open a pull request, do not push directly to `main`. This applies to every contributor, human or agent.
This file is a pointer. The repository's contributing rules are in
[CONTRIBUTING.md](CONTRIBUTING.md), the workflow is in
[DEVELOPMENT.md](DEVELOPMENT.md), and the agent runtime file is
[AGENTS.md](AGENTS.md); read all three before your first change. They are the
same files every other coding-agent runtime reads, so there is exactly one copy
of the rules and no chance of drift.

- Branch names: short, descriptive, kebab-case.
- Keep PRs scoped to one change; large or unrelated changes go in separate PRs.
- `main` should always be in a releasable state.
The one thing worth repeating here, so a session that reads only this file is
not blind: sign off every commit (`git commit -s`).
Loading
Loading
0