"""Template content for `ievo init` scaffolding."""

SPEC_INDEX_MD = """\
# Specification Index

## Selection Algorithm

```
FIRST: Check for Change Requests (CRs) with status: ready -> process those first
THEN:  Select requirements using:
  1. Filter: status = ready
  2. Filter: all dependencies have status = implemented
  3. Score: (priority×3) + (blocking×2) + (dep_met×1) - (complexity×0.5) - (questions×5)
  4. Select highest score
  5. Tiebreak: lower REQ number (older first)
```

## Requirements Registry

<!-- Keep this in sync with requirement files. Agent updates on every status change. -->

| ID | Title | Status | Priority | Dependencies | Blocks | Questions | Source |
|----|-------|--------|----------|--------------|--------|-----------|--------|

## Change Requests

<!-- CRs are ALWAYS processed before new REQs -->

| ID | Modifies | Status | Created | Source |
|----|----------|--------|---------|--------|

## Status Legend

### Requirement statuses
- `draft` — has ambiguities, not ready for implementation
- `ready` — fully specified, agent can pick it up
- `blocked` — agent found ambiguities, questions filed
- `in-progress` — agent is currently implementing
- `implemented` — all acceptance criteria met, all tests passing
- `removed` — deleted via Change Request

### Change Request statuses
- `draft` — CR written but not reviewed
- `impact-review` — agent assessed impact, waiting for human review
- `ready` — approved for implementation
- `applied` — changes merged into REQ, done
- `rejected` — decided not to apply

## Dependency Rules

- Agent MUST NOT start a REQ whose dependencies are not ALL `implemented`
- Circular dependencies are a spec error -> file a question
- CRs have implicit dependency on their target REQ being `implemented`
"""

CLAUDE_SETTINGS_LOCAL_JSON = """\
{
  "hooks": {
    "PreCompact": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "python3 .claude/hooks/precompact_save.py"
          }
        ]
      }
    ]
  },
  "contextPaths": [".ievo/iEVO.md"]
}
"""

# ── New templates added for improved init ─────────────────────

CLAUDE_MD = """\
# {project_name}

<!-- Fill this before running agents. It is read at the start of every session. -->

## What this project is

<!-- One paragraph: what the system does, who uses it, what problem it solves -->


## Tech stack

<!-- Language, framework, key libraries, database, hosting, etc. -->
<!-- Example:
  - Python 3.13 / FastAPI
  - PostgreSQL (via SQLAlchemy)
  - Redis for caching
  - Deployed on Railway
-->


## Conventions

<!-- Project-specific rules agents must follow.
     Examples: naming conventions, file layout, error handling style,
     test framework, commit message format, etc. -->


## Key concepts / domain vocabulary

<!-- Define terms that are specific to your domain.
     Agents will use these exact words in specs and code. -->


## Important links

<!-- Docs, design files, API references, staging URL, etc. -->


## What NOT to do

<!-- Anti-patterns, explicitly forbidden approaches, deprecated paths -->

Read `.ievo/iEVO.md` for pipeline conventions.
"""

GITIGNORE = """\
# Python
__pycache__/
*.py[cod]
*.egg-info/
.venv/
dist/
.pytest_cache/

# Node
node_modules/

# Env
.env
.env.*
!.env.example

# OS
.DS_Store
Thumbs.db

# iEvo
.ievo/config.json

# Claude Code local settings
.claude/settings.local.json
"""
