/ knowledge
Capture decisions, notes, and feature documentation that persists across sessions.
The /knowledge command captures structured knowledge during or
after a session. It creates documents in flydocs/knowledge/ that
persist across sessions -- your AI assistant consults them when making future
decisions.
Usage
/knowledge We decided to use Zustand instead of Redux for state management /knowledge Document the authentication flow for the API Templates
FlyDocs provides three knowledge templates. The AI selects the right one based on your input, or you can specify directly:
| Template | Purpose | When to Use |
|---|---|---|
| Decision | Architecture Decision Record (ADR) | Recording a technical choice with context, alternatives, and rationale |
| Note | General knowledge capture | Documenting patterns, conventions, or context that future sessions need |
| Feature | Feature documentation | Describing how a feature works, its components, and integration points |
What Happens
- Template Selection: FlyDocs determines the appropriate template from your description
- Content Generation: The AI structures your input into the selected template format
- File Creation: The document is saved to
flydocs/knowledge/ - Index Update:
flydocs/knowledge/INDEX.mdis updated to reference the new document
How Knowledge Persists
Knowledge documents are checked into your repository alongside your code.
When the AI starts a new session, the session-start.py hook
injects relevant knowledge context. This means decisions you record today
inform the AI's choices tomorrow -- even across different sessions and
different team members.
Examples
Recording a Decision
/knowledge Decision: Use server-side rendering for the dashboard pages.
Context: We need good SEO and fast initial loads.
Alternatives considered: SPA with client-side rendering, static generation.
Chose SSR because dashboard data changes frequently and static generation
would require rebuilds. Capturing a Note
/knowledge Note: The payment webhook endpoint expects idempotency keys
in the X-Idempotency-Key header. Stripe sends retries, so all handlers
must be idempotent. Related Commands
/wrap-session: Session wrap prompts for knowledge capture/start-session: Session start loads relevant knowledge context