Skip to content

PRD: Add Index Pages for Task Navigation

Project: ai-plans Date: 2026-02-08 Status: draft

Context

Currently, URLs like /project/task/ return 404 because there's no index.md file. Users have to navigate via sidebar to find specific documents (PRD, Tasks, Notes). This is inconvenient.

Goals

  • Create index.md landing page for each task
  • Provide clear navigation to all task documents
  • Show task overview and progress
  • Improve user experience

Requirements

Functional

  • Auto-generate index.md when publishing PRD
  • Include links to PRD, Tasks, Notes
  • Show task title and status
  • Display progress if tasks exist
  • Update index.md when task status changes

Non-functional

  • Clean, readable layout
  • Consistent styling
  • Fast generation (<100ms)

Technical Approach

  1. Create generateIndexPage() function:
  2. Read PRD title and status
  3. Check if Tasks and Notes exist
  4. Generate markdown with navigation
  5. Write to project/task/index.md

  6. Update publish_prd:

  7. After creating PRD, generate index.md
  8. Include link to PRD

  9. Update publish_tasks:

  10. After creating Tasks, update index.md
  11. Add link to Tasks
  12. Show progress counter

  13. Update publish_notes:

  14. After creating Notes, update index.md
  15. Add link to Notes

  16. Index.md template:

    # {Task Title}
    
    **Project:** {project}
    **Status:** {status}
    **Progress:** {completed}/{total} tasks
    
    ## Documents
    
    - [📋 PRD](prd-{task}/) - Product Requirements Document
    - [✅ Tasks](tasks-{task}/) - Task list and progress
    - [📝 Notes](notes-{task}/) - Development notes
    
    ## Quick Links
    
    - [Back to project](../)
    - [All projects](../../)
    

Constraints and Risks

  • Need to parse PRD to extract title and status
  • Index.md needs to be updated by multiple tools
  • Race conditions if multiple updates happen simultaneously

Open Questions

  • Should index.md show task details or just links?
  • Include last updated timestamp?