|
๐งญ ย Your coding Agent keeps losing product intent, architecture choices, and task context between sessions? |
Discuss โ specify โ initialize โ build โ maintain context
๐งฉ Editions ยท โจ Highlights ยท ๐บ Workflow ยท ๐ฆ Files ยท โก Install ยท ๐ Usage ยท ๐ก Principles ยท ๐ฌ Example ยท ๐ Structure ยท ๐ Notes
English ยท ็ฎไฝไธญๆ ยท Espaรฑol ยท Deutsch ยท ๆฅๆฌ่ช ยท ะ ัััะบะธะน ยท Portuguรชs ยท ํ๊ตญ์ด
| Full | Lite | |
|---|---|---|
| Skills | spec-gen, project-init, readme-craft |
spec-gen-lite, project-init-lite |
| Project files | 3 core files, up to 9 when triggered | 3 core files |
| Task model | Priority queue, triage headers, issues, decisions, and handoffs | Phase queue with [S/M/L/XL] sizing |
| Best fit | Multi-module work, longer projects, multiple sessions, or team handoffs | Focused solo projects, prototypes, and short delivery cycles |
| Install source | skills/ |
lite/skills/ |
Both editions live in this repository. Install one edition in a coding environment so the two pairs of overlapping Skill triggers stay unambiguous.
| Skill | Input | Output | Place in the workflow |
|---|---|---|---|
spec-gen |
Product discussion and constraints | A structured SPEC.md |
First: define the product |
project-init |
An existing SPEC.md |
Project guidance and management files | Second: prepare the coding environment |
readme-craft |
Repository facts and audience | A polished project README.md |
Standalone: explain the project publicly |
The core development path uses spec-gen followed by project-init. readme-craft is an independent documentation Skill included in the same repository.
flowchart LR
A([Discuss product]) --> B[spec-gen]
B --> C[SPEC.md]
C --> D[project-init]
D --> E[CLAUDE.md]
D --> F[TODO.md]
D -. when needed .-> G[ARCHITECTURE ยท SCHEMA ยท DESIGN]
E --> H([Coding Agent])
F --> H
G --> H
H -. first issue .-> I[ISSUES.md]
H -. first decision .-> J[DECISIONS.md]
H -. cross-session handoff .-> K[PROGRESS.md]
H --> L([Build with context])
M([Repository facts]) --> N[readme-craft]
N --> O[README.md]
style A fill:#FEF3C7,stroke:#F59E0B,stroke-width:2px,color:#000
style B fill:#DBEAFE,stroke:#3B82F6,stroke-width:2px,color:#000
style C fill:#EDE9FE,stroke:#8B5CF6,stroke-width:2px,color:#000
style D fill:#DBEAFE,stroke:#3B82F6,stroke-width:2px,color:#000
style E fill:#F1F5F9,stroke:#64748B,stroke-width:1px,color:#000
style F fill:#F1F5F9,stroke:#64748B,stroke-width:1px,color:#000
style G fill:#F8FAFC,stroke:#94A3B8,stroke-width:1px,stroke-dasharray:4 4,color:#000
style H fill:#DCFCE7,stroke:#22C55E,stroke-width:2px,color:#000
style I fill:#FEF2F2,stroke:#EF4444,stroke-width:1px,stroke-dasharray:4 4,color:#000
style J fill:#FFFBEB,stroke:#F59E0B,stroke-width:1px,stroke-dasharray:4 4,color:#000
style K fill:#F0FDF4,stroke:#22C55E,stroke-width:1px,stroke-dasharray:4 4,color:#000
style L fill:#DCFCE7,stroke:#22C55E,stroke-width:2px,color:#000
style M fill:#FEF3C7,stroke:#F59E0B,stroke-width:2px,color:#000
style N fill:#DBEAFE,stroke:#3B82F6,stroke-width:2px,color:#000
style O fill:#EDE9FE,stroke:#8B5CF6,stroke-width:2px,color:#000
project-init reads the SPEC and decides how much structure the project needs. It also writes natural-language maintenance rules into CLAUDE.md. An Agent that follows those rules can create state-bearing files when their first real trigger occurs; no runtime hook enforces this behavior.
| File | Source | Purpose |
|---|---|---|
SPEC.md |
spec-gen |
Product scope, modules, constraints, data needs, and MVP boundary |
CLAUDE.md |
project-init |
The Agent entry point, permissions, repository map, and automation rules |
TODO.md |
project-init |
A prioritized queue with a focused current-task section |
| File | Trigger | Purpose |
|---|---|---|
ARCHITECTURE.md |
Three or more functional modules | System structure, dependencies, interfaces, and data flow |
SCHEMA.md |
A database or complex data model | Entities, fields, constraints, indexes, and migrations |
DESIGN.md |
A user interface | Visual system, components, flows, states, and responsive behavior |
| File | First trigger | Purpose |
|---|---|---|
ISSUES.md |
A bug, technical problem, limitation, or open question | Structured issue tracking with status and module IDs |
DECISIONS.md |
A technical or architectural choice | Decision records, rejected options, and reversibility level |
PROGRESS.md |
The first cross-session handoff | Current phase, blockers, milestones, and restart point |
The framework starts with three files and can grow to nine. Each additional file has a concrete trigger.
These instructions install the Full edition. For the three-core-file setup, use the Lite installation guide.
Give Claude Code this line:
Remove the five managed Full and Lite Skill directories from the target scope, then install all three Full Skills from
https://github.com/okht/ai-dev-context-framework/tree/main/skills.
๐ ๏ธ Install manually
Clone the repository:
git clone --depth=1 https://github.com/okht/ai-dev-context-framework.gitInstall globally for Claude Code and clean any managed Lite Skills:
bash ai-dev-context-framework/scripts/sync-skills.sh fullInstall into the current project and clean any managed Lite Skills:
mkdir -p .claude/skills
rm -rf .claude/skills/spec-gen .claude/skills/project-init .claude/skills/readme-craft .claude/skills/spec-gen-lite .claude/skills/project-init-lite
cp -r ai-dev-context-framework/skills/* .claude/skills/Start a new Claude Code turn after installation so the Skill index refreshes.
For development on this repository, the bundled sync script copies the current skills/ directories into ~/.claude/skills/:
bash scripts/sync-skills.sh fullThe sync script removes the five managed Full and Lite Skill directories, then copies the selected Full edition. Unrelated global Skills remain in place. Review the script and the destination before running it.
Other AI coding tools can use the Markdown instructions and templates directly. Skill discovery and invocation syntax depend on the host.
/spec-gen
Or ask naturally:
Turn our product discussion into a structured SPEC.
spec-gen writes SPEC.md, covering product overview, feature modules, non-functional requirements, data needs, technical constraints, MVP scope, and glossary.
/project-init
project-init checks for SPEC.md, creates the core files, evaluates conditional files, and embeds maintenance rules for later development.
/readme-craft
Use readme-craft independently when the repository needs a clear public-facing README based on verified project facts.
| Principle | How the framework applies it |
|---|---|
| LLM-readable structure | Stable headings, explicit relationships, tables, and plain-text rules |
| Prompt-level permissions | Locked and generated regions tell the Agent what the workflow expects it to change |
| Process and decision split | Routine progress can move quickly while product and architecture changes require approval |
| Complexity-scaled files | Small projects stay light; additional files appear from explicit signals |
| Bounded document size | A SPEC above 300 lines prompts a module split into docs/spec/ |
| Deterministic summaries | State headers are rebuilt from counts, modules, IDs, and dates |
Generated files mark their boundaries with HTML comments:
<!-- ๐ START ้ๅฎๅบ๏ผ่งๅ -->
Rules the Agent must preserve
<!-- ๐ END ้ๅฎๅบ๏ผ่งๅ -->
<!-- ๐ START ็ๆๅบ๏ผ้กน็ฎๅ
ๅฎน -->
Project-specific content the Agent can maintain
<!-- ๐ END ็ๆๅบ๏ผ้กน็ฎๅ
ๅฎน -->The generated instructions require user confirmation before substantive changes to SPEC.md, ARCHITECTURE.md, SCHEMA.md, DESIGN.md, and DECISIONS.md. Process files such as TODO.md, ISSUES.md, and PROGRESS.md are intended for routine Agent maintenance. These controls are conventions in Markdown and depend on Agent compliance.
TODO.md, ISSUES.md, PROGRESS.md, and DECISIONS.md begin with a compact, mechanically derived status block.
| File | Header focus |
|---|---|
TODO.md |
In-progress count, backlog distribution, next action, update date |
ISSUES.md |
Active modules, first relevant item, state counts, MVP blockers |
PROGRESS.md |
Phase, milestone progress, blockers, restart point |
DECISIONS.md |
Irreversible decisions, count, and update date |
Each template includes the rebuild algorithm in a locked section. After changing the body, the Agent recomputes the complete header from the source entries.
The examples/ directory contains a filled set for ChatLens, a fictional B2B conversation-analytics product.
| What the example shows | Important context |
|---|---|
| All nine project files | They were intentionally generated together to demonstrate every template |
| Locked and generated regions | The permission model in realistic documents |
| Triage headers and algorithms | How state summaries stay mechanically derived |
| Cross-file references | How tasks, issues, decisions, and progress connect |
Real projects follow the trigger rules. A small project may use only SPEC.md, CLAUDE.md, and TODO.md.
ai-dev-context-framework/
โโโ README.md
โโโ LICENSE
โโโ scripts/
โ โโโ sync-skills.sh
โโโ skills/
โ โโโ spec-gen/
โ โ โโโ SKILL.md
โ โ โโโ templates/SPEC.md.example
โ โโโ project-init/
โ โ โโโ SKILL.md
โ โ โโโ templates/*.md.example
โ โโโ readme-craft/
โ โโโ SKILL.md
โ โโโ agents/openai.yaml
โ โโโ references/
โ โ โโโ visual-system.md
โ โ โโโ verification.md
โ โโโ scripts/validate_readme.py
โ โโโ templates/README.md.example
โโโ lite/
โ โโโ README.md
โ โโโ WORKFLOW.md
โ โโโ skills/
โ โโโ spec-gen-lite/SKILL.md
โ โโโ project-init-lite/SKILL.md
โโโ examples/
โโโ SPEC.md
โโโ CLAUDE.md
โโโ TODO.md
โโโ ARCHITECTURE.md
โโโ SCHEMA.md
โโโ DESIGN.md
โโโ ISSUES.md
โโโ DECISIONS.md
โโโ PROGRESS.md
The repository stores Skills, reusable templates, a complete example, and one developer sync helper. It contains no application runtime.
spec-genandproject-initform the core project workflow.readme-craftis a standalone README-writing Skill.lite/is the three-core-file edition maintained in the same repository.- Install either the Full or Lite edition in one coding environment to avoid overlapping Skill triggers.
project-initexpects an existing, completeSPEC.md.- The nine-file ChatLens set is a showcase; normal output scales with project complexity.
scripts/sync-skills.sh full|litecleans the other managed edition before copying the selected global Skills.- The repository currently distributes source Skill folders and does not publish packaged
.skillreleases.
Issues and pull requests are welcome.
Keep product intent, implementation context, and project state in the same system.
MIT License ยฉ okht