Skip to main content

Feature Context Template

Source: .agents/references/features/_template.md

Content

Feature Context Template

Use this template when adding a new feature reference under .agents/references/features/. Feature references are prompt context, not source-of-truth product specs. Keep them detailed enough to orient an agent, but require live code inspection before edits.

Purpose

  • What user or operator workflow does this domain support?
  • Who uses it: visitor, member, creator, admin, partner, internal team, or system?
  • What business outcome or product surface does it protect?

User-Facing Workflows

  • Primary workflow:
  • Secondary workflows:
  • Empty, loading, blocked, or error states:
  • Mobile/responsive concerns:

Key Entrypoints

  • Routes:
  • Components:
  • Hooks:
  • Services:
  • Utilities:
  • Context/providers:

Data Flow and Service Boundaries

  • Server/static props:
  • Client fetch hooks:
  • Service modules:
  • Analytics/session tracking:
  • External integrations:
  • Persistence/cookies/storage:

Conventions and Gotchas

  • Localization:
  • React/effects:
  • Styling/Tailwind:
  • Service error handling:
  • Security:
  • Feature-specific risks:
  • .agents/rules/*.mdc
  • .agents/rules/codebase-memory-first.mdc
  • .agents/references/coding-standard/codebase-memory-guidance.md
  • .agents/references/coding-standard/figma-guidance.md when design-driven
  • .agents/references/coding-standard/useeffect-guidance.md when hooks/effects are involved

Useful Graph Queries and Searches

Start with search_graph terms for central symbols/routes and trace_path targets for key dependencies. Add search_code patterns for source literals/tests. Keep shell searches only for non-code or graph fallbacks, following .agents/references/coding-standard/codebase-memory-guidance.md.

  • search_graph: <feature concepts, routes, or symbol patterns>
  • trace_path: <central function/method and inbound/outbound direction>
  • search_code: <literal or test pattern>
  • Fallback: rtk rg "<non-code or unresolved term>" <scope>

Update Triggers

Update this reference when a change:

  • Adds, removes, or renames a route, service, hook, or major component in this domain.
  • Changes the primary data flow, API response expectations, permissions, or redirects.
  • Introduces a recurring bug pattern, edge case, or review rule specific to the domain.