tyrex-framework 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,19 +32,18 @@ Show ALL commands grouped by category:
32
32
  TYREX Help
33
33
  ═══════════════════════════════════════
34
34
 
35
- Workflow principal:
35
+ Core Workflow:
36
36
  /tyrex-init Initialize Tyrex in a project (map codebase, configure)
37
- /tyrex-new Start a new feature/demand
38
- /tyrex-plan Plan tasks with dependencies and parallelism
39
- /tyrex-do Execute implementation tasks
40
- /tyrex-review Review implementation, finalize docs
37
+ /tyrex-new Start a new feature/demand (interactive quiz)
38
+ /tyrex-plan Plan tasks with security-first approach
39
+ /tyrex-do Execute tasks [--auto-approve]
40
+ /tyrex-review Senior code review with 4 lenses [--do-all | --do-critical] [full]
41
41
 
42
42
  Exploration:
43
43
  /tyrex-discuss Explore the project, ask questions, brainstorm architecture
44
44
 
45
- Shortcuts:
46
- /tyrex-quick Quick task without full ceremony (bug fix, tweak)
47
- /tyrex-handoff Autopilot — chains new→plan→do→review automatically
45
+ Fast Track:
46
+ /tyrex-quick Unified new→plan→do from a single prompt [--auto-approve]
48
47
 
49
48
  Management:
50
49
  /tyrex-status Show current project and feature status
@@ -61,6 +60,9 @@ TYREX Help
61
60
 
62
61
  Meta:
63
62
  /tyrex-help This command. Use /tyrex-help <command> for details.
63
+
64
+ Deprecated:
65
+ /tyrex-handoff → Use /tyrex-quick --auto-approve instead
64
66
  ```
65
67
 
66
68
  #### Step 3: Show workflow diagram
@@ -68,21 +70,21 @@ TYREX Help
68
70
  ```
69
71
  Typical workflow:
70
72
 
71
- /tyrex-init → /tyrex-discuss → /tyrex-new → /tyrex-plan → /tyrex-do → /tyrex-review
72
- (optional) ↑ │
73
- └─── fix tasks ───────────┘
74
-
75
- Greenfield:
76
- /tyrex-init → /tyrex-discuss (brainstorm) → /tyrex-new → ...
73
+ /tyrex-init → /tyrex-new → /tyrex-plan → /tyrex-do → /tyrex-review
74
+ (quiz) (security) [--auto] (4 lenses)
75
+ ↑ │
76
+ └── fix tasks ─┘
77
77
 
78
- Anytime Q&A:
79
- /tyrex-discuss (explore the project, ask questions at any point)
78
+ Fast track (from single prompt):
79
+ /tyrex-quick [--auto-approve]
80
+ = /tyrex-new + /tyrex-plan + /tyrex-do in one command
80
81
 
81
- Fast mode:
82
- /tyrex-handoff (runs the entire workflow, stops at checkpoints)
82
+ Review with auto-fix:
83
+ /tyrex-review --do-all (fix everything)
84
+ /tyrex-review --do-critical (fix only HIGH/CRITICAL)
83
85
 
