@armstrongnate/april 0.1.4 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@armstrongnate/april",
3
- "version": "0.1.4",
3
+ "version": "0.2.0",
4
4
  "description": "She does all the work so you don't have to. Watches GitHub issues and spawns coding-agent sessions (Claude Code or Codex) to work them.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,6 +15,7 @@
15
15
  "scripts": {
16
16
  "build": "tsc",
17
17
  "dev": "tsx src/index.ts",
18
+ "cli": "tsx src/cli.ts",
18
19
  "start": "node dist/index.js",
19
20
  "prepublishOnly": "pnpm build"
20
21
  },
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: issue-investigator
3
+ description: Research a free-text problem across one or more repos, then file a well-scoped GitHub issue that an implementation agent can pick up.
4
+ ---
5
+
6
+ # issue-investigator
7
+
8
+ You have been given a **problem to investigate**, not an issue to implement. Your
9
+ job is to research it thoroughly and end by **creating a GitHub issue** that is
10
+ well-scoped enough for an implementation agent (or person) to start without
11
+ repeating your investigation.
12
+
13
+ Do not implement a fix. Do not open a PR. The deliverable is the issue.
14
+
15
+ Your launch prompt includes the specifics for this run:
16
+
17
+ - the **problem statement** to investigate,
18
+ - the **assignee** to put on the issue,
19
+ - the **trigger label** april uses to pick work up,
20
+ - the **candidate repos** (each as `owner/name` plus a local checkout path),
21
+ - the **mode**: `deferred` (default) or `auto`.
22
+
23
+ ## 1. Understand the problem
24
+
25
+ - Read the problem statement carefully. Note what is observed, what is expected,
26
+ and anything still unknown.
27
+ - You are running in whatever directory april was invoked from — possibly not a
28
+ repo at all. Use the candidate repo paths from the prompt to read code, and the
29
+ `gh` CLI to inspect issues, PRs, and code history across repos.
30
+
31
+ ## 2. Investigate (read-only)
32
+
33
+ **First, make sure each repo you investigate is current.** The local checkouts
34
+ are not guaranteed to be up to date, and they are usually not pulled manually —
35
+ investigating stale code leads to wrong conclusions and duplicate/already-fixed
36
+ issues. For each candidate repo, before reading its code:
37
+
38
+ - Check the branch and working tree: `git -C <path> status`.
39
+ - If it's on a clean `main`/`master`, pull the latest: `git -C <path> pull --ff-only`.
40
+ - If the checkout is dirty or on another branch, do **not** overwrite local work.
41
+ Instead `git -C <path> fetch origin` and base your reading on the remote default
42
+ branch (e.g. `git -C <path> log origin/main`, `git -C <path> show origin/main:path/to/file`).
43
+ - Never discard local changes. If a repo can't be brought current safely, note
44
+ that in the issue so the staleness is visible.
45
+
46
+ This git sync is expected; it's distinct from the "do not modify any files" rule
47
+ below, which is about not editing source as part of discovery.
48
+
49
+ - Reproduce the reasoning: trace the relevant code paths in the candidate repos.
50
+ - Identify the **owning repo** — where the change actually belongs. The problem
51
+ may touch several repos; pick the one that owns the fix and note cross-repo
52
+ impact in the issue.
53
+ - Gather concrete references: `path/to/file.ts:123`, function names, relevant
54
+ existing patterns, related/duplicate issues (`gh issue list --search ...`).
55
+ - Determine root cause and scope. Distinguish the core fix from nice-to-haves.
56
+
57
+ Do not modify any files. This is discovery only.
58
+
59
+ ## 3. Draft the issue
60
+
61
+ Write an issue that follows the workspace conventions:
62
+
63
+ - **Title:** concise and specific.
64
+ - **Summary:** the problem in 2-4 sentences — observed vs. expected behavior.
65
+ - **Technical context:** the root cause and the relevant code references you found
66
+ (`file:line`), plus any cross-repo impact.
67
+ - **Proposed approach:** the shape of the fix, if clear. Keep it brief.
68
+ - **Acceptance criteria:** a short checklist of what "done" means. Prefer clear
69
+ criteria over long prose.
70
+ - **Out of scope:** anything you deliberately excluded.
71
+
72
+ ## 4. Create the issue
73
+
74
+ Create it in the **owning repo** and assign the configured assignee:
75
+
76
+ ```
77
+ gh issue create \
78
+ --repo {owner}/{name} \
79
+ --title "..." \
80
+ --body "..." \
81
+ --assignee {assignee}
82
+ ```
83
+
84
+ Then honor the mode from your prompt:
85
+
86
+ - **deferred** (default): do **not** add the trigger label. The issue is for human
87
+ review — print the issue URL and say it's ready to review and label.
88
+ - **auto**: also pass `--label {trigger_label}` so april picks it up and starts
89
+ implementation immediately.
90
+
91
+ ## 5. Report
92
+
93
+ Print the created issue's URL and a one-line summary of what you filed and in
94
+ which repo. If you concluded no issue should be filed (e.g. not reproducible, or
95
+ already covered by an existing issue), say so clearly and link the existing issue
96
+ instead of creating a duplicate.