The context repository is Buildforce's persistent memory—a version-controlled directory containing YAML files that capture your project's accumulated knowledge.
.buildforce/
├── context/
│ ├── _index.yaml # Context catalog
│ ├── authentication.yaml # Module context
│ ├── error-handling.yaml # Pattern context
│ ├── api-conventions.yaml # Design decisions
│ └── database-schema.yaml # Data model context
└── specs/
└── [feature-folders]/ # Feature specs and plans
Architectural Decisions
Design Patterns
Module Documentation
Implementation Knowledge
Each context file follows a structured format:
version: "0.0.29"
id: "authentication-module"
name: "Authentication Module"
type: module # module | feature | component | pattern
description: "JWT-based authentication with OAuth2 support"
# What this context is about
overview: |
The authentication system uses JWT tokens with 15-minute expiration
and refresh tokens for extended sessions. Supports email/password
and OAuth2 (Google, GitHub).
# Key implementation decisions
key_decisions:
- decision: "Use bcrypt for password hashing"
rationale: "Better salt handling and security than crypto module"
- decision: "15-minute JWT expiration with refresh tokens"
rationale: "Balance between security and UX"
# Important files
file_paths:
primary:
- path: "src/auth/middleware.ts"
purpose: "JWT validation middleware"
- path: "src/auth/service.ts"
purpose: "Authentication business logic"
# Relationships to other contexts
related_context:
- user-management
- api-security
- session-handling
# Searchable tags
tags:
- authentication
- jwt
- oauth2
- security
/completeWhen you finish a feature with /complete, Buildforce:
.buildforce/context/_index.yaml catalog/documentFor existing code or tribal knowledge:
/research [topic to understand]
/document [what to document]
Example:
/research authentication patterns in this codebase
/document authentication module
Buildforce creates context files based on conversation history and code exploration.
/research Command/research authentication patterns in this codebase
What happens:
_index.yaml for relevant context filesSearch matches:
_index.yaml)The index tracks all context files for fast searching:
version: 1.0
contexts:
- id: "authentication-module"
file: "authentication.yaml"
type: module
description: "JWT-based authentication with OAuth2 support"
tags: [auth, jwt, oauth2, security]
related_context: [user-management, api-security]
- id: "error-handling-patterns"
file: "error-handling.yaml"
type: pattern
description: "Centralized error handling with typed errors"
tags: [errors, patterns, typescript]
related_context: [api-conventions]
.buildforce/context/
└── _index.yaml (1 context)
└── authentication.yaml
.buildforce/context/
├── _index.yaml (8 contexts)
├── authentication.yaml
├── authorization.yaml
├── user-management.yaml
├── api-conventions.yaml
├── error-handling.yaml
├── database-schema.yaml
├── caching-strategy.yaml
└── deployment-process.yaml
.buildforce/context/
├── _index.yaml (50+ contexts)
├── modules/
│ ├── authentication.yaml
│ ├── authorization.yaml
│ └── ... (20+ modules)
├── patterns/
│ ├── error-handling.yaml
│ ├── caching-strategy.yaml
│ └── ... (15+ patterns)
└── features/
├── oauth2-integration.yaml
├── rate-limiting.yaml
└── ... (15+ features)
Context files are plain text YAML—commit them with your code:
git add .buildforce/context/
git commit -m "Add authentication context"
git push
Benefits:
related_context