84
- Quick fix:
85
- /tyrex-quick (skip spec/plan, just fix and commit)
86
+ Exploration (anytime):
87
+ /tyrex-discuss (explore the project, ask questions at any point)
86
88
  ```
87
89
 
88
90
  #### Step 4: Contextual suggestion
@@ -93,19 +95,19 @@ Based on the current state, suggest the next action. Use EXACTLY ONE of these:
93
95
  > "You haven't initialized Tyrex yet. Start with `/tyrex-init` to map your project and configure the framework."
94
96
 
95
97
  - **`.tyrex/` exists but no active feature (or last feature is `done`):**
96
- > "Tyrex is initialized. Use `/tyrex-new` to start a new feature, or `/tyrex-handoff` for autopilot mode."
98
+ > "Tyrex is initialized. Use `/tyrex-new` to start a new feature, or `/tyrex-quick` for a fast-track task."
97
99
 
98
100
  - **Active feature with status `spec` (no plan yet):**
99
101
  > "You have a feature spec ready. Run `/tyrex-plan` to plan the implementation tasks."
100
102
 
101
103
  - **Active feature with status `planned` (plan approved, no tasks started):**
102
- > "Your plan is approved. Run `/tyrex-do` to start implementing."
104
+ > "Your plan is approved. Run `/tyrex-do` to start implementing, or `/tyrex-do --auto-approve` for autopilot."
103
105
 
104
106
  - **Active feature with tasks `in_progress` or `pending`:**
105
107
  > "You have tasks in progress. Run `/tyrex-do` to continue, or `/tyrex-resume` if this is a new session."
106
108
 
107
109
  - **Active feature with ALL tasks `completed`:**
108
- > "All tasks are done! Run `/tyrex-review` to review the implementation."
110
+ > "All tasks are done! Run `/tyrex-review` to review, or `/tyrex-review --do-all` to review and auto-fix."
109
111
 
110
112
  - **Cannot determine state (cursor.yml missing or corrupted):**
111
113
  > "Run `/tyrex-status` to see where things stand, or `/tyrex-init` to start fresh."
@@ -124,7 +126,9 @@ All resolve to the same command.
124
126
  #### Step 1: Identify the command
125
127
 
126
128
  Strip any `/tyrex-` or `tyrex-` prefix from the argument. Match against the known commands:
127
- `init`, `new`, `plan`, `do`, `review`, `quick`, `handoff`, `status`, `resume`, `settings`, `evolve`, `skills`, `context`, `discuss`, `readme`, `openapi`, `wiki`, `help`
129
+ `init`, `new`, `plan`, `do`, `review`, `quick`, `status`, `resume`, `settings`, `evolve`, `skills`, `context`, `discuss`, `readme`, `openapi`, `wiki`, `help`
130
+
131
+ Also match deprecated: `handoff` → redirect to `quick`.
128
132
 
129
133
  If no match: show "Command not found" and list all available commands.
130
134
 
@@ -139,6 +143,9 @@ For the matched command, present a structured summary:
139
143
  What it does:
140
144
  [1-2 sentence description of purpose]
141
145
 
146
+ Flags:
147
+ [list of flags and their effects, or "None"]
148
+
142
149
  When to use:
143
150
  [Context — when should the user reach for this command]
144
151
 
@@ -161,6 +168,7 @@ Use the reference below for each command:
161
168
 
162
169
  **init:**
163
170
  - What: Maps your codebase, detects stack/architecture/security issues, configures Tyrex.
171
+ - Flags: None
164
172
  - When: First time using Tyrex in a project, or re-initializing after major changes.
165
173
  - Steps: Codebase analysis → Generate TYREX.md + constitution → Interactive config → Summary
166
174
  - Prerequisites: None (this is the starting point)
@@ -168,62 +176,63 @@ Use the reference below for each command:
168
176
 
169
177
  **discuss:**
170
178
  - What: Interactive exploration and technical discussion. In codebase mode, answers questions about existing code with file references. In greenfield mode, brainstorms architecture, stack, and scope. Loads relevant skills as perspective automatically.
179
+ - Flags: None
171
180
  - When: You're new to a project and want to understand it, or starting from scratch and want to brainstorm before building. Can be used anytime for Q&A.
172
181
  - Steps: Detect mode (codebase/greenfield/hybrid) → Load skills → Multi-turn conversation → Save conclusions on demand (user-initiated only)
173
182
  - Prerequisites: `.tyrex/` initialized (recommended but not required for basic Q&A)
174
183
  - Next: `/tyrex-new` (to act on what was discussed) or `/tyrex-evolve` (to record decisions)
175
184
 
176
185
  **new:**
177
- - What: Starts a new feature/demand. Checks the roadmap for planned features first, captures requirements, analyzes required skills, configures docs/git, generates feature spec, and updates the roadmap. Supports documentation types: ADR, RFC, Wiki, SPEC, SRS, PRD.
186
+ - What: Starts a new feature/demand. All decisions are made via interactive quizzes. Checks the roadmap, captures requirements, analyzes required skills (including DevSec), configures docs/git, generates feature spec, and updates TYREX.md.
187
+ - Flags: None
178
188
  - When: You have something to build and want to go through the full workflow.
179
- - Steps: Check roadmap for planned features → Describe demand → Clarification questions → Context ingestion → Skill analysis & suggestion → Config (docs, branch, commits) → Generate docs first → Create feature spec → Create branch → Update roadmap
189
+ - Steps: Check roadmap (quiz) → Describe demand → Clarification (quiz) → Context ingestion (quiz) → Skill analysis with DevSec check (quiz) → Config docs/git (quiz) → Generate docs first → Create feature spec → Create branch → Update TYREX.md
180
190
  - Prerequisites: `.tyrex/` initialized (`/tyrex-init`)
181
191
  - Next: `/tyrex-plan`
182
192
 
183
193
  **plan:**
184
- - What: Breaks the feature into executable tasks with dependencies, parallelism, skill assignments, and quality strategy.
194
+ - What: Breaks the feature into tasks with dependencies, parallelism, skill assignments, quality strategy, and security-first analysis. Every task gets a SPEC draft. Security-sensitive tasks get the devsec skill auto-assigned.
195
+ - Flags: None
185
196
  - When: After creating a feature spec with `/tyrex-new`.
186
- - Steps: Load feature → Propose tasks → Show execution graph → Human approval → Save plan
197
+ - Steps: Load contextSecurity-first analysis → Propose tasks with security attributes Generate SPECs → Show execution graph → Human approval (quiz) → Save plan
187
198
  - Prerequisites: Active feature in `spec` status
188
199
  - Next: `/tyrex-do`
189
200
 
190
201
  **do:**
191
- - What: Executes tasks from the plan. Handles TDD, parallelization, commits, and state updates.
202
+ - What: Executes tasks from the plan. Handles TDD, parallelization, commits, and state updates. Auto-updates TYREX.md when macro docs are generated.
203
+ - Flags: `--auto-approve` (skip ALL human checkpoints, full autopilot)
192
204
  - When: After the plan is approved with `/tyrex-plan`.
193
- - Steps: Load state → Find ready tasks → Ask about parallelization → Execute with TDD → Commit → Update state → Repeat
205
+ - Steps: Load state → Find ready tasks → Parallelization (quiz or auto) → Execute with TDD → Commit (quiz or auto) → Update state + TYREX.md → Repeat
194
206
  - Prerequisites: Active feature with approved plan
195
207
  - Next: `/tyrex-review` (when all tasks done)
196
208
 
197
209
  **review:**
198
- - What: Reviews the completed implementation against acceptance criteria, checks quality, finalizes docs.
210
+ - What: Senior code review through 4 lenses: Pattern Compliance, Code Quality & DRY, Business & Technical Compliance, Security First. Can auto-create fix tasks and enter the plan/do loop.
211
+ - Flags: `--do-all` (fix all findings), `--do-critical` (fix HIGH/CRITICAL only), `full` (codebase-wide review instead of branch diff)
199
212
  - When: All implementation tasks are complete.
200
- - Steps: Automated checks → Code review → Documentation finalization → TYREX.md evolution → Human approval
213
+ - Steps: Automated checks → 4-lens review → TYREX.md evolution → Present findings (quiz) → Requested changes loop (if needed) → Finalize
201
214
  - Prerequisites: All tasks in active feature completed
202
- - Next: `/tyrex-new` (next feature) or `/tyrex-status`
215
+ - Next: `/tyrex-new` (next feature) or done
203
216
 
204
217
  **quick:**
205
- - What: Handles a small task without the full spec/plan ceremony. Still requires tests and CHANGELOG.
206
- - When: Bug fixes, config tweaks, small changes that don't need a feature spec.
207
- - Steps: Describe task Implement with TDD Commit
208
- - Prerequisites: `.tyrex/` initialized
209
- - Next: Nothing specific — back to normal flow
210
-
211
- **handoff:**
212
- - What: Deterministic autopilot. Chains the entire workflow (new→plan→do→review) automatically, stopping only at defined checkpoints for human decisions.
213
- - When: You want to describe what to build and let Tyrex drive the entire process.
214
- - Steps: Context load → Demand capture [CHECKPOINT] → Config [CHECKPOINT] → Planning [CHECKPOINT] → Execution (with checkpoints per parallel decision and commit approval) → Review [CHECKPOINT]
218
+ - What: Fast-track workflow unified new/plan/do from a single prompt. Same quality guardrails, fewer steps. All decisions via quizzes.
219
+ - Flags: `--auto-approve` (full autopilot from prompt to implementation)
220
+ - When: Bug fixes, config tweaks, small features anything that doesn't need extensive ceremony but still needs quality.
221
+ - Steps: Capture demand (quiz) → Quick config (quiz) → Skill + security check → Quick plan (quiz) → Execute (same as /tyrex-do) → Update TYREX.md
215
222
  - Prerequisites: `.tyrex/` initialized
216
- - Next: Nothing it runs the full cycle
223
+ - Next: `/tyrex-review` (optional) or done
217
224
 
218
225
  **status:**
219
- - What: Shows a comprehensive dashboard: features, active tasks, project roadmap (planned/future features), health diagnostics (TYREX.md completeness, stale branches, context/skills coverage), documentation coverage, and actionable suggestions.
220
- - When: You want a full overview of where things stand — what's done, what's active, what's planned, and what needs attention.
226
+ - What: Shows a comprehensive dashboard: features, active tasks, project roadmap, health diagnostics, documentation coverage, and actionable suggestions.
227
+ - Flags: None
228
+ - When: You want a full overview of where things stand.
221
229
  - Steps: Read state + roadmap + health checks → Display comprehensive summary
222
230
  - Prerequisites: `.tyrex/` initialized
223
231
  - Next: Whatever the status suggests
224
232
 
225
233
  **resume:**
226
234
  - What: Recovers session state from cursor.yml with minimal token usage. Picks up where you left off.
235
+ - Flags: None
227
236
  - When: Starting a new agent session and wanting to continue previous work.
228
237
  - Steps: Read cursor.yml → Show resume summary → Continue from last state
229
238
  - Prerequisites: Previous Tyrex session with state saved
@@ -231,41 +240,47 @@ Use the reference below for each command:
231
240
 
232
241
  **settings:**
233
242
  - What: Shows and lets you modify Tyrex configuration (commit mode, branch mode, docs, quality, parallelism, git).
243
+ - Flags: None
234
244
  - When: You want to change how Tyrex behaves.
235
- - Steps: Display current settings → Ask what to change → Save
245
+ - Steps: Display current settings → Ask what to change (quiz) → Save
236
246
  - Prerequisites: `.tyrex/tyrex.yml` exists
237
247
  - Next: Changes apply from next demand onward
238
248
 
239
249
  **evolve:**
240
250
  - What: Updates TYREX.md with new patterns, hurdles, architecture decisions, or context discovered during work.
251
+ - Flags: None
241
252
  - When: You learned something about the project that future sessions should know.
242
253
  - Steps: Describe discovery → Update TYREX.md → Commit
243
254
  - Prerequisites: `.tyrex/TYREX.md` exists
244
255
  - Next: Nothing specific
245
256
 
246
257
  **skills:**
247
- - What: Manages reusable skills — persona-based agent contexts (Role, Expertise, Guidelines, Patterns, Review Criteria). Can list, create, and sync skills across providers.
248
- - When: You want to improve implementation quality by giving agents specialized perspectives. Also auto-suggested during `/tyrex-new`.
249
- - Steps: (list) Scan `.tyrex/skills/` + providers Display. (create) Gather role/expertise/guidelines → Generate skill file. (sync) Copy to all providers.
258
+ - What: Manages reusable skills — persona-based agent contexts. Can list, create, and sync skills. DevSec skill is available as a built-in template.
259
+ - Flags: `create [name]`, `sync`
260
+ - When: You want to improve implementation quality by giving agents specialized perspectives.
261
+ - Steps: (list) Scan `.tyrex/skills/` + providers → Display. (create) Gather role/expertise/guidelines (quiz) → Generate skill file. (sync) Copy to all providers.
250
262
  - Prerequisites: `.tyrex/` initialized
251
263
  - Next: Skills are automatically loaded during `/tyrex-do` when assigned to tasks
252
264
 
253
265
  **context:**
254
- - What: Ingests and manages project context (business rules, legacy system constraints, external docs) for better AI decisions. Supports free text, file paths, and URLs.
255
- - When: After `/tyrex-init` to add project background, during `/tyrex-new` for demand-specific context, or anytime you have new context to add.
256
- - Steps: Show existing context Choose scope (project/demand) Choose input type (text/file/URL) Process and save → Confirm
266
+ - What: Ingests and manages project context (business rules, legacy system constraints, external docs) for better AI decisions.
267
+ - Flags: None
268
+ - When: After `/tyrex-init` to add project background, during `/tyrex-new` for demand-specific context, or anytime.
269
+ - Steps: Show existing context → Choose scope (quiz) → Choose input type (quiz) → Process and save → Confirm
257
270
  - Prerequisites: `.tyrex/` initialized (`/tyrex-init`)
258
271
  - Next: Context is automatically read by `/tyrex-plan` and `/tyrex-do`
259
272
 
260
273
  **readme:**
261
274
  - What: Generates a comprehensive README.md with architecture diagrams, setup instructions, and API overview.
275
+ - Flags: None
262
276
  - When: Your project needs a README, or the existing one is outdated.
263
- - Steps: Deep project analysis → Generate README → Handle existing (replace/merge) → Commit
277
+ - Steps: Deep project analysis → Generate README → Handle existing (quiz) → Commit
264
278
  - Prerequisites: A project with code to document
265
279
  - Next: Nothing specific
266
280
 
267
281
  **openapi:**
268
282
  - What: Analyzes your API endpoints and generates OpenAPI 3.1 documentation WITHOUT modifying source code.
283
+ - Flags: None
269
284
  - When: Your project has an API and you need documentation for it.
270
285
  - Steps: Detect framework → Map endpoints (read-only) → Generate openapi.yaml + readable docs → Commit
271
286
  - Prerequisites: A project with HTTP endpoints
@@ -273,13 +288,19 @@ Use the reference below for each command:
273
288
 
274
289
  **wiki:**
275
290
  - What: Generates wiki-style documentation pages in docs/wiki/ covering architecture, getting started, domain areas, deployment, and troubleshooting.
291
+ - Flags: None
276
292
  - When: You need internal documentation for the team.
277
- - Steps: Project analysis → Propose wiki structure → Generate pages → Handle existing → Commit
293
+ - Steps: Project analysis → Propose wiki structure (quiz) → Generate pages → Handle existing (quiz) → Commit
278
294
  - Prerequisites: A project with code to document
279
295
  - Next: Nothing specific
280
296
 
297
+ **handoff (DEPRECATED):**
298
+ - What: Replaced by `/tyrex-quick --auto-approve`. See migration guide in the command file.
299
+ - When: Never — use `/tyrex-quick --auto-approve` instead.
300
+
281
301
  **help:**
282
302
  - What: This command. Shows all available commands and suggests what to do next.
303
+ - Flags: `<command-name>` for detailed help
283
304
  - When: You're not sure what command to use.
284
305
  - Steps: Display command list → Show workflow → Suggest next action
285
306
  - Prerequisites: None
@@ -291,3 +312,4 @@ Use the reference below for each command:
291
312
  - When showing details for a specific command, do NOT dump the entire command file — summarize for humans
292
313
  - The workflow diagram should be ASCII-compatible (no special Unicode beyond box-drawing)
293
314
  - If the user asks `/tyrex-help` with a command that doesn't exist, be helpful: suggest the closest match
315
+ - ALWAYS mention flags for commands that have them — this is a key differentiator
@@ -11,19 +11,23 @@ You are the Tyrex Framework orchestrator. The user is starting a new implementat
11
11
  This command runs in **plan** mode. Set `agent_mode: "plan"` in `cursor.yml` as the FIRST action.
12
12
  You MUST NOT write source code. You may create/modify only `.tyrex/`, `docs/`, and configuration files.
13
13
 
14
+ ## Interactive Quiz Rule
15
+
16
+ **ALL decisions in this command MUST use the interactive quiz format** (multiple-choice selection). Never ask open-ended questions when a quiz can be used. This applies to: roadmap selection, clarification questions, context ingestion, skill selection, documentation configuration, branch configuration, and any other decision point.
17
+
14
18
  ## Behavior
15
19
 
16
20
  ### Step 0: Check roadmap
17
21
  Before asking the user to describe the demand:
18
22
  1. Read `.tyrex/roadmap.yml` (if exists) and check for `planned` features.
19
- 2. If there are planned features in the roadmap, show them:
23
+ 2. If there are planned features, present interactive quiz:
20
24
  ```
