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
24 changes: 24 additions & 0 deletions .changes/bugs/feat-issue-body-contract-skills-f098795e.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
bump: minor
---

### Added

- read issue-body skeletons from the org issue-body contract

track add, decompose, the agent brief and bugs:write now take their
issue-body headings from the issue-body contract the standards sync
delivers into each plugin's reference/ directory, the same record the
org issue forms are generated from. triage checks an issue body against
the contract with scripts/check-body.mjs, which accepts a field under
a `##` or `###` heading and treats a form's skipped answer as empty. The tidy
deferred-item body follows the task type.

- fan the synced issue-body contract into the plugins

The standards sync delivers the contract once, to
docs/contracts/issue-body/contract.json. sync-shared-copies.sh now
copies a JSON canonical byte for byte (JSON has no comment syntax for a
header) and generates plugins/bugs and plugins/work-items
reference/issue-body-contract.json from it; the cross-plugin registry
records the cluster.
15 changes: 15 additions & 0 deletions .changes/code-tidying/feat-issue-body-contract-skills-f3b63720.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
bump: minor
---

### Added

- read issue-body skeletons from the org issue-body contract

track add, decompose, the agent brief and bugs:write now take their
issue-body headings from the issue-body contract the standards sync
delivers into each plugin's reference/ directory, the same record the
org issue forms are generated from. triage checks an issue body against
the contract with scripts/check-body.mjs, which accepts a field under
a `##` or `###` heading and treats a form's skipped answer as empty. The tidy
deferred-item body follows the task type.
24 changes: 24 additions & 0 deletions .changes/work-items/feat-issue-body-contract-skills-4c8a6d60.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
bump: minor
---

### Added

- read issue-body skeletons from the org issue-body contract

track add, decompose, the agent brief and bugs:write now take their
issue-body headings from the issue-body contract the standards sync
delivers into each plugin's reference/ directory, the same record the
org issue forms are generated from. triage checks an issue body against
the contract with scripts/check-body.mjs, which accepts a field under
a `##` or `###` heading and treats a form's skipped answer as empty. The tidy
deferred-item body follows the task type.

- fan the synced issue-body contract into the plugins

