Skip to content

Add toc-navigation community preset to catalog and README#2080

Merged
mnriem merged 16 commits intogithub:mainfrom
Quratulain-bilal:feat/toc-generated-markdown
Apr 7, 2026
Merged

Add toc-navigation community preset to catalog and README#2080
mnriem merged 16 commits intogithub:mainfrom
Quratulain-bilal:feat/toc-generated-markdown

Conversation

@Quratulain-bilal
Copy link
Copy Markdown
Contributor

Summary

  • Add exemplar TOC sections to structure templates (spec-template.md, plan-template.md,
    tasks-template.md)
  • Add TOC generation instructions to command templates (specify.md, plan.md, tasks.md)
  • Only ##-level headings included to keep TOC concise

Closes #1970

Changes

File Change
templates/spec-template.md Added TOC with links to User Scenarios, Requirements, Success
Criteria, Assumptions
templates/plan-template.md Added TOC with links to Summary, Technical Context, Constitution
Check, Project Structure, Complexity Tracking
templates/tasks-template.md Added TOC with links to Phase 1, Phase 2, Phase 3, Dependencies,
Implementation Strategy
templates/commands/specify.md Instruction in step 5 to generate TOC with anchor links
templates/commands/plan.md Instruction in step 3 to generate TOC with anchor links
templates/commands/tasks.md Instruction in step 4 to generate TOC with anchor links

Design decisions

  • Pure template change — no Python code or test changes needed
  • Standard GitHub anchor format (lowercase, spaces to hyphens, strip special chars)
  • Skipped small documents (checklist, constitution) — too short to need TOC

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Table of Contents (TOC) guidance to the Speckit command templates so generated spec.md, plan.md, and tasks.md include a concise TOC linking to ##-level sections.

Changes:

  • Instruct /speckit.specify to include a TOC after the document header and before the first content section.
  • Instruct /speckit.plan to include a TOC after the document header and before the Summary section.
  • Instruct /speckit.tasks to include a TOC after the document header and before the first phase.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
templates/commands/specify.md Adds instruction to generate a ##-heading TOC with GitHub-style anchors.
templates/commands/plan.md Adds instruction to generate a ##-heading TOC before Summary.
templates/commands/tasks.md Adds instruction to generate a ##-heading TOC before phases.
Comments suppressed due to low confidence (1)

templates/commands/specify.md:123

  • PR description mentions adding exemplar TOC sections to templates/spec-template.md, templates/plan-template.md, and templates/tasks-template.md, but those files currently contain no “Table of Contents” section (verified via search). Either update the structure templates as described, or adjust the PR description/scope so it matches what’s actually changed.
5. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings. Include a **Table of Contents** section immediately after the header metadata block and before the first content section. The TOC must list all `##`-level headings as markdown anchor links (lowercase, spaces to hyphens, strip special characters). Example: `- [User Scenarios & Testing](#user-scenarios--testing)`. Only include sections that actually appear in the final document.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@mnriem mnriem left a comment

Choose a reason for hiding this comment

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

Please address Copilot feedback. If not applicable, please explain why

@Quratulain-bilal
Copy link
Copy Markdown
Contributor Author

Addressed all 3 Copilot comments replaced ambiguous 'header metadata block' wording with
template-accurate descriptions in all three command files.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 3, 2026

Please address Copilot feedback. If not applicable, please explain why

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 3, 2026

Please address Copilot feedback. If not applicable please explain why!

@Quratulain-bilal
Copy link
Copy Markdown
Contributor Author

Addressed Copilot feedback — fixed TOC anchors in spec-template.md to include the -mandatory suffix matching the actual heading IDs.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 3, 2026

Please address Copilot feedback. Hopefully that will be the last round

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 3, 2026

Address the last nit from Copilot and I think we are ready :)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 3, 2026

Looks like there is more critical Copilot feedback

Quratulain-bilal and others added 9 commits April 7, 2026 00:33
Pivots from core template changes to a preset approach per reviewer
request. Adds presets/toc-navigation/ with 3 template overrides and
3 command overrides that add Table of Contents sections to generated
spec.md, plan.md, and tasks.md documents.

Addresses all 8 impact concerns from review:
- Templates use anchor links (not plain text) matching command instructions
- All 12 tasks-template headings accounted for (dynamic phases as plain text)
- spec-template anchors include -mandatory suffix
- TOC placed after Note paragraph in plan-template
- Self-reference exclusion explicit in all commands
- Clarify stale TOC instruction in specify command
- Implement misparse warning in tasks command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Move preset to standalone repository per maintainer guidance:
https://github.com/Quratulain-bilal/spec-kit-preset-toc-navigation

- Remove presets/toc-navigation/ from core repo
- Add toc-navigation entry to catalog.community.json

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Quratulain-bilal Quratulain-bilal force-pushed the feat/toc-generated-markdown branch from 39c7e3f to 00187d9 Compare April 6, 2026 19:35
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 7, 2026