21
- Planned features in roadmap:
22
- 003-discuss-command /tyrex-discuss — Structured technical discussions
23
- 004-review-knowledge-base Skill evolution via /tyrex-review
24
- 005-research-command /tyrex-research — AI-powered research
25
+ Start a planned feature or describe something new?
25
26
 
26
- Start one of these? Or describe a new demand?
27
+ [ ] 003-discuss-command Structured technical discussions
28
+ [ ] 004-review-knowledge — Skill evolution via /tyrex-review
29
+ [ ] 005-research-command — AI-powered research
30
+ [ ] Describe a new demand
27
31
  ```
28
32
  3. If the user picks a roadmap feature:
29
33
  - Use its description as the starting point for Step 1
@@ -36,73 +40,108 @@ Before asking the user to describe the demand:
36
40
  Ask the user: "Describe what you want to implement."
37
41
  Listen to their description. This is the WHAT and WHY.
38
42
 
39
- ### Step 2: Clarification (max 5 questions)
40
- Analyze the description and ask UP TO 5 targeted clarification questions.
41
- Focus on:
42
- - Ambiguous requirements
43
- - Edge cases that would affect architecture
44
- - Scope boundaries (what's NOT included)
45
- Do NOT ask trivial questions. If the description is clear, skip this step.
43
+ ### Step 2: Clarification (max 5 questions, quiz format)
44
+ Analyze the description and ask UP TO 5 targeted clarification questions **using interactive quizzes**:
45
+
46
+ Example quiz formats for common clarifications:
47
+ ```
48
+ What's the primary scope of this feature?
49
+ [ ] New API endpoints
50
+ [ ] Frontend/UI changes
51
+ [ ] Data model changes
52
+ [ ] Infrastructure/config
53
+ [ ] Cross-cutting (multiple areas)
54
+ ```
55
+
56
+ ```
57
+ Who are the primary users of this feature?
58
+ [ ] End users (customers)
59
+ [ ] Internal team/admins
60
+ [ ] API consumers (developers)
61
+ [ ] System/automated processes
62
+ ```
63
+
64
+ ```
65
+ What's the expected data volume/scale?
66
+ [ ] Low (< 1K records/requests)
67
+ [ ] Medium (1K-100K)
68
+ [ ] High (100K-1M)
69
+ [ ] Very high (> 1M)
70
+ [ ] Unknown / not applicable
71
+ ```
72
+
73
+ Adapt quizzes to the specific demand context. If the description is clear and complete, skip this step entirely. Do NOT ask trivial questions.
46
74
 
47
75
  ### Step 3: Context Ingestion
48
- Before configuring or generating documentation, offer the user a chance to provide demand-specific context:
49
-
50
- 1. Ask: "Do you have additional context for this demand? (legacy system constraints, business rules, external docs, related code, etc.) [y/N]"
51
- 2. If yes: follow the `/tyrex-context add` flow with scope set to `demand`
52
- - Accept free text, file paths, or URLs
53
- - Store in `.tyrex/features/NNN-context.md`
54
- - This context will inform documentation generation and planning
55
- 3. If no: proceed to configuration
56
- 4. Note: the user can always add more context later with `/tyrex-context`
76
+ Present quiz to the user:
77
+ ```
78
+ Do you have additional context for this demand?
79
+ [ ] Yes I have docs, constraints, or business rules to share
80
+ [ ] No proceed with what I described
81
+ ```
82
+
83
+ If yes: follow the `/tyrex-context add` flow with scope set to `demand`
84
+ - Accept free text, file paths, or URLs
85
+ - Store in `.tyrex/features/NNN-context.md`
86
+ - This context will inform documentation generation and planning
87
+ Note: the user can always add more context later with `/tyrex-context`
57
88
 
58
89
  ### Step 3b: Skill Analysis & Suggestion
59
90
  After ingesting context, analyze the demand to identify relevant skills:
60
91
 
61
92
  1. **Identify expertise domains** from the demand description (e.g., "backend API" → backend-engineer, "database migration" → dba, "security audit" → security-engineer, "product requirements" → product-manager).
62
93
  2. **Scan `.tyrex/skills/`** for existing skills matching the identified domains.
63
- 3. **If matching skills exist:**
64
- - Show: "Skills that match this demand: [list with name + role]"
65
- - Ask: "Use these skills? [Y/n]"
66
- - Selected skills will be loaded during planning and execution.
67
- 4. **If NO matching skills exist (or partial match):**
68
- - Show: "No skills found for: [unmatched domains]. Skills improve implementation quality by providing specialized context."
69
- - Ask: "Create skills for these areas now? [Y/n]"
70
- - If yes: For each missing skill, ask for a brief role description, then generate the skill file in `.tyrex/skills/{name}.md` using:
94
+ 3. **ALWAYS check for DevSec skill:** If the demand touches any security-sensitive area (auth, data, APIs, user input, encryption), check for `devsec.md`:
95
+ - If doesn't exist: present quiz:
71
96
  ```
