home / skills / yellinzero / aico / aico-backend-init

aico-backend-init skill

/.codex/skills/aico-backend-init

This skill initializes backend development by creating a constraints.md from a template and guiding tech stack decisions.

npx playbooks add skill yellinzero/aico --skill aico-backend-init

Review the files below or copy the command above to add this skill to your agents.

Files (2)
SKILL.md
2.2 KB
---
name: aico-backend-init
description: |
  Initialize backend environment by creating constraints document from template.

  Use this skill when:
  - Running /backend.init command
  - User asks to "initialize backend", "setup backend environment"
  - Starting backend work and need to establish tech stack and conventions
  - Need to create docs/reference/backend/constraints.md
---

# 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

1. **Check existing**: Look for `docs/reference/backend/constraints.md`
2. **If exists**: Ask user if they want to overwrite or skip
3. **Create directory structure**:
   ```
   docs/reference/backend/
   ├── constraints.md
   └── tasks/
   ```
4. **Generate constraints file**:
   - Read template from `references/constraints.template.md`
   - Guide user through key decisions
5. **Save output**: Write to `docs/reference/backend/constraints.md`

## Document Header Format

All generated documents MUST use this unified header format:

```markdown
# [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.

## Output

```
✓ Created docs/reference/backend/constraints.md
✓ Created docs/reference/backend/tasks/
✓ 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`

Overview

This skill initializes a backend development environment by generating a constraints document from a template and creating the necessary directory structure. It enforces a unified document header and guides the user through tech-stack decisions to produce a consistent docs/reference/backend/constraints.md. Use it to establish conventions before backend work begins.

How this skill works

The skill checks for an existing docs/reference/backend/constraints.md and prompts to overwrite or skip if present. It reads the template at references/constraints.template.md, walks the user through a short set of guided questions about language, framework, database, ORM, testing, and API style, then writes the finalized constraints file and ensures docs/reference/backend/tasks/ exists. All generated documents use the required unified header format with project name and timestamps.

When to use it

  • Running the /backend.init command to bootstrap backend docs
  • Starting backend work and needing to lock in tech-stack and conventions
  • Creating or updating docs/reference/backend/constraints.md for the project
  • Onboarding new engineers who need a clear, consistent backend spec

Best practices

  • Always confirm the project name in the header and verify the language setting in aico.json before generating content
  • When prompted, choose options that reflect long-term maintainability rather than quick prototypes
  • Keep answers brief and decisive to produce a focused constraints document
  • Commit docs/reference/backend/constraints.md and the tasks/ directory to version control immediately
  • If constraints.md exists, review diff before overwriting to avoid losing decisions

Example use cases

  • Initialize backend docs for a new TypeScript Node.js project using Express and Prisma
  • Switch an existing repo to a different runtime (e.g., Node.js -> Go) and update constraints.md accordingly
  • Generate a constraints.md during sprint planning to capture agreed API style and testing tools
  • Create a baseline constraints document before adding CI pipelines or deployment configs

FAQ

What if docs/reference/backend/constraints.md already exists?

The skill will prompt to overwrite or skip. If you overwrite, it will preserve header rules and write the new file; otherwise it leaves the existing file intact.

Where does the template come from?

The constraints content is read from references/constraints.template.md and used as the base for guided edits and final output.