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.
Files changed (38) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +274 -0
  3. package/bin/tyrex.js +445 -0
  4. package/package.json +33 -0
  5. package/templates/AGENTS.md +74 -0
  6. package/templates/CHANGELOG.md +11 -0
  7. package/templates/CLAUDE.md +74 -0
  8. package/templates/TYREX.md +60 -0
  9. package/templates/adr.md +20 -0
  10. package/templates/commands/unified/tyrex-context.md +107 -0
  11. package/templates/commands/unified/tyrex-discuss.md +141 -0
  12. package/templates/commands/unified/tyrex-do.md +133 -0
  13. package/templates/commands/unified/tyrex-evolve.md +31 -0
  14. package/templates/commands/unified/tyrex-handoff.md +215 -0
  15. package/templates/commands/unified/tyrex-help.md +293 -0
  16. package/templates/commands/unified/tyrex-init.md +134 -0
  17. package/templates/commands/unified/tyrex-new.md +156 -0
  18. package/templates/commands/unified/tyrex-openapi.md +168 -0
  19. package/templates/commands/unified/tyrex-plan.md +152 -0
  20. package/templates/commands/unified/tyrex-quick.md +31 -0
  21. package/templates/commands/unified/tyrex-readme.md +154 -0
  22. package/templates/commands/unified/tyrex-resume.md +75 -0
  23. package/templates/commands/unified/tyrex-review.md +157 -0
  24. package/templates/commands/unified/tyrex-settings.md +67 -0
  25. package/templates/commands/unified/tyrex-skills.md +150 -0
  26. package/templates/commands/unified/tyrex-status.md +158 -0
  27. package/templates/commands/unified/tyrex-wiki.md +116 -0
  28. package/templates/constitution.md +60 -0
  29. package/templates/cursor.yml +29 -0
  30. package/templates/feature.md +40 -0
  31. package/templates/prd.md +30 -0
  32. package/templates/review-checklist.md +37 -0
  33. package/templates/rfc.md +19 -0
  34. package/templates/roadmap.yml +16 -0
  35. package/templates/skill.md +16 -0
  36. package/templates/spec.md +33 -0
  37. package/templates/srs.md +27 -0
  38. package/templates/tyrex.yml +54 -0
