mirror of
https://github.com/affaan-m/ECC.git
synced 2026-09-30 21:45:13 +02:00
Adds a curated, Pi-native, skills+prompts-only profile at pi/core/ for downstream packagers that mirror GitHub Releases. - manifests/pi-core.json: explicit include lists, per-item exclusion reasons, curation rules, safety allowlists; every root skill and command must be classified. - scripts/build-pi-core.js regenerates pi/core deterministically (package.json from VERSION, LICENSE, README.md, CURATION.md, skills/, commands/); --check fails CI on drift. council is renamed ecc-council inside pi/core only. - Safety checks: no callable endpoints outside the allowlist, no npx/curl|sh/pip install, no secrets, no absolute home paths, no symlinks, valid frontmatter, no duplicate names. - CI: build + drift check and an offline Pi CLI load test of pi/core. - Release: VERSION, package.json and pi/core/package.json at 2.2.2, CHANGELOG, tag-triggered release verification, and a two-week cadence in CONTRIBUTING.md. pi/core: 123 of 293 skills and 24 of 94 commands; 35,006 characters of skill description text.
2.4 KiB
2.4 KiB
description
| description |
|---|
| Scan project structure and generate token-lean architecture codemaps. |
Update Codemaps
Analyze the codebase structure and generate token-lean architecture documentation.
Step 1: Scan Project Structure
- Identify the project type (monorepo, single app, library, microservice)
- Find all source directories (src/, lib/, app/, packages/)
- Map entry points (main.ts, index.ts, app.py, main.go, etc.)
Step 2: Generate Codemaps
Create or update codemaps in docs/CODEMAPS/ (or .reports/codemaps/):
| File | Contents |
|---|---|
architecture.md |
High-level system diagram, service boundaries, data flow |
backend.md |
API routes, middleware chain, service → repository mapping |
frontend.md |
Page tree, component hierarchy, state management flow |
data.md |
Database tables, relationships, migration history |
dependencies.md |
External services, third-party integrations, shared libraries |
Codemap Format
Each codemap should be token-lean — optimized for AI context consumption:
# Backend Architecture
## Routes
POST /api/users → UserController.create → UserService.create → UserRepo.insert
GET /api/users/:id → UserController.get → UserService.findById → UserRepo.findById
## Key Files
src/services/user.ts (business logic, 120 lines)
src/repos/user.ts (database access, 80 lines)
## Dependencies
- PostgreSQL (primary data store)
- Redis (session cache, rate limiting)
- Stripe (payment processing)
Step 3: Diff Detection
- If previous codemaps exist, calculate the diff percentage
- If changes > 30%, show the diff and request user approval before overwriting
- If changes <= 30%, update in place
Step 4: Add Metadata
Add a freshness header to each codemap:
<!-- Generated: 2026-02-11 | Files scanned: 142 | Token estimate: ~800 -->
Step 5: Save Analysis Report
Write a summary to .reports/codemap-diff.txt:
- Files added/removed/modified since last scan
- New dependencies detected
- Architecture changes (new routes, new services, etc.)
- Staleness warnings for docs not updated in 90+ days
Tips
- Focus on high-level structure, not implementation details
- Prefer file paths and function signatures over full code blocks
- Keep each codemap under 1000 tokens for efficient context loading
- Use ASCII diagrams for data flow instead of verbose descriptions
- Run after major feature additions or refactoring sessions