- Scan directory structure for project type identification
- Detect language, framework, package manager
- Identify build tools, CI/CD config, test framework
- Map high-level architecture (monorepo, microservices, etc.)
2. Semantic Index Building
Four parallel index domains:
- Code Index: Source files with exports, purposes, dependencies
- Test Index: Test files with cases, fixtures, patterns
- Config Index: Configuration files with parsed rules
- API Index: Public interfaces, types, data models
3. Convention Discovery
- Code style patterns (naming, structure, organization)
- Error handling conventions
- Testing conventions (naming, structure, assertions)
- Git commit message conventions
- Documentation standards
- Language-conditional standards
4. Rule Generation
Convert conventions into enforceable rules:
{
"id": "ts-no-any",
"category": "coding-standards",
"description": "Avoid 'any' type; use 'unknown' and narrow",
"severity": "error",
"autoFixable": false,
"language": "typescript"
}
Rule Categories
| Category |
Examples |
| core |
task-and-workflow, testing, verification |
| dev-practices |
development-practices, context-management |
| tools |
research-tools, cli-tools |
| coding-standards |
Language-specific rules (conditional) |
Output Artifacts
artifacts/CONVENTIONS.md -- Discovered conventions
artifacts/SEARCH-INDEX.json -- Semantic search index
artifacts/RULES.md -- Generated project rules
1---
2name: codebase-sync
3description: Convention discovery and rule generation from codebase analysis. Scans project structure, builds search indexes, identifies patterns, and generates enforceable rules.
4allowed-tools: Bash(*) Read Write Edit Glob Grep
5metadata:
6 source: https://skillmd.com/skills/a5c-ai/codebase-sync
7 author: babysitter-sdk
8 version: "1.0.0"
9 category: pilot-shell-sync
10 attribution: "Adapted from Pilot Shell by Max Ritter (https://github.com/maxritter/pilot-shell)"
11graph:
12 domains: [domain:software-engineering]
13 skillAreas: [skill-area:agentic-loops, skill-area:orchestration-loop]
14 workflows: [workflow:feature-development]
15 topics: [topic:developer-experience]
16 roles: [role:tech-lead, role:backend-engineer]
17---
18
19- Scan directory structure for project type identification
20- Detect language, framework, package manager
21- Identify build tools, CI/CD config, test framework
22- Map high-level architecture (monorepo, microservices, etc.)
23
24### 2. Semantic Index Building
25Four parallel index domains:
26- **Code Index**: Source files with exports, purposes, dependencies
27- **Test Index**: Test files with cases, fixtures, patterns
28- **Config Index**: Configuration files with parsed rules
29- **API Index**: Public interfaces, types, data models
30
31### 3. Convention Discovery
32- Code style patterns (naming, structure, organization)
33- Error handling conventions
34- Testing conventions (naming, structure, assertions)
35- Git commit message conventions
36- Documentation standards
37- Language-conditional standards
38
39### 4. Rule Generation
40Convert conventions into enforceable rules:
41```json
42{
43 "id": "ts-no-any",
44 "category": "coding-standards",
45 "description": "Avoid 'any' type; use 'unknown' and narrow",
46 "severity": "error",
47 "autoFixable": false,
48 "language": "typescript"
49}
50```
51
52## Rule Categories
53
54| Category | Examples |
55|----------|---------|
56| **core** | task-and-workflow, testing, verification |
57| **dev-practices** | development-practices, context-management |
58| **tools** | research-tools, cli-tools |
59| **coding-standards** | Language-specific rules (conditional) |
60
61## Output Artifacts
62
63- `artifacts/CONVENTIONS.md` -- Discovered conventions
64- `artifacts/SEARCH-INDEX.json` -- Semantic search index
65- `artifacts/RULES.md` -- Generated project rules