erk 0.4.5__py3-none-any.whl

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 (331) hide show
  1. erk/__init__.py +12 -0
  2. erk/__main__.py +6 -0
  3. erk/agent_docs/__init__.py +5 -0
  4. erk/agent_docs/models.py +123 -0
  5. erk/agent_docs/operations.py +666 -0
  6. erk/artifacts/__init__.py +5 -0
  7. erk/artifacts/artifact_health.py +623 -0
  8. erk/artifacts/detection.py +16 -0
  9. erk/artifacts/discovery.py +343 -0
  10. erk/artifacts/models.py +63 -0
  11. erk/artifacts/staleness.py +56 -0
  12. erk/artifacts/state.py +100 -0
  13. erk/artifacts/sync.py +624 -0
  14. erk/cli/__init__.py +0 -0
  15. erk/cli/activation.py +132 -0
  16. erk/cli/alias.py +53 -0
  17. erk/cli/cli.py +221 -0
  18. erk/cli/commands/__init__.py +0 -0
  19. erk/cli/commands/admin.py +153 -0
  20. erk/cli/commands/artifact/__init__.py +1 -0
  21. erk/cli/commands/artifact/check.py +260 -0
  22. erk/cli/commands/artifact/group.py +31 -0
  23. erk/cli/commands/artifact/list_cmd.py +89 -0
  24. erk/cli/commands/artifact/show.py +62 -0
  25. erk/cli/commands/artifact/sync_cmd.py +39 -0
  26. erk/cli/commands/branch/__init__.py +26 -0
  27. erk/cli/commands/branch/assign_cmd.py +152 -0
  28. erk/cli/commands/branch/checkout_cmd.py +357 -0
  29. erk/cli/commands/branch/create_cmd.py +161 -0
  30. erk/cli/commands/branch/list_cmd.py +82 -0
  31. erk/cli/commands/branch/unassign_cmd.py +197 -0
  32. erk/cli/commands/cc/__init__.py +15 -0
  33. erk/cli/commands/cc/jsonl_cmd.py +20 -0
  34. erk/cli/commands/cc/session/AGENTS.md +30 -0
  35. erk/cli/commands/cc/session/CLAUDE.md +1 -0
  36. erk/cli/commands/cc/session/__init__.py +15 -0
  37. erk/cli/commands/cc/session/list_cmd.py +167 -0
  38. erk/cli/commands/cc/session/show_cmd.py +175 -0
  39. erk/cli/commands/completion.py +89 -0
  40. erk/cli/commands/completions.py +165 -0
  41. erk/cli/commands/config.py +327 -0
  42. erk/cli/commands/docs/__init__.py +1 -0
  43. erk/cli/commands/docs/group.py +16 -0
  44. erk/cli/commands/docs/sync.py +121 -0
  45. erk/cli/commands/docs/validate.py +102 -0
  46. erk/cli/commands/doctor.py +243 -0
  47. erk/cli/commands/down.py +171 -0
  48. erk/cli/commands/exec/__init__.py +1 -0
  49. erk/cli/commands/exec/group.py +164 -0
  50. erk/cli/commands/exec/scripts/AGENTS.md +79 -0
  51. erk/cli/commands/exec/scripts/CLAUDE.md +1 -0
  52. erk/cli/commands/exec/scripts/__init__.py +5 -0
  53. erk/cli/commands/exec/scripts/add_reaction_to_comment.py +69 -0
  54. erk/cli/commands/exec/scripts/add_remote_execution_note.py +68 -0
  55. erk/cli/commands/exec/scripts/check_impl.py +152 -0
  56. erk/cli/commands/exec/scripts/ci_update_pr_body.py +294 -0
  57. erk/cli/commands/exec/scripts/create_extraction_branch.py +138 -0
  58. erk/cli/commands/exec/scripts/create_extraction_plan.py +242 -0
  59. erk/cli/commands/exec/scripts/create_issue_from_session.py +103 -0
  60. erk/cli/commands/exec/scripts/create_plan_from_context.py +103 -0
  61. erk/cli/commands/exec/scripts/create_worker_impl_from_issue.py +93 -0
  62. erk/cli/commands/exec/scripts/detect_trunk_branch.py +121 -0
  63. erk/cli/commands/exec/scripts/exit_plan_mode_hook.py +777 -0
  64. erk/cli/commands/exec/scripts/extract_latest_plan.py +49 -0
  65. erk/cli/commands/exec/scripts/extract_session_from_issue.py +150 -0
  66. erk/cli/commands/exec/scripts/find_project_dir.py +214 -0
  67. erk/cli/commands/exec/scripts/generate_pr_summary.py +112 -0
  68. erk/cli/commands/exec/scripts/get_closing_text.py +98 -0
  69. erk/cli/commands/exec/scripts/get_embedded_prompt.py +62 -0
  70. erk/cli/commands/exec/scripts/get_plan_metadata.py +95 -0
  71. erk/cli/commands/exec/scripts/get_pr_body_footer.py +70 -0
  72. erk/cli/commands/exec/scripts/get_pr_discussion_comments.py +149 -0
  73. erk/cli/commands/exec/scripts/get_pr_review_comments.py +155 -0
  74. erk/cli/commands/exec/scripts/impl_init.py +158 -0
  75. erk/cli/commands/exec/scripts/impl_signal.py +375 -0
  76. erk/cli/commands/exec/scripts/impl_verify.py +49 -0
  77. erk/cli/commands/exec/scripts/issue_title_to_filename.py +34 -0
  78. erk/cli/commands/exec/scripts/list_sessions.py +296 -0
  79. erk/cli/commands/exec/scripts/mark_impl_ended.py +188 -0
  80. erk/cli/commands/exec/scripts/mark_impl_started.py +188 -0
  81. erk/cli/commands/exec/scripts/marker.py +163 -0
  82. erk/cli/commands/exec/scripts/objective_save_to_issue.py +109 -0
  83. erk/cli/commands/exec/scripts/plan_save_to_issue.py +269 -0
  84. erk/cli/commands/exec/scripts/plan_update_issue.py +147 -0
  85. erk/cli/commands/exec/scripts/post_extraction_comment.py +237 -0
  86. erk/cli/commands/exec/scripts/post_or_update_pr_summary.py +133 -0
  87. erk/cli/commands/exec/scripts/post_pr_inline_comment.py +143 -0
  88. erk/cli/commands/exec/scripts/post_workflow_started_comment.py +168 -0
  89. erk/cli/commands/exec/scripts/preprocess_session.py +777 -0
  90. erk/cli/commands/exec/scripts/quick_submit.py +32 -0
  91. erk/cli/commands/exec/scripts/rebase_with_conflict_resolution.py +260 -0
  92. erk/cli/commands/exec/scripts/reply_to_discussion_comment.py +173 -0
  93. erk/cli/commands/exec/scripts/resolve_review_thread.py +170 -0
  94. erk/cli/commands/exec/scripts/session_id_injector_hook.py +52 -0
  95. erk/cli/commands/exec/scripts/setup_impl_from_issue.py +159 -0
  96. erk/cli/commands/exec/scripts/slot_objective.py +102 -0
  97. erk/cli/commands/exec/scripts/tripwires_reminder_hook.py +20 -0
  98. erk/cli/commands/exec/scripts/update_dispatch_info.py +116 -0
  99. erk/cli/commands/exec/scripts/user_prompt_hook.py +113 -0
  100. erk/cli/commands/exec/scripts/validate_plan_content.py +98 -0
  101. erk/cli/commands/exec/scripts/wrap_plan_in_metadata_block.py +34 -0
  102. erk/cli/commands/implement.py +695 -0
  103. erk/cli/commands/implement_shared.py +649 -0
  104. erk/cli/commands/info/__init__.py +14 -0
  105. erk/cli/commands/info/release_notes_cmd.py +128 -0
  106. erk/cli/commands/init.py +801 -0
  107. erk/cli/commands/land_cmd.py +690 -0
  108. erk/cli/commands/log_cmd.py +137 -0
  109. erk/cli/commands/md/__init__.py +5 -0
  110. erk/cli/commands/md/check.py +118 -0
  111. erk/cli/commands/md/group.py +14 -0
  112. erk/cli/commands/navigation_helpers.py +430 -0
  113. erk/cli/commands/objective/__init__.py +16 -0
  114. erk/cli/commands/objective/list_cmd.py +47 -0
  115. erk/cli/commands/objective_helpers.py +132 -0
  116. erk/cli/commands/plan/__init__.py +32 -0
  117. erk/cli/commands/plan/check_cmd.py +174 -0
  118. erk/cli/commands/plan/close_cmd.py +69 -0
  119. erk/cli/commands/plan/create_cmd.py +120 -0
  120. erk/cli/commands/plan/docs/__init__.py +18 -0
  121. erk/cli/commands/plan/docs/extract_cmd.py +53 -0
  122. erk/cli/commands/plan/docs/unextract_cmd.py +38 -0
  123. erk/cli/commands/plan/docs/unextracted_cmd.py +72 -0
  124. erk/cli/commands/plan/extraction/__init__.py +16 -0
  125. erk/cli/commands/plan/extraction/complete_cmd.py +101 -0
  126. erk/cli/commands/plan/extraction/create_raw_cmd.py +63 -0
  127. erk/cli/commands/plan/get.py +71 -0
  128. erk/cli/commands/plan/list_cmd.py +754 -0
  129. erk/cli/commands/plan/log_cmd.py +440 -0
  130. erk/cli/commands/plan/start_cmd.py +459 -0
  131. erk/cli/commands/planner/__init__.py +40 -0
  132. erk/cli/commands/planner/configure_cmd.py +73 -0
  133. erk/cli/commands/planner/connect_cmd.py +96 -0
  134. erk/cli/commands/planner/create_cmd.py +148 -0
  135. erk/cli/commands/planner/list_cmd.py +51 -0
  136. erk/cli/commands/planner/register_cmd.py +105 -0
  137. erk/cli/commands/planner/set_default_cmd.py +23 -0
  138. erk/cli/commands/planner/unregister_cmd.py +43 -0
  139. erk/cli/commands/pr/__init__.py +23 -0
  140. erk/cli/commands/pr/check_cmd.py +112 -0
  141. erk/cli/commands/pr/checkout_cmd.py +165 -0
  142. erk/cli/commands/pr/fix_conflicts_cmd.py +82 -0
  143. erk/cli/commands/pr/parse_pr_reference.py +10 -0
  144. erk/cli/commands/pr/submit_cmd.py +360 -0
  145. erk/cli/commands/pr/sync_cmd.py +181 -0
  146. erk/cli/commands/prepare_cwd_recovery.py +60 -0
  147. erk/cli/commands/project/__init__.py +16 -0
  148. erk/cli/commands/project/init_cmd.py +91 -0
  149. erk/cli/commands/run/__init__.py +17 -0
  150. erk/cli/commands/run/list_cmd.py +189 -0
  151. erk/cli/commands/run/logs_cmd.py +54 -0
  152. erk/cli/commands/run/shared.py +19 -0
  153. erk/cli/commands/shell_integration.py +29 -0
  154. erk/cli/commands/slot/__init__.py +23 -0
  155. erk/cli/commands/slot/check_cmd.py +277 -0
  156. erk/cli/commands/slot/common.py +314 -0
  157. erk/cli/commands/slot/init_pool_cmd.py +157 -0
  158. erk/cli/commands/slot/list_cmd.py +228 -0
  159. erk/cli/commands/slot/repair_cmd.py +190 -0
  160. erk/cli/commands/stack/__init__.py +23 -0
  161. erk/cli/commands/stack/consolidate_cmd.py +470 -0
  162. erk/cli/commands/stack/list_cmd.py +79 -0
  163. erk/cli/commands/stack/move_cmd.py +309 -0
  164. erk/cli/commands/stack/split_old/README.md +64 -0
  165. erk/cli/commands/stack/split_old/__init__.py +5 -0
  166. erk/cli/commands/stack/split_old/command.py +233 -0
  167. erk/cli/commands/stack/split_old/display.py +116 -0
  168. erk/cli/commands/stack/split_old/plan.py +216 -0
  169. erk/cli/commands/status.py +58 -0
  170. erk/cli/commands/submit.py +768 -0
  171. erk/cli/commands/up.py +154 -0
  172. erk/cli/commands/upgrade.py +82 -0
  173. erk/cli/commands/wt/__init__.py +29 -0
  174. erk/cli/commands/wt/checkout_cmd.py +110 -0
  175. erk/cli/commands/wt/create_cmd.py +998 -0
  176. erk/cli/commands/wt/current_cmd.py +35 -0
  177. erk/cli/commands/wt/delete_cmd.py +573 -0
  178. erk/cli/commands/wt/list_cmd.py +332 -0
  179. erk/cli/commands/wt/rename_cmd.py +66 -0
  180. erk/cli/config.py +242 -0
  181. erk/cli/constants.py +29 -0
  182. erk/cli/core.py +65 -0
  183. erk/cli/debug.py +9 -0
  184. erk/cli/ensure-conversion-tasks.md +288 -0
  185. erk/cli/ensure.py +628 -0
  186. erk/cli/github_parsing.py +96 -0
  187. erk/cli/graphite.py +81 -0
  188. erk/cli/graphite_command.py +80 -0
  189. erk/cli/help_formatter.py +345 -0
  190. erk/cli/output.py +361 -0
  191. erk/cli/presets/dagster.toml +12 -0
  192. erk/cli/presets/generic.toml +12 -0
  193. erk/cli/prompt_hooks_templates/README.md +68 -0
  194. erk/cli/script_output.py +32 -0
  195. erk/cli/shell_integration/bash_wrapper.sh +32 -0
  196. erk/cli/shell_integration/fish_wrapper.fish +39 -0
  197. erk/cli/shell_integration/handler.py +338 -0
  198. erk/cli/shell_integration/zsh_wrapper.sh +32 -0
  199. erk/cli/shell_utils.py +171 -0
  200. erk/cli/subprocess_utils.py +92 -0
  201. erk/cli/uvx_detection.py +59 -0
  202. erk/core/__init__.py +0 -0
  203. erk/core/claude_executor.py +511 -0
  204. erk/core/claude_settings.py +317 -0
  205. erk/core/command_log.py +406 -0
  206. erk/core/commit_message_generator.py +234 -0
  207. erk/core/completion.py +10 -0
  208. erk/core/consolidation_utils.py +177 -0
  209. erk/core/context.py +570 -0
  210. erk/core/display/__init__.py +4 -0
  211. erk/core/display/abc.py +24 -0
  212. erk/core/display/real.py +30 -0
  213. erk/core/display_utils.py +526 -0
  214. erk/core/file_utils.py +87 -0
  215. erk/core/health_checks.py +1315 -0
  216. erk/core/health_checks_dogfooder/__init__.py +85 -0
  217. erk/core/health_checks_dogfooder/deprecated_dot_agent_config.py +64 -0
  218. erk/core/health_checks_dogfooder/legacy_claude_docs.py +69 -0
  219. erk/core/health_checks_dogfooder/legacy_config_locations.py +122 -0
  220. erk/core/health_checks_dogfooder/legacy_erk_docs_agent.py +61 -0
  221. erk/core/health_checks_dogfooder/legacy_erk_kits_folder.py +60 -0
  222. erk/core/health_checks_dogfooder/legacy_hook_settings.py +104 -0
  223. erk/core/health_checks_dogfooder/legacy_kit_yaml.py +78 -0
  224. erk/core/health_checks_dogfooder/legacy_kits_toml.py +43 -0
  225. erk/core/health_checks_dogfooder/outdated_erk_skill.py +43 -0
  226. erk/core/implementation_queue/__init__.py +1 -0
  227. erk/core/implementation_queue/github/__init__.py +8 -0
  228. erk/core/implementation_queue/github/abc.py +7 -0
  229. erk/core/implementation_queue/github/noop.py +38 -0
  230. erk/core/implementation_queue/github/printing.py +43 -0
  231. erk/core/implementation_queue/github/real.py +119 -0
  232. erk/core/init_utils.py +227 -0
  233. erk/core/output_filter.py +338 -0
  234. erk/core/plan_store/__init__.py +6 -0
  235. erk/core/planner/__init__.py +1 -0
  236. erk/core/planner/registry_abc.py +8 -0
  237. erk/core/planner/registry_fake.py +129 -0
  238. erk/core/planner/registry_real.py +195 -0
  239. erk/core/planner/types.py +7 -0
  240. erk/core/pr_utils.py +30 -0
  241. erk/core/release_notes.py +263 -0
  242. erk/core/repo_discovery.py +126 -0
  243. erk/core/script_writer.py +41 -0
  244. erk/core/services/__init__.py +1 -0
  245. erk/core/services/plan_list_service.py +94 -0
  246. erk/core/shell.py +51 -0
  247. erk/core/user_feedback.py +11 -0
  248. erk/core/version_check.py +55 -0
  249. erk/core/workflow_display.py +75 -0
  250. erk/core/worktree_pool.py +190 -0
  251. erk/core/worktree_utils.py +300 -0
  252. erk/data/CHANGELOG.md +438 -0
  253. erk/data/__init__.py +1 -0
  254. erk/data/claude/agents/devrun.md +180 -0
  255. erk/data/claude/commands/erk/__init__.py +0 -0
  256. erk/data/claude/commands/erk/create-extraction-plan.md +360 -0
  257. erk/data/claude/commands/erk/fix-conflicts.md +25 -0
  258. erk/data/claude/commands/erk/git-pr-push.md +345 -0
  259. erk/data/claude/commands/erk/implement-stacked-plan.md +96 -0
  260. erk/data/claude/commands/erk/land.md +193 -0
  261. erk/data/claude/commands/erk/objective-create.md +370 -0
  262. erk/data/claude/commands/erk/objective-list.md +34 -0
  263. erk/data/claude/commands/erk/objective-next-plan.md +220 -0
  264. erk/data/claude/commands/erk/objective-update-with-landed-pr.md +216 -0
  265. erk/data/claude/commands/erk/plan-implement.md +202 -0
  266. erk/data/claude/commands/erk/plan-save.md +45 -0
  267. erk/data/claude/commands/erk/plan-submit.md +39 -0
  268. erk/data/claude/commands/erk/pr-address.md +367 -0
  269. erk/data/claude/commands/erk/pr-submit.md +58 -0
  270. erk/data/claude/skills/dignified-python/SKILL.md +48 -0
  271. erk/data/claude/skills/dignified-python/cli-patterns.md +155 -0
  272. erk/data/claude/skills/dignified-python/dignified-python-core.md +1190 -0
  273. erk/data/claude/skills/dignified-python/subprocess.md +99 -0
  274. erk/data/claude/skills/dignified-python/versions/python-3.10.md +517 -0
  275. erk/data/claude/skills/dignified-python/versions/python-3.11.md +536 -0
  276. erk/data/claude/skills/dignified-python/versions/python-3.12.md +662 -0
  277. erk/data/claude/skills/dignified-python/versions/python-3.13.md +653 -0
  278. erk/data/claude/skills/erk-diff-analysis/SKILL.md +27 -0
  279. erk/data/claude/skills/erk-diff-analysis/references/commit-message-prompt.md +78 -0
  280. erk/data/claude/skills/learned-docs/SKILL.md +362 -0
  281. erk/data/github/actions/setup-claude-erk/action.yml +11 -0
  282. erk/data/github/prompts/dignified-python-review.md +125 -0
  283. erk/data/github/workflows/dignified-python-review.yml +61 -0
  284. erk/data/github/workflows/erk-impl.yml +251 -0
  285. erk/hooks/__init__.py +1 -0
  286. erk/hooks/decorators.py +319 -0
  287. erk/status/__init__.py +8 -0
  288. erk/status/collectors/__init__.py +9 -0
  289. erk/status/collectors/base.py +52 -0
  290. erk/status/collectors/git.py +76 -0
  291. erk/status/collectors/github.py +81 -0
  292. erk/status/collectors/graphite.py +80 -0
  293. erk/status/collectors/impl.py +145 -0
  294. erk/status/models/__init__.py +4 -0
  295. erk/status/models/status_data.py +404 -0
  296. erk/status/orchestrator.py +169 -0
  297. erk/status/renderers/__init__.py +5 -0
  298. erk/status/renderers/simple.py +322 -0
  299. erk/tui/AGENTS.md +193 -0
  300. erk/tui/CLAUDE.md +1 -0
  301. erk/tui/__init__.py +1 -0
  302. erk/tui/app.py +1404 -0
  303. erk/tui/commands/__init__.py +1 -0
  304. erk/tui/commands/executor.py +66 -0
  305. erk/tui/commands/provider.py +165 -0
  306. erk/tui/commands/real_executor.py +63 -0
  307. erk/tui/commands/registry.py +121 -0
  308. erk/tui/commands/types.py +36 -0
  309. erk/tui/data/__init__.py +1 -0
  310. erk/tui/data/provider.py +492 -0
  311. erk/tui/data/types.py +104 -0
  312. erk/tui/filtering/__init__.py +1 -0
  313. erk/tui/filtering/logic.py +43 -0
  314. erk/tui/filtering/types.py +55 -0
  315. erk/tui/jsonl_viewer/__init__.py +1 -0
  316. erk/tui/jsonl_viewer/app.py +61 -0
  317. erk/tui/jsonl_viewer/models.py +208 -0
  318. erk/tui/jsonl_viewer/widgets.py +204 -0
  319. erk/tui/sorting/__init__.py +6 -0
  320. erk/tui/sorting/logic.py +55 -0
  321. erk/tui/sorting/types.py +68 -0
  322. erk/tui/styles/dash.tcss +95 -0
  323. erk/tui/widgets/__init__.py +1 -0
  324. erk/tui/widgets/command_output.py +112 -0
  325. erk/tui/widgets/plan_table.py +276 -0
  326. erk/tui/widgets/status_bar.py +116 -0
  327. erk-0.4.5.dist-info/METADATA +376 -0
  328. erk-0.4.5.dist-info/RECORD +331 -0
  329. erk-0.4.5.dist-info/WHEEL +4 -0
  330. erk-0.4.5.dist-info/entry_points.txt +2 -0
  331. erk-0.4.5.dist-info/licenses/LICENSE.md +3 -0
