Skip to content

Commit 0c33a75

Browse files
Merge pull request #5 from navapbc/jeffhorn/contribution-workflow-skills
Add contribution workflow docs and skills
2 parents 45fabf0 + e0d7f7f commit 0c33a75

6 files changed

Lines changed: 189 additions & 5 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ for a cross-project issue: `jeffhorn/oscer-42-short-description`.
6262
### Pull requests
6363

6464
Open all PRs as drafts; mark ready only after self-review. Use `.github/PULL_REQUEST_TEMPLATE.md`
65-
(GitHub pre-populates it).
65+
(GitHub pre-populates it). The `create-pr` skill guides naming, filling the template, review, and
66+
opening as a draft.
6667

6768
### Commits
6869

@@ -72,8 +73,9 @@ Wire up the template once per clone: `git config commit.template .gitmessage`. S
7273
### Drafting durable artifacts
7374

7475
Before filing a durable, outward-facing artifact (issue, PR description, commit-message set), do not
75-
file the first draft: run the `review-draft` skill (checks quality, template adherence, voice,
76-
punctuation, house style, then revises), and file only after the caller or user approves the revision.
76+
file the first draft: run the `review-draft` skill, which checks quality, template adherence, voice,
77+
punctuation, house style, and formatting (no hard-wrapped issue or PR bodies, see `CONTRIBUTING.md`),
78+
then revises. File only after the caller or user approves the revision.
7779

7880
## Issue templates
7981

@@ -91,6 +93,8 @@ Use the template that best fits the work; GitHub surfaces these on new-issue.
9193
For `technical-task.md`, fill "Starting point" and "Constraints and gotchas" thoroughly; those are
9294
what an agent or new developer needs to pick up work cold.
9395

96+
The `create-issue` skill guides choosing the template, wording, labeling, reviewing, and filing.
97+
9498
## Architecture and CI
9599

96100
Deep reference lives in path-scoped rule files that Claude Code auto-loads when you edit the relevant

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Contributing
22