package/bin/tyrex.js ADDED
@@ -0,0 +1,445 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require("fs");
4
+ const path = require("path");
5
+ const readline = require("readline");
6
+
7
+ // ─── Constants ───────────────────────────────────────────────
8
+ const VERSION = "0.1.1";
9
+ const TEMPLATES_DIR = path.join(__dirname, "..", "templates");
10
+
11
+ const AGENTS = {
12
+ claude: {
13
+ name: "Claude Code",
14
+ commandsDir: ".claude/commands",
15
+ commandsSrc: "commands/unified",
16
+ rulesFile: "CLAUDE.md",
17
+ rulesTemplate: "CLAUDE.md",
18
+ settingsFile: ".claude/settings.json",
19
+ },
20
+ opencode: {
21
+ name: "OpenCode",
22
+ commandsDir: ".opencode/commands",
23
+ commandsSrc: "commands/unified",
24
+ rulesFile: "AGENTS.md",
25
+ rulesTemplate: "AGENTS.md",
26
+ settingsFile: null,
27
+ },
28
+ cursor: {
29
+ name: "Cursor",
30
+ commandsDir: ".cursor/rules/tyrex",
31
+ commandsSrc: "commands/unified",
32
+ rulesFile: "CLAUDE.md",
33
+ rulesTemplate: "CLAUDE.md",
34
+ settingsFile: null,
35
+ },
36
+ codex: {
37
+ name: "Codex",
38
+ commandsDir: ".codex/skills/tyrex",
39
+ commandsSrc: "commands/unified",
40
+ rulesFile: "CLAUDE.md",
41
+ rulesTemplate: "CLAUDE.md",
42
+ settingsFile: null,
43
+ },
44
+ };
45
+
46
+ const COLORS = {
47
+ reset: "\x1b[0m",
48
+ bold: "\x1b[1m",
49
+ dim: "\x1b[2m",
50
+ green: "\x1b[32m",
51
+ yellow: "\x1b[33m",
52
+ blue: "\x1b[34m",
53
+ cyan: "\x1b[36m",
54
+ red: "\x1b[31m",
55
+ magenta: "\x1b[35m",
56
+ };
57
+
58
+ const c = (color, text) => `${COLORS[color]}${text}${COLORS.reset}`;
59
+
60
+ // ─── CLI Interface ───────────────────────────────────────────
61
+
62
+ const rl = readline.createInterface({
63
+ input: process.stdin,
64
+ output: process.stdout,
65
+ });
66
+
67
+ function ask(question) {
68
+ return new Promise((resolve) => {
69
+ rl.question(question, (answer) => resolve(answer.trim()));
70
+ });
71
+ }
72
+
73
+ async function choose(question, options) {
74
+ console.log(`\n${c("cyan", question)}`);
75
+ options.forEach((opt, i) => {
76
+ const marker = opt.default ? c("green", " (default)") : "";
77
+ console.log(` ${c("bold", `[${i + 1}]`)} ${opt.label}${marker}`);
78
+ if (opt.desc) console.log(` ${c("dim", opt.desc)}`);
79
+ });
80
+ const answer = await ask(`\n ${c("dim", "Choice [1]:")} `);
81
+ const idx = answer === "" ? 0 : parseInt(answer, 10) - 1;
82
+ return options[idx] || options[0];
83
+ }
84
+
85
+ async function confirm(question, defaultYes = true) {
86
+ const hint = defaultYes ? "Y/n" : "y/N";
87
+ const answer = await ask(`${c("cyan", question)} ${c("dim", `[${hint}]:`)} `);
88
+ if (answer === "") return defaultYes;
89
+ return answer.toLowerCase().startsWith("y");
90
+ }
91
+
92
+ // ─── File Operations ─────────────────────────────────────────
93
+
94
+ function copyTemplate(templateName, destPath, replacements = {}) {
95
+ const srcPath = path.join(TEMPLATES_DIR, templateName);
96
+ if (!fs.existsSync(srcPath)) {
97
+ console.log(c("red", ` Template not found: ${templateName}`));
98
+ return false;
99
+ }
100
+ let content = fs.readFileSync(srcPath, "utf-8");
101
+ for (const [key, value] of Object.entries(replacements)) {
102
+ content = content.replace(new RegExp(`{{${key}}}`, "g"), value);
103
+ }
104
+ const dir = path.dirname(destPath);
105
+ fs.mkdirSync(dir, { recursive: true });
106
+ fs.writeFileSync(destPath, content);
107
+ return true;
108
+ }
109
+
110
+ /**
111
+ * Copy a template only if the destination doesn't already exist.
112
+ * Core files (TYREX.md, constitution.md, cursor.yml, tyrex.yml, roadmap.yml)
113
+ * evolve over time and must NOT be overwritten by a re-install.
114
+ * Use --force to explicitly reset them to template defaults.
115
+ */
116
+ function copyTemplateIfNew(templateName, destPath, replacements = {}, force = false) {
117
+ if (!force && fs.existsSync(destPath)) {
118
+ console.log(c("dim", ` Preserved ${path.relative(process.cwd(), destPath)} (already exists, use --force to overwrite)`));
119
+ return false;
120
+ }
121
+ return copyTemplate(templateName, destPath, replacements);
122
+ }
123
+
124
+ function ensureDir(dirPath) {
125
+ fs.mkdirSync(dirPath, { recursive: true });
126
+ }
127
+
128
+ // ─── Installation Logic ──────────────────────────────────────
129
+
130
+ async function installCommands(targetDir, agent) {
131
+ const agentConfig = AGENTS[agent];
132
+ const commandsTarget = path.join(targetDir, agentConfig.commandsDir);
133
+ const commandsSrc = path.join(TEMPLATES_DIR, agentConfig.commandsSrc);
134
+
135
+ ensureDir(commandsTarget);
136
+
137
+ const commandFiles = fs.readdirSync(commandsSrc).filter((f) => f.endsWith(".md"));
138
+ let count = 0;
139
+
140
+ for (const file of commandFiles) {
141
+ const src = path.join(commandsSrc, file);
142
+ const dest = path.join(commandsTarget, file);
143
+ fs.copyFileSync(src, dest);
144
+ count++;
145
+ }
146
+
147
+ console.log(c("green", ` Installed ${count} slash commands to ${agentConfig.commandsDir}/`));
148
+ return count;
149
+ }
150
+
151
+ function installTyrexStructure(targetDir, config, agents, force = false) {
152
+ const tyrexDir = path.join(targetDir, ".tyrex");
153
+
154
+ // Directories
155
+ ensureDir(path.join(tyrexDir, "state", "tasks"));
156
+ ensureDir(path.join(tyrexDir, "features"));
157
+ ensureDir(path.join(tyrexDir, "templates"));
158
+ ensureDir(path.join(tyrexDir, "skills"));
159
+ ensureDir(path.join(tyrexDir, "map"));
160
+ ensureDir(path.join(tyrexDir, "context"));
161
+
162
+ // Docs directories
163
+ ensureDir(path.join(targetDir, "docs", "adrs"));
164
+ ensureDir(path.join(targetDir, "docs", "rfcs"));
165
+ ensureDir(path.join(targetDir, "docs", "wiki"));
166
+ ensureDir(path.join(targetDir, "docs", "diagrams"));
167
+ ensureDir(path.join(targetDir, "docs", "specs"));
168
+ ensureDir(path.join(targetDir, "docs", "srs"));
169
+ ensureDir(path.join(targetDir, "docs", "prd"));
170
+
171
+ const replacements = {
172
+ PROJECT_NAME: config.projectName || path.basename(targetDir),
173
+ DATE: new Date().toISOString().split("T")[0],
174
+ COMMIT_MODE: config.commits || "approve",
175
+ BRANCH_MODE: config.branches || "approve",
176
+ DOC_MODE: config.documentation || "suggest",
177
+ MAX_AGENTS: String(config.maxAgents || 5),
178
+ COMMIT_STYLE: config.commitStyle || "conventional",
179
+ BRANCH_PREFIX: config.branchPrefix || "feat/",
180
+ };
181
+
182
+ // Core files — these evolve over time and must NOT be overwritten on re-install.
183
+ // Use --force to explicitly reset them to template defaults.
184
+ copyTemplateIfNew("tyrex.yml", path.join(tyrexDir, "tyrex.yml"), replacements, force);
185
+ copyTemplateIfNew("TYREX.md", path.join(tyrexDir, "TYREX.md"), replacements, force);
186
+ copyTemplateIfNew("constitution.md", path.join(tyrexDir, "constitution.md"), replacements, force);
187
+ copyTemplateIfNew("cursor.yml", path.join(tyrexDir, "state", "cursor.yml"), replacements, force);
188
+ copyTemplateIfNew("roadmap.yml", path.join(tyrexDir, "roadmap.yml"), replacements, force);
189
+
190
+ // Reference templates — safe to overwrite since these are fill-in-later
191
+ // templates that AI agents use as starting points. Updating them ensures
192
+ // projects always have the latest template versions.
193
+ copyTemplate("feature.md", path.join(tyrexDir, "templates", "feature.md"));
194
+ copyTemplate("adr.md", path.join(tyrexDir, "templates", "adr.md"));
195
+ copyTemplate("rfc.md", path.join(tyrexDir, "templates", "rfc.md"));
196
+ copyTemplate("review-checklist.md", path.join(tyrexDir, "templates", "review-checklist.md"));
197
+ copyTemplate("spec.md", path.join(tyrexDir, "templates", "spec.md"));
198
+ copyTemplate("srs.md", path.join(tyrexDir, "templates", "srs.md"));
199
+ copyTemplate("prd.md", path.join(tyrexDir, "templates", "prd.md"));
200
+ copyTemplate("skill.md", path.join(tyrexDir, "templates", "skill.md"));
201
+
202
+ // Rules files (CLAUDE.md and/or AGENTS.md) — these may be customized by the user,
203
+ // so protect them from overwrite on re-install.
204
+ const installedRules = new Set();
205
+ for (const agentKey of agents) {
206
+ const agentConfig = AGENTS[agentKey];
207
+ const rulesFile = agentConfig.rulesFile;
208
+ if (!installedRules.has(rulesFile)) {
209
+ const rulesPath = path.join(targetDir, rulesFile);
210
+ if (copyTemplateIfNew(agentConfig.rulesTemplate, rulesPath, replacements, force)) {
211
+ console.log(c("green", ` Created ${rulesFile}`));
212
+ }
213
+ installedRules.add(rulesFile);
214
+ }
215
+ }
216
+
217
+ // CHANGELOG.md — never overwrite (append-only by nature)
218
+ const changelogPath = path.join(targetDir, "docs", "CHANGELOG.md");
219
+ copyTemplateIfNew("CHANGELOG.md", changelogPath, replacements);
220
+
221
+ console.log(c("green", " Created .tyrex/ directory structure"));
222
+ console.log(c("green", " Created docs/ directory structure"));
223
+ }
224
+
225
+ // ─── Main ────────────────────────────────────────────────────
226
+
227
+ async function main() {
228
+ const args = process.argv.slice(2);
229
+ const command = args[0];
230
+
231
+ // Non-interactive flags
232
+ const flags = {
233
+ claude: args.includes("--claude"),
234
+ opencode: args.includes("--opencode"),
235
+ cursor: args.includes("--cursor"),
236
+ codex: args.includes("--codex"),
237
+ all: args.includes("--all"),
238
+ global: args.includes("--global") || args.includes("-g"),
239
+ local: args.includes("--local") || args.includes("-l"),
240
+ uninstall: args.includes("--uninstall"),
241
+ defaults: args.includes("--defaults") || args.includes("-d"),
242
+ force: args.includes("--force") || args.includes("-f"),
243
+ };
244
+
245
+ console.log("");
246
+ console.log(c("bold", " ╔══════════════════════════════════════╗"));
247
+ console.log(c("bold", " ║") + c("green", " TYREX Framework") + c("bold", " ║"));
248
+ console.log(c("bold", " ║") + c("dim", " Human-driven, AI-accelerated") + c("bold", " ║"));
249
+ console.log(c("bold", " ║") + c("dim", ` v${VERSION}`) + c("bold", " ║"));
250
+ console.log(c("bold", " ╚══════════════════════════════════════╝"));
251
+ console.log("");
252
+
253
+ if (command === "version" || args.includes("--version") || args.includes("-v")) {
254
+ console.log(` tyrex v${VERSION}`);
255
+ rl.close();
256
+ return;
257
+ }
258
+
259
+ if (command === "help" || args.includes("--help") || args.includes("-h")) {
260
+ printHelp();
261
+ rl.close();
262
+ return;
263
+ }
264
+
265
+ // ─── Uninstall ───
266
+ if (flags.uninstall) {
267
+ await handleUninstall(flags);
268
+ rl.close();
269
+ return;
270
+ }
271
+
272
+ // ─── Install flow ───
273
+ console.log(c("bold", " Setup\n"));
274
+
275
+ // 1. Choose agent
276
+ let agent;
277
+ if (flags.claude) agent = "claude";
278
+ else if (flags.opencode) agent = "opencode";
279
+ else if (flags.cursor) agent = "cursor";
280
+ else if (flags.codex) agent = "codex";
281
+ else if (flags.all) agent = "all";
282
+ else {
283
+ const agentChoice = await choose("Which AI agent are you using?", [
284
+ { label: "Claude Code", desc: "Anthropic's CLI agent", default: true },
285
+ { label: "OpenCode", desc: "Open source AI coding agent" },
286
+ { label: "Cursor", desc: "AI-first code editor" },
287
+ { label: "Codex", desc: "OpenAI's coding agent" },
288
+ { label: "All", desc: "Install for all agents" },
289
+ ]);
290
+ agent = ["claude", "opencode", "cursor", "codex", "all"][
291
+ [
292
+ "Claude Code",
293
+ "OpenCode",
294
+ "Cursor",
295
+ "Codex",
296
+ "All",
297
+ ].indexOf(agentChoice.label)
298
+ ];
299
+ }
300
+
301
+ // 2. Choose location
302
+ let location;
303
+ if (flags.global) location = "global";
304
+ else if (flags.local) location = "local";
305
+ else {
306
+ const locChoice = await choose("Where to install?", [
307
+ {
308
+ label: "Local (this project)",
309
+ desc: "Install in current directory. Best for per-project setup.",
310
+ default: true,
311
+ },
312
+ {
313
+ label: "Global",
314
+ desc: "Install in home directory. Available for all projects.",
315
+ },
316
+ ]);
317
+ location = locChoice.label.startsWith("Local") ? "local" : "global";
318
+ }
319
+
320
+ const targetDir = location === "global" ? require("os").homedir() : process.cwd();
321
+
322
+ // 3. Configure defaults
323
+ let config;
324
+ if (flags.defaults) {
325
+ console.log(c("dim", "\n Using default configuration.\n"));
326
+ config = {
327
+ projectName: path.basename(process.cwd()),
328
+ commits: "approve",
329
+ branches: "approve",
330
+ documentation: "suggest",
331
+ maxAgents: 5,
332
+ commitStyle: "conventional",
333
+ branchPrefix: "feat/",
334
+ };
335
+ } else {
336
+ console.log(c("bold", "\n Configuration\n"));
337
+
338
+ const commitMode = await choose("Commit mode:", [
339
+ { label: "Approve", desc: "Review and approve each commit", default: true },
340
+ { label: "Auto", desc: "Commit automatically after each task" },
341
+ ]);
342
+
343
+ const branchMode = await choose("Branch creation:", [
344
+ { label: "Approve", desc: "Tyrex suggests branch name, you approve", default: true },
345
+ { label: "Auto", desc: "Create branches automatically" },
346
+ ]);
347
+
348
+ const docMode = await choose("Documentation level:", [
349
+ { label: "Suggest", desc: "Suggest docs per demand, you choose", default: true },
350
+ { label: "Always", desc: "Always generate full documentation (ADR, RFC, Wiki)" },
351
+ { label: "Minimal", desc: "Only CHANGELOG (mandatory) + TYREX.md" },
352
+ ]);
353
+
354
+ config = {
355
+ projectName: path.basename(process.cwd()),
356
+ commits: commitMode.label.toLowerCase(),
357
+ branches: branchMode.label.toLowerCase(),
358
+ documentation: docMode.label.toLowerCase(),
359
+ maxAgents: 5,
360
+ commitStyle: "conventional",
361
+ branchPrefix: "feat/",
362
+ };
363
+ }
364
+
365
+ // 4. Install
366
+ console.log(c("bold", "\n Installing...\n"));
367
+
368
+ // Install slash commands
369
+ const agents = agent === "all" ? ["claude", "opencode", "cursor", "codex"] : [agent];
370
+ for (const a of agents) {
371
+ installCommands(targetDir, a);
372
+ }
373
+
374
+ // Install .tyrex structure (only for local)
375
+ if (location === "local") {
376
+ installTyrexStructure(targetDir, config, agents, flags.force);
377
+ } else {
378
+ // For global, only install commands
379
+ console.log(c("dim", " Global install: only slash commands installed."));
380
+ console.log(c("dim", " Run /tyrex-init in your project to create .tyrex/ structure."));
381
+ }
382
+
383
+ // 5. Done
384
+ console.log(c("bold", "\n ═══════════════════════════════════════"));
385
+ console.log(c("green", c("bold", " Done!")));
386
+ console.log("");
387
+ console.log(` ${c("dim", "Start your agent and run:")} ${c("cyan", "/tyrex-init")}`);
388
+ console.log(` ${c("dim", "Or for a new feature:")} ${c("cyan", "/tyrex-new")}`);
389
+ console.log(` ${c("dim", "See all commands:")} ${c("cyan", "/tyrex-status")}`);
390
+ console.log("");
391
+
392
+ rl.close();
393
+ }
394
+
395
+ async function handleUninstall(flags) {
396
+ const agents = flags.all
397
+ ? ["claude", "opencode", "cursor", "codex"]
398
+ : [flags.claude ? "claude" : flags.opencode ? "opencode" : flags.cursor ? "cursor" : "codex"];
399
+ const targetDir = flags.global ? require("os").homedir() : process.cwd();
400
+
401
+ for (const agent of agents) {
402
+ const agentConfig = AGENTS[agent];
403
+ const commandsDir = path.join(targetDir, agentConfig.commandsDir);
404
+ if (fs.existsSync(commandsDir)) {
405
+ fs.rmSync(commandsDir, { recursive: true });
406
+ console.log(c("green", ` Removed ${agentConfig.commandsDir}/`));
407
+ } else {
408
+ console.log(c("dim", ` ${agentConfig.commandsDir}/ not found, skipping`));
409
+ }
410
+ }
411
+ console.log(c("green", "\n Uninstall complete."));
412
+ console.log(c("dim", " Note: .tyrex/ directory was preserved (contains project state)."));
413
+ }
414
+
415
+ function printHelp() {
416
+ console.log(` ${c("bold", "Usage:")} npx tyrex-framework [options]`);
417
+ console.log("");
418
+ console.log(` ${c("bold", "Options:")}`);
419
+ console.log(` --claude Install for Claude Code`);
420
+ console.log(` --opencode Install for OpenCode`);
421
+ console.log(` --cursor Install for Cursor`);
422
+ console.log(` --codex Install for Codex`);
423
+ console.log(` --all Install for all agents`);
424
+ console.log(` --local, -l Install in current directory`);
425
+ console.log(` --global, -g Install in home directory`);
426
+ console.log(` --defaults, -d Skip configuration questions, use defaults`);
427
+ console.log(` --force, -f Overwrite core files (TYREX.md, constitution, etc.) on re-install`);
428
+ console.log(` --uninstall Remove Tyrex commands`);
429
+ console.log(` --version, -v Show version`);
430
+ console.log(` --help, -h Show this help`);
431
+ console.log("");
432
+ console.log(` ${c("bold", "Examples:")}`);
433
+ console.log(` npx tyrex-framework Interactive setup`);
434
+ console.log(` npx tyrex-framework --claude --local Claude Code, current project`);
435
+ console.log(` npx tyrex-framework --opencode --local OpenCode, current project`);
436
+ console.log(` npx tyrex-framework --opencode --local -d OpenCode, defaults, no questions`);
437
+ console.log(` npx tyrex-framework --all --global All agents, global install`);
438
+ console.log("");
439
+ }
440
+
441
+ main().catch((err) => {
442
+ console.error(c("red", `\n Error: ${err.message}`));
443
+ rl.close();
444
+ process.exit(1);
445
+ });
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "tyrex-framework",
3
+ "version": "0.1.1",
4
+ "description": "Human-driven, AI-accelerated pair programming framework. Orchestrates AI agents with guardrails, parallelization, and shared memory.",
5
+ "bin": {
6
+ "tyrex": "./bin/tyrex.js"
7
+ },
8
+ "keywords": [
9
+ "ai",
10
+ "pair-programming",
11
+ "claude-code",
12
+ "opencode",
13
+ "cursor",
14
+ "codex",
15
+ "framework",
16
+ "orchestration",
17
+ "tdd",
18
+ "spec-driven"
19
+ ],
20
+ "author": "Tyrex Contributors",
21
+ "license": "MIT",
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "https://github.com/tyrex-framework/tyrex"
25
+ },
26
+ "engines": {
27
+ "node": ">=18.0.0"
28
+ },
29
+ "files": [
30
+ "bin/",
31
+ "templates/"
32
+ ]
33
+ }
@@ -0,0 +1,74 @@
1
+ # Tyrex Framework
2
+
3
+ This project uses the Tyrex Framework for human-driven, AI-accelerated pair programming.
4
+
5
+ ## How It Works
6
+
7
+ 1. **Read context first:** Before any action, read `.tyrex/TYREX.md` for project context and `.tyrex/constitution.md` for guardrails.
8
+ 2. **Check state:** Read `.tyrex/state/cursor.yml` to know where we left off.
9
+ 3. **Check mode:** Read `agent_mode` from `cursor.yml`. In `plan` mode, NEVER write source code — only `.tyrex/`, `docs/`, and config files. In `build` mode, follow TDD and commit rules.
10
+ 4. **Use commands:** The `/tyrex-*` slash commands orchestrate the development workflow.
11
+ 5. **Update state:** After every task, update the cursor and task state files.
12
+
13
+ ## Commands Available
14
+
15
+ | Command | Purpose |
16
+ |---------|---------|
17
+ | `/tyrex-init` | Initialize Tyrex in a project (map codebase, configure) |
18
+ | `/tyrex-settings` | View/modify Tyrex configuration |
19
+ | `/tyrex-new` | Start a new feature/demand (with docs config per demand) |
20
+ | `/tyrex-plan` | Plan implementation tasks with dependencies and parallelism |
21
+ | `/tyrex-do` | Execute tasks (sequential or parallel, with TDD) |
22
+ | `/tyrex-review` | Review implementation, finalize docs, refactor |
23
+ | `/tyrex-status` | Show current project and feature status |
24
+ | `/tyrex-resume` | Resume from last session (fast recovery via cursor) |
25
+ | `/tyrex-quick` | Quick task without full ceremony (bug fixes, tweaks) |
26
+ | `/tyrex-evolve` | Update TYREX.md with new patterns/knowledge |
27
+ | `/tyrex-handoff` | Deterministic autopilot (chains new→plan→do→review) |
28
+ | `/tyrex-skills` | Manage and apply reusable skills |
29
+ | `/tyrex-readme` | Generate or update project README.md |
30
+ | `/tyrex-openapi` | Generate or update OpenAPI documentation |
31
+ | `/tyrex-wiki` | Generate or update project wiki pages |
32
+ | `/tyrex-help` | Show commands, workflow guide, and contextual suggestions |
33
+
34
+ ## Core Rules
35
+
36
+ 1. **Human decides WHAT and WHY. AI decides HOW.** Never invert this.
37
+ 2. **TDD is mandatory.** Write tests alongside or before code.
38
+ 3. **Every commit passes CI.** No broken commits, ever.
39
+ 4. **CHANGELOG is mandatory.** Update `docs/CHANGELOG.md` on every change.
40
+ 5. **Small commits.** One task = one atomic, revertible commit.
41
+ 6. **Ask, don't assume.** When in doubt, ask the human.
42
+ 7. **Simplicity wins.** Propose the simplest solution first.
43
+ 8. **Documentation first.** When configured, generate docs before code.
44
+ 9. **Update state.** Always update cursor.yml after completing tasks.
45
+ 10. **Respect parallelism rules.** Sub-agents only modify their own files and state.
46
+
47
+ ## File Structure
48
+
49
+ ```
50
+ .tyrex/
51
+ ├── tyrex.yml # Configuration
52
+ ├── TYREX.md # Living project context (READ THIS FIRST)
53
+ ├── constitution.md # Inviolable guardrails (READ THIS SECOND)
54
+ ├── state/
55
+ │ ├── cursor.yml # Session pointer (READ THIS THIRD)
56
+ │ └── tasks/ # Individual task states
57
+ ├── features/ # Feature specs
58
+ ├── templates/ # Document templates
59
+ ├── skills/ # Reusable skills (synced across agents)
60
+ └── map/ # Project mapping (generated on init)
61
+ docs/
62
+ ├── CHANGELOG.md # Mandatory changelog
63
+ ├── adrs/ # Architecture Decision Records
64
+ ├── rfcs/ # Request for Comments
65
+ ├── wiki/ # Project wiki
66
+ └── diagrams/ # Flow diagrams
67
+ ```
68
+
69
+ ## On Parallelization
70
+
71
+ When tasks can run in parallel, ask the human before spawning sub-agents.
72
+ Each sub-agent receives: task description + TYREX.md + constitution.md.
73
+ Each sub-agent writes ONLY to its own task state file.
74
+ The orchestrator (main agent) handles commits, CHANGELOG, and cursor updates.
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Added
11
+ - Project initialized with Tyrex Framework v0.1.0
@@ -0,0 +1,74 @@
1
+ # Tyrex Framework
2
+
3
+ This project uses the Tyrex Framework for human-driven, AI-accelerated pair programming.
4
+
5
+ ## How It Works
6
+
7
+ 1. **Read context first:** Before any action, read `.tyrex/TYREX.md` for project context and `.tyrex/constitution.md` for guardrails.
8
+ 2. **Check state:** Read `.tyrex/state/cursor.yml` to know where we left off.
9
+ 3. **Check mode:** Read `agent_mode` from `cursor.yml`. In `plan` mode, NEVER write source code — only `.tyrex/`, `docs/`, and config files. In `build` mode, follow TDD and commit rules.
10
+ 4. **Use commands:** The `/tyrex-*` slash commands orchestrate the development workflow.
11
+ 5. **Update state:** After every task, update the cursor and task state files.
12
+
13
+ ## Commands Available
14
+
15
+ | Command | Purpose |
16
+ |---------|---------|
17
+ | `/tyrex-init` | Initialize Tyrex in a project (map codebase, configure) |
18
+ | `/tyrex-settings` | View/modify Tyrex configuration |
19
+ | `/tyrex-new` | Start a new feature/demand (with docs config per demand) |
20
+ | `/tyrex-plan` | Plan implementation tasks with dependencies and parallelism |
21
+ | `/tyrex-do` | Execute tasks (sequential or parallel, with TDD) |
22
+ | `/tyrex-review` | Review implementation, finalize docs, refactor |
23
+ | `/tyrex-status` | Show current project and feature status |
24
+ | `/tyrex-resume` | Resume from last session (fast recovery via cursor) |
25
+ | `/tyrex-quick` | Quick task without full ceremony (bug fixes, tweaks) |
26
+ | `/tyrex-evolve` | Update TYREX.md with new patterns/knowledge |
27
+ | `/tyrex-handoff` | Deterministic autopilot (chains new→plan→do→review) |
28
+ | `/tyrex-skills` | Manage and apply reusable skills |
29
+ | `/tyrex-readme` | Generate or update project README.md |
30
+ | `/tyrex-openapi` | Generate or update OpenAPI documentation |
31
+ | `/tyrex-wiki` | Generate or update project wiki pages |
32
+ | `/tyrex-help` | Show commands, workflow guide, and contextual suggestions |
33
+
34
+ ## Core Rules
35
+
36
+ 1. **Human decides WHAT and WHY. AI decides HOW.** Never invert this.
37
+ 2. **TDD is mandatory.** Write tests alongside or before code.
38
+ 3. **Every commit passes CI.** No broken commits, ever.
39
+ 4. **CHANGELOG is mandatory.** Update `docs/CHANGELOG.md` on every change.
40
+ 5. **Small commits.** One task = one atomic, revertible commit.
41
+ 6. **Ask, don't assume.** When in doubt, ask the human.
42
+ 7. **Simplicity wins.** Propose the simplest solution first.
43
+ 8. **Documentation first.** When configured, generate docs before code.
44
+ 9. **Update state.** Always update cursor.yml after completing tasks.
45
+ 10. **Respect parallelism rules.** Sub-agents only modify their own files and state.
46
+
47
+ ## File Structure
48
+
49
+ ```
50
+ .tyrex/
51
+ ├── tyrex.yml # Configuration
52
+ ├── TYREX.md # Living project context (READ THIS FIRST)
53
+ ├── constitution.md # Inviolable guardrails (READ THIS SECOND)
54
+ ├── state/
55
+ │ ├── cursor.yml # Session pointer (READ THIS THIRD)
56
+ │ └── tasks/ # Individual task states
57
+ ├── features/ # Feature specs
58
+ ├── templates/ # Document templates
59
+ ├── skills/ # Reusable skills (synced across agents)
60
+ └── map/ # Project mapping (generated on init)
61
+ docs/
62
+ ├── CHANGELOG.md # Mandatory changelog
63
+ ├── adrs/ # Architecture Decision Records
64
+ ├── rfcs/ # Request for Comments
65
+ ├── wiki/ # Project wiki
66
+ └── diagrams/ # Flow diagrams
67
+ ```
68
+
69
+ ## On Parallelization
70
+
71
+ When tasks can run in parallel, ask the human before spawning sub-agents.
72
+ Each sub-agent receives: task description + TYREX.md + constitution.md.
73
+ Each sub-agent writes ONLY to its own task state file.
74
+ The orchestrator (main agent) handles commits, CHANGELOG, and cursor updates.