@Quratulain-bilal Please add it to the main README as well

Adds Table of Contents Navigation entry (alphabetically between Pirate
Speak and VS Code Ask Questions) to the community presets table in
README.md as requested by maintainer.
@Quratulain-bilal
Copy link
Copy Markdown
Contributor Author

Added toc-navigation preset to the main README's Community Presets table as requested. Entry placed
alphabetically between Pirate Speak and VS Code Ask Questions, with 3 templates, 3 commands, and link to the preset repository.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR appears to add a new community preset entry that provides Table of Contents navigation for generated spec.md, plan.md, and tasks.md, by updating the community preset catalog and documenting it in the README.

Changes:

  • Added “Table of Contents Navigation” to the community presets list in README.md.
  • Added a new toc-navigation preset entry to presets/catalog.community.json (including download URL, version, and tags).
Show a summary per file
File Description
README.md Documents the new community preset in the Community Presets table.
presets/catalog.community.json Registers the new toc-navigation preset in the community catalog so it can be discovered/installed.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 7, 2026

Please address Copilot feedback

@Quratulain-bilal
Copy link
Copy Markdown
Contributor Author

Updated PR title and description to clarify this is a community preset catalog entry, not core template
changes. The TOC functionality is delivered as a standalone preset in a separate
repository
per maintainer guidance.
This PR only registers it in the catalog and README.

@Quratulain-bilal Quratulain-bilal changed the title feat: add Table of Contents to generated markdown documents (#1970) Add toc-navigation community preset to catalog and README Apr 7, 2026
@mnriem mnriem requested a review from Copilot April 7, 2026 18:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new community preset (“toc-navigation”) to Spec Kit’s discovery surfaces so users can find/install the preset that generates a navigable TOC for spec/plan/tasks docs.

Changes:

  • Add “Table of Contents Navigation” row to the Community Presets table in README.md.
  • Add a toc-navigation entry (metadata + download URL + requirements/tags) to presets/catalog.community.json.
Show a summary per file
File Description
README.md Documents the new community preset in the Community Presets table.
presets/catalog.community.json Registers the new toc-navigation preset in the community catalog for discovery/install.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

@mnriem mnriem self-requested a review April 7, 2026 18:42
@mnriem mnriem requested a review from Copilot April 7, 2026 18:43
@mnriem mnriem merged commit 375b2fd into github:main Apr 7, 2026
18 checks passed
@mnriem
Copy link
Copy Markdown
Collaborator

mnriem commented Apr 7, 2026

Thank you!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new community preset entry (“toc-navigation”) to the project’s community preset discovery surfaces (README + community preset catalog), making it discoverable alongside other presets.

Changes:

  • Added “Table of Contents Navigation” to the Community Presets table in README.md.
  • Added a toc-navigation entry to presets/catalog.community.json with metadata (name, version, URLs, requires/provides, tags).
Show a summary per file
File Description
README.md Adds the new preset to the human-readable Community Presets list.
presets/catalog.community.json Registers the new preset in the machine-readable community catalog for discovery/search.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 2/2 changed files
  • Comments generated: 2

Comment on lines +81 to +95
"toc-navigation": {
"name": "Table of Contents Navigation",
"id": "toc-navigation",
"version": "1.0.0",
"description": "Adds a navigable Table of Contents to generated spec.md, plan.md, and tasks.md documents",
"author": "Quratulain-bilal",
"repository": "https://github.com/Quratulain-bilal/spec-kit-preset-toc-navigation",
"download_url": "https://github.com/Quratulain-bilal/spec-kit-preset-toc-navigation/archive/refs/tags/v1.0.0.zip",
"homepage": "https://github.com/Quratulain-bilal/spec-kit-preset-toc-navigation",
"documentation": "https://github.com/Quratulain-bilal/spec-kit-preset-toc-navigation/blob/main/README.md",
"license": "MIT",
"requires": {
"speckit_version": ">=0.4.0"
},
"provides": {
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

The preset catalog entry is missing the per-preset created_at and updated_at fields shown in the Preset Publishing Guide’s recommended catalog.community.json format. Adding those timestamps (and bumping the top-level catalog updated_at to reflect this change) would keep the catalog metadata consistent and make updates easier to track over time.

Copilot uses AI. Check for mistakes.
"name": "Table of Contents Navigation",
"id": "toc-navigation",
"version": "1.0.0",
"description": "Adds a navigable Table of Contents to generated spec.md, plan.md, and tasks.md documents",
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

Minor consistency: other preset descriptions in this file end with a period, but this new description does not. Consider adding the trailing period to match the surrounding entries.

Suggested change
"description": "Adds a navigable Table of Contents to generated spec.md, plan.md, and tasks.md documents",
"description": "Adds a navigable Table of Contents to generated spec.md, plan.md, and tasks.md documents.",

Copilot uses AI. Check for mistakes.
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.

[Feature]: Table of Contents (toc) in each generated markdown

3 participants