Skip to content

Add requirement granularity guidance to spec template, AGENTS.md section, and README - #5

Merged
sansari merged 4 commits into
mainfrom
copilot/add-guidance-on-requirement-granularity
Jul 29, 2026
Merged

Add requirement granularity guidance to spec template, AGENTS.md section, and README#5
sansari merged 4 commits into
mainfrom
copilot/add-guidance-on-requirement-granularity

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Agents drafting first-pass feature specs tend to over-decompose into 20+ MUST requirements, making the coverage/review cycle disproportionately heavy before a team has decided which behaviors are core product promises. This adds guidance nudging toward 3–8 workflow-level requirements per feature.

Changes

  • specs/REQ-010-granularity-guidance.md — new spec formalizing the granularity guidance requirements (REQ-010.1–3)

  • src/init.tsAGENTS_MD_SECTION — new "Requirement granularity" paragraph with:

    • 3–8 MUST recommendation with workflow-level vs. implementation-step contrast
    • Spec sizing smells: >10 MUSTs before tests, requirements restating internal steps, "MUST cover"/"MUST test" anti-patterns
  • src/init.tsSPEC_TEMPLATE — restructured from a generic single section to four explicit sections:

    ### REQ-001.1: Core workflows          ← MUST requirements for user workflows
    ### REQ-001.2: Safety and compatibility invariants
    ### REQ-001.3: Manual acceptance criteria   ← [manual]-tagged
    ## Notes and non-goals                ← prose, outside Requirements block
  • README.md — new ## Requirement granularity section with guidance, good/bad examples, sizing smells checklist, and starter spec structure

  • tests/granularity.test.ts — four tests covering REQ-010; each assertion verified by fresh-context reviewers to be genuinely falsifiable (e.g., REQ-010.2.1 extracts and checks that the Core workflows section contains a MUST, not just that the heading exists)

Copilot AI linked an issue Jul 22, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add guidance on manageable requirement granularity Add requirement granularity guidance to spec template, AGENTS.md section, and README Jul 22, 2026
Copilot AI requested a review from sansari July 22, 2026 18:34
@sansari
sansari marked this pull request as ready for review July 29, 2026 20:44

@sansari sansari left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot i expected only the change to AGENTS.md, but i see many more files. is this because the change to the spec granularity guidance modified the core features? i'm confused why the verdicts are being added, i expected them to already be there

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot i expected only the change to AGENTS.md, but i see many more files. is this because the change to the spec granularity guidance modified the core features? i'm confused why the verdicts are b...

The extra files fall into two categories:

Beyond AGENTS.md (by design): The granularity guidance was added in all four places that the 2119 workflow touches when setting up a repo — AGENTS.md (the injected section), src/init.ts (the spec template generated by npx rfc2119 init, updated to show the 3-section layout), README.md (user-facing docs), and a new formal spec specs/REQ-010-granularity-guidance.md that records the requirement itself.

Verdicts — why they're new instead of pre-existing:

  • REQ-010 verdicts are brand new because REQ-010 is a new spec — those requirements had no prior verdicts.
  • REQ-003/005/008 verdicts (5 new files) are new hash variants of existing requirements. The 2119 system ties each verdict to a content-hash of the test block it covers. Because src/init.ts changed (the spec template and AGENTS section text), the test blocks that assert against those strings changed too, producing new hashes. The old verdict files (with the old hashes) remain on the base branch and still pass those old test shapes; the new files cover the updated test blocks. The total number of required verdicts for the existing requirements didn't grow — only their hashes rotated.

If you'd like to scope the PR down to just the AGENTS.md change (dropping the spec template restructuring, README section, and REQ-010 spec), I can revert those parts.

Copilot AI requested a review from sansari July 29, 2026 20:50
@sansari

sansari commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

@copilot i expected only the change to AGENTS.md, but i see many more files. is this because the change to the spec granularity guidance modified the core features? i'm confused why the verdicts are b...

The extra files fall into two categories:

Beyond AGENTS.md (by design): The granularity guidance was added in all four places that the 2119 workflow touches when setting up a repo — AGENTS.md (the injected section), src/init.ts (the spec template generated by npx rfc2119 init, updated to show the 3-section layout), README.md (user-facing docs), and a new formal spec specs/REQ-010-granularity-guidance.md that records the requirement itself.

Verdicts — why they're new instead of pre-existing:

  • REQ-010 verdicts are brand new because REQ-010 is a new spec — those requirements had no prior verdicts.
  • REQ-003/005/008 verdicts (5 new files) are new hash variants of existing requirements. The 2119 system ties each verdict to a content-hash of the test block it covers. Because src/init.ts changed (the spec template and AGENTS section text), the test blocks that assert against those strings changed too, producing new hashes. The old verdict files (with the old hashes) remain on the base branch and still pass those old test shapes; the new files cover the updated test blocks. The total number of required verdicts for the existing requirements didn't grow — only their hashes rotated.

If you'd like to scope the PR down to just the AGENTS.md change (dropping the spec template restructuring, README section, and REQ-010 spec), I can revert those parts.

@copilot yes let's keep the change simple, the only intent here is that other repos using this would respect that guidance as they generate specs, we don't need to be too dictative

…c, granularity tests, and hash-rotated verdicts

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@copilot i expected only the change to AGENTS.md, but i see many more files. is this because the change to the spec granularity guidance modified the core features? i'm confused why the verdicts a...

Done. Reverted in commit Scope PR to AGENTS.md-only. The PR now only changes AGENTS.md and the AGENTS_MD_SECTION in src/init.ts (so the granularity paragraph flows into any repo that runs npx rfc2119 init). The spec template, README section, REQ-010 spec, granularity tests, and all associated verdict files have been removed.

@sansari
sansari merged commit e529a8d into main Jul 29, 2026
Copilot stopped work on behalf of sansari due to an error July 29, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add guidance on manageable requirement granularity

2 participants