3+
## Contribution workflow
4+
5+
The short version of how a change moves through this repo:
6+
7+
1. **Start from an issue.** File one with the template that fits the work (epic, story, bug,
8+
technical-task, spike, or chore). The `create-issue` skill walks you through choosing a template,
9+
wording it for its audience, reviewing it, labeling it, and filing it.
10+
2. **Branch.** Use the naming shape in [Branching](#branching) below.
11+
3. **Make your changes.** Keep commits terse and explain why, not what. Wire up the commit template
12+
(see [Commit message template](#commit-message-template)).
13+
4. **Review, then open a draft PR.** Run the `review-draft` skill on the PR description, then open
14+
the PR as a draft and fill in the template (see [Opening pull requests](#opening-pull-requests)).
15+
The `create-pr` skill walks you through branch naming, the review, and opening the PR.
16+
5. **Mark ready.** Move the PR out of draft once it is self-reviewed and CI passes.
17+
18+
Run `review-draft` before any durable artifact goes up: an issue, a PR description, or a commit
19+
message set. It checks quality, template adherence, voice, punctuation, and house style. The rest of
20+
this document covers each step in detail.
21+
322
## Local setup
423

524
### Python
@@ -40,6 +59,19 @@ jeffhorn/oscer-42-short-description
4059

4160
Open all pull requests as drafts initially. Mark ready for review when the work is complete and self-reviewed.
4261

62+
## Formatting issue and PR bodies
63+
64+
GitHub renders issue descriptions, PR descriptions, and comments as GitHub-Flavored Markdown, and in
65+
that context it treats a single newline inside a paragraph as a line break (unlike a `.md` file
66+
rendered on github.com, where single newlines collapse into a space). So a body that was hard-wrapped
67+
at 72 or 80 columns renders as ragged, broken lines.
68+
69+
Write one line per paragraph and let it soft-wrap. Separate paragraphs with a blank line. Lists,
70+
tables, and fenced code blocks keep their own line structure and are unaffected. This is the
71+
opposite of a commit message body, which is plain text and should wrap at 72 columns (see the
72+
commit template). The distinction is by artifact: wrap commit bodies, do not wrap issue or PR
73+
bodies.
74+
4375
## Running the pipeline
4476

4577
```bash

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sources, producing a linked, agent-queryable knowledge base.
55

66
## How it works
77

8-
1. `sources.md` lists each source (`id`, `type`, `repo`, `ref`, optional `subpaths`)
8+
1. `sources.md` lists each source (`id`, `type`, `repo`, `ref`, optional `subpaths`):
99
the SDK, the Rails app template, SDK-consuming apps like OSCER, the `template-infra`
1010
infrastructure template, and the `platform-cli` (`nava-platform`) tool.
1111
2. The `generate-strata-docs` skill documents each source (one agent per source) using the
@@ -39,3 +39,9 @@ python -m scripts.lint_docs
3939
```
4040

4141
See `docs/superpowers/specs/2026-06-18-strata-documentation-engine-design.md` for the design.
42+
43+
## Contributing
44+
45+
See [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution workflow, branch naming, commit
46+
conventions, and the issue and PR templates. `AGENTS.md` is the canonical guide for both human
47+
contributors and AI agents.

skills/create-issue/SKILL.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: create-issue
3+
description: Guides filing a new GitHub issue: picks the right template, writes it in the right register, applies the matching label, reviews the draft, and files it. Use when opening a new issue for this repo.
4+
---
5+
6+
# Create Issue
7+
8+
Walks from "I have something to file" to a filed issue that follows the repo's conventions. It picks
9+
the right template, helps write it in the right language for its audience, applies the matching
10+
label, runs a review pass, and files only after the draft is approved.
11+
12+
## When to use
13+
14+
Use whenever you are about to open an issue in this repo. It is especially helpful if you are not
15+
sure which template fits or how technical the wording should be.
16+
17+
## Steps
18+
19+
### 1. Choose the template
20+
21+
Pick the template that matches the work. Templates live in `.github/ISSUE_TEMPLATE/`.
22+
23+
| If the work is... | Use |
24+
|---|---|
25+
| A large initiative framed around an outcome, spanning several stories or tasks | `epic.md` |
26+
| A user-facing feature or improvement | `story.md` |
27+
| Something broken or behaving unexpectedly | `bug.md` |
28+
| An implementation handoff a developer or agent must pick up cold | `technical-task.md` |
29+
| A time-boxed investigation whose output is findings, not shipped code | `spike.md` |
30+
| Non-user-visible maintenance (dependency upgrades, CI, tooling) | `chore.md` |
31+
32+
If two seem to fit, prefer the less technical one for anything a non-engineer might file (`story`
33+
over `technical-task`, `bug` over `technical-task`).
34+
35+
### 2. Write in the right register
36+
37+
- **Product templates** (`epic`, `story`): plain, outcome-oriented language. Describe user value and
38+
what success looks like, not the implementation.
39+
- **Defect and maintenance templates** (`bug`, `chore`): accessible language. For `bug`, include
40+
reproduction steps and expected versus actual behavior; mark technical fields optional where they are.
41+
- **Investigation template** (`spike`): accessible language; state the question and the time box.
42+
- **Handoff template** (`technical-task`): technical and specific. Fill in the "Starting point" and
43+
"Constraints and gotchas" thoroughly; these are what an agent or new developer needs to start cold.
44+
45+
Fill in the template's sections. Do not leave a heading with an empty body unless the template says
46+
it is optional.
47+
48+
Write the body one line per paragraph; do not hard-wrap it. See "Formatting issue and PR bodies" in
49+
`CONTRIBUTING.md` for why.
50+
51+
### 3. Apply the matching label
52+
53+
Each template declares its label (`epic`, `story`, `bug`, `technical-task`, `spike`, `chore`). Apply
54+
that label when filing. If the label does not exist yet, create it first.
55+
56+
### 4. Review the draft
57+
58+
Run the `review-draft` skill on the issue body before filing. It checks quality, template adherence,
59+
voice, punctuation (no em dashes), formatting (no hard-wrapped body), and house style. Apply the
60+
findings you agree with.
61+
62+
### 5. File
63+
64+
Present the final draft for approval, then file it. Pass the body via a file so multi-line markdown
65+
survives the shell:
66+
67+
```bash
68+
gh issue create --repo navapbc/strata-documentation-engine \
69+
--title "<title>" --label <label> --body-file <path-to-body.md>
70+
```
71+
72+
Issue titles are plain and imperative, with no bracket prefix (the label carries the type).

skills/create-pr/SKILL.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
name: create-pr
3+
description: Guides opening a pull request: names the branch correctly, fills the PR template, reviews the description, and opens it as a draft. Use when opening a PR for this repo.
4+
---
5+
6+
# Create PR
7+
8+
Walks from a set of committed changes to an opened pull request that follows the repo's conventions.
9+
It checks the branch name, fills the PR template, runs a review pass on the description, and opens
10+
the PR as a draft.
11+
12+
## When to use
13+
14+
Use when your work is committed and ready to go up for review, or when you want a work-in-progress
15+
PR open early.
16+
17+
## Steps
18+
19+
### 1. Name the branch
20+
21+
Use the team's branch shape:
22+
23+
```
24+
<github-username>/<issue-number>-<short-kebab-description>
25+
```
26+
27+
Skip the repo-name prefix when the branch lives in the same repo as the work. Include the
28+
originating project name only when a branch in this repo addresses an issue from a different project
29+
(for example `jeffhorn/oscer-42-short-description`). If the current branch does not follow this
30+
shape and has not been pushed yet, rename it with `git branch -m`.
31+
32+
### 2. Decide the base
33+
34+
- Most PRs target `main`.
35+
- If this work builds on another open PR's branch, target that branch instead (a stacked PR) and say
36+
so in the PR's "Notes for reviewers" so the merge order is clear.
37+
38+
### 3. Fill the PR template
39+
40+
Use `.github/PULL_REQUEST_TEMPLATE.md`. Keep it terse and technical, in complete sentences: what
41+
changed and why, how (if not obvious from the diff), a checkable test plan, and notes for reviewers.
42+
Reference the issue with `Closes #n` or `Relates to #n`.
43+
44+
Write the description one line per paragraph; do not hard-wrap it. See "Formatting issue and PR
45+
bodies" in `CONTRIBUTING.md` for why.
46+
47+
### 4. Review the description
48+
49+
Run the `review-draft` skill on the PR description before opening it. Apply the findings you agree
50+
with.
51+
52+
### 5. Open as a draft
53+
54+
Open the PR as a draft; this is the repo default. Pass the body via a file so multi-line markdown
55+
survives the shell:
56+
57+
```bash
58+
git push -u origin <branch>
59+
gh pr create --draft --repo navapbc/strata-documentation-engine \
60+
--base <base> --title "<title>" --body-file <path-to-body.md>
61+
```
62+
63+
Mark the PR ready for review only after self-review is complete and CI passes.

skills/review-draft/SKILL.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ Review the draft along these five dimensions. Each is a separate lens; do not co
3030
For commits, the `.gitmessage` scaffold (imperative subject 50 chars or less, body explains why).
3131
3. **Voice.** Warm but professional, plain language where the audience is mixed, concise by cutting
3232
filler rather than clipping into fragments, complete sentences, "we" for shared decisions.
33-
4. **Punctuation.** No em dashes (hard rule). En dashes only for genuine numeric ranges.
33+
4. **Punctuation and formatting.** No em dashes (hard rule). En dashes only for genuine numeric
34+
ranges. Line wrapping is by artifact: issue and PR bodies must not be hard-wrapped (one line per
35+
paragraph); a commit message body should wrap at 72 columns. See "Formatting issue and PR bodies"
36+
in `CONTRIBUTING.md`.
3437
5. **House style and stated preferences.** Anything the repo's conventions or the requester has
3538
asked for.
3639

@@ -50,6 +53,8 @@ Each reviewer must:
5053
- report findings as a list, each with a location/quote, the issue, a concrete suggested fix, and a
5154
severity (BLOCKER / MAJOR / MINOR / NIT);
5255
- run a literal em-dash check and report every hit;
56+
- for an issue or PR body, check for hard-wrapped paragraphs (a paragraph broken across several
57+
short lines) and report each;
5358
- end with a one-paragraph verdict.
5459

5560
### 3. Adjudicate
@@ -68,4 +73,6 @@ you rejected and the reason. Do not file the artifact; that is the caller's step
6873

6974
- Keep reviewers cheap and the adjudication in a more capable model.
7075
- An em dash anywhere is at least a MAJOR finding and must be fixed before filing.
76+
- A hard-wrapped issue or PR body is at least a MAJOR finding: it renders as broken lines on GitHub.
77+
Reflow each paragraph to a single line before filing.
7178
- This skill complements the "Drafting durable artifacts" convention in `AGENTS.md`.

0 commit comments

Comments
 (0)