@@ -0,0 +1,370 @@
1
+ ---
2
+ description: Create a structured objective through guided conversation
3
+ ---
4
+
5
+ # /erk:objective-create
6
+
7
+ Create a new objective through an interactive, guided process. You describe what you want to accomplish, and Claude proposes a structured objective for your approval.
8
+
9
+ ## Usage
10
+
11
+ ```bash
12
+ /erk:objective-create
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Agent Instructions
18
+
19
+ ### Step 1: Prompt for Description
20
+
21
+ Ask the user to describe what they want to accomplish:
22
+
23
+ ```
24
+ What do you want to accomplish? Describe it however makes sense to you - goals,
25
+ constraints, design decisions you've already made, context about the codebase, etc.
26
+
27
+ I'll structure it into a formal objective for your review.
28
+ ```
29
+
30
+ Wait for the user's response. They may provide:
31
+
32
+ - A brief summary
33
+ - A detailed brain dump
34
+ - Existing notes or documentation
35
+ - A combination of the above
36
+
37
+ ### Step 2: Analyze and Explore
38
+
39
+ Based on the user's description:
40
+
41
+ 1. **Identify key elements:**
42
+ - What is the transformation/goal?
43
+ - What design decisions are mentioned or implied?
44
+ - What constraints exist?
45
+ - What's the scope?
46
+
47
+ 2. **Explore the codebase if needed:**
48
+ - If the user references specific code, read it to understand context
49
+ - If architecture decisions are mentioned, verify current state
50
+ - Gather enough context to propose realistic phases
51
+
52
+ 3. **Capture context for downstream implementers:**
53
+
54
+ During objective creation, you gather valuable context that would otherwise be lost: web searches, codebase exploration, user feedback, and your reasoning. **This context belongs in the objective issue.**
55
+
56
+ Ask yourself: "What would a future agent (or human) implementing this need to know?"
57
+
58
+ Examples of valuable context:
59
+ - **Inventories**: Grep results showing all instances of a pattern, categorized by type
60
+ - **Root cause analysis**: Why the current state exists, what caused the problem
61
+ - **Codebase findings**: Relevant files, existing patterns, architectural constraints
62
+ - **External research**: API docs, library behavior, migration guides discovered via web search
63
+ - **Design rationale**: Why certain approaches were chosen or rejected
64
+ - **User preferences**: Feedback and decisions made during the conversation
65
+
66
+ This context goes in a dedicated section after the Roadmap (see template below)
67
+
68
+ ### Step 3: Ask for Structure Preference
69
+
70
+ After understanding the user's goals, present structure options using AskUserQuestion:
71
+
72
+ ```
73
+ How would you like the objective structured?
74
+ ```
75
+
76
+ **Options:**
77
+
78
+ 1. **Steelthread (Recommended)** - Phase 1A is a minimal vertical slice proving the concept works end-to-end, followed by Phase 1B to complete the feature. Best when you can demonstrate value with a partial implementation.
79
+ 2. **Linear** - Sequential phases, each building on the previous. Good when infrastructure must exist before any use case works (e.g., database schema before queries).
80
+ 3. **Single** - One phase, one PR. For small, focused objectives that don't need phasing.
81
+ 4. **Custom** - User describes their preferred structure
82
+
83
+ **Selection guidelines:**
84
+
85
+ - **Steelthread**: Default choice. Use when feasible - it de-risks the approach early by proving the concept works.
86
+ - **Linear**: Use when Phase 1A doesn't make sense - e.g., building a new abstraction layer that has no value until complete.
87
+ - **Single**: Use for objectives small enough to implement in one PR (typically 1-2 days of work).
88
+ - **Custom**: Use when the user has a specific structure in mind.
89
+
90
+ ### Step 4: Propose Structured Objective
91
+
92
+ Write a structured objective proposal and show it to the user. Use the appropriate template based on their structure choice:
93
+
94
+ #### Steelthread Template (Recommended)
95
+
96
+ ```markdown
97
+ # Objective: [Clear, Concise Title]
98
+
99
+ [1-2 sentence summary of the transformation]
100
+
101
+ ## Goal
102
+
103
+ [What the end state looks like - concrete examples of the new API/behavior/architecture]
104
+
105
+ ## Design Decisions
106
+
107
+ - **[Decision 1]**: [rationale]
108
+ - **[Decision 2]**: [rationale]
109
+
110
+ ## Roadmap
111
+
112
+ ### Phase 1A: [Name] Steelthread (1 PR)
113
+
114
+ Minimal vertical slice proving the concept works end-to-end.
115
+
116
+ | Step | Description | Status | PR |
117
+ | ---- | ---------------------------- | ------- | --- |
118
+ | 1A.1 | [Minimal infrastructure] | pending | |
119
+ | 1A.2 | [Wire into one command/path] | pending | |
120
+
121
+ **Test:** [End-to-end acceptance test for steelthread]
122
+
123
+ ### Phase 1B: Complete [Name] (1 PR)
124
+
125
+ Fill out remaining functionality.
126
+
127
+ | Step | Description | Status | PR |
128
+ | ---- | ------------------------------ | ------- | --- |
129
+ | 1B.1 | [Extend to remaining commands] | pending | |
130
+ | 1B.2 | [Full test coverage] | pending | |
131
+
132
+ **Test:** [Full acceptance criteria]
133
+
134
+ ### Phase 2: [Next Component] (1 PR)
135
+
136
+ [Description]
137
+
138
+ | Step | Description | Status | PR |
139
+ | ---- | ----------- | ------- | --- |
140
+ | 2.1 | ... | pending | |
141
+
142
+ **Test:** [Verification criteria]
143
+
144
+ ## Implementation Context
145
+
146
+ [Current architecture, target architecture, patterns to follow - include if helpful]
147
+
148
+ ## Exploration Notes
149
+
150
+ [Context gathered during objective creation that implementers will need]
151
+
152
+ ## Related Documentation
153
+
154
+ - Skills to load: [relevant skills]
155
+ - Docs to reference: [relevant docs]
156
+ ```
157
+
158
+ #### Linear Template
159
+
160
+ ```markdown
161
+ # Objective: [Clear, Concise Title]
162
+
163
+ [1-2 sentence summary]
164
+
165
+ ## Goal
166
+
167
+ [End state description]
168
+
169
+ ## Design Decisions
170
+
171
+ - **[Decision 1]**: [rationale]
172
+
173
+ ## Roadmap
174
+
175
+ ### Phase 1: [Foundation] (1 PR)
176
+
177
+ [Description - this phase establishes infrastructure needed by subsequent phases]
178
+
179
+ | Step | Description | Status | PR |
180
+ | ---- | ----------- | ------- | --- |
181
+ | 1.1 | ... | pending | |
182
+
183
+ **Test:** [Verification criteria]
184
+
185
+ ### Phase 2: [Build on Foundation] (1 PR)
186
+
187
+ [Description - uses Phase 1 infrastructure]
188
+
189
+ | Step | Description | Status | PR |
190
+ | ---- | ----------- | ------- | --- |
191
+ | 2.1 | ... | pending | |
192
+
193
+ **Test:** [Verification criteria]
194
+
195
+ ## Implementation Context
196
+
197
+ [Context for implementers]
198
+
199
+ ## Exploration Notes
200
+
201
+ [Gathered context]
202
+
203
+ ## Related Documentation
204
+
205
+ - Skills to load: [relevant skills]
206
+ - Docs to reference: [relevant docs]
207
+ ```
208
+
209
+ #### Single Template
210
+
211
+ ```markdown
212
+ # Objective: [Clear, Concise Title]
213
+
214
+ [1-2 sentence summary]
215
+
216
+ ## Goal
217
+
218
+ [End state description]
219
+
220
+ ## Design Decisions
221
+
222
+ - **[Decision 1]**: [rationale]
223
+
224
+ ## Implementation
225
+
226
+ | Step | Description | Status | PR |
227
+ | ---- | ----------- | ------- | --- |
228
+ | 1 | ... | pending | |
229
+ | 2 | ... | pending | |
230
+
231
+ **Test:** [Acceptance criteria]
232
+
233
+ ## Implementation Context
234
+
235
+ [Context for implementers]
236
+
237
+ ## Related Documentation
238
+
239
+ - Skills to load: [relevant skills]
240
+ - Docs to reference: [relevant docs]
241
+ ```
242
+
243
+ **Key structuring principles:**
244
+
245
+ 1. **One PR per phase**: Each phase should be a self-contained PR that:
246
+ - Has a coherent, reviewable scope
247
+ - Includes its own tests (unit + integration as appropriate)
248
+ - Leaves the system in a working state when merged
249
+
250
+ 2. **Always shippable**: After each merged PR, the system must remain functional. Never leave the codebase in a broken state between phases.
251
+
252
+ 3. **Test per phase**: Every phase needs a **Test:** section describing acceptance criteria. This becomes the definition of "done" for that PR.
253
+
254
+ **Section guidelines:**
255
+
256
+ - **Goal**: Always include - this is the north star
257
+ - **Design Decisions**: Include if there are meaningful choices already made
258
+ - **Roadmap**: Include for bounded objectives - break into shippable phases (1 PR each typically)
259
+ - **Principles/Guidelines**: Include for perpetual objectives instead of a roadmap
260
+ - **Implementation Context**: Include for larger refactors where current/target state matters
261
+ - **Exploration Notes**: Include when you gathered valuable context during creation (inventories, research, reasoning). This is often the most valuable section for implementers
262
+ - **Related Documentation**: Include if specific skills or docs are relevant
263
+
264
+ **For perpetual objectives**, replace the Roadmap section with:
265
+
266
+ ```markdown
267
+ ## Principles
268
+
269
+ - [Guiding principle 1]
270
+ - [Guiding principle 2]
271
+
272
+ ## Current Focus
273
+
274
+ [What to prioritize right now - can be updated as the objective evolves]
275
+ ```
276
+
277
+ After showing the proposal, ask:
278
+
279
+ ```
280
+ Does this capture what you're thinking? I can adjust any section, add more detail
281
+ to the roadmap, or restructure the phases.
282
+ ```
283
+
284
+ ### Step 5: Iterate Until Approved
285
+
286
+ The user may:
287
+
288
+ - **Approve as-is**: Proceed to Step 6
289
+ - **Request changes**: Make the requested adjustments and show again
290
+ - **Add information**: Incorporate new details and show again
291
+ - **Restructure**: Reorganize phases/steps based on feedback
292
+
293
+ Continue iterating until the user approves.
294
+
295
+ ### Step 6: Write to Plan File and Create Issue
296
+
297
+ Once approved:
298
+
299
+ 1. **Write the objective to the session's plan file:**
300
+ - Get the plan file path from the session context
301
+ - Write the approved objective content to that file
302
+
303
+ 2. **Create the GitHub issue:**
304
+
305
+ ```bash
306
+ erk exec objective-save-to-issue --session-id=<session-id> --format=display
307
+ ```
308
+
309
+ 3. **Report success:**
310
+
311
+ ```
312
+ Objective created: #<number>
313
+ URL: <issue-url>
314
+
315
+ Next steps:
316
+ - Use /erk:objective-create-plan <number> to create implementation plans for specific steps
317
+ - Track progress by updating step status in the issue
318
+ ```
319
+
320
+ ---
321
+
322
+ ## Output Format
323
+
324
+ - **Start**: Single prompt asking what they want to accomplish
325
+ - **After description**: Ask for structure preference
326
+ - **After structure choice**: Show proposed structured objective
327
+ - **Iteration**: Show updated objective after each change
328
+ - **Success**: Issue number, URL, and next steps
329
+
330
+ ---
331
+
332
+ ## Differences from /erk:plan-save
333
+
334
+ | Feature | /erk:plan-save | /erk:objective-create |
335
+ | ---------------- | ------------------- | ------------------------------- |
336
+ | Label | `erk-plan` | `erk-plan` + `erk-objective` |
337
+ | Purpose | Implementation plan | Roadmap or perpetual focus area |
338
+ | Title suffix | `[erk-plan]` | None |
339
+ | Metadata block | Yes | No |
340
+ | Commands section | Yes | No |
341
+ | Body content | Metadata only | Objective directly |
342
+ | Input | Existing plan file | Interactive creation |
343
+
344
+ ---
345
+
346
+ ## Types of Objectives
347
+
348
+ **Bounded objectives** - Have a clear end state and roadmap:
349
+
350
+ - "Refactor GitHub gateway into facade pattern"
351
+ - "Add dark mode support"
352
+
353
+ **Perpetual objectives** - Ongoing areas of focus without a defined end:
354
+
355
+ - "Improve test coverage"
356
+ - "Documentation maintenance"
357
+ - "Performance optimization"
358
+
359
+ The structure adapts to the type - perpetual objectives may have principles/guidelines instead of a phased roadmap.
360
+
361
+ ---
362
+
363
+ ## Error Cases
364
+
365
+ | Scenario | Action |
366
+ | ---------------------------- | -------------------------------- |
367
+ | User provides no description | Re-prompt with examples |
368
+ | Not authenticated | Report GitHub auth error |
369
+ | Issue creation fails | Report API error, offer to retry |
370
+ | Plan file write fails | Report error with path |
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: List open objectives
3
+ ---
4
+
5
+ # /erk:objective-list
6
+
7
+ List all open objectives in the current repository.
8
+
9
+ ## Agent Instructions
10
+
11
+ ### Step 1: Fetch Open Objectives
12
+
13
+ Run:
14
+
15
+ ```bash
16
+ gh issue list --label "erk-objective" --state open --json number,title,createdAt --limit 50
17
+ ```
18
+
19
+ ### Step 2: Display Results
20
+
21
+ Format output as a markdown table:
22
+
23
+ | # | Title | Created |
24
+ | ---- | --------------------- | ------- |
25
+ | #123 | Objective: Feature X | 3d ago |
26
+ | #456 | Objective: Refactor Y | 1w ago |
27
+
28
+ If no objectives found, report: "No open objectives found."
29
+
30
+ ### Step 3: Suggest Next Steps
31
+
32
+ After listing, suggest:
33
+
34
+ - /erk:objective-create-plan <number> to start planning a step from an objective
@@ -0,0 +1,220 @@
1
+ ---
2
+ description: Create an implementation plan from an objective step
3
+ argument-hint: <issue-number-or-url>
4
+ ---
5
+
6
+ # /erk:objective-create-plan
7
+
8
+ Create an implementation plan for a specific step in an objective's roadmap.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ /erk:objective-create-plan 3679
14
+ /erk:objective-create-plan https://github.com/owner/repo/issues/3679
15
+ /erk:objective-create-plan # prompts for issue reference
16
+ ```
17
+
18
+ ---
19
+
20
+ ## Agent Instructions
21
+
22
+ ### Step 1: Parse Issue Reference
23
+
24
+ Parse `$ARGUMENTS` to extract the issue reference:
25
+
26
+ - If argument is a URL: extract issue number from path
27
+ - If argument is a number: use directly
28
+ - If no argument provided: try to get the default from pool.json (see below), then prompt if no default
29
+
30
+ **Getting default objective from pool.json:**
31
+
32
+ If no argument is provided, check if we're in a pool slot worktree with a last objective:
33
+
34
+ ```bash
35
+ erk exec slot-objective
36
+ ```
37
+
38
+ This returns JSON like:
39
+
40
+ ```json
41
+ { "objective_issue": 123, "slot_name": "erk-managed-wt-01" }
42
+ ```
43
+
44
+ Or if not in a slot or no objective:
45
+
46
+ ```json
47
+ { "objective_issue": null, "slot_name": null }
48
+ ```
49
+
50
+ If `objective_issue` is not null, use it as the default and inform the user: "Using objective #<number> from slot's last objective. Run with explicit argument to override."
51
+
52
+ If no default found or not in a pool slot, prompt user using AskUserQuestion with "What objective issue should I work from?"
53
+
54
+ ### Step 2: Fetch and Validate Issue
55
+
56
+ ```bash
57
+ gh issue view <issue-number> --json number,title,body,labels
58
+ ```
59
+
60
+ **Validate this is an objective:**
61
+
62
+ 1. Check for `erk-objective` label
63
+ 2. If label is `erk-plan` instead: report error "This is an erk-plan issue, not an objective. Use `/erk:plan-implement` instead."
64
+ 3. If neither label: warn but proceed
65
+
66
+ ### Step 2.5: Create Objective Context Marker
67
+
68
+ Create a marker to persist the objective issue number for the exit-plan-mode hook:
69
+
70
+ ```bash
71
+ erk exec marker create --session-id $CLAUDE_CODE_SESSION_ID \
72
+ --associated-objective <objective-number> objective-context
73
+ ```
74
+
75
+ Replace `<objective-number>` with the issue number from Step 2.
76
+
77
+ This enables the exit-plan-mode-hook to suggest the correct save command with `--objective-issue` automatically.
78
+
79
+ ### Step 3: Load Objective Skill
80
+
81
+ Load the `objective` skill for format templates and guidance.
82
+
83
+ ### Step 4: Parse Roadmap and Display Steps
84
+
85
+ Parse the objective body to extract roadmap steps. Look for markdown tables with columns like:
86
+
87
+ | Step | Description | Status | PR |
88
+
89
+ Extract all steps and display them to the user:
90
+
91
+ ```
92
+ Objective #<number>: <title>
93
+
94
+ Roadmap Steps:
95
+ [1] Step 1A.1: <description> (pending)
96
+ [2] Step 1A.2: <description> (pending)
97
+ [3] Step 1B.1: <description> (done, PR #123)
98
+ ...
99
+ ```
100
+
101
+ Show status indicators:
102
+
103
+ - `(pending)` - available to plan
104
+ - `(done, PR #XXX)` - already completed
105
+ - `(blocked)` - cannot be worked yet
106
+ - `(skipped)` - explicitly skipped
107
+
108
+ ### Step 5: Prompt User to Select Step
109
+
110
+ Use AskUserQuestion to ask which step to plan:
111
+
112
+ ```
113
+ Which step should I create a plan for?
114
+ - Step 1A.1: <description>
115
+ - Step 1A.2: <description>
116
+ - Step 1B.1: <description>
117
+ - (Other - specify step number or description)
118
+ ```
119
+
120
+ Only show steps that are `pending` or `blocked` (not already `done` or `skipped`).
121
+
122
+ If all steps are complete, report: "All roadmap steps are complete! Consider closing the objective."
123
+
124
+ ### Step 6: Gather Context for Planning
125
+
126
+ Before entering plan mode, gather relevant context:
127
+
128
+ 1. **Objective context:** Goal, design decisions, current focus
129
+ 2. **Step context:** What the specific step requires
130
+ 3. **Prior work:** Look at completed steps and their PRs for patterns
131
+
132
+ Use this context to inform the plan.
133
+
134
+ ### Step 7: Enter Plan Mode
135
+
136
+ Enter plan mode to create the implementation plan:
137
+
138
+ 1. Use the EnterPlanMode tool
139
+ 2. Focus the plan on the specific step selected
140
+ 3. Reference the parent objective in the plan
141
+
142
+ **Plan should include:**
143
+
144
+ - Reference to objective: `Part of Objective #<number>, Step <step-id>`
145
+ - Clear goal for this specific step
146
+ - Implementation phases (typically 1-3 for a single step)
147
+ - Files to modify
148
+ - Test requirements
149
+
150
+ ### Step 8: Save Plan with Objective Link
151
+
152
+ After the plan is approved in plan mode, the `exit-plan-mode-hook` will prompt to save or implement.
153
+
154
+ **If the objective-context marker was created in Step 2.5:**
155
+ The hook will automatically suggest the correct command with `--objective-issue=<objective-number>`. Simply follow the hook's suggestion.
156
+
157
+ **If the marker was not created (fallback):**
158
+ Use the objective-aware save command manually:
159
+
160
+ ```bash
161
+ /erk:plan-save --objective-issue=<objective-number>
162
+ ```
163
+
164
+ Replace `<objective-number>` with the objective issue number from Step 2.
165
+
166
+ This will:
167
+
168
+ - Create a GitHub issue with the erk-plan label
169
+ - Link it to the parent objective (stored in metadata)
170
+ - Enable objective-aware landing via `/erk:land`
171
+
172
+ ### Step 9: Verify Objective Link
173
+
174
+ After saving, verify the issue has the objective link:
175
+
176
+ ```bash
177
+ gh issue view <new-issue-number> --json body | grep -q "objective_issue"
178
+ ```
179
+
180
+ **If verification fails** (objective_issue not found in body):
181
+
182
+ The plan was saved without the objective link. Fix it by updating the issue body:
183
+
184
+ 1. Get current body: `gh issue view <issue-number> --json body -q '.body'`
185
+ 2. Add `objective_issue: <objective-number>` to the YAML metadata block
186
+ 3. Update: `gh issue edit <issue-number> --body "..."`
187
+
188
+ Or simply close the incorrectly-created issue and re-run Step 8 with the correct command.
189
+
190
+ ---
191
+
192
+ ## Output Format
193
+
194
+ - **Start:** "Loading objective #<number>..."
195
+ - **After parsing:** Display roadmap steps with status
196
+ - **After selection:** "Creating plan for step <step-id>: <description>"
197
+ - **In plan mode:** Show plan content
198
+ - **End:** Guide to `/erk:plan-save`
199
+
200
+ ---
201
+
202
+ ## Error Cases
203
+
204
+ | Scenario | Action |
205
+ | --------------------------------------- | ----------------------------------------------- |
206
+ | Issue not found | Report error and exit |
207
+ | Issue is erk-plan | Redirect to `/erk:plan-implement` |
208
+ | No pending steps | Report all steps complete, suggest closing |
209
+ | Invalid argument format | Prompt for valid issue number |
210
+ | Roadmap not parseable | Ask user to specify which step to plan |
211
+ | Verification fails (no objective_issue) | Fix issue body or recreate with correct command |
212
+
213
+ ---
214
+
215
+ ## Important Notes
216
+
217
+ - **Objective context matters:** Read the full objective for design decisions and lessons learned
218
+ - **One step at a time:** Each plan should focus on a single roadmap step
219
+ - **Link back:** Always reference the parent objective in the plan
220
+ - **Steelthread pattern:** If planning a Phase A step, focus on minimal vertical slice