tyrex-framework 0.1.1
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.
- package/LICENSE +21 -0
- package/README.md +274 -0
- package/bin/tyrex.js +445 -0
- package/package.json +33 -0
- package/templates/AGENTS.md +74 -0
- package/templates/CHANGELOG.md +11 -0
- package/templates/CLAUDE.md +74 -0
- package/templates/TYREX.md +60 -0
- package/templates/adr.md +20 -0
- package/templates/commands/unified/tyrex-context.md +107 -0
- package/templates/commands/unified/tyrex-discuss.md +141 -0
- package/templates/commands/unified/tyrex-do.md +133 -0
- package/templates/commands/unified/tyrex-evolve.md +31 -0
- package/templates/commands/unified/tyrex-handoff.md +215 -0
- package/templates/commands/unified/tyrex-help.md +293 -0
- package/templates/commands/unified/tyrex-init.md +134 -0
- package/templates/commands/unified/tyrex-new.md +156 -0
- package/templates/commands/unified/tyrex-openapi.md +168 -0
- package/templates/commands/unified/tyrex-plan.md +152 -0
- package/templates/commands/unified/tyrex-quick.md +31 -0
- package/templates/commands/unified/tyrex-readme.md +154 -0
- package/templates/commands/unified/tyrex-resume.md +75 -0
- package/templates/commands/unified/tyrex-review.md +157 -0
- package/templates/commands/unified/tyrex-settings.md +67 -0
- package/templates/commands/unified/tyrex-skills.md +150 -0
- package/templates/commands/unified/tyrex-status.md +158 -0
- package/templates/commands/unified/tyrex-wiki.md +116 -0
- package/templates/constitution.md +60 -0
- package/templates/cursor.yml +29 -0
- package/templates/feature.md +40 -0
- package/templates/prd.md +30 -0
- package/templates/review-checklist.md +37 -0
- package/templates/rfc.md +19 -0
- package/templates/roadmap.yml +16 -0
- package/templates/skill.md +16 -0
- package/templates/spec.md +33 -0
- package/templates/srs.md +27 -0
- package/templates/tyrex.yml +54 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Resume from last session"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tyrex-resume - Resume from last session
|
|
6
|
+
|
|
7
|
+
You are the Tyrex Framework orchestrator. The user lost their session and is resuming.
|
|
8
|
+
|
|
9
|
+
## Agent Mode
|
|
10
|
+
|
|
11
|
+
This command inherits the `agent_mode` from the command it resumes into. Read `cursor.yml` to determine the last action and set the appropriate mode:
|
|
12
|
+
- If resuming into `/tyrex-do`: set `agent_mode: "build"`
|
|
13
|
+
- Otherwise: set `agent_mode: "plan"`
|
|
14
|
+
|
|
15
|
+
## Behavior
|
|
16
|
+
|
|
17
|
+
### Step 1: Quick state recovery
|
|
18
|
+
Read ONLY these files (minimal token usage):
|
|
19
|
+
1. `.tyrex/state/cursor.yml` — the session pointer
|
|
20
|
+
2. The active feature spec (if any)
|
|
21
|
+
3. `.tyrex/context/` — project-level context files (if directory exists)
|
|
22
|
+
4. `.tyrex/features/NNN-context.md` — demand-level context for the active feature (if exists)
|
|
23
|
+
5. Existing documentation for the active demand (if any):
|
|
24
|
+
- `docs/specs/` — SPEC files for current tasks
|
|
25
|
+
- `docs/srs/` — SRS for the active demand
|
|
26
|
+
- `docs/prd/` — PRD for the active demand
|
|
27
|
+
|
|
28
|
+
Do NOT read the entire codebase. Do NOT re-analyze the project. The cursor has everything you need. Context and documentation files provide continuity across sessions.
|
|
29
|
+
|
|
30
|
+
### Step 2: Display resume summary
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
TYREX Resume
|
|
34
|
+
═══════════════════════════════════════
|
|
35
|
+
|
|
36
|
+
Project: [name from tyrex.yml]
|
|
37
|
+
Last session: [timestamp from cursor.yml]
|
|
38
|
+
Last action: [action from cursor.yml]
|
|
39
|
+
|
|
40
|
+
Active feature: [feature name]
|
|
41
|
+
Progress: [completed]/[total] tasks
|
|
42
|
+
|
|
43
|
+
Last completed: Task [N] - [description]
|
|
44
|
+
Last commit: [hash] ([time])
|
|
45
|
+
|
|
46
|
+
Next tasks:
|
|
47
|
+
- Task [N]: [description] (ready)
|
|
48
|
+
- Task [N]: [description] (ready, can parallel)
|
|
49
|
+
- Task [N]: [description] (blocked by Task [X])
|
|
50
|
+
|
|
51
|
+
Continue from where you left off? [Y/n]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Step 3: Resume
|
|
55
|
+
If the user confirms:
|
|
56
|
+
- Load TYREX.md and constitution.md (for context)
|
|
57
|
+
- Load project-level context from `.tyrex/context/` and demand-level context from `.tyrex/features/NNN-context.md`
|
|
58
|
+
- Load SPEC files for pending tasks, SRS and PRD for the active demand
|
|
59
|
+
- Continue as if `/tyrex-do` was called — pick up from the next pending task
|
|
60
|
+
- If there were parallel tasks in progress when the session dropped, check their state files to see if any completed
|
|
61
|
+
|
|
62
|
+
If the user says no:
|
|
63
|
+
- Show `/tyrex-status` and let them choose what to do
|
|
64
|
+
|
|
65
|
+
### Step 4: Handle edge cases
|
|
66
|
+
- **Tasks were in_progress when session dropped:** Mark them as `pending` again (they didn't complete)
|
|
67
|
+
- **Cursor.yml is corrupted or missing:** Fall back to reading all task state files to reconstruct state
|
|
68
|
+
- **No active feature:** Show status and suggest `/tyrex-new`
|
|
69
|
+
|
|
70
|
+
## Important Rules
|
|
71
|
+
- SPEED is the priority here — read minimal files, display quickly
|
|
72
|
+
- Do NOT re-read the entire codebase
|
|
73
|
+
- Do NOT re-analyze architecture
|
|
74
|
+
- The cursor.yml IS the recovery point — trust it
|
|
75
|
+
- If cursor.yml has `in_progress` tasks, they need to be restarted (session crash = incomplete)
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Review completed implementation"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tyrex-review - Review completed implementation
|
|
6
|
+
|
|
7
|
+
You are the Tyrex Framework orchestrator. The user wants to review the implementation.
|
|
8
|
+
|
|
9
|
+
## Agent Mode
|
|
10
|
+
|
|
11
|
+
This command runs in **plan** mode. Set `agent_mode: "plan"` in `cursor.yml` as the FIRST action.
|
|
12
|
+
You MUST NOT create, edit, or delete source code files. You MUST NOT apply fixes, refactors, or suggestions directly.
|
|
13
|
+
Present ALL findings as recommendations for the human to action via `/tyrex-do` or `/tyrex-quick`.
|
|
14
|
+
You may update ONLY: `.tyrex/` state files, `docs/` documentation files, and `.tyrex/TYREX.md`.
|
|
15
|
+
|
|
16
|
+
## Review Scope
|
|
17
|
+
|
|
18
|
+
This command supports two scopes:
|
|
19
|
+
|
|
20
|
+
- **`/tyrex-review`** (default) — **PR review**: reviews ONLY the changes made in the current branch compared to the base branch (`git diff main...HEAD`). Focuses on what was implemented in this feature.
|
|
21
|
+
- **`/tyrex-review full`** — **Codebase review**: reviews the entire codebase. Re-scans for security vulnerabilities, architectural issues, and code quality across all files. Updates `.tyrex/map/security-audit.md` with new findings.
|
|
22
|
+
|
|
23
|
+
## Behavior
|
|
24
|
+
|
|
25
|
+
### Step 1: Detect scope and load context
|
|
26
|
+
|
|
27
|
+
1. Parse the command argument to determine scope (`pr` or `full`). Default is `pr`.
|
|
28
|
+
2. Read:
|
|
29
|
+
- `.tyrex/state/cursor.yml` → active feature
|
|
30
|
+
- Active feature spec → acceptance criteria
|
|
31
|
+
- `.tyrex/templates/review-checklist.md` → review checklist
|
|
32
|
+
- `.tyrex/tyrex.yml` → documentation configuration for this demand
|
|
33
|
+
- `.tyrex/map/security-audit.md` → existing security findings (if exists)
|
|
34
|
+
|
|
35
|
+
3. **For PR scope:** identify the changed files:
|
|
36
|
+
- Run `git diff main...HEAD --name-only` to get the list of files changed in this branch
|
|
37
|
+
- This file list is the scope for code review and security review
|
|
38
|
+
|
|
39
|
+
4. **For Full scope:** the scope is the entire codebase (excluding `.tyrex/`, `node_modules/`, `.git/`, `docs/`).
|
|
40
|
+
|
|
41
|
+
### Step 2: Automated checks
|
|
42
|
+
Run and report:
|
|
43
|
+
- [ ] All tests passing
|
|
44
|
+
- [ ] Lint clean (if configured)
|
|
45
|
+
- [ ] Security scan clean (if configured — e.g., `npm audit`, `bundler-audit`, etc.)
|
|
46
|
+
- [ ] All acceptance criteria addressed (map each criterion to implementation) — PR scope only
|
|
47
|
+
|
|
48
|
+
### Step 3: Security review
|
|
49
|
+
|
|
50
|
+
**For PR scope (default):**
|
|
51
|
+
1. Analyze ONLY the files changed in the branch against common vulnerability patterns:
|
|
52
|
+
- Injection vulnerabilities (SQL, NoSQL, command injection, XSS)
|
|
53
|
+
- Authentication and authorization issues (missing auth checks, privilege escalation)
|
|
54
|
+
- Secrets exposure (hardcoded credentials, API keys, tokens in code or logs)
|
|
55
|
+
- Input validation gaps (unsanitized user input, missing boundary checks)
|
|
56
|
+
- Insecure data handling (sensitive data in logs, unencrypted storage)
|
|
57
|
+
- Dependency risks (new dependencies added without justification)
|
|
58
|
+
2. Cross-reference with pending findings from `.tyrex/map/security-audit.md`:
|
|
59
|
+
- If any pending finding (`[ ]`) references a file that was changed in this branch, check whether the change resolves it
|
|
60
|
+
- If resolved: mark as `[x]` in the audit file
|
|
61
|
+
- If a changed file introduces a NEW vulnerability: report it as a new finding
|
|
62
|
+
3. Present security findings for the changed files only
|
|
63
|
+
|
|
64
|
+
**For Full scope (`/tyrex-review full`):**
|
|
65
|
+
1. Re-scan the ENTIRE codebase for all vulnerability patterns listed above
|
|
66
|
+
2. Read existing `.tyrex/map/security-audit.md` (if exists)
|
|
67
|
+
3. Generate an updated `security-audit.md` that:
|
|
68
|
+
- Preserves `[x]` status for previously resolved findings
|
|
69
|
+
- Adds new findings with `[ ]` status
|
|
70
|
+
- Removes findings that no longer apply (e.g., deleted code)
|
|
71
|
+
- Updates the `> Generated by` date header
|
|
72
|
+
4. Present a diff summary: new findings, resolved findings, persistent findings
|
|
73
|
+
|
|
74
|
+
### Step 4: Code review
|
|
75
|
+
|
|
76
|
+
Review the implementation (scoped to changed files for PR, full codebase for Full) against the review checklist:
|
|
77
|
+
- Code quality (DRY, file sizes, naming)
|
|
78
|
+
- Test coverage (critical paths, edge cases)
|
|
79
|
+
- Consistency with TYREX.md patterns
|
|
80
|
+
- Performance concerns
|
|
81
|
+
- Error handling completeness
|
|
82
|
+
|
|
83
|
+
Present findings. Suggest refactoring if needed — but do NOT apply changes. All suggestions must be actionable recommendations.
|
|
84
|
+
|
|
85
|
+
### Step 5: Documentation finalization
|
|
86
|
+
|
|
87
|
+
Ensure all required documentation is complete:
|
|
88
|
+
- [ ] `docs/CHANGELOG.md` is up to date with all changes from this feature
|
|
89
|
+
- [ ] ADR files are complete (if configured for this demand)
|
|
90
|
+
- [ ] RFC files are complete (if configured for this demand)
|
|
91
|
+
- [ ] Wiki updated (if configured for this demand)
|
|
92
|
+
- [ ] Diagrams updated (if configured for this demand)
|
|
93
|
+
|
|
94
|
+
If any docs are missing or incomplete, generate/complete them now (docs are allowed in plan mode).
|
|
95
|
+
|
|
96
|
+
### Step 6: TYREX.md evolution
|
|
97
|
+
|
|
98
|
+
Ask: "Did any new patterns, hurdles, or architecture decisions emerge during this implementation?"
|
|
99
|
+
If yes:
|
|
100
|
+
- Update `.tyrex/TYREX.md` with new patterns/hurdles
|
|
101
|
+
- Update Architecture Decisions table if applicable
|
|
102
|
+
|
|
103
|
+
### Step 7: Human approval
|
|
104
|
+
|
|
105
|
+
Present the complete review:
|
|
106
|
+
```
|
|
107
|
+
Review Summary - Feature: [name]
|
|
108
|
+
Scope: [PR | Full Codebase]
|
|
109
|
+
═══════════════════════════════════
|
|
110
|
+
|
|
111
|
+
Acceptance Criteria: 5/5 met
|
|
112
|
+
Tests: 24 passing, 0 failing
|
|
113
|
+
Lint: clean
|
|
114
|
+
|
|
115
|
+
Security:
|
|
116
|
+
New findings: [N] (from this review)
|
|
117
|
+
Pending (prior): [N] (from init audit, still unresolved)
|
|
118
|
+
Resolved: [N] (fixed in this branch)
|
|
119
|
+
[!] MEDIUM Missing input validation in src/api/users.js:45
|
|
120
|
+
[!] LOW Console.log exposes user email in src/services/auth.js:102
|
|
121
|
+
|
|
122
|
+
Code Quality:
|
|
123
|
+
[suggestion if any]
|
|
124
|
+
|
|
125
|
+
Documentation:
|
|
126
|
+
CHANGELOG: updated
|
|
127
|
+
ADR-003: created
|
|
128
|
+
Wiki: updated
|
|
129
|
+
|
|
130
|
+
New patterns documented in TYREX.md: [yes/no]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Ask: "Approve and mark feature as done? Or request changes?"
|
|
134
|
+
|
|
135
|
+
### Step 8: Finalize
|
|
136
|
+
|
|
137
|
+
If approved:
|
|
138
|
+
- Update feature spec status to `done`
|
|
139
|
+
- Update `.tyrex/roadmap.yml`: set this feature's status to `done`
|
|
140
|
+
- Final commit with documentation updates (if any docs were updated during review)
|
|
141
|
+
- Update cursor.yml: clear active feature, update last_action
|
|
142
|
+
- Tell user: "Feature complete. Run /tyrex-new for the next feature, or /tyrex-status for overview."
|
|
143
|
+
|
|
144
|
+
If changes requested:
|
|
145
|
+
- Note the requested changes as actionable items
|
|
146
|
+
- Tell user: "Run `/tyrex-do` to implement the requested changes, then `/tyrex-review` again."
|
|
147
|
+
- Do NOT start implementing changes — this command stays in plan mode
|
|
148
|
+
|
|
149
|
+
## Important Rules
|
|
150
|
+
- ALWAYS check CHANGELOG.md is updated — it's mandatory
|
|
151
|
+
- The review phase is where documentation gets FINALIZED, not skipped
|
|
152
|
+
- Refactoring suggestions should be actionable and specific — never apply them directly
|
|
153
|
+
- NEVER skip the security review step
|
|
154
|
+
- NEVER write, edit, or delete source code — this is a plan-mode command
|
|
155
|
+
- For PR scope: always use `git diff` against the base branch to determine scope
|
|
156
|
+
- For Full scope: always update `.tyrex/map/security-audit.md` with the complete re-scan results
|
|
157
|
+
- When marking findings as resolved in `security-audit.md`, change `[ ]` to `[x]` — do not delete the row
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "View and modify Tyrex configuration"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tyrex-settings - View and modify Tyrex configuration
|
|
6
|
+
|
|
7
|
+
You are the Tyrex Framework orchestrator. The user wants to view or change settings.
|
|
8
|
+
|
|
9
|
+
## Agent Mode
|
|
10
|
+
|
|
11
|
+
This command runs in **plan** mode. Set `agent_mode: "plan"` in `cursor.yml` as the FIRST action.
|
|
12
|
+
You MUST NOT write source code. You may modify only `.tyrex/tyrex.yml`.
|
|
13
|
+
|
|
14
|
+
## Behavior
|
|
15
|
+
|
|
16
|
+
1. Read `.tyrex/tyrex.yml`
|
|
17
|
+
2. Display current settings in a clear format:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Current Tyrex Settings:
|
|
21
|
+
─────────────────────────
|
|
22
|
+
Mode:
|
|
23
|
+
Commits: approve
|
|
24
|
+
Branches: approve
|
|
25
|
+
Changelog: always (locked)
|
|
26
|
+
Documentation: suggest
|
|
27
|
+
|
|
28
|
+
Docs defaults:
|
|
29
|
+
SPEC: enabled (LOCKED — mandatory per task)
|
|
30
|
+
SRS: enabled (Software Requirements Specification per demand)
|
|
31
|
+
PRD: enabled (Product Requirements Document per demand)
|
|
32
|
+
ADR: enabled
|
|
33
|
+
RFC: disabled
|
|
34
|
+
Wiki: enabled
|
|
35
|
+
Diagrams: enabled
|
|
36
|
+
|
|
37
|
+
Skills:
|
|
38
|
+
Auto-suggest on /tyrex-new: true
|
|
39
|
+
Installed: 3 in .tyrex/skills/
|
|
40
|
+
|
|
41
|
+
Quality:
|
|
42
|
+
TDD: enabled
|
|
43
|
+
Lint: enabled
|
|
44
|
+
Security scan: enabled
|
|
45
|
+
Review checklist: enabled
|
|
46
|
+
|
|
47
|
+
Parallel:
|
|
48
|
+
Enabled: true
|
|
49
|
+
Max agents: 5
|
|
50
|
+
Auto suggest: true
|
|
51
|
+
|
|
52
|
+
Git:
|
|
53
|
+
Branch prefix: feat/
|
|
54
|
+
Commit style: conventional
|
|
55
|
+
Auto push: false
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
3. Ask: "What would you like to change? (or 'done' to exit)"
|
|
59
|
+
4. For each change, update `tyrex.yml`
|
|
60
|
+
5. Confirm the change was saved
|
|
61
|
+
|
|
62
|
+
## Rules
|
|
63
|
+
- `changelog: always` is LOCKED and cannot be changed
|
|
64
|
+
- `docs.changelog: true` is LOCKED and cannot be changed
|
|
65
|
+
- `docs.spec: true` is LOCKED and cannot be changed — SPECs are mandatory per task
|
|
66
|
+
- Warn the user if they try to disable TDD or security scan (but allow it)
|
|
67
|
+
- Changes apply from the next demand onward
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Manage skills - list, create, and sync persona-based agent contexts"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tyrex-skills - Manage Skills
|
|
6
|
+
|
|
7
|
+
You are the Tyrex Framework orchestrator. The user wants to manage skills — persona-based contexts that specialize agent behavior for specific domains and tasks.
|
|
8
|
+
|
|
9
|
+
Skills are **not** tech-stack checklists. They are **agent personas**: a role, expertise areas, behavioral guidelines, learned patterns, and review criteria. When loaded during `/tyrex-do`, they shape how the agent thinks and reviews code.
|
|
10
|
+
|
|
11
|
+
## Agent Mode
|
|
12
|
+
|
|
13
|
+
This command runs in **plan** mode. Set `agent_mode: "plan"` in `cursor.yml` as the FIRST action.
|
|
14
|
+
You MUST NOT write source code. You may create/modify only `.tyrex/skills/` and agent provider skill directories.
|
|
15
|
+
|
|
16
|
+
## Behavior
|
|
17
|
+
|
|
18
|
+
### Default (no arguments): List installed skills
|
|
19
|
+
|
|
20
|
+
Scan all known skill locations:
|
|
21
|
+
|
|
22
|
+
1. `.tyrex/skills/*.md` (canonical source of truth)
|
|
23
|
+
2. `.claude/skills/*.md`
|
|
24
|
+
3. `.opencode/skills/*.md`
|
|
25
|
+
4. `.cursor/rules/tyrex-skill-*.md`
|
|
26
|
+
5. `.codex/skills/tyrex/skill-*.md`
|
|
27
|
+
|
|
28
|
+
For each `.md` file found, read the `## Role` line to extract the one-line description.
|
|
29
|
+
|
|
30
|
+
Display:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Installed Skills
|
|
34
|
+
════════════════════════════════════════
|
|
35
|
+
|
|
36
|
+
.tyrex/skills/
|
|
37
|
+
backend-engineer Backend engineer focused on API correctness and performance
|
|
38
|
+
security-reviewer Security engineer who catches auth and injection issues
|
|
39
|
+
|
|
40
|
+
.claude/skills/
|
|
41
|
+
frontend-engineer React/TypeScript UI specialist [not synced to .tyrex/]
|
|
42
|
+
|
|
43
|
+
.cursor/rules/
|
|
44
|
+
tyrex-skill-dba.md Database expert for migrations and queries [not synced to .tyrex/]
|
|
45
|
+
|
|
46
|
+
Total: 4 skills (2 canonical, 2 provider-specific)
|
|
47
|
+
|
|
48
|
+
Actions:
|
|
49
|
+
/tyrex-skills create Create a new skill
|
|
50
|
+
/tyrex-skills sync Sync skills across provider directories
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### /tyrex-skills create [name]
|
|
54
|
+
|
|
55
|
+
Interactive skill creation:
|
|
56
|
+
|
|
57
|
+
1. If `name` provided, use it. Otherwise ask: "What role or expertise should this skill represent?"
|
|
58
|
+
2. Gather from the user (or infer from project analysis):
|
|
59
|
+
- **Role**: One-line persona description (e.g., "Backend engineer focused on API correctness")
|
|
60
|
+
- **Expertise**: 3-6 areas of specialization
|
|
61
|
+
- **Guidelines**: Behavioral rules — how this persona approaches code
|
|
62
|
+
3. Generate the skill file using the format below
|
|
63
|
+
4. Save to `.tyrex/skills/{name}.md`
|
|
64
|
+
5. Ask: "Sync to provider directories? [Y/n]"
|
|
65
|
+
6. If yes, run the sync flow for this skill
|
|
66
|
+
|
|
67
|
+
### /tyrex-skills sync
|
|
68
|
+
|
|
69
|
+
Synchronize skills across provider directories:
|
|
70
|
+
|
|
71
|
+
1. Read all skills from `.tyrex/skills/*.md`
|
|
72
|
+
2. For each provider directory that exists in the project:
|
|
73
|
+
- `.claude/skills/` → copy as `{name}.md`
|
|
74
|
+
- `.opencode/skills/` → copy as `{name}.md`
|
|
75
|
+
- `.cursor/rules/` → copy as `tyrex-skill-{name}.md`
|
|
76
|
+
- `.codex/skills/tyrex/` → copy as `skill-{name}.md`
|
|
77
|
+
3. Check for provider-specific skills NOT in `.tyrex/skills/`:
|
|
78
|
+
- Offer to import them to canonical location
|
|
79
|
+
4. Report what was synced
|
|
80
|
+
|
|
81
|
+
## Skill File Format
|
|
82
|
+
|
|
83
|
+
Each skill is a flat file at `.tyrex/skills/{skill-name}.md`:
|
|
84
|
+
|
|
85
|
+
```markdown
|
|
86
|
+
# Skill: {Role Name}
|
|
87
|
+
|
|
88
|
+
## Role
|
|
89
|
+
{One-line description of the persona and what it focuses on.}
|
|
90
|
+
|
|
91
|
+
## Expertise
|
|
92
|
+
- {Area of specialization 1}
|
|
93
|
+
- {Area of specialization 2}
|
|
94
|
+
- {Area of specialization 3}
|
|
95
|
+
|
|
96
|
+
## Guidelines
|
|
97
|
+
- {Behavioral rule or pattern this persona follows}
|
|
98
|
+
- {Another guideline}
|
|
99
|
+
- {How this persona approaches trade-offs}
|
|
100
|
+
|
|
101
|
+
## Patterns
|
|
102
|
+
{Project-specific learned patterns. This section grows over time as the agent
|
|
103
|
+
discovers conventions, architectural decisions, and recurring solutions.
|
|
104
|
+
Initially empty or sparse — enriched after /tyrex-review cycles.}
|
|
105
|
+
|
|
106
|
+
## Review Criteria
|
|
107
|
+
- {What this persona checks during code review}
|
|
108
|
+
- {Quality gates specific to this domain}
|
|
109
|
+
- {Common mistakes this persona catches}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Example: Security Reviewer Skill
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
# Skill: Security Reviewer
|
|
116
|
+
|
|
117
|
+
## Role
|
|
118
|
+
Security engineer who reviews code for authentication, authorization, and injection vulnerabilities.
|
|
119
|
+
|
|
120
|
+
## Expertise
|
|
121
|
+
- Authentication and session management
|
|
122
|
+
- Input validation and sanitization
|
|
123
|
+
- SQL/NoSQL injection prevention
|
|
124
|
+
- Secrets management and environment isolation
|
|
125
|
+
|
|
126
|
+
## Guidelines
|
|
127
|
+
- Assume all external input is hostile
|
|
128
|
+
- Validate at the boundary, never trust inner layers to sanitize
|
|
129
|
+
- Flag any hardcoded secrets or credentials immediately
|
|
130
|
+
- Prefer allowlists over denylists for input validation
|
|
131
|
+
|
|
132
|
+
## Patterns
|
|
133
|
+
- This project uses JWT with refresh tokens stored in httpOnly cookies
|
|
134
|
+
- All DB queries go through the repository layer which uses parameterized queries
|
|
135
|
+
- Environment variables are loaded via `config/env.ts` — never read `process.env` directly
|
|
136
|
+
|
|
137
|
+
## Review Criteria
|
|
138
|
+
- No raw SQL concatenation
|
|
139
|
+
- All endpoints require auth middleware unless explicitly marked public
|
|
140
|
+
- Secrets never appear in logs or error messages
|
|
141
|
+
- Rate limiting on auth-related endpoints
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Rules
|
|
145
|
+
- Skills in `.tyrex/skills/` are the canonical source of truth
|
|
146
|
+
- Provider directories receive copies via sync — never edit provider copies directly
|
|
147
|
+
- Skill names MUST be lowercase, hyphenated, 1-64 characters
|
|
148
|
+
- Skills should be concise (under 150 lines) — they are loaded into agent context
|
|
149
|
+
- The `suggest` flow is part of `/tyrex-new`, not this command
|
|
150
|
+
- Patterns section starts sparse and grows via `/tyrex-review` and `/tyrex-evolve`
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Show current project status"
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# /tyrex-status - Show current project status
|
|
6
|
+
|
|
7
|
+
You are the Tyrex Framework orchestrator. Show the user a comprehensive view of where things stand.
|
|
8
|
+
|
|
9
|
+
## Agent Mode
|
|
10
|
+
|
|
11
|
+
This command runs in **plan** mode. Set `agent_mode: "plan"` in `cursor.yml` as the FIRST action.
|
|
12
|
+
You MUST NOT write source code. Read-only analysis and reporting only.
|
|
13
|
+
|
|
14
|
+
## Behavior
|
|
15
|
+
|
|
16
|
+
### Step 1: Gather data
|
|
17
|
+
Read these files (in parallel where possible):
|
|
18
|
+
1. `.tyrex/state/cursor.yml` — session state
|
|
19
|
+
2. `.tyrex/tyrex.yml` — project configuration
|
|
20
|
+
3. `.tyrex/features/` — all feature specs (list directory)
|
|
21
|
+
4. `.tyrex/state/tasks/` — all task state files
|
|
22
|
+
5. `.tyrex/roadmap.yml` — project roadmap and backlog (if exists)
|
|
23
|
+
6. `.tyrex/skills/` — installed skills (list directory)
|
|
24
|
+
7. `.tyrex/context/` — project context files (list directory)
|
|
25
|
+
8. `.tyrex/TYREX.md` — check completeness (sections filled or empty)
|
|
26
|
+
9. `docs/` — scan for existing documentation files
|
|
27
|
+
10. `.tyrex/map/security-audit.md` — security findings from init mapping (if exists)
|
|
28
|
+
|
|
29
|
+
### Step 2: Display comprehensive status
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
TYREX Status
|
|
33
|
+
═══════════════════════════════════════
|
|
34
|
+
|
|
35
|
+
Project: [name]
|
|
36
|
+
Config: commits=[mode] branches=[mode] docs=[mode]
|
|
37
|
+
|
|
38
|
+
─── Features ───────────────────────────
|
|
39
|
+
001-feature-name done (8/8 tasks)
|
|
40
|
+
002-feature-name done (7/7 tasks)
|
|
41
|
+
003-feature-name in_progress (3/7 tasks)
|
|
42
|
+
|
|
43
|
+
Active: 003-feature-name
|
|
44
|
+
Task 3: ServiceX completed
|
|
45
|
+
Task 4: ServiceY in_progress <- current
|
|
46
|
+
Task 5: Controller blocked (needs 3, 4)
|
|
47
|
+
Task 6: Tests A pending (can parallel after 5)
|
|
48
|
+
Task 7: Tests B pending (can parallel after 5)
|
|
49
|
+
|
|
50
|
+
─── Roadmap ────────────────────────────
|
|
51
|
+
004-feature-name planned (depends on 003)
|
|
52
|
+
005-feature-name planned (depends on 002)
|
|
53
|
+
006-feature-name discussed (no spec yet)
|
|
54
|
+
|
|
55
|
+
─── Health ─────────────────────────────
|
|
56
|
+
TYREX.md: [complete | incomplete (list empty sections)]
|
|
57
|
+
Constitution: [present | missing]
|
|
58
|
+
Context: [N files | no project context ingested]
|
|
59
|
+
Skills: [N installed (list names) | none installed]
|
|
60
|
+
Git branches: [N stale feature branches | clean]
|
|
61
|
+
|
|
62
|
+
─── Security ───────────────────────────
|
|
63
|
+
Last audit: [date from security-audit.md header | never]
|
|
64
|
+
Findings: [N pending, M resolved | no findings | no audit]
|
|
65
|
+
|
|
66
|
+
[!] MEDIUM .env not in .gitignore
|
|
67
|
+
[!] LOW Unescaped regex in bin/tyrex.js:102
|
|
68
|
+
[x] LOW Path containment in bin/tyrex.js:378 (resolved)
|
|
69
|
+
|
|
70
|
+
─── Documentation ──────────────────────
|
|
71
|
+
CHANGELOG: [present, up to date | present, stale | missing]
|
|
72
|
+
ADRs: [N (list numbers)] | none
|
|
73
|
+
Wiki: [N pages] | none
|
|
74
|
+
SRS/PRD: [N documents] | none
|
|
75
|
+
SPECs: [N task specs] | none
|
|
76
|
+
README: [present | not generated]
|
|
77
|
+
|
|
78
|
+
─── Skills ─────────────────────────────
|
|
79
|
+
Installed: [N] (.tyrex/skills/)
|
|
80
|
+
[skill-name] [role description]
|
|
81
|
+
[skill-name] [role description]
|
|
82
|
+
Active: [names assigned to current feature | none]
|
|
83
|
+
|
|
84
|
+
─── Context ────────────────────────────
|
|
85
|
+
Project: [N files] (.tyrex/context/)
|
|
86
|
+
Demand: [filename | none] (.tyrex/features/NNN-context.md)
|
|
87
|
+
|
|
88
|
+
Last commit: [hash] ([time or date])
|
|
89
|
+
Last action: [action from cursor.yml]
|
|
90
|
+
═══════════════════════════════════════
|
|
91
|
+
|
|
92
|
+
Commands:
|
|
93
|
+
/tyrex-discuss Explore the project, ask questions, brainstorm
|
|
94
|
+
/tyrex-do Continue implementation (if active feature)
|
|
95
|
+
/tyrex-review Review completed feature (if all tasks done)
|
|
96
|
+
/tyrex-new Start new feature
|
|
97
|
+
/tyrex-quick Quick fix or small task
|
|
98
|
+
/tyrex-skills Create or list skills
|
|
99
|
+
/tyrex-context Add project context
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Step 3: Health diagnostics
|
|
103
|
+
|
|
104
|
+
Perform these quick checks and include results in the Health section:
|
|
105
|
+
|
|
106
|
+
1. **TYREX.md completeness** — Check if key sections are filled:
|
|
107
|
+
- Project Overview (not just placeholder)
|
|
108
|
+
- Tech Stack (has entries)
|
|
109
|
+
- Architecture (has content)
|
|
110
|
+
- Project Patterns (has entries)
|
|
111
|
+
Report which sections are empty/placeholder.
|
|
112
|
+
|
|
113
|
+
2. **Stale branches** — List `feat/*` branches that have been merged to main but not deleted.
|
|
114
|
+
|
|
115
|
+
3. **Context coverage** — Check if `.tyrex/context/` has files. If empty, suggest `/tyrex-context`.
|
|
116
|
+
|
|
117
|
+
4. **Skills coverage** — Check if `.tyrex/skills/` has skills. If empty and features exist, note it.
|
|
118
|
+
|
|
119
|
+
5. **Documentation gaps** — Check what exists in `docs/`:
|
|
120
|
+
- Is CHANGELOG present and does it have entries beyond the template?
|
|
121
|
+
- Are there ADR files? How many?
|
|
122
|
+
- Are there wiki pages? How many?
|
|
123
|
+
- Are there SRS/PRD files?
|
|
124
|
+
- Is README.md present?
|
|
125
|
+
|
|
126
|
+
6. **Roadmap awareness** — If `.tyrex/roadmap.yml` exists, show planned/discussed features. If it doesn't exist but feature specs reference future features in "Out of Scope" or "Related" sections, extract those references and display them with a note "(extracted from feature specs — consider creating roadmap.yml)".
|
|
127
|
+
|
|
128
|
+
7. **Security findings** — If `.tyrex/map/security-audit.md` exists:
|
|
129
|
+
- Parse the findings table for `Status` column (`[ ]` = pending, `[x]` = resolved)
|
|
130
|
+
- Count pending vs resolved findings
|
|
131
|
+
- Show each pending finding with severity and description
|
|
132
|
+
- Show resolved findings as `[x]` (collapsed or dimmed)
|
|
133
|
+
- If no security-audit.md exists, show "No security audit found — run `/tyrex-init` to generate one"
|
|
134
|
+
|
|
135
|
+
### Step 4: Actionable suggestions
|
|
136
|
+
|
|
137
|
+
Based on the status, suggest the most relevant next actions:
|
|
138
|
+
|
|
139
|
+
- If there's an active feature with pending tasks: suggest `/tyrex-do`
|
|
140
|
+
- If all tasks are done but feature not reviewed: suggest `/tyrex-review`
|
|
141
|
+
- If no active feature: suggest `/tyrex-new`
|
|
142
|
+
- If TYREX.md is incomplete: suggest `/tyrex-evolve` or `/tyrex-discuss` to explore and fill gaps
|
|
143
|
+
- If no context files: suggest `/tyrex-context` or `/tyrex-discuss` to explore the project
|
|
144
|
+
- If project is greenfield (no features completed, minimal code): suggest `/tyrex-discuss` to brainstorm
|
|
145
|
+
- If no skills and features exist: suggest `/tyrex-skills create`
|
|
146
|
+
- If stale branches exist: suggest cleanup
|
|
147
|
+
- If roadmap has planned features: mention what's next
|
|
148
|
+
- If security findings are pending: "N security findings pending. Fix now with `/tyrex-quick`? [y/N]" — if user says yes, list the pending findings and let them choose which to fix, then hand off to `/tyrex-quick`
|
|
149
|
+
- Always include `/tyrex-discuss` in the commands list for Q&A availability
|
|
150
|
+
|
|
151
|
+
## Rules
|
|
152
|
+
- Keep the output concise — this is a status check, not a full report
|
|
153
|
+
- Highlight what's actionable (what can the user do next?)
|
|
154
|
+
- Show blocked tasks and what they're waiting for
|
|
155
|
+
- The Roadmap section provides forward-looking visibility into planned work
|
|
156
|
+
- The Health section surfaces issues proactively — don't wait for the user to ask
|
|
157
|
+
- If roadmap.yml doesn't exist, still try to extract future references from feature specs
|
|
158
|
+
- Adapt the display: omit sections that are completely empty/irrelevant (e.g., don't show Skills section if no skills exist and no features reference them)
|