Backend Init
Initialize backend development environment by creating the constraints file.
Language Configuration
Before generating any content, check aico.json in project root for language field to determine the output language. If not set, default to English.
Process
- Check existing: Look for
docs/reference/backend/constraints.md
- If exists: Ask user if they want to overwrite or skip
- Create directory structure:
docs/reference/backend/
├── constraints.md
└── tasks/
- Generate constraints file:
- Read template from
references/constraints.template.md
- Guide user through key decisions
- Save output: Write to
docs/reference/backend/constraints.md
Document Header Format
All generated documents MUST use this unified header format:
# [Document Title]
> Project: [project-name]
> Created: YYYY-MM-DD
> Last Updated: YYYY-MM-DD
Guided Questions
| Category |
Questions |
| Language/Runtime |
Node.js, Python, Go, Rust? |
| Framework |
Express, Fastify, FastAPI, Gin? |
| Database |
PostgreSQL, MySQL, MongoDB? |
| ORM/Query |
Prisma, Drizzle, SQLAlchemy, GORM? |
| Testing |
Vitest, Jest, Pytest, Go test? |
| API Style |
REST, GraphQL, gRPC? |
Template
See references/constraints.template.md for the full constraints template.
Update Instructions File
After creating constraint files, update the project's AI instructions file to reference them:
Check for existing instructions file:
- Look for
CLAUDE.md (Claude Code) or AGENTS.md (Codex) in project root
- If neither exists, create
CLAUDE.md
Add reference section at the end of the file:
## Reference Documents
The following constraint documents should be read before starting work:
- `docs/reference/backend/constraints.md` - Tech stack and coding conventions
If file already has Reference Documents section: Append the new reference if not already present
Output
✓ Created docs/reference/backend/constraints.md
✓ Created docs/reference/backend/tasks/
✓ Updated CLAUDE.md with reference to constraint files
✓ Backend environment initialized
Key Rules
- ALWAYS use the unified header format
- MUST guide user through tech stack questions
- ALWAYS create tasks/ directory
- ALWAYS save to
docs/reference/backend/constraints.md
- MUST update CLAUDE.md or AGENTS.md with reference to constraint files
1---2name: aico-backend-init3description: Aico Backend Init4---5
6# Backend Init
7
8Initialize backend development environment by creating the constraints file.
9
10## Language Configuration
11
12Before generating any content, check `aico.json` in project root for `language` field to determine the output language. If not set, default to English.
13
14## Process
15
161. **Check existing**: Look for `docs/reference/backend/constraints.md`
172. **If exists**: Ask user if they want to overwrite or skip
183. **Create directory structure**:
19 ```
20 docs/reference/backend/
21 ├── constraints.md
22 └── tasks/
23 ```
244. **Generate constraints file**:
25 - Read template from `references/constraints.template.md`
26 - Guide user through key decisions
275. **Save output**: Write to `docs/reference/backend/constraints.md`
28
29## Document Header Format
30
31All generated documents MUST use this unified header format:
32
33```markdown
34# [Document Title]
35
36> Project: [project-name]
37> Created: YYYY-MM-DD
38> Last Updated: YYYY-MM-DD
39```
40
41## Guided Questions
42
43| Category | Questions |
44| ---------------- | ---------------------------------- |
45| Language/Runtime | Node.js, Python, Go, Rust? |
46| Framework | Express, Fastify, FastAPI, Gin? |
47| Database | PostgreSQL, MySQL, MongoDB? |
48| ORM/Query | Prisma, Drizzle, SQLAlchemy, GORM? |
49| Testing | Vitest, Jest, Pytest, Go test? |
50| API Style | REST, GraphQL, gRPC? |
51
52## Template
53
54See `references/constraints.template.md` for the full constraints template.
55
56## Update Instructions File
57
58After creating constraint files, update the project's AI instructions file to reference them:
59
601. **Check for existing instructions file**:
61 - Look for `CLAUDE.md` (Claude Code) or `AGENTS.md` (Codex) in project root
62 - If neither exists, create `CLAUDE.md`
63
642. **Add reference section** at the end of the file:
65
66 ```markdown
67 ## Reference Documents
68
69 The following constraint documents should be read before starting work:
70
71 - `docs/reference/backend/constraints.md` - Tech stack and coding conventions
72 ```
73
743. **If file already has Reference Documents section**: Append the new reference if not already present
75
76## Output
77
78```
79✓ Created docs/reference/backend/constraints.md
80✓ Created docs/reference/backend/tasks/
81✓ Updated CLAUDE.md with reference to constraint files
82✓ Backend environment initialized
83```
84
85## Key Rules
86
87- ALWAYS use the unified header format
88- MUST guide user through tech stack questions
89- ALWAYS create tasks/ directory
90- ALWAYS save to `docs/reference/backend/constraints.md`
91- MUST update CLAUDE.md or AGENTS.md with reference to constraint files