$npx -y skills add gotalab/cc-sdd --skill kiro-steeringManage {{KIRO_DIR}}/steering/ as persistent project knowledge
| 1 | # Kiro Steering Management |
| 2 | |
| 3 | <background_information> |
| 4 | **Role**: Maintain `{{KIRO_DIR}}/steering/` as persistent project memory. |
| 5 | |
| 6 | **Mission**: |
| 7 | - Bootstrap: Generate core steering from codebase (first-time) |
| 8 | - Sync: Keep steering and codebase aligned (maintenance) |
| 9 | - Preserve: User customizations are sacred, updates are additive |
| 10 | |
| 11 | **Success Criteria**: |
| 12 | - Steering captures patterns and principles, not exhaustive lists |
| 13 | - Code drift detected and reported |
| 14 | - All `{{KIRO_DIR}}/steering/*.md` treated equally (core + custom) |
| 15 | </background_information> |
| 16 | |
| 17 | <instructions> |
| 18 | ## Scenario Detection |
| 19 | |
| 20 | Check `{{KIRO_DIR}}/steering/` status: |
| 21 | |
| 22 | **Bootstrap Mode**: Empty OR missing core files (product.md, tech.md, structure.md) |
| 23 | **Sync Mode**: All core files exist |
| 24 | |
| 25 | --- |
| 26 | |
| 27 | ## Bootstrap Flow |
| 28 | |
| 29 | 1. Load templates from `{{KIRO_DIR}}/settings/templates/steering/` |
| 30 | 2. Analyze codebase (JIT): |
| 31 | |
| 32 | #### Parallel Research |
| 33 | |
| 34 | The following research areas are independent and can be executed in parallel: |
| 35 | 1. **Product analysis**: README, package.json, documentation files for purpose, value, core capabilities |
| 36 | 2. **Tech analysis**: Config files, dependencies, frameworks for technology patterns and decisions |
| 37 | 3. **Structure analysis**: Directory tree, naming conventions, import patterns for organization |
| 38 | |
| 39 | If multi-agent is enabled, spawn sub-agents for each area above. Otherwise execute sequentially. |
| 40 | |
| 41 | After all parallel research completes, synthesize patterns for steering files. |
| 42 | |
| 43 | 3. Extract patterns (not lists): |
| 44 | - Product: Purpose, value, core capabilities |
| 45 | - Tech: Frameworks, decisions, conventions |
| 46 | - Structure: Organization, naming, imports |
| 47 | 4. Generate steering files (follow templates) |
| 48 | 5. Load principles from `rules/steering-principles.md` from this skill's directory |
| 49 | 6. Present summary for review |
| 50 | |
| 51 | **Focus**: Patterns that guide decisions, not catalogs of files/dependencies. |
| 52 | |
| 53 | --- |
| 54 | |
| 55 | ## Sync Flow |
| 56 | |
| 57 | 1. Load all existing steering (`{{KIRO_DIR}}/steering/*.md`) |
| 58 | 2. Analyze codebase for changes (JIT) |
| 59 | 3. Detect drift: |
| 60 | - **Steering → Code**: Missing elements → Warning |
| 61 | - **Code → Steering**: New patterns → Update candidate |
| 62 | - **Custom files**: Check relevance |
| 63 | 4. Propose updates (additive, preserve user content) |
| 64 | 5. Report: Updates, warnings, recommendations |
| 65 | |
| 66 | **Update Philosophy**: Add, don't replace. Preserve user sections. |
| 67 | |
| 68 | --- |
| 69 | |
| 70 | ## Granularity Principle |
| 71 | |
| 72 | From `rules/steering-principles.md` (in this skill's directory): |
| 73 | |
| 74 | > "If new code follows existing patterns, steering shouldn't need updating." |
| 75 | |
| 76 | Document patterns and principles, not exhaustive lists. |
| 77 | |
| 78 | **Bad**: List every file in directory tree |
| 79 | **Good**: Describe organization pattern with examples |
| 80 | |
| 81 | </instructions> |
| 82 | |
| 83 | ## Tool guidance |
| 84 | |
| 85 | - **Glob**: Find source/config files |
| 86 | - **Read**: Read steering, docs, configs |
| 87 | - **Grep**: Search patterns |
| 88 | - **Bash** with `ls`: Analyze structure |
| 89 | |
| 90 | **JIT Strategy**: Fetch when needed, not upfront. |
| 91 | |
| 92 | ## Output description |
| 93 | |
| 94 | Chat summary only (files updated directly). |
| 95 | |
| 96 | ### Bootstrap: |
| 97 | ``` |
| 98 | ✅ Steering Created |
| 99 | |
| 100 | ## Generated: |
| 101 | - product.md: [Brief description] |
| 102 | - tech.md: [Key stack] |
| 103 | - structure.md: [Organization] |
| 104 | |
| 105 | Review and approve as Source of Truth. |
| 106 | ``` |
| 107 | |
| 108 | ### Sync: |
| 109 | ``` |
| 110 | ✅ Steering Updated |
| 111 | |
| 112 | ## Changes: |
| 113 | - tech.md: React 18 → 19 |
| 114 | - structure.md: Added API pattern |
| 115 | |
| 116 | ## Code Drift: |
| 117 | - Components not following import conventions |
| 118 | |
| 119 | ## Recommendations: |
| 120 | - Consider api-standards.md |
| 121 | ``` |
| 122 | |
| 123 | ## Examples |
| 124 | |
| 125 | ### Bootstrap |
| 126 | **Input**: Empty steering, React TypeScript project |
| 127 | **Output**: 3 files with patterns - "Feature-first", "TypeScript strict", "React 19" |
| 128 | |
| 129 | ### Sync |
| 130 | **Input**: Existing steering, new `/api` directory |
| 131 | **Output**: Updated structure.md, flagged non-compliant files, suggested api-standards.md |
| 132 | |
| 133 | ## Safety & Fallback |
| 134 | |
| 135 | - **Security**: Never include keys, passwords, secrets (see principles) |
| 136 | - **Uncertainty**: Report both states, ask user |
| 137 | - **Preservation**: Add rather than replace when in doubt |
| 138 | |
| 139 | ## Notes |
| 140 | |
| 141 | - All `{{KIRO_DIR}}/steering/*.md` loaded as project memory |
| 142 | - Templates and principles are external for customization |
| 143 | - Focus on patterns, not catalogs |
| 144 | - "Golden Rule": New code following patterns shouldn't require steering updates |
| 145 | - Avoid documenting agent-specific tooling directories (e.g. `.cursor/`, `.gemini/`, `.claude/`) |
| 146 | - `{{KIRO_DIR}}/settings/` content should NOT be documented in steering files (settings are metadata, not project knowledge) |
| 147 | - Light references to `{{KIRO_DIR}}/specs/` and `{{KIRO_DIR}}/steering/` are acceptable; avoid other `.kiro/` directories |