---
description: Create custom steering documents for specialized project contexts
auto_execution_mode: 3
---
<meta>
description: Create custom steering documents for specialized project contexts
</meta>

# SDD Custom Steering Creation

<background_information>
**Role**: Create specialized steering documents beyond core files (product, tech, structure).

**Mission**: Help users create domain-specific project memory for specialized areas.

**Success Criteria**:
- Custom steering captures specialized patterns
- Follows same granularity principles as core steering
- Provides clear value for specific domain
</background_information>

<instructions>
## Workflow

1. **Ask user** which custom steering document to create by presenting ALL available templates (both Project patterns and Integrations groups) in a **single question**. Do not ask for domain/topic separately or split into multiple questions.

2. **Check if template exists**:
   - Load from `{{SDD_DIR}}/settings/templates/steering-custom/{name}.md` if available
   - Use as starting point, customize based on project
   - **Exception — integration templates** (e.g. `jira.md`, `azure-devops.md`): display the setup guide embedded
     in the template's HTML comment block in chat, then write the file content verbatim without
     codebase analysis (external tool integrations have nothing to analyze in the repo)

3. **Analyze codebase** (JIT) for relevant patterns (skip for integration templates):
   - **Glob** for related files
   - **Read** for existing implementations
   - **Grep** for specific patterns

4. **Generate custom steering**:
   - Follow template structure if available
   - Apply principles from `{{SDD_DIR}}/settings/rules/steering-principles.md`
   - Focus on patterns, not exhaustive lists
   - Keep to 100-200 lines (2-3 minute read)

5. **Create file** in `{{SDD_DIR}}/steering/{name}.md`

## Available Templates

Templates available in `{{SDD_DIR}}/settings/templates/steering-custom/`:

**Project patterns** (customized from codebase analysis):
1. **api-standards.md** - REST/GraphQL conventions, error handling
2. **testing.md** - Test organization, mocking, coverage
3. **security.md** - Auth patterns, input validation, secrets
4. **database.md** - Schema design, migrations, query patterns
5. **error-handling.md** - Error types, logging, retry strategies
6. **authentication.md** - Auth flows, permissions, session management
7. **deployment.md** - CI/CD, environments, rollback procedures
8. **cross-repo.md** - Cross-repo contracts, ownership boundaries, and communication protocols for multi-repo products *(multi-repo — discovers and writes to all platform repos)*. *Produces persistent AI context — does not create specs.*

**Integrations** (written verbatim after displaying embedded setup guide):
9. **jira.md** - Jira Cloud sync: auto-creates Epics, Stories, and Subtasks at each SDD phase
10. **azure-devops.md** - Azure DevOps Boards sync: auto-creates Epics, User Stories, and Tasks at each SDD phase

Load template when needed, customize for project (or write verbatim for integrations).

## Steering Principles

From `{{SDD_DIR}}/settings/rules/steering-principles.md`:

- **Patterns over lists**: Document patterns, not every file/component
- **Single domain**: One topic per file
- **Concrete examples**: Show patterns with code
- **Maintainable size**: 100-200 lines typical
- **Security first**: Never include secrets or sensitive data

</instructions>

## Tool guidance

- **Read**: Load template, analyze existing code
- **Glob**: Find related files for pattern analysis
- **Grep**: Search for specific patterns
- **LS**: Understand relevant structure

**JIT Strategy**: Load template only when creating that type of steering.

## Output description

Chat summary with file location (file created directly).

```
✅ Custom Steering Created

## Created:
- {{SDD_DIR}}/steering/api-standards.md

## Based On:
- Template: api-standards.md
- Analyzed: src/api/ directory patterns
- Extracted: REST conventions, error format

## Content:
- Endpoint naming patterns
- Request/response format
- Error handling conventions
- Authentication approach

Review and customize as needed.
```

## Examples

### Success: API Standards
**Input**: "Create API standards steering"  
**Action**: Load template, analyze src/api/, extract patterns  
**Output**: api-standards.md with project-specific REST conventions

### Success: Testing Strategy
**Input**: "Document our testing approach"  
**Action**: Load template, analyze test files, extract patterns  
**Output**: testing.md with test organization and mocking strategies

## Safety & Fallback

- **No template**: Generate from scratch based on domain knowledge
- **Security**: Never include secrets (load principles)
- **Validation**: Ensure doesn't duplicate core steering content

## Notes

- Templates are starting points, customize for project
- Follow same granularity principles as core steering
- All steering files loaded as project memory
- Custom files equally important as core files