72
- # Skill: {Name}
73
- ## Role
74
- ## Expertise
75
- ## Guidelines
76
- ## Patterns
77
- ## Review Criteria
97
+ This demand has security implications but no DevSec skill is installed.
98
+ [ ] Create DevSec skill now from built-in template (Recommended)
99
+ [ ] Continue without DevSec skill
78
100
  ```
79
- - If no: Continue without skills (they can be created later with `/tyrex-skills create`).
80
- 5. **Record selected skills** they will be included in the feature spec (Step 6) as a `Skills:` field.
81
-
82
- ### Step 4: Demand configuration
83
- Read defaults from `.tyrex/tyrex.yml` and present configuration for THIS demand:
84
-
85
- Ask the user (suggest based on the nature of the demand):
86
-
87
- "Configuration for this demand:"
88
-
89
- 1. **Documentation bundle:**
90
- - [x] CHANGELOG (mandatory, always)
91
- - [x] SPEC - Technical Specification (mandatory, always — generated per task during /tyrex-plan)
92
- - [ ] SRS - Software Requirements Specification (suggest for features with clear functional requirements)
93
- - [ ] PRD - Product Requirements Document (suggest if user provides product-level context, or offer to generate)
94
- - [ ] ADR - Architecture Decision Record (suggest if there's an architecture choice)
95
- - [ ] RFC - Technical proposal (suggest if it's a complex system)
96
- - [ ] Wiki update
97
- - [ ] Flow diagram
98
-
99
- "Use full documentation bundle? Or select individually? Or use defaults from tyrex.yml?"
100
-
101
- 2. **Git:**
102
- - Suggest branch name based on the description (e.g., `feat/oauth-system`)
103
- - "Commits: approve or auto for this demand?"
104
-
105
- 3. "Use defaults from tyrex.yml for everything else? [Y/n]"
101
+ - If "Create": copy from `templates/skills/devsec.md` to `.tyrex/skills/devsec.md`
102
+ 4. **If matching skills exist:** present quiz:
103
+ ```
104
+ Skills that match this demand:
105
+ [x] backend-engineer Senior Backend Engineer
106
+ [x] devsec — Security-First Developer
107
+ [ ] Don't use any skills
108
+ ```
109
+ 5. **If NO matching skills exist (or partial match):** present quiz:
110
+ ```
111
+ No skills found for: [unmatched domains].
112
+ [ ] Create skills for these areas now (Recommended)
113
+ [ ] Continue without skills
114
+ ```
115
+ - If yes: For each missing skill, ask for a brief role description, then generate the skill file
116
+ 6. **Record selected skills** they will be included in the feature spec (Step 6) as a `Skills:` field.
117
+
118
+ ### Step 4: Demand configuration (interactive quiz)
119
+ Read defaults from `.tyrex/tyrex.yml` and present configuration via quiz:
120
+
121
+ ```
122
+ Documentation bundle for this demand:
123
+ [x] CHANGELOG (mandatory, always)
124
+ [x] SPEC per task (mandatory, always)
125
+ [ ] SRS Software Requirements Specification
126
+ [ ] PRD — Product Requirements Document
127
+ [ ] ADR Architecture Decision Record
128
+ [ ] RFC — Technical proposal
129
+ [ ] Wiki update
130
+ [ ] Flow diagram
131
+
132
+ Defaults from tyrex.yml are pre-selected. Modify as needed.
133
+ ```
134
+
135
+ ```
136
+ Git configuration:
137
+ Branch name: feat/[suggested-slug]
138
+ [ ] Accept suggested name
139
+ [ ] Custom name
140
+
141
+ Commit mode:
142
+ [ ] Approve each commit (from tyrex.yml default)
143
+ [ ] Auto-commit for this demand
144
+ ```
106
145
 
107
146
  ### Step 5: Documentation First
108
147
  Generate documentation BEFORE any code, in this order:
@@ -113,7 +152,13 @@ Generate documentation BEFORE any code, in this order:
113
152
  4. **RFC** (if configured): Create in `docs/rfcs/`. Present for review.
114
153
  5. **Diagrams** (if configured): Create in `docs/diagrams/`. Present for review.
115
154
 
116
- Wait for approval of all generated docs before proceeding.
155
+ Present quiz for doc approval:
156
+ ```
157
+ Generated documentation:
158
+ [ ] Approve all documents
159
+ [ ] Review and edit individual docs
160
+ [ ] Regenerate with feedback
161
+ ```
117
162
 
118
163
  Note: SPEC documents are NOT generated here — they are generated per task during `/tyrex-plan`.
119
164
 
@@ -128,8 +173,10 @@ Create `.tyrex/features/NNN-feature-name.md` with:
128
173
  - Status: `spec`
129
174
 
130
175
  ### Step 7: Create branch (if configured)
131
- If branch mode is `approve`: show suggested branch name, wait for approval.
132
- If branch mode is `auto`: create it automatically.
176
+ Based on Step 4 quiz response:
177
+ - If accepted suggested name: create branch automatically
178
+ - If custom name: use the provided name
179
+ - Always respect `approve`/`auto` mode from tyrex.yml
133
180
 
134
181
  ### Step 8: Update state
135
182
  Update `.tyrex/state/cursor.yml`:
@@ -142,15 +189,25 @@ Update `.tyrex/roadmap.yml`:
142
189
  - If this is a NEW feature not in the roadmap: add it to the roadmap with status `in_progress`
143
190
  - This ensures the roadmap always reflects reality
144
191
 
145
- ### Step 9: Next step
192
+ ### Step 9: Auto-update TYREX.md
193
+ If any macro documentation was generated (PRD, SRS, ADR), automatically update TYREX.md:
194
+ - PRD → add business rules summary to `## Business Rules` section
195
+ - SRS → add requirements summary to `## Requirements Summary` section
196
+ - ADR → add decision to `## Architecture Decisions` table
197
+ This keeps TYREX.md as the single living index of all project knowledge.
198
+
199
+ ### Step 10: Next step
146
200
  Tell the user: "Feature spec created. Run /tyrex-plan to plan the implementation."
147
201
 
148
202
  ## Important Rules
149
203
  - Feature spec MUST be under 50 lines
150
204
  - ALWAYS generate CHANGELOG entry (even if just "Feature X started")
205
+ - ALWAYS use interactive quiz for ALL decisions — never open-ended questions for configuration
151
206
  - Documentation is generated BEFORE code — the human reviews docs first
152
207
  - SPEC is always mandatory — it is generated per task during `/tyrex-plan`, not here
153
208
  - SRS and PRD are suggested based on demand nature — not forced
154
209
  - Context ingestion happens BEFORE documentation to inform doc generation
210
+ - ALWAYS check for DevSec skill when the demand has security implications
155
211
  - If the user says "use defaults" or "just go", use tyrex.yml defaults without asking each question
156
212
  - The user can override ANY default for this specific demand
213
+ - When macro docs (ADR, PRD, SRS) are generated, ALWAYS update TYREX.md with summaries