AgileFlow

/context

PreviousNext

Create and manage project context for web AI tools

/context

Create, refresh, and manage your project context brief for use in web AI tools like ChatGPT, Perplexity, Gemini, and Claude web.

Overview

The /context command family helps you maintain and export project context for web-based AI tools. This is useful when you need to:

  • Generate a comprehensive context brief for pasting into web AI tools
  • Export a concise excerpt for quick context loading
  • Record important decisions and discoveries in your context file
  • Keep external AI tools informed about your project status

Subcommands

The /context command has three subcommands, each with a specific purpose:

/agileflow:context:full

Generate or refresh the comprehensive project context brief.

Creates or updates docs/context.md with managed sections containing:

  • What we're building and current focus
  • Feature map and tech/tooling summary
  • Key decisions (ADRs) and architecture snapshot
  • Testing & CI status
  • Recent progress
  • Risks and next steps

This file is designed to be pasted into ChatGPT, Perplexity, Gemini, or Claude web to give external AI tools full project context.

Usage:

/agileflow:context:full

Behavior:

  • Reads existing docs/context.md if present
  • Gathers data from status.json, ADRs, epics, stories, and CHANGELOG
  • Updates only managed sections (between <!-- MANAGED_SECTION --> markers)
  • Preserves any user-written content outside managed sections
  • Shows diff before applying changes
  • Requires confirmation before writing

/agileflow:context:export

Export a concise context excerpt for pasting into web AI tools.

Reads docs/context.md and outputs a condensed excerpt (≤300 lines) ready to copy and paste into ChatGPT, Perplexity, Gemini, or Claude web.

This is a read-only command - no files are written.

Usage:

/agileflow:context:export

Behavior:

  • Reads docs/context.md
  • Extracts key sections (overview, current focus, tech stack, decisions, feature map, next steps)
  • Outputs concise excerpt in a code block
  • Includes instructions for pasting into web AI
  • Does not require confirmation

/agileflow:context:note

Append a timestamped note to the context file.

Quickly add a note to docs/context.md under the "Notes" section. Useful for recording decisions, observations, or reminders that should persist in project context.

Usage:

/agileflow:context:note NOTE="Your note here"

Arguments:

ArgumentRequiredDescription
NOTEYes1-5 line note text to append

Behavior:

  • Reads or creates docs/context.md
  • Creates a "Notes" section if it doesn't exist
  • Appends note with ISO timestamp (e.g., 2024-12-31T10:30:00Z)
  • Shows diff before applying changes
  • Requires confirmation before writing

Examples

Generate Full Context

/agileflow:context:full

Creates or updates docs/context.md with comprehensive project information:

# Project Context Brief
 
**Last Updated**: 2025-12-24
**Project**: AgileFlow - AI-powered project management
 
## What We're Building
 
AgileFlow is a comprehensive project management system powered by AI agents. It provides automated task management, documentation synchronization, and intelligent context preservation.
 
## Current Focus
 
- Implementing context compacting for long conversations
- Improving research workflow integration
- Expanding agent capabilities
 
## Feature Map
 
- **Core**: Project setup, status tracking, agent coordination
- **Documentation**: Automatic sync, README generation, ADR management
- **Agents**: 149 specialized agents for different tasks
- **Research**: Structured research notes and integration
 
## Tech Stack
 
- **Language**: TypeScript
- **Framework**: Next.js 16 (App Router)
- **UI**: React with Tailwind CSS
- **Package Manager**: npm with legacy-peer-deps
- **Deployment**: Vercel
 
## Key Decisions
 
- ADR-0001: Use TypeScript for type safety
- ADR-0002: Use React component library
- ADR-0003: Next.js for web framework
 
## Architecture Snapshot
 
- Monorepo structure with packages/ and apps/
- CLI package with 155 commands
- Website and documentation sites
- Agent-based command coordination
 
## Testing & CI
 
- Unit tests: Jest
- E2E tests: Playwright
- CI/CD: GitHub Actions
- Pre-commit hooks for validation
 
## Recent Progress
 
- Completed context compacting feature
- Improved documentation sync workflow
- Added 5 new specialized agents
 
## Risks
 
- Token limits with large projects
- Documentation drift during rapid development
 
## Next Steps
 
- Implement automated test coverage reporting
- Add real-time collaboration features
- Expand agent capabilities for code generation

Export for Web AI Tools

/agileflow:context:export

Outputs a concise excerpt (≤300 lines) ready to paste:

# Project Context Brief
 
Last updated: 2025-12-24
Project: AgileFlow - AI-powered project management
 
## What We're Building
AgileFlow provides automated task management, documentation, and AI agents.
 
## Current Focus
- Context compacting for conversations
- Research workflow integration
- Agent capability expansion
 
## Tech Stack
- TypeScript, Next.js 16, React, Tailwind CSS, Vercel
 
## Key Decisions
- ADR-0001: Use TypeScript
- ADR-0002: Use React components
- ADR-0003: Use Next.js
 
