docs: add issue & PR templates and document agent rules in CLAUDE.md#70
Conversation
Standardises agent-driven workflow with two new GitHub templates: .github/ISSUE_TEMPLATE/issue.md and .github/PULL_REQUEST_TEMPLATE.md. Each carries a short human-facing summary section followed by an "AI specificities" detail block, so other agents picking up the work have a structured brief rather than freeform paragraphs. CLAUDE.md gains three rules: - Require the issue template when creating issues via gh. - Forbid edits under tests/ without explicit user approval, and require a written which-tests/what/why rationale before any test edit. Coverage is gated at 100%, so test churn has real weight and the user, not the agent, decides whether the production code or the test is wrong. - Require PR descriptions to spell out the blocker and reason when a PR carries the do-not-merge label, kept current as blockers resolve. PR-template usage is left implicit since the itkdev-pull-request skill already preserves repository templates verbatim. Also rolls in the ADR 002 -> 004 renumber follow-up: the license ADR was moved aside to free 002 for the frontend-tooling decision (#38), but the README link and the CHANGELOG reference still pointed at the old number. Updates both, and renumbers the ADR heading and index to match. Closes #69. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Martin Yde Granath <yde001@gmail.com>
While the project has no tagged releases, every [Unreleased] entry belongs under Added — there is no prior released version for a change to be Changed/Fixed/Removed/Deprecated/Security relative to. Adds the rule to CLAUDE.md and points at PR #57 (the prior consolidation that established this convention). Applies the rule to the bundled ADR 002 -> 004 renumber bullet in CHANGELOG.md: folds it into Added and drops the now-empty Changed section. Refreshes the CLAUDE.md bullet under [Unreleased] / Added so it lists all four new agent-workflow rules (issue template, tests-without-approval, do-not-merge description, and the pre-release changelog rule). Also rolls in small editorial fixes to the new files that landed with this PR: PR template heading "Link to ticket" -> "Links to issues" (plural — a PR can address multiple issues) and column-width tweaks in docs/adr/README.md so the index table renders evenly. Refs #69. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Martin Yde Granath <yde001@gmail.com>
yepzdk
left a comment
There was a problem hiding this comment.
Should we align issue templates to the Bug / Feature / Task taxonomy that CLAUDE.md mandates?
This single catch-all issue.md formalizes layout but not the classification the repo actually requires. Splitting it into three templates (or YAML issue forms) aligned to that taxonomy would close the gap between the template and our own rules.
Should we add a checklist item for the test-edit rule?
The new "don't touch tests/ without approval" rule lives only in CLAUDE.md, so it's only enforceable by an agent that reads it. A checklist line in the PR template — e.g. "Test changes were approved / justified" — would surface it at review time where a human actually looks. Worth adding, or do we want to keep the PR checklist as the standard itk-dev one?
Have we considered disabling blank issues via config.yml? There's no .github/ISSUE_TEMPLATE/config.yml, so GitHub still offers the "blank issue" escape hatch — which undermines "require the issue template." Adding config.yml with blank_issues_enabled: false would actually enforce template usage. Does that add value here, or do we want to keep blank issues available?
Should we align issue templates? : Should we add a checklist item for the test-edit rule? : Have we considered disabling blank issues via config.yml? |
Link to ticket
Closes #69.
Description
Standardises the agent-driven workflow by introducing GitHub issue and
pull-request templates and recording matching agent rules in
CLAUDE.md..github/ISSUE_TEMPLATE/issue.md— short human-facing "Resume"section (Description + Tasks checklist) followed by an "AI
specificities" detail block so other agents picking up the work have
a structured brief instead of freeform paragraphs.
.github/PULL_REQUEST_TEMPLATE.md— mirrors that split for PRs:human checklist on top, AI brief at the bottom.
CLAUDE.mdgains three rules:gh;tests/without explicit user approval, andrequire a written which-tests / what / why rationale before any
test edit (the 100% coverage gate makes test churn weighty enough
that the user, not the agent, should decide whether the production
code or the test is wrong);
a PR carries the
do-not-mergelabel, kept current as blockersresolve.
002-project-license-mpl-2→004-project-license-mpl-2renumber follow-up: the license ADR was moved aside in Decide on frontend tooling (CSS framework + asset pipeline) #38 to free
ADR
002for the frontend-tooling decision, but the README linkand the changelog reference still pointed at the old number. Both
updated, ADR heading + index renumbered to match.
PR-template usage is left implicit in
CLAUDE.mdbecause theitkdev-pull-requestskill already preserves repository templatesverbatim — adding a rule here would just duplicate that.
Screenshot of the result
N/A — documentation / repository-config only, no UI affected.
Checklist
If your code does not pass all the requirements on the checklist you have to add a comment explaining why this change
should be exempt from the list.
Additional comments or questions
The "covered by test cases" box is intentionally unchecked: this PR
only touches
CLAUDE.md, two GitHub template files,README.md,CHANGELOG.md, anddocs/adr/. There is no PHP/JS to exercise, sono PHPUnit cases are added. The 100% coverage gate is unaffected
because no
src/files changed.Details - AI specificities
Goal and motivation
paragraphs and ad-hoc checklists. The two templates introduce a
consistent two-part layout (human header + AI brief) so any agent
continuing the work has structured context.
CLAUDE.mdis the canonical contract for agent behaviour in thisrepo, so the new behavioural rules belong there rather than buried
inside skill prompts.
Scope
.github/ISSUE_TEMPLATE/issue.md,.github/PULL_REQUEST_TEMPLATE.md.CLAUDE.md(three new rules).CHANGELOG.md(Added+ a newChangedsection under[Unreleased]).002-project-license-mpl-2.md→004-project-license-mpl-2.md, with README link, ADR heading, andindex entry updated.
Non-goals
in
CLAUDE.mdstays as is.PULL_REQUEST_TEMPLATE/directory — a singledefault template is enough for now.
src/,tests/,config/untouched).CLAUDE.mdbecause theitkdev-pull-requestskill already enforces it.Areas needing extra scrutiny
markers intact: the
itkdev-pull-requestskill copies the templateverbatim and matches on those markers. Reformatting the headings
would silently break PR generation.
Changedsection is new for this[Unreleased]block — previous entries collapsed everything into
Added(docs: ADRs drop Follow-up Actions; CHANGELOG consolidates to Added #57).We're opting back into a
Changedsection here because the ADRrenumber is genuinely a change to existing material, not an
addition. If the project prefers a single
Addedlist, therenumber bullet can be folded back in.
Follow-up work intentionally out of scope
Related
do-not-mergelabel and theblock-on-labelworkflow wereintroduced in feat: placeholder frontpage (#40) + do-not-merge label workflow #43 (refs Decide on frontend tooling (CSS framework + asset pipeline) #38).
002-frontend-tooling(the reason the license ADR had to moveto
004) landed via Decide on frontend tooling (CSS framework + asset pipeline) #38.CLAUDE.md(Set up ADR (Architecture Decision Records) structure #11, task: transform ADR "Follow-up Actions" sections into GitHub issues #44, docs: ADRs drop Follow-up Actions; CHANGELOG consolidates to Added #57) are thepattern the new rules follow.