| name | project-init |
| description | Initialize a new project with standard .gid/ directory structure |
| version | 1.0.0 |
| author | potato |
| triggers | {"patterns":["init project","new project","create project","initialize project","ๆฐๅปบ้กน็ฎ","ๅๅงๅ้กน็ฎ","ๅผไธชๆฐ้กน็ฎ"],"keywords":["project init","gid init","project setup","scaffold project"]} |
| tags | ["project-management","setup"] |
| priority | 60 |
| always_load | false |
| max_body_size | 4096 |
SKILL: Project Initialization
Set up a new project with the standard .gid/ directory structure for GID-driven development.
Philosophy
Every project managed by GID follows a consistent directory structure. .gid/ is the project's brain โ it holds the dependency graph, feature documentation, and issue tracking. Consistency across projects means skills, tools, and workflows all work the same way everywhere.
When to Use
- Starting a brand new project
- Onboarding an existing codebase into GID workflow
- When potato says "init project", "ๆฐๅปบ้กน็ฎ", etc.
Standard .gid/ Structure
{project_root}/
โโโ .gid/
โ โโโ graph.yml โ Dependency graph (created by `gid init`)
โ โโโ config.yml โ GID config (optional, for ritual gating etc.)
โ โโโ requirements.md โ Master requirements (GUARDs + feature index)
โ โโโ design.md โ Master design (architecture overview)
โ โโโ features/ โ Feature-level documentation
โ โ โโโ {feature-name}/
โ โ โ โโโ requirements.md
โ โ โ โโโ design.md
โ โ โโโ ...
โ โโโ issues/ โ Issue tracking
โ โ โโโ ISSUES.md โ Issue index (all issues listed here)
โ โ โโโ ISS-001/ โ Per-issue workspace (requirements, design, etc.)
โ โ โโโ ...
โ โโโ reviews/ โ Review findings (auto-generated)
โ โ โโโ {doc-name}-review.md
โ โโโ rituals/ โ Ritual state files (auto-generated)
โ โโโ {id}.json
โโโ src/ โ Source code
โโโ tests/ โ Tests
โโโ ...
Pipeline
Step 1: Determine Project Location
Ask potato (if not obvious from context):
- Project name: What's the project called?
- Location: Where should it live?
- New project under RustClaw workspace:
/Users/potato/rustclaw/projects/{name}/
- New project under OpenClaw workspace:
/Users/potato/clawd/projects/{name}/
- Custom location: wherever potato specifies
- Existing codebase: use its current location
โ ๏ธ Never create a project root inside another project's .gid/.
Step 2: Create Project Root (if new)
mkdir -p {project_root}
cd {project_root}
For Rust projects:
cargo init {project_root}
For other languages, just create the directory.
Step 3: Initialize GID Graph
cd {project_root}
gid init
This creates .gid/graph.yml with project metadata. gid init only creates the graph file โ the rest of the structure is our responsibility.
Step 4: Create Standard Directories
cd {project_root}
mkdir -p .gid/features
mkdir -p .gid/issues
mkdir -p .gid/reviews
mkdir -p .gid/rituals
Step 5: Create ISSUES.md Template
cat > .gid/issues/ISSUES.md << 'EOF'
> ้กน็ฎไฝฟ็จ่ฟ็จไธญๅ็ฐ็ bugใๆน่ฟ็นๅๅพ
ๅไบ้กนใ
> ๆ ผๅผ: ISS-{NNN} [{type}] [{priority}] [{status}]
---
*(No issues yet)*
EOF
Step 6: Git Setup (if needed)
If the project doesn't have .git/:
cd {project_root}
git init
Add .gid/rituals/ and .gid/reviews/ to .gitignore (auto-generated, not worth tracking):
echo ".gid/rituals/" >> .gitignore
echo ".gid/reviews/" >> .gitignore
Keep everything else in .gid/ tracked:
graph.yml โ project structure
features/ โ requirements & design docs
issues/ โ issue tracking
config.yml โ GID config
Step 7: Record in Memory
- Daily log โ note the new project
- Engram โ store for future recall:
engram_store(type=factual, importance=0.5,
content="New project initialized: {name} at {path}. Language: {lang}. Purpose: {brief}")
Step 8: Report
โ
Project initialized: {name}
๐ Location: {project_root}/
๐ Graph: .gid/graph.yml
๐ Issues: .gid/issues/ISSUES.md
๐ Features: .gid/features/ (empty, ready for requirements & design)
Next steps:
1. Write requirements โ .gid/requirements.md (or .gid/features/{feat}/requirements.md)
2. Write design โ .gid/design.md (or .gid/features/{feat}/design.md)
3. Generate graph โ gid_design
4. Start building โ gid_tasks
Feature Documentation Convention
When adding features to an initialized project:
.gid/features/{feature-name}/
โโโ requirements.md โ WHAT this feature does (GOALs)
โโโ design.md โ HOW this feature is built (components, data flow)
Naming rules:
- Feature directory names: lowercase, hyphen-separated (e.g.,
core-engine, data-loading)
- One feature = one directory
- Each feature should have โค15 GOALs in requirements and โค8 components in design
- If a feature exceeds these limits, split into sub-features
Master documents (project-level) go directly in .gid/:
.gid/requirements.md โ master requirements (GUARDs, feature index, cross-cutting concerns)
.gid/design.md โ master design (architecture overview, cross-cutting patterns)
Existing Project Onboarding
For codebases that already exist but don't have .gid/:
- Run
gid init to create graph
- Create the directory structure (Step 4-5 above)
- Run
gid_extract on src/ to build code-level graph nodes
- Optionally: write retroactive requirements/design docs based on existing code
Rules
gid init is just the graph. Always follow up with directory creation.
- Don't skip ISSUES.md. Even if there are no issues yet, create the template.
- features/ starts empty. Don't create placeholder feature dirs โ add them when actual features are being designed.
- One project, one
.gid/. Never nest .gid/ directories.
- Track
.gid/ in git (except rituals/ and reviews/).