1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
//! The `/tm-*` PM skill portfolio — constants embedding each bundled skill.
//!
//! Why: the `mpm-*` guidance skills (`bundle_skills.rs`) were a direct,
//! mechanical port of claude-mpm's Python skill catalog — same names, same
//! claude-mpm-flavored tool/path references (`~/.claude-mpm/`, Socket.IO
//! dashboards on :8765, `mcp__mcp-ticketer__*`, `deepeval test --agent`). None
//! of that matches trusty-mpm's actual Rust daemon/MCP-tool surface. This
//! module holds the tm-native replacement catalog: same behavioral intent,
//! rewritten against the real `mcp__trusty-mpm__*` / `mcp__trusty-memory__*` /
//! `mcp__trusty-search__*` / `mcp__trusty-review__*` tool families, the real
//! `.trusty-mpm/` paths, and the real agent roster.
//! What: `pub const` strings for each `/tm-*` skill, embedded at compile time
//! via `include_str!`. Re-exported by `bundle.rs`.
//! Test: `bundle_tests.rs` — `tm_skills_are_in_bundle`,
//! `tm_skills_have_frontmatter`, `constants_are_non_empty`.
/// User-invocable `/tm-doctor` slash command — runs `tm doctor`.
///
/// Why: `tm-doctor.md` existed as an asset file (A3, tm-skills-portfolio
/// epic) but was never wired into a const or the `ALL` bundle table, so it
/// silently never shipped to any user despite being a real, useful skill
/// that just shells out to the already-documented `tm doctor` diagnostic.
/// What: embedded markdown skill file deployed to `skills/tm-doctor.md`.
/// Test: `tm_doctor_skill_is_wired_into_bundle`.
pub const TM_DOCTOR: &str = include_str!;
/// Circuit breaker enforcement patterns — the crown jewel of the portfolio.
///
/// Why: the PM's delegation discipline (CB#1-10, CB#14) is the single most
/// consequential behavioral contract in the framework; agents need the full
/// detection-pattern/violation/remediation reference, not just the summary
/// table in `PM_INSTRUCTIONS.md`.
/// What: embedded markdown skill file deployed to `skills/tm-circuit-breaker.md`.
/// Test: `tm_skills_are_in_bundle`, `tm_skills_have_frontmatter`.
pub const TM_CIRCUIT_BREAKER: &str = include_str!;
/// QA verification gate and evidence standards.
///
/// Why: prevents the PM from claiming work complete without agent-produced
/// evidence — the most common source of silent quality regressions.
/// What: embedded markdown skill file deployed to `skills/tm-verification-protocols.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_VERIFICATION_PROTOCOLS: &str =
include_str!;
/// Detailed tool usage patterns for the PM's real MCP tool families.
///
/// Why: the PM needs a concrete reference for `mcp__trusty-mpm__*` /
/// `mcp__trusty-memory__*` / `mcp__trusty-search__*` / `mcp__trusty-review__*`
/// usage and the vector-search-first discipline.
/// What: embedded markdown skill file deployed to `skills/tm-tool-usage-guide.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_TOOL_USAGE_GUIDE: &str = include_str!;
/// Immediate post-agent git file tracking protocol.
///
/// Why: untracked deliverables are lost between agent completion and session
/// end; this skill enforces the blocking git-tracking gate (CB#4).
/// What: embedded markdown skill file deployed to `skills/tm-git-file-tracking.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_GIT_FILE_TRACKING: &str = include_str!;
/// Architecture Decision Records (Nygard template) discipline.
///
/// Why: significant, hard-to-reverse architectural decisions need a durable,
/// discoverable record; this is opt-in guidance for when to write one.
/// What: embedded markdown skill file deployed to `skills/tm-adr.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_ADR: &str = include_str!;
/// The single delivery-workflow skill: phases/gates, the ticketing↔version-control
/// ownership boundary, worktree/branch discipline, changelog, PR body, review
/// gate, squash-merge, and the `CLAUDE.md` customization mechanism.
///
/// Why: #5202 absorbed the retired `tm-pr-workflow` here so one skill owns the
/// whole delivery chain. It maps to the *real* override mechanism in
/// `core/instruction_overrides.rs` and `core/instruction_pipeline.rs`, not a
/// fixed claude-mpm 5-phase script.
/// What: embedded markdown skill file deployed to `skills/tm-workflow.md`.
/// Test: `tm_skills_are_in_bundle`, `retired_pr_workflow_skill_is_not_bundled`.
pub const TM_WORKFLOW: &str = include_str!;
/// Official (source→rebuild→deploy) vs custom agent update workflow.
///
/// Why: prevents agents from editing a deployed `~/.claude/agents/*.md` build
/// output instead of the composable source under `assets/agents/`.
/// What: embedded markdown skill file deployed to `skills/tm-agent-architecture.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_AGENT_ARCHITECTURE: &str = include_str!;
/// Session-error postmortem orchestration over the MCP bug-reporting pipeline.
///
/// Why: routes through the real `list_recent_errors` / `preview_bug_report` /
/// `report_bug` MCP tools instead of ad-hoc log parsing.
/// What: embedded markdown skill file deployed to `skills/tm-postmortem.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_POSTMORTEM: &str = include_str!;
/// Bug reporting protocol — MCP-native filing pipeline, single-repo routing.
///
/// Why: trusty-tools is one monorepo (no claude-mpm/-agents/-skills split),
/// and filing is MCP-native (`report_bug`) rather than manual `gh issue create`.
/// What: embedded markdown skill file deployed to `skills/tm-bug-reporting.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_BUG_REPORTING: &str = include_str!;
/// Progressive-disclosure onboarding/teaching templates.
///
/// Why: condensed from claude-mpm's 658-line teaching-mode skill, stripping
/// generic (non-framework) examples and pointing at the concrete tm-* skills
/// instead of duplicating their content.
/// What: embedded markdown skill file deployed to `skills/tm-teaching-templates.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_TEACHING_TEMPLATES: &str = include_str!;
/// Ticket-driven development protocol and ticketing orchestration.
///
/// Why: consolidates mpm-ticket-view + mpm-ticketing-integration; verified
/// against the real bundled `ticketing` agent's mcp-ticketer/aitrackdown
/// priority (not assumed).
/// What: embedded markdown skill file deployed to `skills/tm-ticketing.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_TICKETING: &str = include_str!;
/// Delegation matrices and agent-selection decision trees.
///
/// Why: SLIM per the portfolio design — drops native Agent/Task-tool basics,
/// keeps only the tm-specific chains and the verified real agent roster.
/// What: embedded markdown skill file deployed to `skills/tm-delegation-patterns.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_DELEGATION_PATTERNS: &str = include_str!;
/// PM context-limit pause/resume, project-local sessions, worktree pruning.
///
/// Why: consolidates mpm-session-management + mpm-session-pause +
/// mpm-session-resume into one skill; keeps the 70% auto-pause threshold, the
/// `.trusty-mpm/sessions/` format, `tm session prune-worktrees`, and
/// trusty-memory task_add/task_list/task_complete integration.
/// What: embedded markdown skill file deployed to `skills/tm-session-management.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_SESSION_MANAGEMENT: &str = include_str!;
/// Focused `/tm-session-pause` action — snapshot + prune, split from the
/// consolidated session-management overview.
///
/// Why: restores the per-action UX of claude-mpm's `/mpm-session-pause`; users
/// want a single-purpose "pause and save my work" entry point rather than
/// reading the full policy skill. Adapted to tm-native `.trusty-mpm/sessions/`
/// paths and `tm session prune-worktrees` (no `.claude-mpm/` references).
/// What: embedded markdown skill file deployed to `skills/tm-session-pause.md`.
/// Test: `tm_skills_are_in_bundle`, `tm_skills_have_frontmatter`.
pub const TM_SESSION_PAUSE: &str = include_str!;
/// Focused `/tm-session-resume` action — load + restore, split from the
/// consolidated session-management overview.
///
/// Why: restores the per-action UX of claude-mpm's `/mpm-session-resume`; a
/// single-purpose "resume my paused session" entry point over `tm session
/// catchup`, with project-path validation. Adapted to tm-native
/// `.trusty-mpm/sessions/` paths (no `.claude-mpm/` references).
/// What: embedded markdown skill file deployed to `skills/tm-session-resume.md`.
/// Test: `tm_skills_are_in_bundle`, `tm_skills_have_frontmatter`.
pub const TM_SESSION_RESUME: &str = include_str!;
/// User-invocable `/tm-init` — project initialization / CLAUDE.md refresh.
///
/// Why: restores the per-command UX of claude-mpm's `/mpm-init`, adapted to
/// tm's reality — the trusty *config* (agents/skills/INSTRUCTIONS/settings/
/// output-style/`.mcp.json`) deploys automatically on managed-session launch
/// (or via `tm install`), so this skill deliberately does NOT deploy config.
/// It focuses on *project* init/refresh: analyze the repo, scaffold or update
/// `CLAUDE.md`, register the project (`tm project init`), and offer
/// update/context/catchup modes (catchup → `tm session catchup`). Uses only
/// tm-native `.trusty-mpm/` paths (no `.claude-mpm/` references).
/// What: embedded markdown skill file deployed to `skills/tm-init.md`.
/// Test: `tm_skills_are_in_bundle`, `tm_skills_have_frontmatter`.
pub const TM_INIT: &str = include_str!;
/// SLIM `/tm` orchestration-model overview (optional 15th portfolio skill).
///
/// Why: a quick-reference entry point for the agent roster, skills catalog,
/// memory system, and health tooling — the tm-native replacement for the
/// claude-mpm `mpm` overview skill.
/// What: embedded markdown skill file deployed to `skills/tm.md`.
/// Test: `tm_skills_are_in_bundle`.
pub const TM_OVERVIEW: &str = include_str!;
/// tm CLI operations — MCP setup/management, session lifecycle, diagnostics.
///
/// Why: the PM/operator needs a single reference for driving the `tm` binary
/// itself — most importantly the user-scope MCP server management surface
/// (`tm mcp add|remove|list|get|test`, #2286/#2316) — plus the rest of the
/// operational CLI (sessions, services, doctor, validate, auth, register). The
/// other tm-* skills teach the PM's in-session MCP *tools*; this teaches the
/// `tm` command-line binary and the config it owns. Named `tm-cli-operations`
/// (not `tm-mcp-management`) because the skill deployer refuses any skill whose
/// stem contains "mcp" — it would shadow Claude Code's built-in `/mcp` (#2186).
/// What: embedded markdown skill file deployed to `skills/tm-cli-operations.md`.
/// Test: `tm_skills_are_in_bundle`, `tm_skills_have_frontmatter`.
pub const TM_CLI_OPERATIONS: &str = include_str!;
/// `/tm-issues-prune` — GitHub issue backlog prune, organize, prioritize &
/// suggest-next (issue #2185, extended by #2392).
///
/// Why: backlogs accumulate stale, duplicate, and obsolete issues, open
/// issues drift out of accurate priority, and surviving issues need to be
/// grouped and turned into an actionable next-task slate; this is a
/// natural-language PM delegation pattern (not a new Rust command) that has
/// the `ticketing` agent survey the repo via `gh issue list/close/edit`,
/// presents prune candidates with reasons for confirmation before any
/// close, proposes priority-label corrections, groups surviving issues by
/// epic/component/theme, produces a deterministic `gh`-fact-justified
/// ranked list, and recommends a top 3-7 next-task table for the user to
/// pick from (never auto-started). gh-first; JIRA is deferred
/// (`TicketSystemKind::Jira` is stubbed).
/// What: embedded markdown skill file deployed to `skills/tm-issues-prune.md`.
/// Test: `tm_skills_are_in_bundle`, `tm_skills_have_frontmatter`.
pub const TM_ISSUES_PRUNE: &str = include_str!;
/// Slack delivery protocol, general (issue #4761).
///
/// Why: replaces `tm-slack-canvas-delivery` (issue #4447), which existed as
/// an asset file but was never wired into a const or the `ALL` bundle table
/// (same shape of defect as `TM_DOCTOR`'s A3 gap) and whose scope was
/// narrower than needed — canvas only, not Slack delivery generally. This
/// skill routes through the native `mcp__slack-mcp__*` server
/// (`trusty-channels`) per ADR-0014's native-first preference, documents the
/// full verified 22-tool surface (`trusty-channels/src/slack/tools.rs`), and
/// keeps the old skill's core completion rule — creation is not delivery —
/// generalized to every delivery shape (plain message, canvas, scheduled).
/// What: embedded markdown skill file deployed to `skills/tm-slack.md`.
/// Test: `tm_skills_are_in_bundle`, `tm_skills_have_frontmatter`.
pub const TM_SLACK: &str = include_str!;