The standards sync delivers the contract once, to
docs/contracts/issue-body/contract.json. sync-shared-copies.sh now
copies a JSON canonical byte for byte (JSON has no comment syntax for a
header) and generates plugins/bugs and plugins/work-items
reference/issue-body-contract.json from it; the cross-plugin registry
records the cluster.
235 changes: 235 additions & 0 deletions plugins/bugs/reference/issue-body-contract.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
{
"schemaVersion": 1,
"headingLevels": [2, 3],
"emptyAnswer": "_No response_",
"floorLabels": ["needs-triage"],
"types": {
"bug": {
"form": "bug-report.yml",
"name": "Bug Report",
"description": "Report an unexpected problem or behavior.",
"nativeType": "Bug",
"labels": ["needs-triage"],
"fields": [
{
"id": "steps",
"heading": "Steps to reproduce",
"kind": "textarea",
"required": true,
"description": "Minimal steps that reproduce the behavior.",
"placeholder": "1. ...\n2. ...\n3. ..."
},
{
"id": "expected",
"heading": "Expected behavior",
"kind": "textarea",
"required": true,
"description": "What should happen?"
},
{
"id": "actual",
"heading": "Actual behavior",
"kind": "textarea",
"required": true,
"description": "What actually happens? Include error messages, stack traces, or screenshots."
},
{
"id": "severity",
"heading": "Severity",
"kind": "dropdown",
"required": true,
"description": "How bad is it? Say why under Severity justification.",
"options": ["low", "medium", "high", "critical"]
},
{
"id": "severity-justification",
"heading": "Severity justification",
"kind": "textarea",
"required": true,
"description": "One sentence: the blast radius, what it blocks, or the data at risk."
},
{
"id": "fix-location",
"heading": "Suggested fix location",
"kind": "input",
"required": false,
"description": "The file and function or class where the fix likely belongs, if known. No patch."
},
{
"id": "environment",
"heading": "Environment",
"kind": "input",
"required": false,
"description": "OS, runtime and tool versions, and anything else relevant."
}
]
},
"feature": {
"form": "feature-request.yml",
"name": "Feature Request",
"description": "Propose a new feature or enhancement.",
"nativeType": "Feature",
"labels": ["needs-triage"],
"fields": [
{
"id": "user-story",
"heading": "User story",
"kind": "textarea",
"required": true,
"description": "Who benefits and why?",
"placeholder": "As a [role], I want [capability] so that [benefit]."
},
{
"id": "acceptance-criteria",
"heading": "Acceptance criteria",
"kind": "textarea",
"required": true,
"description": "How do we know this is done? One verifiable check per line.",
"placeholder": "- [ ] Criterion 1\n- [ ] Criterion 2"
},
{
"id": "area",
"heading": "Affected area / component",
"kind": "input",
"required": false,
"description": "Which part of the project would this affect?"
}
]
},
"task": {
"form": "task.yml",
"name": "Task",
"description": "A chore, maintenance task, audit, or other housekeeping item.",
"nativeType": "Task",
"labels": ["needs-triage"],
"fields": [
{
"id": "context",
"heading": "Context",
"kind": "textarea",
"required": true,
"description": "What surfaced this, and what leaving it costs."
},
{
"id": "proposed-work",
"heading": "Proposed work",
"kind": "textarea",
"required": true,
"description": "The concrete next actions.",
"placeholder": "- ..."
},
{
"id": "acceptance-criteria",
"heading": "Acceptance criteria",
"kind": "textarea",
"required": true,
"description": "One verifiable check per line.",
"placeholder": "- [ ] ..."
},
{
"id": "references",
"heading": "References",
"kind": "textarea",
"required": false,
"description": "Rules, files, pull requests, or docs this relates to."
}
]
},
"agent-ready": {
"form": "agent-ready.yml",
"name": "Agent-Ready Work Item",
"description": "Work written as an agent brief. Triage decides its type and whether it is agent-ready.",
"nativeType": null,
"labels": ["needs-triage"],
"fields": [
{
"id": "summary",
"heading": "Summary",
"kind": "input",
"required": true,
"description": "The change, in one line."
},
{
"id": "root-cause",
"heading": "Root cause",
"kind": "input",
"required": false,
"description": "Bugs only: unknown, or known: the cause in one line."
},
{
"id": "current-behavior",
"heading": "Current behavior",
"kind": "textarea",
"required": true,
"description": "What the code does today."
},
{
"id": "desired-behavior",
"heading": "Desired behavior",
"kind": "textarea",
"required": true,
"description": "What is true once this lands, edge cases and failure handling included. The end state, not edit instructions."
},
{
"id": "key-interfaces",
"heading": "Key interfaces",
"kind": "textarea",
"required": false,
"description": "The types, signatures, config keys, or observable behaviors that change, named by contract rather than file path or line."
},
{
"id": "acceptance-criteria",
"heading": "Acceptance criteria",
"kind": "textarea",
"required": true,
"description": "Checks that each give a yes or no.",
"placeholder": "- [ ] ..."
},
{
"id": "out-of-scope",
"heading": "Out of scope",
"kind": "textarea",
"required": true,
"description": "The neighboring code and features this change leaves as they are."
}
]
},
"decomposed-item": {
"form": null,
"name": "Decomposed work item",
"description": "A vertical slice /work-items:decompose publishes, born triaged; no public form.",
"nativeType": null,
"labels": [],
"fields": [
{
"id": "outcome",
"heading": "Outcome",
"kind": "textarea",
"required": true,
"description": "The one observable change a user gets when this slice merges, end to end."
},
{
"id": "key-interfaces",
"heading": "Key interfaces",
"kind": "textarea",
"required": true,
"description": "The design this slice touches, named by contract, or None."
},
{
"id": "done-when",
"heading": "Done when",
"kind": "textarea",
"required": true,
"description": "The slice's acceptance criteria, each a check with a pass or fail answer."
},
{
"id": "out-of-scope",
"heading": "Out of scope",
"kind": "textarea",
"required": true,
"description": "Adjacent work this slice must not change."
}
]
}
}
}
35 changes: 16 additions & 19 deletions plugins/bugs/skills/write/context/template.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
# `/bugs:write` template

