issue-flow 0.3.4__tar.gz → 0.4.1__tar.gz

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 (69) hide show
  1. issue_flow-0.4.1/PKG-INFO +527 -0
  2. issue_flow-0.4.1/README.md +502 -0
  3. {issue_flow-0.3.4 → issue_flow-0.4.1}/pyproject.toml +2 -1
  4. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/__init__.py +1 -1
  5. issue_flow-0.4.1/src/issue_flow/agent.py +549 -0
  6. issue_flow-0.4.1/src/issue_flow/cli.py +328 -0
  7. issue_flow-0.4.1/src/issue_flow/config.py +220 -0
  8. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/dependencies.py +2 -3
  9. issue_flow-0.4.1/src/issue_flow/editors.py +145 -0
  10. issue_flow-0.4.1/src/issue_flow/gitutils.py +202 -0
  11. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/graphify.py +40 -12
  12. issue_flow-0.4.1/src/issue_flow/init.py +687 -0
  13. issue_flow-0.4.1/src/issue_flow/modes.py +385 -0
  14. issue_flow-0.4.1/src/issue_flow/modes.toml +46 -0
  15. issue_flow-0.3.4/src/issue_flow/templates/commands/issue-cleanup.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-cleanup.md.j2 +6 -6
  16. issue_flow-0.3.4/src/issue_flow/templates/commands/issue-close.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-close.md.j2 +20 -13
  17. issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-fix.md.j2 +86 -0
  18. issue_flow-0.3.4/src/issue_flow/templates/commands/graphify.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-graphify.md.j2 +6 -6
  19. issue_flow-0.3.4/src/issue_flow/templates/commands/issue-init.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-init.md.j2 +16 -7
  20. issue_flow-0.3.4/src/issue_flow/templates/commands/issue-pause.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-pause.md.j2 +5 -5
  21. issue_flow-0.3.4/src/issue_flow/templates/commands/issue-pick.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-pick.md.j2 +13 -13
  22. issue_flow-0.3.4/src/issue_flow/templates/commands/issue-plan.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-plan.md.j2 +22 -15
  23. issue_flow-0.3.4/src/issue_flow/templates/commands/issue-start.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-start.md.j2 +22 -12
  24. issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-status.md.j2 +80 -0
  25. issue_flow-0.3.4/src/issue_flow/templates/commands/issue-yolo.md.j2 → issue_flow-0.4.1/src/issue_flow/templates/commands/iflow-yolo.md.j2 +22 -21
  26. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/templates/commands/iflow.md.j2 +34 -27
  27. issue_flow-0.4.1/src/issue_flow/templates/docs/issue-workflow.md.j2 +359 -0
  28. issue_flow-0.4.1/src/issue_flow/templates/docs/this-project.md.j2 +32 -0
  29. issue_flow-0.4.1/src/issue_flow/templates/rules/AGENTS.md.j2 +1 -0
  30. issue_flow-0.4.1/src/issue_flow/templates/rules/CLAUDE.md.j2 +1 -0
  31. issue_flow-0.4.1/src/issue_flow/templates/rules/_body.md.j2 +215 -0
  32. issue_flow-0.4.1/src/issue_flow/templates/rules/issueflow-rules.mdc.j2 +8 -0
  33. issue_flow-0.4.1/src/issue_flow/templates/skills/caveman/SKILL.md.j2 +62 -0
  34. issue_flow-0.4.1/src/issue_flow/templates/skills/grill_me/SKILL.md.j2 +63 -0
  35. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_cleanup → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_cleanup}/SKILL.md.j2 +10 -10
  36. issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_close/SKILL.md.j2 +69 -0
  37. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_comments → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_comments}/SKILL.md.j2 +5 -5
  38. issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_fix/SKILL.md.j2 +64 -0
  39. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_graphify → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_graphify}/SKILL.md.j2 +9 -9
  40. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_history_update → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_history_update}/SKILL.md.j2 +11 -11
  41. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_iflow → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_iflow}/SKILL.md.j2 +28 -18
  42. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_init → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_init}/SKILL.md.j2 +17 -8
  43. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_pause → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_pause}/SKILL.md.j2 +9 -9
  44. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_pick → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_pick}/SKILL.md.j2 +11 -11
  45. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_plan → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_plan}/SKILL.md.j2 +26 -15
  46. issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_start/SKILL.md.j2 +60 -0
  47. issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_status/SKILL.md.j2 +54 -0
  48. issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_version_bump/SKILL.md.j2 +67 -0
  49. {issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_yolo → issue_flow-0.4.1/src/issue_flow/templates/skills/iflow_yolo}/SKILL.md.j2 +13 -13
  50. issue_flow-0.4.1/src/issue_flow/templates/tools/README.md.j2 +29 -0
  51. issue_flow-0.4.1/src/issue_flow/templating.py +229 -0
  52. issue_flow-0.4.1/src/issue_flow/tracking.py +265 -0
  53. issue_flow-0.3.4/PKG-INFO +0 -288
  54. issue_flow-0.3.4/README.md +0 -264
  55. issue_flow-0.3.4/src/issue_flow/cli.py +0 -125
  56. issue_flow-0.3.4/src/issue_flow/config.py +0 -87
  57. issue_flow-0.3.4/src/issue_flow/init.py +0 -301
  58. issue_flow-0.3.4/src/issue_flow/templates/docs/cursor-issue-workflow.md.j2 +0 -291
  59. issue_flow-0.3.4/src/issue_flow/templates/rules/issueflow-rules.mdc.j2 +0 -137
  60. issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_close/SKILL.md.j2 +0 -62
  61. issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_issue_start/SKILL.md.j2 +0 -50
  62. issue_flow-0.3.4/src/issue_flow/templates/skills/issueflow_version_bump/SKILL.md.j2 +0 -41
  63. issue_flow-0.3.4/src/issue_flow/templating.py +0 -142
  64. {issue_flow-0.3.4 → issue_flow-0.4.1}/LICENSE +0 -0
  65. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/py.typed +0 -0
  66. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/templates/__init__.py +0 -0
  67. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/templates/commands/__init__.py +0 -0
  68. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/templates/docs/__init__.py +0 -0
  69. {issue_flow-0.3.4 → issue_flow-0.4.1}/src/issue_flow/templates/rules/__init__.py +0 -0
