This directory contains GitHub-specific files and comprehensive guidance for working on the ollama-kit project.
| File | Purpose |
|---|---|
copilot-instructions.md |
Primary agent guidance — comprehensive instructions for AI coding agents |
CONTRIBUTING.md |
Human contributor guidelines |
PULL_REQUEST_TEMPLATE.md |
PR template with checklist |
ISSUE_TEMPLATE/ |
Issue templates for bugs and features |
If you're an AI agent working on this project, read these files in order:
docs/index/MASTER_INDEX.md ← Current state, active sprint
docs/design/DESIGN.md ← Full product specification
docs/_system/agent-guidance.md ← Rules for working
The /docs folder is the single source of truth:
docs/
├── _system/ # System rules
│ ├── agent-guidance.md # How to work on this project
│ ├── conventions.md # Naming and status rules
│ ├── lifecycle.md # State transitions
│ └── bootstrap.md # Initial setup runbook
├── design/
│ └── DESIGN.md # Product specification (authoritative)
├── index/
│ ├── MASTER_INDEX.md # Current state (start here!)
│ └── ROADMAP.md # High-level milestones
├── phases/ # PHASE-XX-*.md files
├── sprints/ # SPRINT-XX.md files
├── features/ # FEAT-XXX-*.md files
├── bugs/ # BUG-XXX-*.md files
├── refactors/ # REFACTOR-XXX-*.md files
├── decisions/ # ADR-XXXX-*.md files
│ └── DECISION_LOG.md # Index of all ADRs
└── templates/ # Templates for creating new docs
- Only work on items in the active sprint — Check
MASTER_INDEX.md - No new work without an ID and file — Every task needs a doc
- If docs conflict, MASTER_INDEX wins — It's the source of truth
- Do not silently expand scope — Create an ADR for significant changes
Use ONLY these status values:
| Status | Meaning | Used For |
|---|---|---|
planned |
Not started | All types |
active |
Currently running | Phases, Sprints only |
in_progress |
Being worked on | Features, Bugs, Refactors |
blocked |
Waiting on something | Features, Bugs, Refactors |
review |
Ready for review | Features, Bugs, Refactors |
complete |
Done | All types |
deprecated |
No longer relevant | All types |
| Type | Pattern | Example |
|---|---|---|
| Phase | PHASE-XX |
PHASE-01-foundation.md |
| Sprint | SPRINT-XX |
SPRINT-01.md |
| Feature | FEAT-XXX |
FEAT-001-package-structure.md |
| Bug | BUG-XXX |
BUG-001-timeout-race.md |
| Refactor | REFACTOR-XXX |
REFACTOR-001-http-cleanup.md |
| Decision | ADR-XXXX |
ADR-0001-zod-first-schemas.md |
1. Read docs/index/MASTER_INDEX.md
2. Identify active sprint
3. Pick a planned item from the sprint
4. Update item status to in_progress
5. Update MASTER_INDEX "In Progress" section
6. Do the work
7. Update item status to complete
8. Remove from MASTER_INDEX "In Progress"
If you need to make a significant design choice:
- Create
docs/decisions/ADR-XXXX-name.md - Add entry to
docs/decisions/DECISION_LOG.md - Link from relevant feature docs
If a new task is needed (found during implementation):
- Discuss with user first
- Create appropriate doc file (feature/bug/refactor)
- Add to current or future sprint
- Update
MASTER_INDEX.md
ollama-kit is structured as:
src/
├── index.ts # Main entry (ollama-kit)
├── client.ts # OllamaClient class
├── createClient.ts # Factory function
├── types/ # Shared types
├── http/ # HTTP layer
├── streaming/ # Stream parsing
├── chat/ # Chat API
├── tools/ # Tool calling
├── schemas/ # Schema adapters
├── errors/ # Error classes
├── react/ # ollama-kit/react
│ └── index.ts
└── node/ # ollama-kit/node
└── index.ts
| ADR | Decision |
|---|---|
| ADR-0001 | Zod-first schemas with JSON Schema fallback |
| ADR-0002 | Manual tool mode default, auto-execute opt-in |
| ADR-0003 | Proxy-first architecture for browser usage |
| ADR-0004 | Single package with subpath exports |
| ADR-0005 | Adapter-based tokenizer with default estimator |
- Check
docs/_system/files for rules - Check
docs/design/DESIGN.mdfor product requirements - Check ADRs in
docs/decisions/for past decisions - Ask for clarification (don't guess)