@vextlabs/theron-cli 0.2.1 → 0.4.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.
- package/dist/api.d.ts +8 -0
- package/dist/api.js +3 -0
- package/dist/api.js.map +1 -1
- package/dist/auth.js +51 -1
- package/dist/auth.js.map +1 -1
- package/dist/banner.js +3 -2
- package/dist/banner.js.map +1 -1
- package/dist/checkpoints.d.ts +32 -0
- package/dist/checkpoints.js +61 -0
- package/dist/checkpoints.js.map +1 -0
- package/dist/index.js +61 -5
- package/dist/index.js.map +1 -1
- package/dist/input.d.ts +61 -0
- package/dist/input.js +574 -0
- package/dist/input.js.map +1 -0
- package/dist/profiles/index.js +5 -0
- package/dist/profiles/index.js.map +1 -1
- package/dist/profiles/methodologies/build_domains.d.ts +6 -0
- package/dist/profiles/methodologies/build_domains.js +170 -0
- package/dist/profiles/methodologies/build_domains.js.map +1 -0
- package/dist/profiles/methodologies/operate_domains.d.ts +8 -0
- package/dist/profiles/methodologies/operate_domains.js +1239 -0
- package/dist/profiles/methodologies/operate_domains.js.map +1 -0
- package/dist/profiles/methodologies/regulated_domains.d.ts +6 -0
- package/dist/profiles/methodologies/regulated_domains.js +153 -0
- package/dist/profiles/methodologies/regulated_domains.js.map +1 -0
- package/dist/profiles/methodologies/research_domains.d.ts +8 -0
- package/dist/profiles/methodologies/research_domains.js +179 -0
- package/dist/profiles/methodologies/research_domains.js.map +1 -0
- package/dist/profiles/methodologies/strategy_domains.d.ts +15 -0
- package/dist/profiles/methodologies/strategy_domains.js +193 -0
- package/dist/profiles/methodologies/strategy_domains.js.map +1 -0
- package/dist/profiles/seeds.js +241 -95
- package/dist/profiles/seeds.js.map +1 -1
- package/dist/receipt.d.ts +17 -0
- package/dist/receipt.js +46 -0
- package/dist/receipt.js.map +1 -0
- package/dist/render.d.ts +4 -1
- package/dist/render.js +95 -28
- package/dist/render.js.map +1 -1
- package/dist/repl.d.ts +8 -1
- package/dist/repl.js +420 -62
- package/dist/repl.js.map +1 -1
- package/dist/sessions.d.ts +14 -0
- package/dist/sessions.js +100 -0
- package/dist/sessions.js.map +1 -1
- package/dist/ship.d.ts +2 -0
- package/dist/ship.js +62 -0
- package/dist/ship.js.map +1 -0
- package/dist/skills/catalog.d.ts +13 -0
- package/dist/skills/catalog.js +86 -0
- package/dist/skills/catalog.js.map +1 -0
- package/dist/tools/bash.js +81 -14
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/edit.js +21 -1
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/glob.js +4 -1
- package/dist/tools/glob.js.map +1 -1
- package/dist/tools/grep.d.ts +5 -0
- package/dist/tools/grep.js +101 -2
- package/dist/tools/grep.js.map +1 -1
- package/dist/tools/index.d.ts +22 -0
- package/dist/tools/index.js +177 -41
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/ls.d.ts +3 -0
- package/dist/tools/ls.js +23 -12
- package/dist/tools/ls.js.map +1 -1
- package/dist/tools/multiedit.d.ts +12 -0
- package/dist/tools/multiedit.js +79 -0
- package/dist/tools/multiedit.js.map +1 -0
- package/dist/tools/stoa.d.ts +1 -1
- package/dist/tools/stoa.js +7 -3
- package/dist/tools/stoa.js.map +1 -1
- package/dist/tools/task.d.ts +9 -0
- package/dist/tools/task.js +166 -0
- package/dist/tools/task.js.map +1 -0
- package/dist/tools/todowrite.d.ts +12 -0
- package/dist/tools/todowrite.js +38 -0
- package/dist/tools/todowrite.js.map +1 -0
- package/dist/tools/webfetch.d.ts +6 -0
- package/dist/tools/webfetch.js +98 -0
- package/dist/tools/webfetch.js.map +1 -0
- package/dist/tools/websearch.d.ts +7 -0
- package/dist/tools/websearch.js +83 -0
- package/dist/tools/websearch.js.map +1 -0
- package/dist/tools/write.js +17 -1
- package/dist/tools/write.js.map +1 -1
- package/dist/verifiers/calc_gate.d.ts +2 -0
- package/dist/verifiers/calc_gate.js +112 -0
- package/dist/verifiers/calc_gate.js.map +1 -0
- package/dist/verifiers/citation_gate.d.ts +2 -0
- package/dist/verifiers/citation_gate.js +130 -0
- package/dist/verifiers/citation_gate.js.map +1 -0
- package/dist/verifiers/confidence_marked.d.ts +2 -0
- package/dist/verifiers/confidence_marked.js +49 -0
- package/dist/verifiers/confidence_marked.js.map +1 -0
- package/dist/verifiers/disclaimer_gate.d.ts +2 -0
- package/dist/verifiers/disclaimer_gate.js +57 -0
- package/dist/verifiers/disclaimer_gate.js.map +1 -0
- package/dist/verifiers/evidence_gate.d.ts +2 -0
- package/dist/verifiers/evidence_gate.js +108 -0
- package/dist/verifiers/evidence_gate.js.map +1 -0
- package/dist/verifiers/index.d.ts +5 -0
- package/dist/verifiers/index.js +28 -7
- package/dist/verifiers/index.js.map +1 -1
- package/dist/verifiers/lint.js +4 -3
- package/dist/verifiers/lint.js.map +1 -1
- package/dist/verifiers/promoted_kernels.d.ts +8 -0
- package/dist/verifiers/promoted_kernels.js +190 -0
- package/dist/verifiers/promoted_kernels.js.map +1 -0
- package/dist/verifiers/source_gate.d.ts +2 -0
- package/dist/verifiers/source_gate.js +125 -0
- package/dist/verifiers/source_gate.js.map +1 -0
- package/dist/verifiers/test_smoke.js +30 -0
- package/dist/verifiers/test_smoke.js.map +1 -1
- package/dist/verifiers/types.d.ts +3 -0
- package/package.json +4 -2
- package/skills/README.md +123 -0
- package/skills/ab-test.md +89 -0
- package/skills/api-design.md +175 -0
- package/skills/architecture-design.md +185 -0
- package/skills/business-case.md +77 -0
- package/skills/causal-inference.md +77 -0
- package/skills/clinical-guideline.md +98 -0
- package/skills/code-review.md +98 -0
- package/skills/cold-outreach.md +268 -0
- package/skills/competitive-teardown.md +223 -0
- package/skills/component-spec.md +121 -0
- package/skills/content-calendar.md +280 -0
- package/skills/contract-review.md +155 -0
- package/skills/data-analysis.md +187 -0
- package/skills/debug.md +91 -0
- package/skills/design-audit.md +121 -0
- package/skills/differential-diagnosis.md +79 -0
- package/skills/discovery-call.md +206 -0
- package/skills/edit-pass.md +80 -0
- package/skills/engineering-calc.md +101 -0
- package/skills/estimate.md +70 -0
- package/skills/experiment-design.md +105 -0
- package/skills/fact-check.md +82 -0
- package/skills/financial-model.md +104 -0
- package/skills/grant-proposal.md +93 -0
- package/skills/harmony-analysis.md +93 -0
- package/skills/hypothesis-generation.md +99 -0
- package/skills/incident-response.md +134 -0
- package/skills/interview-loop.md +62 -0
- package/skills/job-scorecard.md +92 -0
- package/skills/kb-article.md +174 -0
- package/skills/launch-plan.md +85 -0
- package/skills/lease-review.md +93 -0
- package/skills/lesson-plan.md +198 -0
- package/skills/literature-review.md +69 -0
- package/skills/market-entry.md +137 -0
- package/skills/market-sizing.md +159 -0
- package/skills/meta-analysis.md +140 -0
- package/skills/migrate.md +117 -0
- package/skills/optimize.md +88 -0
- package/skills/options-strategy.md +166 -0
- package/skills/peer-review.md +96 -0
- package/skills/pentest-plan.md +193 -0
- package/skills/pitch-review.md +132 -0
- package/skills/plan.md +88 -0
- package/skills/policy-brief.md +124 -0
- package/skills/positioning.md +192 -0
- package/skills/postmortem.md +168 -0
- package/skills/prd.md +105 -0
- package/skills/prioritize.md +162 -0
- package/skills/proof.md +91 -0
- package/skills/property-underwrite.md +159 -0
- package/skills/recipe-develop.md +109 -0
- package/skills/red-team.md +142 -0
- package/skills/refactor.md +58 -0
- package/skills/reflection-session.md +115 -0
- package/skills/regulatory-compliance.md +136 -0
- package/skills/reproduce.md +87 -0
- package/skills/runbook.md +344 -0
- package/skills/security-audit.md +154 -0
- package/skills/seo-brief.md +201 -0
- package/skills/sql-query.md +161 -0
- package/skills/story-craft.md +163 -0
- package/skills/tdd.md +59 -0
- package/skills/term-sheet.md +298 -0
- package/skills/theory-of-change.md +88 -0
- package/skills/threat-model.md +104 -0
- package/skills/ticket-triage.md +200 -0
- package/skills/tolerance-analysis.md +149 -0
- package/skills/training-program.md +151 -0
- package/skills/translate.md +64 -0
- package/skills/unit-economics.md +238 -0
- package/skills/valuation.md +112 -0
- package/skills/write-tests.md +77 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ticket-triage
|
|
3
|
+
description: Reproduce, severity-assess, and resolve theron-cli support tickets end-to-end; escalate only when root cause requires dev/founder intervention or the customer is Enterprise.
|
|
4
|
+
allowed-tools: Read, Write, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# TICKET TRIAGE PLAYBOOK
|
|
8
|
+
|
|
9
|
+
## ═══ HARD RULES ═══
|
|
10
|
+
|
|
11
|
+
1. **Acknowledge the stated problem in one sentence** — reflect back the customer's exact words before doing anything else.
|
|
12
|
+
2. **Reproduce before advising** — run the failing command or trace the failing code path yourself. Gut-feel fixes are a liability.
|
|
13
|
+
3. **Never promise a fix you have not verified** — say "I can likely fix this by…" only if you have tested it; say "I will confirm" if unverified.
|
|
14
|
+
4. **Severity is not urgency** — a cascading race condition in `repl.ts` (Critical) may take longer to fix than a banner color regression (Low). Separate the two.
|
|
15
|
+
5. **Escalate by impact, not by "is hard"** — if you can fix it in one file without side effects, fix it. Escalate only when root cause touches the SDK contract, alignment layers, model-serving, or billing.
|
|
16
|
+
6. **Document what you tried and why it failed** — "I checked `src/auth.ts:127`, found the cached token has no TTL check, ruled out the API endpoint because it returns 401 not 403" gives the next person reasoning, not a mystery.
|
|
17
|
+
7. **Never commit a workaround to `src/`** — temporary patches in production source become permanent debt. Fix the root cause or escalate.
|
|
18
|
+
|
|
19
|
+
## ═══ PHASE A: INTAKE & TRIAGE ═══
|
|
20
|
+
|
|
21
|
+
**A1. Extract the one-line problem**
|
|
22
|
+
- Read the ticket title and first message verbatim.
|
|
23
|
+
- Restate it: "So you're seeing [symptom] when you run [command] on [OS/version]?"
|
|
24
|
+
- Do not editorialize or assume missing details.
|
|
25
|
+
|
|
26
|
+
**A2. Gather CLI-specific context**
|
|
27
|
+
Run or ask the customer to run:
|
|
28
|
+
```bash
|
|
29
|
+
theron --version # CLI version (packages/theron-cli/package.json)
|
|
30
|
+
node --version # Node version — CLI requires ≥18
|
|
31
|
+
cat ~/.theron/config.json # Active profile + API endpoint
|
|
32
|
+
theron auth status # Token validity (src/auth.ts)
|
|
33
|
+
```
|
|
34
|
+
Also collect:
|
|
35
|
+
- OS + shell (darwin zsh / linux bash / win32 pwsh)
|
|
36
|
+
- When did it start? (Today? After `npm upgrade theron-cli`? After a deploy to Vercel?)
|
|
37
|
+
- How many users affected? (Just them? Their org? All Enterprise customers on the same endpoint?)
|
|
38
|
+
- What is the customer trying to accomplish? (Blocking a release? Annoying UX? Nice-to-have?)
|
|
39
|
+
|
|
40
|
+
**A3. Assign severity + impact**
|
|
41
|
+
- **Critical**: Blocks all work (auth broken, CLI won't start, `src/index.ts` crashes on launch, data loss, checkout unreachable). Escalate immediately.
|
|
42
|
+
- **High**: Blocks a feature class (all tool calls fail, REPL loop hangs, all verifier checks return false, receipt signing fails). Fix today or escalate.
|
|
43
|
+
- **Medium**: Affects a specific workflow with a workaround (one tool in `src/tools/` errors, one verifier in `src/verifiers/` false-positives, profile switching fails, banner renders wrong). Fix this week.
|
|
44
|
+
- **Low**: Cosmetic or rare edge case (typo in output, one endpoint returns wrong status code on malformed input, `update_check.ts` shows stale version). Fix when convenient.
|
|
45
|
+
|
|
46
|
+
**A4. Check if this is known**
|
|
47
|
+
```bash
|
|
48
|
+
git log --oneline packages/theron-cli | head -50
|
|
49
|
+
grep -r "TODO\|FIXME\|HACK" packages/theron-cli/src/
|
|
50
|
+
```
|
|
51
|
+
- If already reported → link the commit/issue, summarize the fix status, give ETA.
|
|
52
|
+
- If a duplicate → thank them, link the canonical issue, close with a one-liner.
|
|
53
|
+
|
|
54
|
+
## ═══ PHASE B: REPRODUCE & CONFIRM ═══
|
|
55
|
+
|
|
56
|
+
**B1. Match symptom to the CLI's known failure taxonomy**
|
|
57
|
+
|
|
58
|
+
Before doing anything open-ended, check which category applies:
|
|
59
|
+
|
|
60
|
+
| Symptom | First place to look |
|
|
61
|
+
|---|---|
|
|
62
|
+
| `theron: command not found` after install | `packages/theron-cli/src/index.ts` entry point; check `package.json` bin field |
|
|
63
|
+
| Auth error / 401 / token loop | `src/auth.ts` — token cache TTL, refresh logic, `~/.theron/config.json` |
|
|
64
|
+
| REPL hangs or crashes mid-session | `src/repl.ts` — streaming loop, `src/streaming.ts` — chunk parsing |
|
|
65
|
+
| Tool call returns wrong output or silently fails | `src/tools/` — match the tool name to its file (`bash.ts`, `glob.ts`, `grep.ts`, `ls.ts`, `stoa.ts`) |
|
|
66
|
+
| Verifier fires falsely or is silently skipped | `src/verifiers/` — `lint.ts`, `source_gate.ts`, `test_smoke.ts`, `types.ts` |
|
|
67
|
+
| Profile switch doesn't take effect | `src/profiles/index.ts`, `src/profile_match.ts` |
|
|
68
|
+
| Receipt missing or malformed | `src/receipt.ts`, `src/stoa.ts` |
|
|
69
|
+
| Banner displays wrong or crashes startup | `src/banner.ts` |
|
|
70
|
+
| `theron ship` fails | `src/ship.ts` — Vercel env injection, `scripts/bring_up_theron.sh` path |
|
|
71
|
+
| SDK tool-contract mismatch (tool schema drift) | `packages/theron-agent-sdk/src/tools/local-contract.ts`; never re-inline TOOL_SCHEMAS in CLI |
|
|
72
|
+
|
|
73
|
+
**B2. Run the minimal reproduction**
|
|
74
|
+
- Follow the exact steps the customer reported in their environment version.
|
|
75
|
+
- Capture the full output — never truncate stack traces.
|
|
76
|
+
- Record git status, env vars (mask secrets), and `~/.theron/config.json` state.
|
|
77
|
+
- If intermittent: run 5+ times, note failure rate, check for race in `src/streaming.ts` or `src/sessions.ts`.
|
|
78
|
+
- If unreproducible: tell the customer exactly what you ran, why it should trigger the bug, and ask for their `~/.theron/` config (redacted).
|
|
79
|
+
|
|
80
|
+
**B3. Narrow the root cause**
|
|
81
|
+
- Is it CLI, SDK (`packages/theron-agent-sdk/`), backend API (`marketing/api/`), third-party (OpenRouter, RunPod, Stripe), or user error?
|
|
82
|
+
- Trace from entry point (`src/index.ts`) through the relevant command handler to where it breaks.
|
|
83
|
+
- Compare against `main` branch: `git diff main packages/theron-cli/src/`.
|
|
84
|
+
- If root cause is in the agent-SDK contract (tool schemas, loop interface, MCP adapter): escalate — do not patch CLI around it.
|
|
85
|
+
- If you cannot reproduce after 30 minutes of honest effort → escalate with your exact reproduction steps and all data collected.
|
|
86
|
+
|
|
87
|
+
## ═══ PHASE C: FIX & VERIFY ═══
|
|
88
|
+
|
|
89
|
+
**C1. State the root cause in one line**
|
|
90
|
+
Example: "The token cached in `src/auth.ts:127` has no TTL check; it passes a stale token to every API call after 24h without refreshing."
|
|
91
|
+
|
|
92
|
+
Always cite: file path + line range + mechanism.
|
|
93
|
+
|
|
94
|
+
**C2. Design the minimal fix**
|
|
95
|
+
- Smallest change that fixes the root cause without side effects.
|
|
96
|
+
- If the fix touches `src/auth.ts`, `src/repl.ts`, or `src/streaming.ts` → check that profile switching, session resumption, and receipt signing still work.
|
|
97
|
+
- If the fix touches `src/tools/index.ts` or `src/verifiers/index.ts` → run the full verifier suite against a real session.
|
|
98
|
+
- If the fix requires changing the tool contract in `packages/theron-agent-sdk/src/tools/local-contract.ts` → escalate; a contract change breaks VS Code, the backend loop, and all consumers simultaneously.
|
|
99
|
+
- If the fix is in model weights, LoRA, async job queue, or `marketing/api/` → escalate to dev.
|
|
100
|
+
|
|
101
|
+
**C3. Test the fix**
|
|
102
|
+
```bash
|
|
103
|
+
# Run existing tests
|
|
104
|
+
cd packages/theron-cli && npm test
|
|
105
|
+
|
|
106
|
+
# Run the exact command that failed
|
|
107
|
+
theron [failing-command] [flags]
|
|
108
|
+
|
|
109
|
+
# If auth-related: force a token expiry and re-run
|
|
110
|
+
rm ~/.theron/config.json && theron auth login && theron [failing-command]
|
|
111
|
+
|
|
112
|
+
# If verifier-related: run against the specific verifier
|
|
113
|
+
# (check src/verifiers/types.ts for the interface; run directly if it has a test harness)
|
|
114
|
+
```
|
|
115
|
+
- Confirm the reproduction case passes.
|
|
116
|
+
- Confirm no new test failures.
|
|
117
|
+
- If you touched rendering (`src/render.ts`, `src/banner.ts`) → visually inspect the terminal output.
|
|
118
|
+
|
|
119
|
+
**C4. End-to-end verification**
|
|
120
|
+
- Close the REPL completely, restart from `theron` cold start, re-run the failing scenario.
|
|
121
|
+
- Confirm the problem is gone, not masked (e.g., don't verify by running a different command).
|
|
122
|
+
- If the bug corrupted session state in `~/.theron/` → prepare the exact `rm` / migration steps for the customer.
|
|
123
|
+
- If the bug affected a STOA receipt (`src/receipt.ts`) → confirm the receipt re-generates and the WebCrypto verifier at `itstheron.com` accepts it.
|
|
124
|
+
|
|
125
|
+
## ═══ PHASE D: COMMUNICATE & CLOSE ═══
|
|
126
|
+
|
|
127
|
+
**D1. Write the resolution message using this template**
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
## Reproduced
|
|
131
|
+
[Exactly what you ran, what you saw, which file/line fails — one paragraph.]
|
|
132
|
+
|
|
133
|
+
## Root Cause
|
|
134
|
+
[One sentence in plain English. Cite file + line range.]
|
|
135
|
+
|
|
136
|
+
## Fix
|
|
137
|
+
[Numbered steps. Include file paths and the changed code if small (< 10 lines).]
|
|
138
|
+
|
|
139
|
+
## Verification
|
|
140
|
+
[Exact command the customer can run. Expected output verbatim.]
|
|
141
|
+
|
|
142
|
+
## Status
|
|
143
|
+
[ ] Merged to main (theron-cli vX.Y.Z)
|
|
144
|
+
[ ] On branch fix/ticket-NNN — run `npm install -g theron-cli@next` to test early
|
|
145
|
+
[ ] Escalated to [dev / founder / product]: [reason in one sentence]
|
|
146
|
+
|
|
147
|
+
## Next Steps
|
|
148
|
+
[What the customer must do, if anything. Otherwise: "You're all set — close and reopen if it recurs."]
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
**D2. Expectation-setting**
|
|
152
|
+
- If the customer must upgrade: "Please run `npm install -g theron-cli@X.Y.Z` (or `brew upgrade theron-cli`)."
|
|
153
|
+
- If there is a workaround while they wait: state it explicitly and confirm it works.
|
|
154
|
+
- If `~/.theron/` data was affected: provide the exact repair commands.
|
|
155
|
+
- If it touches alignment logic, receipts, or `claims.yaml`: "This touches [system]; I am flagging it for founder review before shipping. ETA: [day]."
|
|
156
|
+
|
|
157
|
+
**D3. Escalation handoff**
|
|
158
|
+
- **To dev**: Attach reproduction script (runnable `bash` or `ts-node`), full logs, your diagnosis with file+line, and the reason you stopped.
|
|
159
|
+
- **To founder**: Only for regressions in auth/checkout/alignment layers, `claims.yaml` drift ("we claimed X, CLI does Y"), receipt integrity failures, security issues (token bypass, data leak), or Enterprise/press customers.
|
|
160
|
+
- **To product**: If the fix requires a decision (breaking change to a flag? deprecate a CLI command? change pricing or plan-gate logic?). Summarize the tradeoff in ≤3 sentences.
|
|
161
|
+
|
|
162
|
+
**D4. Close the ticket**
|
|
163
|
+
- Do not close until the customer confirms the fix works in their environment, or you have verified it on `main` + they have the upgrade.
|
|
164
|
+
- Leave one follow-up: "I will close this on [date] if we don't hear back. Feel free to reopen anytime."
|
|
165
|
+
|
|
166
|
+
## ═══ ESCALATION CRITERIA ═══
|
|
167
|
+
|
|
168
|
+
**Escalate to dev immediately if:**
|
|
169
|
+
- Root cause is in the agent loop, orchestrator, or MCP integration (`marketing/api/_lib/`).
|
|
170
|
+
- The fix requires coordinated changes across theron-cli, theron-agent-sdk, and the backend (multi-repo landing).
|
|
171
|
+
- It touches the SDK tool contract in `packages/theron-agent-sdk/src/tools/local-contract.ts`.
|
|
172
|
+
- It requires a database migration against Neon.
|
|
173
|
+
- The bug is intermittent or unreproducible after 30 minutes of honest effort.
|
|
174
|
+
|
|
175
|
+
**Escalate to founder if:**
|
|
176
|
+
- Regression in a Critical system: auth, checkout, alignment-layer precedence (`src/profiles/`), receipt signing.
|
|
177
|
+
- `claims.yaml` drift: the product behavior contradicts a public claim.
|
|
178
|
+
- The fix changes how receipts are generated or how the WebCrypto verifier interprets them.
|
|
179
|
+
- Security: token bypass, data leak, unauthorized access to session/profile data.
|
|
180
|
+
- Customer is Enterprise or press.
|
|
181
|
+
|
|
182
|
+
**Do not escalate if:**
|
|
183
|
+
- You can fix it in one file without touching the SDK contract.
|
|
184
|
+
- It is user error (malformed input, misread docs, wrong Node version).
|
|
185
|
+
- It is already in the backlog with a confirmed ETA — link them there and close.
|
|
186
|
+
|
|
187
|
+
## ═══ ANTI-PATTERNS (CLI-SPECIFIC) ═══
|
|
188
|
+
|
|
189
|
+
- **"Try clearing your cache and reinstalling."** — If you have not reproduced it yourself, you are guessing. Reproduce first.
|
|
190
|
+
- **"Upgrade to the latest version."** — If the latest `theron-cli` has the same bug, you just wasted their time. Check `CHANGELOG.md` before recommending an upgrade.
|
|
191
|
+
- **Patching around an SDK contract drift in `src/index.ts`** — If the CLI is working around a broken tool schema from `theron-agent-sdk`, that is escalation territory, not a CLI patch.
|
|
192
|
+
- **Closing after you push to main** — The ticket is closed when the customer verifies in their environment, not when you merge.
|
|
193
|
+
- **Adding an env-var shim to hide a bug** — e.g., `SKIP_TTL_CHECK=true`. That is a workaround in disguise. Fix the root cause.
|
|
194
|
+
- **"This is by design."** — If the design is wrong, fix it or escalate. Never gaslight.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## KEY PRINCIPLE
|
|
199
|
+
|
|
200
|
+
**Reproducibility + honesty > speed.** A ticket is resolved when the customer verifies the fix in their own environment, not when you push code. The fastest resolution is the one you have actually tested — not the one that sounds right. Escalate early if you hit a wall; mystery handoffs are noise that costs the next person an hour.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tolerance-analysis
|
|
3
|
+
description: Full tolerance stack-up and GD&T analysis workflow — identify the critical dimension chain, run worst-case and RSS/statistical analysis, allocate tolerances to part cost tiers, design the datum scheme, and flag the binding contributor; invoke whenever a mechanical assembly has a gap, interference, clearance, or fit requirement that must be verified before release or when geometric controls (flatness, position, runout, profile) are being defined or reviewed.
|
|
4
|
+
allowed-tools: Read, Bash, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
═══ HARD RULES ═══
|
|
8
|
+
|
|
9
|
+
1. NEVER state a tolerance figure, Cpk threshold, or sigma level as correct without tracing it to a stated requirement or a customer-supplied spec — fabricating process capability numbers is a release risk.
|
|
10
|
+
2. WORST-CASE analysis is mandatory first. RSS is a supplement, not a replacement. If the worst-case gap goes negative, RSS does not save you — stop and redesign.
|
|
11
|
+
3. Every dimension in the stack must map to a real physical interface: a machined surface, a bearing seat, a pressed-in pin, a weld joint, a fastener-hole center. Phantom dimensions (added for convenience) corrupt the chain.
|
|
12
|
+
4. Datum reference frames (DRFs) must be functionally motivated — datums chosen to minimize gage variation, not to make drawing layout convenient. Always state which functional surface the datum controls.
|
|
13
|
+
5. Call out the binding contributor explicitly by name, nominal, and tolerance — never bury it in the sum.
|
|
14
|
+
6. If a tolerance requires a process that conflicts with stated material, heat-treat, or surface-finish constraints, flag the conflict rather than silently tightening the number.
|
|
15
|
+
7. All bilateral tolerances must be confirmed symmetric unless asymmetric is explicitly justified (e.g., shrink fit, press fit, one-sided thermal growth).
|
|
16
|
+
8. Bonus tolerance (MMC/LMC modifiers on GD&T callouts) must be computed at the actual mating envelope, not at MMC alone — show the calculation.
|
|
17
|
+
9. RSS is only valid when contributors are statistically independent. Dimensions produced in a common setup, on the same fixture, or from the same bar-pull are correlated — treat them as worst-case contributors or use Monte Carlo with the correct covariance. Applying RSS to correlated contributors underestimates defect risk.
|
|
18
|
+
10. For press-fit and shrink-fit interfaces: a clearance/interference stack-up answer is necessary but not sufficient — the interface must also pass a yield/stress check (Lame thick-wall equations or thin-ring approximation as appropriate) before the nominal interference is fixed.
|
|
19
|
+
|
|
20
|
+
═══ PHASE A — REQUIREMENT CAPTURE ═══
|
|
21
|
+
|
|
22
|
+
A1. State the assembly-level functional requirement in measurable form: minimum clearance (e.g., "gap ≥ 0.10 mm under all conditions"), maximum interference, maximum runout at a bearing journal, or positional accuracy of a dowel-pin pattern. One number, one direction.
|
|
23
|
+
|
|
24
|
+
A2. Identify operating conditions that shift nominals:
|
|
25
|
+
- Thermal expansion: ΔL = α · L · ΔT per component material. For a bimetallic interface (e.g., aluminum housing, steel shaft), the differential expansion ΔΔL = (α_housing − α_shaft) · L · ΔT is a signed stack contributor — add it explicitly, do not fold into safety margin.
|
|
26
|
+
- Pre-load deflection: bearing pre-load or fastener clamp load deflects mating surfaces; compute via beam or Hertzian contact as appropriate and add to the chain.
|
|
27
|
+
- Press-fit relaxation: interference joints relax under cyclic load and temperature cycling; apply a retention factor from your material/surface-finish data or flag as unknown.
|
|
28
|
+
- Wear allowance: if service life introduces a known wear depth at a sliding interface, add it as a one-sided contributor with sign that closes the functional gap.
|
|
29
|
+
|
|
30
|
+
A3. Confirm the assembly sequence and direction of measurement. A tolerance chain is one-dimensional — if the functional requirement is truly 2D or 3D, decompose into orthogonal 1D chains and solve each separately.
|
|
31
|
+
|
|
32
|
+
A4. For interference fits (press or shrink): specify the target interference range [I_min, I_max], the mating materials and their yield strengths, and the bore/shaft ratio (c = D_outer / D_bore for thick-wall check). These bound the allowable tolerance allocation in Phase E before any stack math begins.
|
|
33
|
+
|
|
34
|
+
═══ PHASE B — DIMENSION CHAIN CONSTRUCTION ═══
|
|
35
|
+
|
|
36
|
+
B1. Trace the closed-loop dimension chain: starting from one side of the functional gap, walk through every part dimension and assembly shift that adds or subtracts until you return to the other side of the gap. Write the chain as:
|
|
37
|
+
|
|
38
|
+
GAP = Σ(closing dimensions, sign per direction)
|
|
39
|
+
|
|
40
|
+
B2. Label each link: part name, feature name, nominal value, tolerance (bilateral ±t_i or GD&T control), and manufacturing process. Tabulate.
|
|
41
|
+
|
|
42
|
+
B3. Assign signs (+ or −) consistently. A dimension that increases the gap is positive; one that closes it is negative. Verify the chain closes: Σ(nominals) = nominal gap.
|
|
43
|
+
|
|
44
|
+
B4. Identify any GD&T geometric errors that contribute to the stack: position tolerance zones project onto the stack axis by a geometric factor (often sinθ or cosθ for angled features) — compute the projected component, do not add the full tolerance zone diameter blindly.
|
|
45
|
+
|
|
46
|
+
B5. For fastener patterns — use the correct formula for the fastener condition:
|
|
47
|
+
|
|
48
|
+
Floating fastener (clearance holes both parts, fastener free to shift):
|
|
49
|
+
T_pos (each part) = (H_hole_min − D_fastener_max) / 2
|
|
50
|
+
This splits the hole-to-fastener clearance equally between the two parts at MMC.
|
|
51
|
+
|
|
52
|
+
Fixed fastener (fastener threaded or pressed into one part, clearance hole in the mating part):
|
|
53
|
+
T_pos_total = H_clearance_min − D_fastener_max
|
|
54
|
+
Allocate T_pos_total between the threaded-feature true position and the clearance-hole true position per cost or process priority — they must sum to T_pos_total, not each equal it.
|
|
55
|
+
|
|
56
|
+
Confirm the derived T_pos is achievable with the target process before proceeding; if not, increase the hole diameter or reduce the fastener size and re-derive.
|
|
57
|
+
|
|
58
|
+
═══ PHASE C — WORST-CASE ANALYSIS ═══
|
|
59
|
+
|
|
60
|
+
C1. Worst-case gap (minimum):
|
|
61
|
+
GAP_min = Nominal_gap − Σ|t_i|
|
|
62
|
+
|
|
63
|
+
C2. Worst-case gap (maximum):
|
|
64
|
+
GAP_max = Nominal_gap + Σ|t_i|
|
|
65
|
+
|
|
66
|
+
C3. If GAP_min < required minimum clearance (or > required maximum interference): the design fails worst-case. Do not proceed to RSS. Return to Phase E for allocation redesign.
|
|
67
|
+
|
|
68
|
+
C4. If GAP_min passes: compute the worst-case margin = GAP_min − required_minimum. Note this margin — it is the budget available for process variation, wear, and thermal effects.
|
|
69
|
+
|
|
70
|
+
═══ PHASE D — STATISTICAL (RSS) ANALYSIS ═══
|
|
71
|
+
|
|
72
|
+
D1. RSS prerequisites — all three must hold, or use Monte Carlo instead:
|
|
73
|
+
(a) Contributors are statistically independent (no common setup, fixture, or material batch).
|
|
74
|
+
(b) Each contributor is normally distributed or boundable by a known distribution.
|
|
75
|
+
(c) Sufficient contributors for CLT: ≥ 4 independent links is a practical floor; fewer than 4 or highly non-normal distributions require Monte Carlo (sample ≥ 100 000 iterations, report P5/P95 and tail probability directly).
|
|
76
|
+
|
|
77
|
+
D2. Compute the RSS total variation:
|
|
78
|
+
t_RSS = √(Σ t_i²)
|
|
79
|
+
|
|
80
|
+
D3. Estimated gap distribution at ±3σ (assuming tolerances = ±3σ process limits):
|
|
81
|
+
GAP_mean = Nominal_gap
|
|
82
|
+
GAP_3σ = GAP_mean ± t_RSS
|
|
83
|
+
|
|
84
|
+
D4. Probability of non-conformance: if t_RSS defines 3σ and GAP_min > 0 with margin m, the Z-score is m / (t_RSS / 3). Lookup or compute the tail probability — state it explicitly (e.g., "estimated non-conforming rate: 0.27% at 3σ").
|
|
85
|
+
|
|
86
|
+
D5. If process capability data (Cpk) exists for any contributor, replace ±t_i with ±(3 · σ_process_actual) in the RSS sum — this gives a more accurate estimate than assuming tolerance = ±3σ.
|
|
87
|
+
|
|
88
|
+
D6. State RSS result alongside worst-case result; never present RSS alone as the pass/fail verdict.
|
|
89
|
+
|
|
90
|
+
D7. Monte Carlo path: when contributors are non-normal (e.g., injection-molded features with skewed shrinkage distributions, positional errors with bimodal fixture seating) or when fewer than 4 links exist, draw from the measured or estimated distributions, sum the chain, and report the simulated P0.135 (equivalent 3σ tail) or the customer-specified percentile. State the assumed distributions and their sources.
|
|
91
|
+
|
|
92
|
+
═══ PHASE E — TOLERANCE ALLOCATION ═══
|
|
93
|
+
|
|
94
|
+
E1. Rank contributors by their fractional share of the worst-case stack: binding contributor = highest |t_i| / Σ|t_i|. Name it and its process.
|
|
95
|
+
|
|
96
|
+
E2. For each contributor, classify the process tier and its natural tolerance capability (reference ranges — always validate against the specific supplier's stated Cpk for the actual feature and feature size):
|
|
97
|
+
|
|
98
|
+
Turning/milling (standard): ±0.05–0.10 mm
|
|
99
|
+
Turning/milling (precision, carbide, CBN): ±0.013–0.025 mm
|
|
100
|
+
Cylindrical grinding: ±0.005–0.013 mm
|
|
101
|
+
Surface grinding: ±0.005–0.025 mm
|
|
102
|
+
Honing (bore finishing): ±0.001–0.005 mm
|
|
103
|
+
Lapping / superfinishing: ±0.001–0.003 mm
|
|
104
|
+
Wire EDM: ±0.003–0.010 mm
|
|
105
|
+
Sinker EDM (complex pockets, slots): ±0.005–0.015 mm
|
|
106
|
+
Sheet metal punch/form: ±0.10–0.25 mm
|
|
107
|
+
Fine blanking: ±0.013–0.050 mm
|
|
108
|
+
Injection molding (thermoplastic): ±0.05–0.20 mm (material- and feature-size-dependent; shrinkage anisotropy in fiber-filled grades adds directional bias — request material-specific shrinkage data from molder)
|
|
109
|
+
Die casting (aluminum/zinc): ±0.10–0.30 mm
|
|
110
|
+
Investment casting (net-near forms): ±0.10–0.25 mm (machining allowance still required on critical interfaces)
|
|
111
|
+
Metal additive (DMLS/SLM, as-built): ±0.10–0.25 mm (significant surface waviness; plan post-machining on mating features)
|
|
112
|
+
Weldment, post-weld as-welded: ±0.5–2.0 mm (straighten or machine after welding for anything tighter)
|
|
113
|
+
|
|
114
|
+
E3. Apply the equal-contribution starting allocation: assign each contributor a trial tolerance of t_i = GAP_budget / N, then tighten those on inexpensive-to-control features and relax those on expensive ones, re-checking the stack sum each iteration. This is the cost-optimized allocation loop.
|
|
115
|
+
|
|
116
|
+
E4. Use GD&T MMC/LMC bonus tolerance to recover tolerance budget where fit allows: a pin at MMC with position tolerance adds bonus equal to the departure from MMC — compute the bonus at the worst mating condition and credit it in the stack.
|
|
117
|
+
|
|
118
|
+
E5. For interference fits: after allocating shaft and bore tolerances, verify the resulting [I_min, I_max] against the stress check from Phase A4:
|
|
119
|
+
- Minimum interference I_min must produce sufficient retention force (friction joint) or thermal seating force (shrink fit).
|
|
120
|
+
- Maximum interference I_max must not exceed the elastic limit at the bore ID (Lame hoop stress ≤ 0.67 · Sy for ductile materials as a conservative design rule; confirm with FEA for thin-walled or asymmetric hubs).
|
|
121
|
+
If the stress check fails at I_max, tighten the upper tolerance on the shaft OD (not the bore, which is typically harder to hold).
|
|
122
|
+
|
|
123
|
+
E6. Document the final allocation table: part | feature | nominal | tolerance | process | unit cost impact (high/medium/low) | Cpk target.
|
|
124
|
+
|
|
125
|
+
═══ PHASE F — DATUM SCHEME AND DRAWING CALLOUT ═══
|
|
126
|
+
|
|
127
|
+
F1. Select the primary datum (Datum A) as the surface that controls the most critical functional direction — typically the mating face or the bore axis. It must be the surface that actually seats in assembly, not the most convenient surface to hold in a fixture.
|
|
128
|
+
|
|
129
|
+
F2. Secondary (B) and tertiary (C) datums constrain the remaining degrees of freedom in the DRF. Confirm the datum precedence eliminates all 6 DOF without over-constraining. For cylindrical parts: primary = axis (2 DOF translational), secondary = face (1 DOF translational + 2 DOF rotational), no tertiary needed unless clocking matters.
|
|
130
|
+
|
|
131
|
+
F3. For castings, weldments, and large sheetmetal assemblies where surface form error is large: use datum targets (points, lines, or areas per ASME Y14.5-2018 §4.24) rather than full datum planes. Datum targets replicate the actual fixture contact; full-plane datums on a warped casting introduce unstable rock. State the target locations and their coordinates in the DRF.
|
|
132
|
+
|
|
133
|
+
F4. Write each GD&T callout per ASME Y14.5-2018 (or ISO 1101 — state which standard governs): feature control frame = [geometric characteristic | tolerance value | material modifier | datum references in precedence order].
|
|
134
|
+
|
|
135
|
+
F5. Position tolerances on hole patterns: state diameter tolerance zone (⌀ prefix), not ± bilateral, unless the direction-specific tolerance is intentionally anisotropic (then use profile of a surface).
|
|
136
|
+
|
|
137
|
+
F6. For critical interfaces (bearing bores, sealing surfaces, mating pilots): add surface finish (Ra or Rz) callout alongside the geometric control — the finish is a functional requirement, not cosmetic. For dynamic seals: Ra ≤ 0.8 µm on the shaft OD is a typical elastomeric lip-seal requirement; confirm against seal manufacturer's specification.
|
|
138
|
+
|
|
139
|
+
═══ PHASE G — BINDING CONTRIBUTOR REPORT ═══
|
|
140
|
+
|
|
141
|
+
G1. State the binding contributor: the single dimension whose tolerance, if cut in half, produces the largest improvement in GAP_min. Show the delta: "Tightening [Part X / Feature Y] from ±0.08 to ±0.04 improves GAP_min by 0.04 mm, recovering 40% of the current deficit."
|
|
142
|
+
|
|
143
|
+
G2. State the process implication: what manufacturing operation, inspection method, or supplier tier change is required to achieve the tightened tolerance, and the estimated unit cost impact.
|
|
144
|
+
|
|
145
|
+
G3. If the binding contributor is a purchased part or raw-material form tolerance (e.g., bar stock straightness, sheet flatness, casting datum-surface flatness): state whether the current supplier specification covers it, and whether incoming inspection or 100% sorting is required.
|
|
146
|
+
|
|
147
|
+
G4. Deliver a final one-line verdict: "Stack PASSES worst-case with GAP_min = X mm (requirement ≥ Y mm). Binding contributor: [name], ±Z mm. RSS non-conforming rate: W% at stated process sigmas." Or: "Stack FAILS worst-case. Redesign required before RSS is relevant."
|
|
148
|
+
|
|
149
|
+
KEY PRINCIPLE: Worst-case closes the loop — RSS refines the risk; the binding contributor is the only lever worth pulling first; and independent RSS applied to correlated setups is the most common error that ships defects.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: training-program
|
|
3
|
+
description: Design a periodized, goal-specific resistance/conditioning training program: screen for contraindications, set phase structure, prescribe sets×reps×intensity (RPE/%1RM)+rest+tempo, supply technique cues+regressions, enforce deload weeks, and close with a mandatory physician disclaimer — invoke when a user requests a workout plan, training block, strength/hypertrophy/conditioning program, or progressive-overload schedule.
|
|
4
|
+
allowed-tools: Read, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
═══ HARD RULES ═══
|
|
8
|
+
|
|
9
|
+
1. NEVER fabricate research figures, named study results, or injury-rate statistics as though they are ground truth. State ranges from established practice; label estimates as estimates.
|
|
10
|
+
2. NEVER skip the readiness screen. A program written before you know the trainee's health status and training age is a liability, not a service.
|
|
11
|
+
3. NEVER remove the physician disclaimer from any output, regardless of how the user frames their request.
|
|
12
|
+
4. NEVER prescribe loads as absolute kg/lb without first knowing the trainee's actual capacity. Use RPE or %1RM with the explicit note that the trainee must determine 1RM safely via submaximal estimation, not an untested max single.
|
|
13
|
+
5. NEVER omit at least one full rest day per 7-day training week.
|
|
14
|
+
6. NEVER program more than 3 consecutive hard (RPE ≥8) sessions without a recovery day or deload trigger.
|
|
15
|
+
7. ALL injury flags, chronic conditions, or post-surgical history → escalate immediately to "consult a qualified medical professional before proceeding" and halt program output for the flagged domain.
|
|
16
|
+
8. Periodization model must match the stated goal. Mismatch (e.g., pure hypertrophy block for a powerlifting meet in 4 weeks) must be flagged and corrected with explicit rationale.
|
|
17
|
+
9. Regressions must be provided for every primary lift. A program without regressions assumes perfect technique — an assumption no responsible coach makes.
|
|
18
|
+
10. This is EDUCATIONAL output. The agent is not a licensed professional. Every output closes with the mandatory disclaimer block verbatim.
|
|
19
|
+
11. Volume landmarks (MV/MEV/MAV/MRV) apply to TRAINED individuals (≥6 months consistent training). For untrained/novice trainees, effective stimulus begins at 5–8 sets per group per week — do NOT apply intermediate volume prescriptions to beginners; doing so is a primary driver of early dropout and overuse injury.
|
|
20
|
+
12. Nutrition context is a programming variable for body-composition goals. Flag severe energy restriction (<1,200 kcal/day estimated) as incompatible with meaningful muscle retention and as a medical risk warranting physician referral. You cannot responsibly prescribe body-composition training without noting the energy availability constraint.
|
|
21
|
+
|
|
22
|
+
═══ PHASE A — READINESS SCREEN ═══
|
|
23
|
+
|
|
24
|
+
A1. Collect the following before writing a single set:
|
|
25
|
+
- Primary goal: strength | hypertrophy | power | fat-loss with muscle retention | endurance base | general fitness
|
|
26
|
+
- Training age: untrained (<6 mo) | novice (6–18 mo) | intermediate (1.5–4 yr) | advanced (4+ yr)
|
|
27
|
+
- Current weekly training frequency, modalities, and approximate weekly volume (sets per session × days)
|
|
28
|
+
- Available equipment (barbell+rack | dumbbells | cables | machines | bodyweight | combination)
|
|
29
|
+
- Session time budget (minutes)
|
|
30
|
+
- Injury history, chronic conditions, current pain — RED FLAGS: active injury, recent surgery (<12 mo for musculoskeletal), unmanaged cardiovascular or metabolic disease, pregnancy → halt and escalate per Hard Rule 7
|
|
31
|
+
- Mobility and movement limitations that would restrict primary patterns (e.g., wrist pain restricting front rack, hip impingement limiting squat depth, shoulder pathology limiting overhead work)
|
|
32
|
+
- Competition date if sport-specific
|
|
33
|
+
|
|
34
|
+
A2. If any input is missing and material to program design, ask before proceeding. Assumptions made must be stated explicitly at the top of the program output, labeled "ASSUMED — confirm or correct before training."
|
|
35
|
+
|
|
36
|
+
A3. Assign a starting tier based on training age:
|
|
37
|
+
- Untrained/novice → linear progression (LP) model: same movement patterns 2–3×/week, add load every session or every week
|
|
38
|
+
- Intermediate → undulating periodization (DUP or WUP): vary rep ranges within the week or across the week
|
|
39
|
+
- Advanced → block periodization or conjugate, matched to sport demand and competition calendar
|
|
40
|
+
|
|
41
|
+
A4. If the trainee does not know their working loads, provide this starting-load protocol — do NOT send them to a 1RM test on day one:
|
|
42
|
+
"Select a load you can lift for 15 clean reps with 3–4 reps clearly remaining. That is your Day 1 working weight. Over sessions 1–3, allow loads to climb naturally at RPE 6–7 to establish your baseline. Only after 3–4 sessions of consistent execution should you attempt to estimate a 1RM via submaximal formula (e.g., load × reps × 0.0333 + load)."
|
|
43
|
+
|
|
44
|
+
═══ PHASE B — PERIODIZATION ARCHITECTURE ═══
|
|
45
|
+
|
|
46
|
+
B1. Define the macrocycle length relative to the goal:
|
|
47
|
+
- Fat-loss + retention: 8–12 weeks (practical deficit-tolerance window before metabolic adaptation warrants a diet break)
|
|
48
|
+
- Hypertrophy: 8–16 weeks accumulation, 1-week deload every 4–6 weeks
|
|
49
|
+
- Strength peak: 12–20 weeks; final 2 weeks = taper (volume –40–60%, intensity maintained or +5%)
|
|
50
|
+
- General fitness: rolling 4-week mesocycles with goal reassessment at each block boundary
|
|
51
|
+
|
|
52
|
+
B2. Structure mesocycles explicitly. Name each and state its primary adaptation target:
|
|
53
|
+
- Anatomical Adaptation (AA): weeks 1–3 for untrained/novice; high rep (15–20), low load (RPE 5–6), technique priority over load
|
|
54
|
+
- Accumulation: volume is the primary driver; RPE ceiling 7–8; load increases are secondary to set/rep accumulation
|
|
55
|
+
- Intensification: load increases, volume decreases; RPE ceiling 8–9; maintain movement quality — drop load if form breaks before hitting RPE target
|
|
56
|
+
- Realization/Peak: competition or test week; volume low, intensity high, frequency reduced by 1 session
|
|
57
|
+
- Deload: mandatory after each mesocycle; same movement patterns, volume –40–50%, intensity –10–20%; this is not optional rest — maintaining movement patterns during deload preserves motor patterns
|
|
58
|
+
|
|
59
|
+
B3. Weekly volume landmarks per muscle group — these ranges are for TRAINED individuals (Hard Rule 11):
|
|
60
|
+
- Maintenance volume (MV): ~10 sets/week per group (sufficient to avoid detraining; appropriate for a deload or life-stress week)
|
|
61
|
+
- Minimum effective volume (MEV): 10–12 sets/week (lowest volume that produces adaptation in a trained individual)
|
|
62
|
+
- Maximum adaptive volume (MAV): 12–20 sets/week (individual variation is high; start at MEV+2 sets and climb)
|
|
63
|
+
- Maximum recoverable volume (MRV): highly individual; first signs are performance plateau across 2+ sessions combined with persistent joint ache and elevated resting HR — this is not a target, it is a ceiling to avoid
|
|
64
|
+
- For untrained/novice: begin at 5–8 sets/week per muscle group; this is sufficient for robust adaptation and far below MRV; do not apply intermediate volume landmarks to beginners
|
|
65
|
+
|
|
66
|
+
B4. For body-composition goals, state the energy availability constraint explicitly:
|
|
67
|
+
"Training stimulus for muscle retention requires adequate protein (1.6–2.2 g/kg body weight is the established range from sports nutrition literature) and sufficient total energy to support training. A caloric deficit deeper than ~500 kcal/day materially increases the risk of muscle loss alongside fat. This program cannot override an energy deficit; consult a registered dietitian for body-composition nutrition if needed."
|
|
68
|
+
|
|
69
|
+
═══ PHASE C — SESSION DESIGN AND PRESCRIPTION ═══
|
|
70
|
+
|
|
71
|
+
C1. Select a training split matched to frequency and recovery capacity:
|
|
72
|
+
- 2–3 days/week: full-body (highest per-muscle-group frequency; superior for novice stimulus)
|
|
73
|
+
- 3–4 days/week: upper/lower or push/pull/legs (PPL)
|
|
74
|
+
- 4–5 days/week: PPL or body-part emphasis split — only appropriate for intermediate/advanced with documented MRV above full-body coverage
|
|
75
|
+
- Never fill every day; rest day placement is a training variable, not wasted time
|
|
76
|
+
|
|
77
|
+
C2. For every exercise prescribed, output EXACTLY this table row format:
|
|
78
|
+
Exercise | Sets×Reps | Intensity | Rest | Tempo | Regression
|
|
79
|
+
Example: Barbell Back Squat | 4×5 | 80% 1RM / RPE 8 | 3–4 min | 32X1 | Goblet Squat → Box Squat
|
|
80
|
+
|
|
81
|
+
C3. Tempo notation (always 4-digit): eccentric–pause bottom–concentric–pause top. "X" = explosive/maximal intent.
|
|
82
|
+
- Strength: 31X1 (controlled descent, explosive concentric, brief reset at top)
|
|
83
|
+
- Hypertrophy: 3010 or 4010 (extended time under tension; no bounce at bottom)
|
|
84
|
+
- Power: X0X0 (maximal intent both directions; load selection must allow this — reduce load before sacrificing intent)
|
|
85
|
+
|
|
86
|
+
C4. Intensity prescription logic:
|
|
87
|
+
- Novice: RPE 6–7 for first 2 weeks, RPE 7–8 thereafter; technique development is the priority adaptation, not limit strength
|
|
88
|
+
- Intermediate: %1RM as primary guide with RPE as daily autoregulation override; on a poor-readiness day, match the RPE target, not the load number
|
|
89
|
+
- Advanced: RPE-driven within prescribed %1RM bands; daily readiness adjustments expected and appropriate
|
|
90
|
+
- If trainee has no established 1RM, prescribe RPE only and use the A4 starting-load protocol — never send an untested trainee to a max effort on day one
|
|
91
|
+
|
|
92
|
+
C5. Rest periods by adaptation target:
|
|
93
|
+
- Strength (1–5 reps, >85% 1RM): 3–5 minutes — incomplete rest at this intensity is not a training variable, it is a performance tax
|
|
94
|
+
- Hypertrophy (6–15 reps): 90 seconds–3 minutes; shorter rest increases metabolic stress but reduces load capacity; match to trainee's priority
|
|
95
|
+
- Muscular endurance (15+ reps): 30–90 seconds
|
|
96
|
+
- Supersets/antagonist pairs: rest after the pair, not between exercises within the pair
|
|
97
|
+
|
|
98
|
+
C6. Technique cues — supply 2–3 per primary compound lift, biomechanically specific:
|
|
99
|
+
Squat: "Brace 360° around the spine before unracking — not just forward flexion of the abs; create intra-abdominal pressure as if bracing for a punch. Screw feet into the floor to generate external rotation torque through the hips. Keep ribs stacked over pelvis on the descent — rib flare is a loss of tension, not a breathing cue."
|
|
100
|
+
Deadlift: "Push the floor away; do not think 'pull the bar up.' Engage lats before initiating — attempt to put your shoulder blades in your back pockets; this protects the lumbar and keeps the bar close. Hips and shoulders must rise at the same rate off the floor: early hip rise converts a deadlift into a stiff-leg row."
|
|
101
|
+
Bench Press: "Retract and depress scapulae into the bench before unracking and hold them there for the entire set — this is your shoulder's safety structure. The bar path is not vertical: it descends toward the lower chest at roughly 45–75° and returns toward the face on the press. Do not press straight up."
|
|
102
|
+
Overhead Press: "Squeeze glutes and brace hard before initiating — the press is a full-body lift, not a shoulder exercise. Think 'punch the ceiling,' not 'push the bar.' Elbows at 45–60° from the torso at the bottom position; elbows flared to 90° externally rotates the humeral head into impingement risk."
|
|
103
|
+
Row: "Pull the elbow, not the hand — the hand is a hook; the scapula initiates the pull before the elbow bends. Avoid shrugging at the top; the goal is scapular retraction and depression, not elevation. A row that ends in a shrug is a partial rep."
|
|
104
|
+
|
|
105
|
+
C7. Regressions per primary lift (required, per Hard Rule 9):
|
|
106
|
+
Barbell Back Squat → Goblet Squat (load and pattern) → Bodyweight Box Squat (depth control) → Wall Squat (hip/ankle mobility drill)
|
|
107
|
+
Barbell Deadlift → Trap Bar Deadlift (more vertical torso) → Romanian Deadlift → DB Romanian Deadlift → Hip Hinge to Wall (motor pattern)
|
|
108
|
+
Barbell Bench Press → DB Bench Press (independent arm loading) → Push-Up (elevate hands to box/bench if needed) → Band-Resisted Push-Up
|
|
109
|
+
Barbell Overhead Press → DB Seated Shoulder Press → Landmine Press (reduces lumbar demand) → Band Pull-Apart superset (shoulder health prerequisite)
|
|
110
|
+
Barbell Row → DB Single-Arm Row → Cable Seated Row → Band-Resisted Row → Scapular Wall Slide (if row mechanics are absent)
|
|
111
|
+
|
|
112
|
+
═══ PHASE D — RECOVERY AND AUTOREGULATION ═══
|
|
113
|
+
|
|
114
|
+
D1. Minimum 1 full rest day per 7-day week — no exceptions (Hard Rule 5). For 5-day programs, schedule 2 rest days; never program more than 3 consecutive training days without a recovery day.
|
|
115
|
+
|
|
116
|
+
D2. Sleep is a programming variable, not lifestyle advice. Flag inadequate sleep (<7 hours per night chronically) as a direct program risk with specific consequences: suppressed testosterone and IGF-1 reduce anabolic signaling; elevated cortisol increases protein catabolism; impaired motor learning reduces technique acquisition rate; CNS fatigue accumulates faster, raising RPE artificially. When sleep is under 6 hours chronically, reduce training volume by ~20% rather than pushing through, because the recovery half of the adaptation equation is absent. If a trainee reports consistent sleep under 6 hours, prioritize sleep hygiene intervention before adding training volume.
|
|
117
|
+
|
|
118
|
+
D3. Deload triggers — use whichever arrives first:
|
|
119
|
+
- Scheduled: every 4–6 weeks regardless of subjective feel (training debt accumulates before it is felt)
|
|
120
|
+
- Performance: RPE for a given load rises 1.5+ points above baseline for 2 consecutive sessions on the same exercise
|
|
121
|
+
- Subjective cluster (2 of 3): resting HR elevated >5–7 bpm above baseline | persistent joint ache that is present before the warm-up, not during | motivational crash or dread of training sessions
|
|
122
|
+
- Deload execution: same movement patterns and frequency, volume –40–50%, intensity –10–20%; deload is not a rest week — movement maintains motor patterns and facilitates active recovery
|
|
123
|
+
|
|
124
|
+
D4. Autoregulation instruction: if the prescribed RPE cannot be achieved at the planned load, reduce load to match the RPE target — do NOT push through to hit the load number. RPE is the prescription; load is the dial that adjusts to meet it. A session where you hit the correct RPE at a lower load is a successful session, not a failed one.
|
|
125
|
+
|
|
126
|
+
D5. Daily readiness check — instruct the trainee to assess three things before each session:
|
|
127
|
+
- Joint readiness: any unusual ache or stiffness in the joints loaded today? If yes → begin with the regression for affected movements, do not progress to working sets until movement feels clean
|
|
128
|
+
- Energy/CNS readiness: subjective rating 1–10; below 5 → reduce planned volume by 1–2 sets per exercise and cap RPE one point below prescription
|
|
129
|
+
- Previous session recovery: did the primary movers feel recovered vs. the last session? If no → add one additional warm-up set and reassess before working sets
|
|
130
|
+
|
|
131
|
+
═══ PHASE E — PROGRAM OUTPUT FORMAT ═══
|
|
132
|
+
|
|
133
|
+
E1. Open every program output with a STATED ASSUMPTIONS block listing every inference made from incomplete input, labeled explicitly: "ASSUMED — confirm or correct before training." Do not bury assumptions in prose.
|
|
134
|
+
|
|
135
|
+
E2. Present the full mesocycle map before any session detail: week numbers, phase name, primary adaptation target, volume landmark (sets/group), intensity range (RPE or %1RM range), and scheduled deload weeks.
|
|
136
|
+
|
|
137
|
+
E3. Session detail uses the table format from C2 for every exercise. Do not write sets/reps as prose — the table is the prescription.
|
|
138
|
+
|
|
139
|
+
E4. Flag any exercise the trainee listed as uncomfortable or contraindicated with a bold CONTRAINDICATED label and provide only the regression path, not the primary lift.
|
|
140
|
+
|
|
141
|
+
E5. Provide a concrete weekly progression rule for each primary lift — not a generic template. State the exact increment:
|
|
142
|
+
"Add [X kg/lb] to the bar / advance to the next RPE increment when you complete ALL sets at the prescribed RPE with 1 rep clearly remaining (1 RIR) across 2 consecutive sessions. If you cannot complete all sets at the prescribed RPE for 2 consecutive sessions, hold load and address technique before adding weight."
|
|
143
|
+
Typical increments: 2.5 kg (5 lb) for upper-body pressing/pulling; 5 kg (10 lb) for squat and deadlift patterns; halve these for novice trainees once rate of adaptation slows in weeks 4–6.
|
|
144
|
+
|
|
145
|
+
E6. Close every single output with the mandatory disclaimer block below — verbatim, no shortening, no paraphrasing:
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
EDUCATIONAL DISCLAIMER: This program is provided for informational and educational purposes only. It does not constitute medical advice, diagnosis, or treatment. Training carries inherent physical risk. Before beginning any new exercise program, especially if you have any pre-existing health conditions, recent injuries, cardiovascular risk factors, or are pregnant or postpartum, consult a qualified physician or licensed healthcare provider. If you experience chest pain, dizziness, shortness of breath, joint pain, or any unusual symptom during exercise, stop immediately and seek medical attention. The agent producing this output is not a licensed strength and conditioning coach, physical therapist, or medical professional. Results vary; no outcome is guaranteed.
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
KEY PRINCIPLE: Progressive overload is the mechanism; recovery is when adaptation actually occurs; adequate energy availability is what fuels both. A program that prescribes training without accounting for sleep and nutrition is a plan to accumulate fatigue, not fitness — prescribe all three or acknowledge which constraints you are working within.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: translate
|
|
3
|
+
description: Translate text/documents between human languages preserving meaning, register, tone, markup, and placeholders — localizing idioms/units/dates, flagging untranslatables with alternatives, and marking low-confidence renderings for review; never silently drop or invent content.
|
|
4
|
+
allowed-tools: Read, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
═══ HARD RULES ═══
|
|
8
|
+
|
|
9
|
+
- **Never silently drop content.** Every sentence, heading, footnote, caption, and metadata value in the source must have a corresponding rendering in the target — or an explicit OMITTED: note explaining why.
|
|
10
|
+
- **Never invent content.** Do not add explanatory glosses, clarifying parentheticals, or extra sentences that have no anchor in the source. If context is missing, flag it, do not fill it.
|
|
11
|
+
- **Preserve all markup and placeholders verbatim.** HTML tags, Markdown syntax, `{variable}` tokens, `%s`/`%d` printf slots, ICU message patterns, XML attributes, YAML keys — copy them character-for-character. Translate only the human-readable string segments around them.
|
|
12
|
+
- **Register must match, not drift.** A formal legal clause stays formal. A casual marketing headline stays casual. Never upgrade or downgrade register without explicit instruction.
|
|
13
|
+
- **Flag, never guess silently.** Any rendering below 90 % confidence must be marked `[REVIEW: <reason>]` inline. Any phrase with no adequate target-language equivalent must be flagged with exactly two alternatives and the tradeoff (see Phase C).
|
|
14
|
+
- **One pass per phase.** Do not collapse phases. A mistranslation caught in Phase A costs one line; caught post-delivery it costs a retranslation and broken trust.
|
|
15
|
+
- **Source of truth is the source text.** If the source is ambiguous, preserve the ambiguity and note it — do not resolve it unilaterally.
|
|
16
|
+
- **Do not localize proper nouns, brand names, or technical identifiers** unless the client brief explicitly lists approved target-language equivalents.
|
|
17
|
+
|
|
18
|
+
═══ PHASE A — INTAKE & TRIAGE ═══
|
|
19
|
+
|
|
20
|
+
1. **Read the full source document** before translating a single word. Identify: language pair (source → target), domain (legal, medical, marketing, technical, literary, UX, etc.), intended audience, and formality register.
|
|
21
|
+
2. **Catalogue every non-translatable element:** markup tags, placeholders, variable tokens, code blocks, URLs, proper nouns, brand names, units of measure, date formats, phone formats, currency symbols. List them in a triage note so Phase B can treat them consistently.
|
|
22
|
+
3. **Identify the register markers** in the source: vocabulary level (Latinate vs. vernacular), sentence length, punctuation style, use of contractions, second-person pronoun choice (e.g., tu/vous in French, du/Sie in German, tú/usted in Spanish). Record the target-language equivalents you will use consistently throughout.
|
|
23
|
+
4. **Flag domain-specific terminology** you will need to render consistently: legal terms of art, medical nomenclature, product/feature names, regulatory labels. Where a standard target-language term of art exists (e.g., ISO standard term, official regulatory body label), prefer it over a literal translation.
|
|
24
|
+
5. **Note locale conventions** for the target language: date format (DD/MM/YYYY vs. MM/DD/YYYY vs. ISO 8601), decimal/thousands separators, measurement system (metric vs. imperial), currency placement, time format (12 h vs. 24 h), quotation mark style, and list punctuation. These will be applied in Phase B.
|
|
25
|
+
|
|
26
|
+
═══ PHASE B — TRANSLATE (segment by segment) ═══
|
|
27
|
+
|
|
28
|
+
6. **Translate in document order**, segment by segment (sentence or logical unit), never paragraph-lumping. This keeps every source segment traceable to its rendered output.
|
|
29
|
+
7. **Markup and placeholder pass-through:** when a segment contains `{name}`, `<strong>`, `<!-- comment -->`, `%1$s`, or any structural token, copy that token verbatim into the rendered segment at the grammatically correct position for the target language. Do not translate, rename, or reorder them.
|
|
30
|
+
8. **Idiom handling:** for each idiomatic expression, first determine whether a target-language idiom covers the same pragmatic function (preferred). If not, use a descriptive paraphrase that preserves the tone. Never carry the source-language idiom over literally if it would read as nonsense or produce a different connotation.
|
|
31
|
+
9. **Localize units, dates, and numbers** according to the locale conventions catalogued in Phase A. Convert Imperial to metric (or vice versa) when the target locale standard differs, rounding to the same precision as the source. Spell out the conversion in a `[LOCALIZED: 5 miles → 8 km]` annotation the first time any unit class appears, then apply silently thereafter.
|
|
32
|
+
10. **Tone and voice calibration:** after every three to five segments, re-read the last rendered paragraph aloud (mentally) in the target language and ask: does this sound like a native speaker in this register writing for this audience, or does it sound like translated text? Signs of translationese: calqued word order, overlong noun stacks, repeated sentence-opening patterns copied from the source, literal rendering of source-language connectives. Revise before proceeding.
|
|
33
|
+
11. **Untranslatable phrases — required protocol:** when no equivalent exists, do not skip and do not invent. Insert:
|
|
34
|
+
```
|
|
35
|
+
[UNTRANSLATABLE: "<source phrase>"
|
|
36
|
+
ALT-1: "<option>" — tradeoff: <what is gained / lost>
|
|
37
|
+
ALT-2: "<option>" — tradeoff: <what is gained / lost>
|
|
38
|
+
]
|
|
39
|
+
```
|
|
40
|
+
Present both alternatives to the requester before finalizing.
|
|
41
|
+
12. **Low-confidence renderings:** any segment where you are uncertain about register fit, domain term correctness, or pragmatic equivalence, append `[REVIEW: <specific reason, e.g., "legal term of art — confirm with counsel"]` immediately after the segment, on the same line.
|
|
42
|
+
13. **Cultural references:** for a reference (film title, proverb, celebrity name, historical event) that is well known in the source culture but opaque in the target culture, choose the most natural of: (a) established target-language equivalent if one exists, (b) transliteration + brief contextual gloss in parentheses, (c) functional equivalent that carries the same cultural weight. Flag with `[CULTURAL ADAPTATION: <original> → <choice>]`.
|
|
43
|
+
|
|
44
|
+
═══ PHASE C — CONSISTENCY & GLOSSARY AUDIT ═══
|
|
45
|
+
|
|
46
|
+
14. **Build an inline term glossary** as you translate: every time a domain term, proper noun, or brand name appears for the first time, record it as `source term → rendered term` in a `## Glossary` section appended to your output. Every subsequent occurrence must match the first rendering exactly.
|
|
47
|
+
15. **Search your own output** for the ten most frequent content words and verify each is rendered consistently throughout. Variation in terminology (e.g., "account" rendered as both "compte" and "dossier" in French) is a glossary error — unify before delivery.
|
|
48
|
+
16. **Pronoun and formality consistency check:** confirm the second-person pronoun register (formal/informal) is uniform across the entire document. A single drift (one informal "du" in an otherwise formal German document) breaks trust with native readers.
|
|
49
|
+
17. **Punctuation and typography normalization:** apply target-language punctuation conventions — French guillemets « », German „lower-upper" quotes, Spanish inverted ¡ ¿ openers, em-dash vs. en-dash norms, non-breaking spaces before colons in French. These are not stylistic preferences; they are correctness requirements for the locale.
|
|
50
|
+
|
|
51
|
+
═══ PHASE D — BACK-TRANSLATE SPOT CHECK ═══
|
|
52
|
+
|
|
53
|
+
18. **Select 10 % of segments** (or minimum 5, whichever is greater), prioritizing: segments containing idioms, segments marked `[REVIEW]`, segments with localized units, and the opening and closing paragraphs.
|
|
54
|
+
19. **Back-translate each selected segment to the source language** (mentally or explicitly). If the back-translation diverges from the source in meaning — not in wording, but in meaning — revise the target rendering. Wording variation is acceptable; semantic shift is not.
|
|
55
|
+
20. **Re-read the entire output as a standalone document** (not alongside the source). Ask: does this read as a native-authored document in the target language, or does the structure reveal its translated origin? Fix any remaining translationese.
|
|
56
|
+
|
|
57
|
+
═══ PHASE E — DELIVERY PACKAGE ═══
|
|
58
|
+
|
|
59
|
+
21. **Produce the final translated document** with all `[LOCALIZED]` annotations on first use, all `[CULTURAL ADAPTATION]` annotations, and all `[REVIEW]` flags preserved inline so the requester knows exactly where human expert judgment is still needed.
|
|
60
|
+
22. **Produce the Glossary section** (`## Glossary`) listing every source → target term pair used.
|
|
61
|
+
23. **Produce a Flagged Items summary** (`## Flagged Items`) listing, by segment reference or paragraph number: every `[UNTRANSLATABLE]` block with both alternatives, every `[REVIEW]` item with the specific reason, and every `[CULTURAL ADAPTATION]` with the rationale for the choice made.
|
|
62
|
+
24. **State explicitly what was NOT done:** if any section was intentionally left in the source language (e.g., legal boilerplate the client retains in English), name it and confirm it was deliberate, not an omission.
|
|
63
|
+
|
|
64
|
+
KEY PRINCIPLE: The translator's obligation is complete semantic fidelity to the source — preserving what was said, how it was said, and for whom it was said — while producing a document that reads as if it were written natively in the target language; any gap between those two goals must be surfaced to the requester, never resolved silently.
|