## Feature Map
- Core: Setup, tracking, coordination
- Documentation: Sync, README, ADRs
- Agents: 149 specialized agents
- Research: Structured notes
 
## Next Steps
- Automated test coverage
- Real-time collaboration
- More agent capabilities
 
---
 
Paste this excerpt into your web AI tool (ChatGPT, Perplexity, Gemini, Claude web) to load project context.

Add a Quick Note

/agileflow:context:note NOTE="User reported critical bug with OAuth flow on mobile"

Appends a timestamped note to the "Notes" section of docs/context.md:

## Notes
 
- **[2025-12-24T10:30:00Z]**: User reported critical bug with OAuth flow on mobile
- **[2025-12-23T14:15:00Z]**: Completed initial research on TypeScript 5.4 features
- **[2025-12-22T09:00:00Z]**: Decided to upgrade to React 19 in next sprint

Workflow Examples

Keep Context Fresh

Keep context updated for better AI assistance:

# After each major milestone
/agileflow:context:full
 
# Before starting work in web AI
/agileflow:context:export
# Copy output and paste into ChatGPT/Perplexity

Use in Web AI Conversations

Before asking web AI to help with your project:

# Export concise context
/agileflow:context:export
 
# Copy output and paste as initial message in ChatGPT
# Then ask your question with full project context

Capture Important Discoveries

/agileflow:context:note NOTE="TypeScript 5.4 improves type inference for generics"
/agileflow:context:note NOTE="Need to upgrade Node.js to 20+ for new features"
/agileflow:context:note NOTE="Team prefers MUI components over shadcn/ui"

Output Modes

/agileflow:context:full (Create/Update Context)

Input: Gathers information from:

  • status.json - Current work and story status
  • bus/log.jsonl - Recent progress messages
  • docs/03-decisions/ - Architecture decisions (ADRs)
  • docs/04-architecture/ - System design documentation
  • docs/05-epics/ - Feature roadmap and epics
  • CHANGELOG.md - Release history
  • package.json - Project metadata

Output: Updates docs/context.md with managed sections while preserving custom content

Key Behavior:

  • Diff-first: Shows changes before writing
  • Managed sections: Only updates content between <!-- MANAGED_SECTION --> markers
  • Preserves user content: Never modifies content outside managed sections
  • Requires confirmation: User must approve changes

/agileflow:context:export (Copy to Web AI)

Input: Reads existing docs/context.md

Output: Concise excerpt (≤300 lines) ready to paste into ChatGPT, Perplexity, Gemini, or Claude web

Use Case: Load project context into web AI tool to continue work in a fresh conversation

Key Behavior:

  • Read-only: No files are modified
  • Self-contained: Includes instructions for pasting
  • Format-ready: Already formatted for easy copy-paste

/agileflow:context:note (Append Timestamped Note)

Input: NOTE argument with 1-5 line note

Output: Appends to "Notes" section with ISO timestamp

Use Case: Quick capture of important events, decisions, or discoveries

Key Behavior:

  • Diff-first: Shows changes before writing
  • Creates section if missing: Automatically creates "Notes" section if needed
  • Chronological: Notes appear in order with newest at bottom
  • Timestamped: Every note includes ISO 8601 timestamp

Best Practices

Regular Context Updates

Keep context fresh for better AI assistance:

  1. After major milestones: Run /agileflow:context:full to capture completed work
  2. Before web AI sessions: Run /agileflow:context:export and paste into ChatGPT
  3. During development: Use /agileflow:context:note to record decisions and discoveries
# Recommended workflow
/agileflow:context:full        # Update full context
/agileflow:context:export      # Get concise version
# Paste into web AI for context-aware help

Capture Important Discoveries

Record technical insights and decisions:

/agileflow:context:note NOTE="TypeScript 5.4 improves type inference - consider upgrading"
/agileflow:context:note NOTE="Stripe API changed pagination in v2.0 - update integration"
/agileflow:context:note NOTE="Team consensus: use Postgres over MongoDB for this project"

Use in Web AI Conversations

Maximize effectiveness of web AI tools by providing context:

  1. Export concise context: /agileflow:context:export
  2. Copy the output
  3. Paste into ChatGPT, Perplexity, or Gemini as your first message
  4. Ask follow-up questions with full project context

This ensures the web AI understands your codebase, architecture, and current focus.


Manage Context File Size

For large projects, manage context.md file size:

  • Use /agileflow:context:export to check current context size
  • Archive old notes if they grow beyond 100+ entries
  • Create separate research files for deep dives
  • Use /agileflow:research:ask for complex research topics

Diff-First Workflow

All context commands that modify files follow a consistent workflow:

  1. Show Changes: Command displays proposed changes as a diff
  2. Confirm: You review changes and approve or reject
  3. Apply: Changes are written only after your confirmation

This ensures you never lose important information and always know what's being modified.



Notes

  • Context files are stored in docs/context.md as part of your local project documentation
  • Managed sections use HTML comments as markers and should not be edited manually
  • The export command respects the 300-line limit to fit in web AI tool context windows
  • Notes are timestamped in ISO 8601 format for consistency and easy sorting