@@ -0,0 +1,527 @@
1
+ Metadata-Version: 2.4
2
+ Name: issue-flow
3
+ Version: 0.4.1
4
+ Summary: Agents should behave. Let them follow the issue flow.
5
+ Keywords: cursor,ai,agents,issue-tracking,workflow
6
+ Author: jepegit
7
+ Author-email: jepegit <jepe@ife.no>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Topic :: Software Development :: Build Tools
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Requires-Dist: jinja2>=3.1.6
16
+ Requires-Dist: python-dotenv>=1.2.2
17
+ Requires-Dist: rich>=14.3.3
18
+ Requires-Dist: tomlkit>=0.15.0
19
+ Requires-Dist: typer>=0.24.1
20
+ Requires-Python: >=3.13
21
+ Project-URL: Homepage, https://github.com/jepegit/issue-flow
22
+ Project-URL: Repository, https://github.com/jepegit/issue-flow
23
+ Project-URL: Issues, https://github.com/jepegit/issue-flow/issues
24
+ Description-Content-Type: text/markdown
25
+
26
+ # issue-flow
27
+
28
+ Agents should behave. Let them follow the issue flow.
29
+
30
+ **issue-flow** scaffolds a lightweight issue-tracking workflow into your project so that AI coding agents can pick up GitHub issues, plan work, and land PRs in a consistent way. It supports **Cursor, Claude Code, opencode, and Codex** via `--editor` (see [Editor support](#editor-support)); the examples below use the default, Cursor.
31
+
32
+ ## What it does
33
+
34
+ Running `issue-flow init` in your project root creates:
35
+
36
+ ```text
37
+ your-project/
38
+ .issueflows/
39
+ 00-tools/ # Helper scripts for agents
40
+ 01-current-issues/ # Active issue markdown files
41
+ 02-partly-solved-issues/ # Parked / in-progress issues
42
+ 03-solved-issues/ # Completed issues archive
43
+ 04-designs-and-guides/ # Durable project context and decisions
44
+ this-project.md # Hand-editable project brief (created if missing)
45
+ .cursor/
46
+ skills/ # Agent Skills (explicit / @ invoke; shown in slash menu)
47
+ iflow-pick/SKILL.md
48
+ iflow/SKILL.md
49
+ iflow-init/SKILL.md
50
+ iflow-plan/SKILL.md
51
+ iflow-start/SKILL.md
52
+ iflow-pause/SKILL.md
53
+ iflow-close/SKILL.md
54
+ iflow-cleanup/SKILL.md
55
+ iflow-yolo/SKILL.md
56
+ iflow-fix/SKILL.md
57
+ iflow-status/SKILL.md
58
+ iflow-version-bump/SKILL.md
59
+ iflow-history-update/SKILL.md
60
+ iflow-graphify/SKILL.md
61
+ rules/
62
+ issueflow-rules.mdc # Always-on Cursor rule for the workflow
63
+ AGENTS.md # Workflow rules (managed block; shared by all editors)
64
+ docs/
65
+ issue-workflow.md # Human-readable overview of the workflow
66
+ ```
67
+
68
+ The exact `agent_dir` and the per-editor rules file depend on which editor(s) you scaffold for — see [Editor support](#editor-support). `AGENTS.md` (written as a non-destructive managed block), `.issueflows/04-designs-and-guides/this-project.md` (a hand-editable project brief created only when missing), and `docs/issue-workflow.md` are shared by every editor.
69
+
70
+ The Cursor Agent Skills give agents a repeatable flow and appear in the slash menu. The linear path is:
71
+
72
+ 1. `/iflow-init 42` — pulls GitHub issue #42 into `.issueflows/01-current-issues/` and archives older issues.
73
+ 2. `/iflow-plan` — drafts `issue<N>_plan.md` (Goal / Constraints / Approach / Files to touch / Test strategy / Open questions) and stops for your confirmation.
74
+ 3. `/iflow-start` — reads the confirmed plan and implements it. If no plan file exists, it offers to run `/iflow-plan` first, proceed without a plan, or abort.
75
+ 4. `/iflow-close` — runs tests, optionally bumps version with `uv version --bump`, appends a `HISTORY.md` entry (or promotes `[Unreleased]` to a new release section on a bump), updates status files, commits, pushes, and opens a PR.
76
+ 5. `/iflow-cleanup` — after the PR merges, switches to the default branch, fast-forwards, prunes, and deletes the merged local branch.
77
+
78
+ Plus a few off-path commands:
79
+
80
+ - `/iflow-pick` — **front door**: when you haven't chosen an issue yet, it helps pick one (parked work in `02-partly-solved-issues/` first, else open GitHub issues ranked by milestone, labels, and similarity to recently solved work), creates the `<N>-slug` branch, and runs `/iflow-init`. Pass `fix` to create a new general-fixes issue. Off-path; never auto-dispatched.
81
+ - `/iflow` — **quick start**: inspects the current issue's state and dispatches to the right linear step automatically. A branch-derived number (`42-fix-login` → `N=42`) is authoritative, so `/iflow` works from a fresh branch too.
82
+ - `/iflow-pause` — park the current issue in `02-partly-solved-issues/` with a **Remaining work** note; optional WIP commit + switch back to the default branch.
83
+ - `/iflow-yolo` — all-in-one chain (`init → plan → start → close`) for small, low-risk issues, with up-front safeguards (refuses on the default branch, refuses with dirty unrelated changes, requires passing tests, single consolidated confirm).
84
+ - `/iflow-fix` — interactive iterative-fixes session: creates one GitHub issue + long-lived branch, then loops over many small fixes (each gets a short plan, implemented only on confirmation and recorded in `issue<N>_status.md`), ending with `/iflow-close`. Coexists with `/iflow-pick fix` (the one-shot setup). Off-path; never auto-dispatched.
85
+ - `/iflow-status` — **read-only** overview of where every issue stands: the local tracking state (focus / parked / solved) plus open GitHub issues cross-referenced against it. Pass `local` to skip the GitHub query. Changes nothing; off-path; never auto-dispatched.
86
+
87
+ The **Agent Skills** under `.cursor/skills/` carry the workflows for on-demand use with `/iflow-pick`, `/iflow`, `/iflow-init`, `/iflow-plan`, `/iflow-start`, `/iflow-pause`, `/iflow-close`, `/iflow-cleanup`, `/iflow-yolo`, `/iflow-fix`, `/iflow-status`, `@iflow-version-bump` when you need only the bump steps, or `@iflow-history-update` when you need only the changelog update (see [Cursor Agent Skills](https://cursor.com/help/customization/skills)).
88
+
89
+ ## Prerequisites
90
+
91
+ issue-flow itself is a small Python CLI, but the **scaffolded commands and skills
92
+ it writes into your project shell out to a few external tools**. If they are
93
+ missing, the workflows will fail at runtime — so `issue-flow init` now
94
+ checks for them up front and prints install hints before it does anything.
95
+
96
+ Required:
97
+
98
+ - **[Git](https://git-scm.com/downloads)** — used by every slash command for
99
+ branch, fetch, status, commit, and push operations. Almost certainly already
100
+ installed if you're here, but the check covers it for completeness.
101
+ - **[GitHub CLI (`gh`)](https://cli.github.com/)** — used by `/iflow-init` to
102
+ fetch issues, by `/iflow-close` to open PRs, and by `/iflow-cleanup` to check
103
+ PR merge status. After installing, run `gh auth login` once to authenticate.
104
+
105
+ Recommended:
106
+
107
+ - **[uv](https://docs.astral.sh/uv/)** — how issue-flow itself is meant to be
108
+ installed, and how this repo manages its own Python environment.
109
+
110
+ Quick install pointers for `gh`:
111
+
112
+
113
+ | Platform | Command |
114
+ | --------------------- | ---------------------------------------------------------------------------------------------- |
115
+ | macOS (Homebrew) | `brew install gh` |
116
+ | Windows (winget) | `winget install --id GitHub.cli -e` |
117
+ | Linux (Debian/Ubuntu) | `sudo apt install gh` (or see [cli.github.com](https://cli.github.com/) for the official repo) |
118
+
119
+
120
+ If a dependency is missing, `issue-flow init` prints the installation hints
121
+ and asks whether to continue anyway. You can bypass the prompt in automation
122
+ with `issue-flow init --skip-dep-check` (the same flag is available on
123
+ `issue-flow update`), and the prompt is also auto-skipped when stdin is not
124
+ a TTY (e.g. CI pipelines).
125
+
126
+ ### Optional: graphify integration
127
+
128
+ issue-flow has a lightweight integration with [graphify](https://iflow-graphify.net)
129
+ (PyPI: `graphifyy`, CLI: `graphify`) — a tool that turns the project into a
130
+ queryable knowledge graph that AI assistants can read instead of grepping
131
+ through files. The integration is **opt-in by installing `graphifyy` as its
132
+ own tool** (the same way you installed issue-flow): there is no enable flag and
133
+ no extras to remember — detection is purely PATH-based. (You *can* keep an LLM
134
+ API key in `.env` for the optional `extract` pass; see below.)
135
+
136
+ What `issue-flow` does when `graphify` is on PATH:
137
+
138
+ - `issue-flow init` and `issue-flow update` run `graphify cursor install` so
139
+ the graphify Cursor skill is registered alongside the issue-flow scaffold.
140
+ If graphify is not installed, both commands just print install hints and
141
+ continue — they never block.
142
+ - A new `/iflow-graphify` entry point (skill on Cursor/Codex, command + skill
143
+ for command-emitting editors) wraps
144
+ `issue-flow graphify`. With no extra args it runs `graphify update <project>`
145
+ — AST-only, **no LLM API key required**, so the no-arg case "just works".
146
+ For richer semantic relationships add `extract` (`issue-flow graphify extract`)
147
+ and configure a backend (`GEMINI_API_KEY`, `ANTHROPIC_API_KEY`,
148
+ `OPENAI_API_KEY`, `MOONSHOT_API_KEY`, or `--backend ollama` for a local
149
+ LLM). You can set that key in the project `.env` — `issue-flow graphify`
150
+ loads `.env` from the project root before invoking graphify — or export it in
151
+ your shell environment. Cursor's own LLM is not available to subprocesses, so
152
+ graphify needs its own backend. Other subcommands (`watch`, `cluster-only`, …)
153
+ pass through too; trailing flags forward verbatim.
154
+ - The scaffolded rules and `/iflow-start` mention `graphify-out/GRAPH_REPORT.md`
155
+ as a recommended pre-read when the file exists. `/iflow-graphify` is **off-path** —
156
+ `/iflow` never auto-dispatches to it.
157
+
158
+ To enable, install graphify as its own standalone tool:
159
+
160
+ ```bash
161
+ uv tool install graphifyy # recommended
162
+ # or
163
+ pipx install graphifyy
164
+ # or
165
+ pip install graphifyy
166
+ ```
167
+
168
+ > **Why not an `issue-flow[graphify]` extra (or `uv tool install issue-flow --with graphifyy`)?**
169
+ > `uv tool install` only puts the **host package's** entry-point scripts on
170
+ > PATH. An extra (or `--with graphifyy`) pulls graphifyy into issue-flow's
171
+ > venv but leaves the `graphify` CLI invisible to the shell, so `/iflow-graphify`
172
+ > and `graphify cursor install` would still fail. Installing graphify as
173
+ > its own tool puts a real `graphify` shim on PATH and matches how we
174
+ > treat `git` / `gh`.
175
+
176
+ > **Just installed graphifyy and `issue-flow init` says it's still missing?**
177
+ > uv prints `~/.local/bin is not on your PATH` after the first
178
+ > `uv tool install`. Run `uv tool update-shell` (refreshes shell rc files),
179
+ > then **restart your shell and Cursor** so the new PATH takes effect.
180
+ > issue-flow's missing-CLI hint also detects this case and tells you the
181
+ > exact directory to add.
182
+
183
+ After installing, run `issue-flow update` once so the graphify Cursor skill
184
+ gets registered.
185
+
186
+ ## Installation
187
+
188
+ Requires Python 3.13+ and [uv](https://docs.astral.sh/uv/).
189
+
190
+ ```bash
191
+ uv tool install issue-flow
192
+ ```
193
+
194
+ Or add it as a dev dependency to your project:
195
+
196
+ ```bash
197
+ uv add --dev issue-flow
198
+ ```
199
+
200
+ ## Quick start
201
+
202
+ ```bash
203
+ cd your-project
204
+ issue-flow init
205
+ ```
206
+
207
+ That's it. Open the project in Cursor and start with `/iflow` (or step through `/iflow-init`, `/iflow-plan`, `/iflow-start`, `/iflow-close`, `/iflow-cleanup` explicitly).
208
+
209
+ ## Usage
210
+
211
+ ```
212
+ issue-flow init [PROJECT_DIR] [--force] [--skip-dep-check] [--editor EDITOR] [--mode MODE]
213
+ issue-flow update [PROJECT_DIR] [--skip-dep-check] [--editor EDITOR]
214
+ issue-flow graphify [-C PROJECT_DIR] [...graphify subcommand + args]
215
+ issue-flow status [PROJECT_DIR] [--local] [--json]
216
+ issue-flow agent state [PROJECT_DIR] [--json]
217
+ issue-flow agent preflight [PROJECT_DIR] [--json]
218
+ issue-flow agent sweep [PROJECT_DIR] [--except N] [--dry-run] [--json]
219
+ issue-flow agent capture N [-C PROJECT_DIR] [--repo OWNER/REPO] [--force] [--json]
220
+ ```
221
+
222
+ ### `issue-flow init`
223
+
224
+
225
+ | Argument / Option | Description |
226
+ | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
227
+ | `PROJECT_DIR` | Project root directory. Defaults to `.` (current directory). |
228
+ | `--force`, `-f` | Overwrite generated commands, rules, and workflow doc instead of skipping them. |
229
+ | `--skip-dep-check` | Skip the external-CLI dependency check (`git`, `gh`) and the confirmation prompt that follows if anything is missing. Useful in automation. |
230
+ | `--editor`, `-e` | AI coding tool(s) to scaffold for: `cursor` (default), `claude`, `opencode`, `codex`, or `all`. Repeatable (`-e cursor -e claude`). See [Editor support](#editor-support). |
231
+ | `--mode`, `-m` | Scaffolding mode — which workflow surfaces to install: `standard` (default, full workflow) or `simple` (markdown-only lifecycle). Persisted to `.issueflows/config.toml`; `update` honours it. See [Modes](#modes). |
232
+
233
+
234
+ Running `init` again without `--force` is safe: generated scaffold files that already exist are skipped, and **issue markdown under `.issueflows/` is never touched** by `init` or `update`. The project brief at `.issueflows/04-designs-and-guides/this-project.md` is also user-owned: `init` creates it only when missing, even with `--force`. When the CLI detects an existing scaffold, it reminds you about `update` and `--force`.
235
+
236
+ ### `issue-flow update`
237
+
238
+
239
+ | Argument / Option | Description |
240
+ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
241
+ | `PROJECT_DIR` | Project root directory. Defaults to `.` (current directory). |
242
+ | `--skip-dep-check` | Skip the external-CLI dependency check (`git`, `gh`) and the confirmation prompt that follows if anything is missing. |
243
+ | `--editor`, `-e` | AI coding tool(s) to refresh for: `cursor` (default), `claude`, `opencode`, `codex`, or `all`. Repeatable. See [Editor support](#editor-support). |
244
+
245
+
246
+ Use `update` after upgrading the **issue-flow** package to refresh the packaged skills, command files where supported, rules file(s), and `docs/issue-workflow.md` from the version you have installed. This **overwrites** those generated files (unlike a plain second `init`) and prunes retired generated command/skill files. It still does not modify arbitrary files under `.issueflows/` (for example your `issue*_original.md` / `issue*_status.md` files), and it creates any **new** `.issueflows/` subdirectories required by the current package. If `.issueflows/04-designs-and-guides/this-project.md` is missing, `update` recreates the starter brief; if it exists, user content is preserved. `update` also respects the project's persisted [mode](#modes): it refreshes only that mode's surfaces (and prunes any that the mode excludes). To change mode, re-run `issue-flow init --mode <id>`.
247
+
248
+ ### `issue-flow graphify`
249
+
250
+
251
+ | Argument / Option | Description |
252
+ | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
253
+ | `-C`, `--project-dir` | Project root directory to scan with graphify. Defaults to `.` (current directory). Modeled on `git -C` so positional args can flow into graphify untouched. |
254
+ | `...graphify subcommand + args` | Optional graphify subcommand + flags. With no extras runs `graphify update <PROJECT_DIR>` — AST-only, **no LLM API key required**. The first extra arg, if it is a recognized build subcommand (`update`, `extract`, `watch`, `cluster-only`, `check-update`), picks the action; trailing tokens forward verbatim. Examples: `issue-flow graphify extract` (semantic LLM pass; needs `GEMINI_API_KEY` / `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` / `MOONSHOT_API_KEY` or `--backend ollama`), `issue-flow graphify cluster-only --no-viz`, `issue-flow graphify ./subdir`. |
255
+
256
+
257
+ `graphify` requires `graphifyy` to be installed (`uv tool install graphifyy`). When the `graphify` CLI is missing, the command prints install hints and exits with code `2`. Outputs land in `graphify-out/` (`graph.html`, `GRAPH_REPORT.md`, `graph.json`).
258
+
259
+ ### `issue-flow status`
260
+
261
+ A **read-only** overview of where every issue stands — the same picture the
262
+ `/iflow-status` skill produces, but computed deterministically in Python. It
263
+ reports the focus issue and its lifecycle stage, parked work, the solved-issue
264
+ count, and (unless `--local`) open GitHub issues cross-referenced against your
265
+ local `.issueflows/` folders.
266
+
267
+
268
+ | Argument / Option | Description |
269
+ | ----------------- | --------------------------------------------------------------------------------- |
270
+ | `PROJECT_DIR` | Project root directory. Defaults to `.` (current directory). |
271
+ | `--local` | Skip the GitHub query; report only the local `.issueflows/` state. |
272
+ | `--json` | Emit a machine-readable JSON object instead of the human-readable text report. |
273
+
274
+
275
+ A missing or unauthenticated `gh` never fails the command — the GitHub section
276
+ is simply skipped and noted.
277
+
278
+ ### `issue-flow agent ...`
279
+
280
+ The `agent` sub-app exposes the deterministic, mechanical building blocks the
281
+ scaffolded skills repeat over and over, so an AI agent can ask the tool for an
282
+ answer (ideally with `--json`) instead of re-deriving lifecycle state by hand.
283
+ The scaffolded skills/commands use these as an **optional fast path** and fall
284
+ back to their manual steps when the CLI is not installed, so nothing breaks if a
285
+ project never installs `issue-flow`.
286
+
287
+
288
+ | Command | What it does |
289
+ | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------- |
290
+ | `agent state` | Resolve the focus issue (branch-derived number wins, else the single current group), its lifecycle stage (`init`/`plan`/`start`/`close`), and the suggested next command. |
291
+ | `agent preflight` | Branch hygiene report: default branch, clean/dirty working tree, ahead/behind vs `origin/<default>`, and a stale-branch flag when the issue is already archived. Runs `git fetch --prune` first. |
292
+ | `agent sweep` | Archive `issue<N>_*` groups out of `01-current-issues/` to `03-solved-issues/` (Done) or `02-partly-solved-issues/` (not Done). Use `--except N` to keep the focus issue and `--dry-run` to preview. |
293
+ | `agent capture N` | Fetch GitHub issue `N` with `gh` and write `issue<N>_original.md` (the `## Original issue text` body). Prints the comments payload so the agent can triage them; comment triage stays agent-side. Use `--repo`, `--force`, `-C`. |
294
+
295
+
296
+ All `agent` commands accept `--json` and degrade gracefully: read-only commands
297
+ never hard-fail when `git`/`gh` is missing (they return partial data with a
298
+ note), while `agent capture` needs `gh` and exits non-zero with a hint when it
299
+ is unavailable or the fetch fails.
300
+
301
+ ### When to use which
302
+
303
+
304
+ | Goal | Command |
305
+ | -------------------------------------------------------------------- | ------------------------- |
306
+ | First-time setup, or add missing files only | `issue-flow init` |
307
+ | Pull newer templates after `uv tool upgrade issue-flow` (or similar) | `issue-flow update` |
308
+ | Replace generated scaffolds without upgrading logic | `issue-flow init --force` |
309
+ | Rebuild the graphify knowledge graph | `issue-flow graphify` |
310
+ | See where every issue stands (focus / parked / solved / GitHub) | `issue-flow status` |
311
+ | Let an agent resolve lifecycle state / sweep / capture deterministically | `issue-flow agent ...` |
312
+
313
+
314
+ ## Modes
315
+
316
+ A **mode** selects which workflow surfaces (skills / slash commands) `init`
317
+ installs, so you can scaffold a lighter workflow when the full lifecycle is more
318
+ than you need. Two modes ship built in:
319
+
320
+ | Mode | What you get |
321
+ | --- | --- |
322
+ | `standard` (default) | The full workflow: planning, PRs, history, cleanup, graphify, and all helpers. |
323
+ | `simple` | A markdown-only lifecycle (capture, plan, implement, park, status). No PR/cleanup/yolo/fix/graphify automation. |
324
+
325
+ ```bash
326
+ issue-flow init --mode simple
327
+ ```
328
+
329
+ The chosen mode is **persisted** to `.issueflows/config.toml`
330
+ (`[issueflow].mode`), so `issue-flow update` refreshes exactly that mode's
331
+ surfaces. `update` never changes the mode — switch by re-running `init --mode
332
+ <id>` (which also prunes the surfaces the new mode drops). The active mode
333
+ resolves in this order: **`--mode` (CLI, on `init`)** > **`.issueflows/config.toml`**
334
+ (the persisted choice) > **`ISSUEFLOW_MODE`** (env, a fallback for projects that
335
+ haven't persisted a mode) > **`standard`**. The persisted choice deliberately
336
+ beats the environment, so a stray `ISSUEFLOW_MODE` can't silently override your
337
+ project's mode on `update`.
338
+
339
+ **Custom modes.** A project can define its own modes in
340
+ `.issueflows/config.toml` using `[modes.<id>]` tables — either explicit
341
+ `skills`/`commands` lists or `extends` + `add`/`remove` to compose on top of a
342
+ built-in mode (a mode may reference any surface issue-flow ships):
343
+
344
+ ```toml
345
+ [issueflow]
346
+ mode = "mine"
347
+
348
+ [modes.mine]
349
+ name = "Mine"
350
+ extends = "simple"
351
+ add = ["iflow_graphify"]
352
+ ```
353
+
354
+ **Caveman skill.** The `standard` mode also installs an optional `caveman` Agent
355
+ Skill (`<agent_dir>/skills/caveman/`) — a terse, "token-greedy" response style
356
+ that keeps technical substance but drops filler. It is off by default and only
357
+ activates when you ask for it ("caveman" / "token greedy"); turn it off with
358
+ "stop caveman" or "normal mode". The lightweight `simple` mode omits it.
359
+
360
+ To make caveman **on by default for a project**, set `caveman_default = true`
361
+ under `[issueflow]` in `.issueflows/config.toml` and re-run `issue-flow update`:
362
+
363
+ ```toml
364
+ [issueflow]
365
+ caveman_default = true
366
+ ```
367
+
368
+ This renders an always-on caveman pointer into the managed rule body (so the
369
+ always-applied rule re-arms it every session); you can still drop it for the rest
370
+ of a session with "stop caveman" / "normal mode". The flag is only honored when
371
+ the `caveman` skill is part of the active mode. It resolves in the order
372
+ `config.toml` > `ISSUEFLOW_CAVEMAN_DEFAULT` (env) > `false`; the persisted value
373
+ beats the env var so a stray env can't flip it on `update`.
374
+
375
+ **Grill-me skill.** The `standard` mode also installs a `grill-me` Agent Skill
376
+ (`<agent_dir>/skills/grill-me/`) — a relentless planning interview that
377
+ stress-tests a plan or design (one question at a time, each with a recommended
378
+ answer) until every branch of the decision tree is resolved, then feeds the
379
+ conclusions into `issue<N>_plan.md`. It is off by default and only activates when
380
+ you ask for it ("grill me"); turn it off with "stop grilling" or "normal mode".
381
+ The lightweight `simple` mode omits it.
382
+
383
+ To make grilling **on by default during planning for a project**, set
384
+ `grill_me_default = true` under `[issueflow]` in `.issueflows/config.toml` and
385
+ re-run `issue-flow update`:
386
+
387
+ ```toml
388
+ [issueflow]
389
+ grill_me_default = true
390
+ ```
391
+
392
+ This renders an always-on grill-me pointer into the managed rule body and the
393
+ `/iflow-plan` skill, so planning starts with a grilling pass every session; you
394
+ can still drop it for the rest of a session with "stop grilling" / "normal mode".
395
+ The flag is only honored when the `grill_me` skill is part of the active mode. It
396
+ resolves in the order `config.toml` > `ISSUEFLOW_GRILL_ME_DEFAULT` (env) >
397
+ `false`; the persisted value beats the env var so a stray env can't flip it on
398
+ `update`.
399
+
400
+
401
+ ## Editor support
402
+
403
+ issue-flow can scaffold its workflow for several AI coding tools. Pass one or
404
+ more `--editor` values (repeatable, or `all`) to `init` / `update`; the default
405
+ is `cursor`, so existing setups are unchanged.
406
+
407
+ ```bash
408
+ issue-flow init # Cursor (default)
409
+ issue-flow init --editor claude # Claude Code
410
+ issue-flow init -e cursor -e claude # both
411
+ issue-flow init --editor all # every supported editor
412
+ ```
413
+
414
+ **Agent Skills** (`<agent_dir>/skills/<name>/SKILL.md`) are the portable core —
415
+ every editor gets the full set. **`AGENTS.md`** is the convergent rules file and
416
+ is written for every editor as a non-destructive *managed block* (issue-flow
417
+ only ever owns the content between its markers, so a hand-maintained `AGENTS.md`
418
+ is preserved). Slash commands and an editor-specific rules file are layered on
419
+ top where the tool supports them.
420
+
421
+
422
+ | Editor | `agent_dir` | Slash commands | Skills | Extra rules file | `AGENTS.md` | graphify auto-register |
423
+ | ----------- | ------------ | -------------- | ------ | ----------------------------------- | ----------- | ---------------------- |
424
+ | Cursor | `.cursor/` | — (use skills) | yes | `.cursor/rules/issueflow-rules.mdc` | yes | yes |
425
+ | Claude Code | `.claude/` | `commands/` | yes | `CLAUDE.md` | yes | no |
426
+ | opencode | `.opencode/` | `command/` | yes | — | yes | no |
427
+ | Codex | `.codex/` | — (use skills) | yes | — | yes | no |
428
+
429
+
430
+ Cursor and Codex use skills as their primary slash-menu surface, so you invoke
431
+ the mirrored skills (e.g. `/iflow-init`) instead of separate files under
432
+ `commands/`. `issue-flow update` removes known generated `.cursor/commands/`
433
+ files during the Cursor migration but preserves unrelated user commands. The
434
+ graphify integration currently registers only with Cursor; other editors still
435
+ get the `/iflow-graphify` command/skill where applicable but no automatic
436
+ `graphify cursor install`.
437
+
438
+ ## Configuration
439
+
440
+ issue-flow reads a `.env` file from the project root (.via python-dotenv). `issue-flow init` **creates a starter `.env` when one is missing** (all `ISSUEFLOW_*` lines written commented-out, so nothing is overridden until you uncomment). It never replaces an existing `.env` — not even with `--force`; on later runs it only *appends* commented hints for any `ISSUEFLOW_*` keys you don't already have. `issue-flow update` does not touch `.env` at all. The following environment variables are supported:
441
+
442
+
443
+ | Variable | Default | Description |
444
+ | ------------------------ | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
445
+ | `ISSUEFLOW_DIR` | `.issueflows` | Name of the issue-tracking directory. |
446
+ | `ISSUEFLOW_EDITOR` | `cursor` | Default editor profile when `--editor` is not passed (`cursor`, `claude`, `opencode`, `codex`). |
447
+ | `ISSUEFLOW_AGENT_DIR` | *(per editor)* | Override the agent/IDE config directory. When unset it is derived from the editor profile (e.g. `.cursor`, `.claude`, `.opencode`, `.codex`). |
448
+ | `ISSUEFLOW_DOCS_DIR` | `docs` | Where to write the workflow documentation file. |
449
+ | `ISSUEFLOW_HISTORY_FILE` | `HISTORY.md` | Changelog file that `/iflow-close` updates (set to e.g. `CHANGELOG.md` for different conventions). |
450
+ | `ISSUEFLOW_MODE` | `standard` | Fallback [scaffolding mode](#modes) when none is persisted in `.issueflows/config.toml`. The canonical store is `config.toml` (written by `init --mode`), which **takes precedence over this env var**. Full order: `--mode` (CLI) > `config.toml` > `ISSUEFLOW_MODE` > `standard`. |
451
+ | `ISSUEFLOW_CAVEMAN_DEFAULT` | `false` | Fallback for the [always-on caveman](#modes) toggle when `[issueflow].caveman_default` is not persisted in `.issueflows/config.toml`. The persisted value takes precedence. Full order: `config.toml` > `ISSUEFLOW_CAVEMAN_DEFAULT` > `false`. Only honored when the `caveman` skill is in the active mode. |
452
+ | `ISSUEFLOW_GRILL_ME_DEFAULT` | `false` | Fallback for the [grill-me-during-planning](#modes) toggle when `[issueflow].grill_me_default` is not persisted in `.issueflows/config.toml`. The persisted value takes precedence. Full order: `config.toml` > `ISSUEFLOW_GRILL_ME_DEFAULT` > `false`. Only honored when the `grill_me` skill is in the active mode. |
453
+
454
+ Beyond the `ISSUEFLOW_*` settings above, `issue-flow graphify` also reads an LLM
455
+ API key from `.env` when present (`GEMINI_API_KEY`, `ANTHROPIC_API_KEY`,
456
+ `OPENAI_API_KEY`, or `MOONSHOT_API_KEY`) and passes it through to the
457
+ `graphify extract` semantic pass. The no-arg `graphify update` build is
458
+ AST-only and needs no key.
459
+
460
+ ### Creating `config.toml`
461
+
462
+ `init --mode <id>` is the usual way `.issueflows/config.toml` first appears, but
463
+ you can also materialize a fully-commented file on demand:
464
+
465
+ ```bash
466
+ issue-flow config add # create .issueflows/config.toml if missing
467
+ issue-flow config add --force # regenerate its [issueflow] keys in place
468
+ ```
469
+
470
+ It writes the three keys issue-flow actually reads from `config.toml` — `mode`,
471
+ `caveman_default`, `grill_me_default` — taking each value from its `ISSUEFLOW_*`
472
+ env var / `.env` when set, otherwise the issue-flow default (`standard`,
473
+ `false`, `false`). The other `ISSUEFLOW_*` settings are **environment-only** and
474
+ are deliberately *not* written to `config.toml` (putting them there would have no
475
+ effect). An existing file is left untouched unless `--force` is passed, in which
476
+ case the three keys are upserted while your comments and `[modes.*]` tables are
477
+ preserved. After changing `caveman_default` / `grill_me_default`, re-run
478
+ `issue-flow update` so the always-on rule re-renders. Pass `--json` for a
479
+ machine-readable result.
480
+
481
+
482
+ ## Development
483
+
484
+ ```bash
485
+ git clone https://github.com/jepegit/issue-flow.git
486
+ cd issue-flow
487
+ uv sync
488
+
489
+ # Run tests
490
+ uv run pytest
491
+
492
+ # Lint
493
+ uv run ruff check src/ tests/
494
+ ```
495
+
496
+ ## Changelog
497
+
498
+ See [HISTORY.md](HISTORY.md) for release notes.
499
+
500
+ ## Future plans
501
+
502
+ - **More editors** — extend `--editor` coverage to further AI coding tools (e.g. Windsurf) on top of the current Cursor / Claude Code / opencode / Codex support.
503
+ - **Custom templates** — let users supply their own Jinja2 templates to tailor slash commands and rules to their team's conventions.
504
+ - **Git hook integration** — optionally move issue files on commit based on status markers.
505
+ - **GitHub Actions workflow** — ship a reusable action that syncs issue state between `.issueflows/` and GitHub issue labels/milestones.
506
+
507
+ ## Acknowledgements
508
+
509
+ issue-flow builds on and takes inspiration from other people's open-source work.
510
+ Thanks to the authors and communities behind these projects:
511
+
512
+ | Project | How issue-flow uses it | License |
513
+ | --- | --- | --- |
514
+ | [JuliusBrussee/caveman](https://github.com/JuliusBrussee/caveman) | Inspiration for the bundled `caveman` Agent Skill (terse, token-greedy response style). Our version is a trimmed adaptation — full intensity only, English only. | [MIT](https://github.com/JuliusBrussee/caveman/blob/main/LICENSE) |
515
+ | [safishamsi/graphify](https://github.com/safishamsi/graphify) (`graphifyy` on PyPI) | Powers the optional knowledge-graph integration (`issue-flow graphify`, `graphify-out/`). Installed separately and invoked as an external tool. | [MIT](https://github.com/safishamsi/graphify/blob/main/LICENSE) |
516
+ | [Typer](https://github.com/fastapi/typer) | The `issue-flow` command-line interface. | MIT |
517
+ | [Rich](https://github.com/Textualize/rich) | Formatted terminal output during `init` / `update`. | MIT |
518
+ | [Jinja2](https://github.com/pallets/jinja) | Renders the scaffolded skill, command, and rules templates. | BSD-3-Clause |
519
+ | [tomlkit](https://github.com/python-poetry/tomlkit) | Comment-preserving round-trips of `.issueflows/config.toml`. | MIT |
520
+ | [python-dotenv](https://github.com/theskumar/python-dotenv) | Loads `ISSUEFLOW_*` settings from a project `.env`. | BSD-3-Clause |
521
+
522
+ Using or drawing on another project that should be listed here? Open a PR or issue
523
+ to add a row.
524
+
525
+ ## License
526
+
527
+ This project is released under the MIT License. See the full text in the repository: [LICENSE](https://github.com/jepegit/issue-flow/blob/main/LICENSE).