Loaded on demand by `/bugs:write`. Contains: the full Markdown template (5 fields), the `--file` frontmatter, and the "No bug confirmed" form.
Loaded on demand by `/bugs:write`. Contains: the full Markdown template (5 fields, laid out by the issue-body contract), the `--file` frontmatter, and the "No bug confirmed" form.

## Full template

The body sections come from the org issue-body contract, so a filed report matches the org bug form
and passes the intake heading check. Read the `bug` type of
[`reference/issue-body-contract.json`](../../../reference/issue-body-contract.json)
and write one `## <heading>` section per entry of its `fields`, in that order, never a heading the
contract does not name except `## Notes`. Fill each from the matching part of the five fields:

- Steps to reproduce: a numbered list.
- Expected and actual behavior: one section each.
- Severity: one of the field's `options`, alone; Severity justification: the one sentence that
justifies it (blast radius, blocking factor, data-integrity impact).
- Suggested fix location: `` `<file path>` `<function or class name>` ``, no patch.
- A field the report cannot back, required or not, gets the placeholder.

Default emission (stdout), no frontmatter:

```markdown
# Bug: <title in present tense, one line>

**Severity**: <low | medium | high | critical>
**Suggested fix location**: `<file path>` `<function or class name>` (no patch)
**Reported by**: <reporter identity, or session ID>
**Reported at**: <ISO-8601 timestamp>

## Steps to reproduce

1. <step>
2. <step>
3. <step>

## Expected behavior

<what should happen>

## Actual behavior

<what does happen>

## Severity justification
## <each contract field heading, in contract order>

<one sentence: why this severity. Cite blast radius / blocking factor / data-integrity impact>
<its value>

## Notes

Expand Down
24 changes: 9 additions & 15 deletions plugins/code-tidying/skills/tidy/reference/scope-budget.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,21 @@ Read the house style (`<plugin-root>/reference/issue-house-style.md`) before fil

### Body format (use as-is, fill in the angle-bracket placeholders)

The sections follow the `task` type of the org issue-body contract, which `/work-items:track add`
reads from its plugin's `reference/issue-body-contract.json`: Context, Proposed work and Acceptance
criteria are its required fields, so the item passes intake's body check.

```markdown
## Context

Deferred from tidy run on `<branch-name>` (anchor: `<anchor-sha>`). The hunt found this candidate but the PR scope budget's hard cap was reached before it could be included.

## Tidying type

<one of the named tidyings from reference/tidyings.md, e.g., "Beck #5: Reading Order">

## Files

- `<path/to/file1.ext>` (<estimated LOC delta>)
- `<path/to/file2.ext>` (<estimated LOC delta>)

## Estimated scope

<estimate>: ~<N> LOC across <M> files. Should fit within the scope budget's target as a future tidy run.

## Lane
## Proposed work

`<lane-name>`
- Tidying: <one of the named tidyings from reference/tidyings.md, e.g., "Beck #5: Reading Order">
- Files: `<path/to/file1.ext>` (<estimated LOC delta>), `<path/to/file2.ext>` (<estimated LOC delta>)
- Estimated scope: ~<N> LOC across <M> files; should fit the scope budget's target as a future tidy run.
- Lane: `<lane-name>`

## Acceptance criteria

Expand Down
Loading
Loading