@fnmoa/cli 0.2.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +31 -0
- package/README.md +273 -70
- package/dist/assets/worker.js +216 -0
- package/dist/main.js +326 -0
- package/package.json +34 -27
- package/dist/args.js +0 -33
- package/dist/args.js.map +0 -1
- package/dist/client.js +0 -103
- package/dist/client.js.map +0 -1
- package/dist/command.js +0 -2
- package/dist/command.js.map +0 -1
- package/dist/commands/config.js +0 -129
- package/dist/commands/config.js.map +0 -1
- package/dist/commands/github.js +0 -19
- package/dist/commands/github.js.map +0 -1
- package/dist/commands/login.js +0 -94
- package/dist/commands/login.js.map +0 -1
- package/dist/commands/oracle.js +0 -86
- package/dist/commands/oracle.js.map +0 -1
- package/dist/commands/repos.js +0 -70
- package/dist/commands/repos.js.map +0 -1
- package/dist/commands/skills.js +0 -225
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/status.js +0 -78
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/tasks.js +0 -156
- package/dist/commands/tasks.js.map +0 -1
- package/dist/commands/track.js +0 -31
- package/dist/commands/track.js.map +0 -1
- package/dist/commands/whoami.js +0 -22
- package/dist/commands/whoami.js.map +0 -1
- package/dist/commands/workflows.js +0 -304
- package/dist/commands/workflows.js.map +0 -1
- package/dist/config.js +0 -65
- package/dist/config.js.map +0 -1
- package/dist/index.js +0 -105
- package/dist/index.js.map +0 -1
- package/dist/poll.js +0 -24
- package/dist/poll.js.map +0 -1
- package/dist/registry.js +0 -56
- package/dist/registry.js.map +0 -1
- package/dist/ui.js +0 -56
- package/dist/ui.js.map +0 -1
- package/src/skills/moa-oracle/SKILL.md +0 -35
- package/src/skills/moa-profiles/SKILL.md +0 -49
- package/src/skills/moa-review-pr/SKILL.md +0 -47
- package/src/skills/moa-run-task/SKILL.md +0 -44
- package/src/skills/moa-setup/SKILL.md +0 -60
- package/src/skills/moa-ship-issue/SKILL.md +0 -54
- package/src/skills/moa-triage-audit/SKILL.md +0 -47
package/dist/ui.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
// Terminal formatting helpers (color-aware, respects NO_COLOR / non-TTY).
|
|
2
|
-
const noColor = !!process.env.NO_COLOR || !process.stdout.isTTY;
|
|
3
|
-
const wrap = (code) => (s) => (noColor ? `${s}` : `\x1b[${code}m${s}\x1b[0m`);
|
|
4
|
-
export const c = {
|
|
5
|
-
dim: wrap('2'),
|
|
6
|
-
bold: wrap('1'),
|
|
7
|
-
green: wrap('32'),
|
|
8
|
-
red: wrap('31'),
|
|
9
|
-
yellow: wrap('33'),
|
|
10
|
-
cyan: wrap('36'),
|
|
11
|
-
amber: wrap('33'),
|
|
12
|
-
};
|
|
13
|
-
/** 256-color foreground (no-op when color is disabled). */
|
|
14
|
-
const fg = (n) => (s) => (noColor ? s : `\x1b[38;5;${n}m${s}\x1b[0m`);
|
|
15
|
-
// fnmoa wordmark in block letters, colored top→bottom as a cyan→blue gradient.
|
|
16
|
-
const LOGO = [
|
|
17
|
-
'█████ █ █ █ █ ███ ███ ',
|
|
18
|
-
'█ ██ █ ██ ██ █ █ █ █',
|
|
19
|
-
'████ █ █ █ █ █ █ █ █ █████',
|
|
20
|
-
'█ █ ██ █ █ █ █ █ █',
|
|
21
|
-
'█ █ █ █ █ ███ █ █',
|
|
22
|
-
];
|
|
23
|
-
const LOGO_FG = [51, 45, 39, 33, 27];
|
|
24
|
-
/** The fnmoa banner — wordmark + tagline, gradient-colored. */
|
|
25
|
-
export function banner() {
|
|
26
|
-
const art = LOGO.map((line, i) => ' ' + fg(LOGO_FG[i])(line)).join('\n');
|
|
27
|
-
return `\n${art}\n ${c.dim('autonomous GitHub coding workflows')}\n`;
|
|
28
|
-
}
|
|
29
|
-
export const statusColor = (s) => s === 'succeeded'
|
|
30
|
-
? c.green(s)
|
|
31
|
-
: s === 'failed'
|
|
32
|
-
? c.red(s)
|
|
33
|
-
: s === 'running' || s === 'queued'
|
|
34
|
-
? c.yellow(s)
|
|
35
|
-
: c.dim(s);
|
|
36
|
-
/** Relative time for list columns: "5s ago", "3m ago", "2h ago", "4d ago". */
|
|
37
|
-
export function relTime(when) {
|
|
38
|
-
if (!when)
|
|
39
|
-
return '';
|
|
40
|
-
const t = new Date(when).getTime();
|
|
41
|
-
if (!Number.isFinite(t))
|
|
42
|
-
return '';
|
|
43
|
-
const s = Math.max(0, Math.floor((Date.now() - t) / 1000));
|
|
44
|
-
if (s < 60)
|
|
45
|
-
return `${s}s ago`;
|
|
46
|
-
if (s < 3600)
|
|
47
|
-
return `${Math.floor(s / 60)}m ago`;
|
|
48
|
-
if (s < 86400)
|
|
49
|
-
return `${Math.floor(s / 3600)}h ago`;
|
|
50
|
-
return `${Math.floor(s / 86400)}d ago`;
|
|
51
|
-
}
|
|
52
|
-
export function die(msg) {
|
|
53
|
-
console.error(c.red(`✗ ${msg}`));
|
|
54
|
-
process.exit(1);
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=ui.js.map
|
package/dist/ui.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAE1E,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;AAChE,MAAM,IAAI,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC,CAAkB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;AAEvG,MAAM,CAAC,MAAM,CAAC,GAAG;IACf,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;IACd,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC;IACf,KAAK,EAAE,IAAI,CAAC,IAAI,C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
|
5
|
-
`moa oracle consult <domain> "<question>"` to ask, `moa oracle history` to review past
|
|
6
|
-
answers. Use to get a read-only answer sourced strictly from a specific knowledge base.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Consult Moa oracles
|
|
10
|
-
|
|
11
|
-
An **oracle** is a read-only knowledge base. A `<domain>-oracle` subagent answers
|
|
12
|
-
questions **only from that KB** — useful for grounded, source-bounded answers. Requires
|
|
13
|
-
a connected CLI (see **moa-setup**).
|
|
14
|
-
|
|
15
|
-
## Use
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
moa oracle list # available domains
|
|
19
|
-
moa oracle consult <domain> "<question>" --watch # ask; --watch streams to the answer
|
|
20
|
-
moa oracle history # past consultations (--limit N, --json)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Example:
|
|
24
|
-
|
|
25
|
-
```sh
|
|
26
|
-
moa oracle list
|
|
27
|
-
moa oracle consult architecture "how do workflow runs isolate git worktrees?" --watch
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Notes
|
|
31
|
-
|
|
32
|
-
- Answers are bounded to the KB — if the KB doesn't cover it, the oracle says so rather
|
|
33
|
-
than guessing.
|
|
34
|
-
- `--watch` exits non-zero if the consultation fails.
|
|
35
|
-
- `moa status` lists the oracle domains the server currently exposes.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: moa-profiles
|
|
3
|
-
description: >-
|
|
4
|
-
Act as multiple operators or orgs with Moa CLI profiles — `moa config add/use`, a
|
|
5
|
-
per-command `--profile` override, `$MOA_PROFILE`, and `moa whoami`. Use for
|
|
6
|
-
multi-operator review flows (solver ≠ reviewer) or driving several workspaces/orgs.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Multi-operator / multi-org profiles
|
|
10
|
-
|
|
11
|
-
`~/.moa/cli.json` holds **named profiles** — each is one operator: a workspace URL + an
|
|
12
|
-
API key. Profiles are how you run flows that need more than one identity (e.g. one
|
|
13
|
-
operator solves, another reviews) or target multiple workspaces/orgs. Requires a
|
|
14
|
-
connected CLI (see **moa-setup**).
|
|
15
|
-
|
|
16
|
-
## Manage profiles
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
moa config add owner --url <url> --key <ownerKey> --label "owner"
|
|
20
|
-
moa config add member --url <url> --key <memberKey> --label "member"
|
|
21
|
-
moa config use member # switch the active profile
|
|
22
|
-
moa config # show active + list (● = active)
|
|
23
|
-
moa config remove <name>
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Pick an identity per command
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
moa <cmd> --profile owner # one-off override (no switch)
|
|
30
|
-
MOA_PROFILE=owner moa <cmd> # same, via env var
|
|
31
|
-
moa whoami # who am I right now (+ GitHub login)
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Precedence: `--profile <name>` → `$MOA_PROFILE` → active (`config use`) → `default`.
|
|
35
|
-
|
|
36
|
-
## Why it matters
|
|
37
|
-
|
|
38
|
-
- **Author ≠ reviewer:** GitHub blocks approving your own PR, so the realistic review
|
|
39
|
-
loop needs two operators:
|
|
40
|
-
```sh
|
|
41
|
-
moa config use owner
|
|
42
|
-
moa wf solve <repo> <issue#> --watch
|
|
43
|
-
MOA_PROFILE=member moa wf review <repo> <pr#> --watch
|
|
44
|
-
moa wf merge <repo> <pr#> --watch
|
|
45
|
-
```
|
|
46
|
-
- **Multiple orgs/workspaces:** give each its own profile (distinct URL + key) and switch
|
|
47
|
-
with `moa config use`.
|
|
48
|
-
|
|
49
|
-
Field precedence within a profile: `env ($MOA_API_URL / $MOA_API_KEY) → profile → default`.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: moa-review-pr
|
|
3
|
-
description: >-
|
|
4
|
-
Review and unblock pull requests with Moa — `moa wf review` for a structured verdict,
|
|
5
|
-
`moa wf address` to apply review feedback, `moa wf fix-ci` to get red CI green, and
|
|
6
|
-
`moa wf review-fix` to converge to approval. Use to review a PR, address comments, or
|
|
7
|
-
fix failing checks.
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Review & unblock PRs with Moa
|
|
11
|
-
|
|
12
|
-
Requires a connected CLI (see **moa-setup**). Repos are `owner/repo`; add `--watch` to
|
|
13
|
-
stream the timeline (exits non-zero on failure).
|
|
14
|
-
|
|
15
|
-
## Review a PR
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
moa wf pending # your review inbox
|
|
19
|
-
moa wf review <repo> <pr#> --watch # → APPROVE / REQUEST_CHANGES + inline comments
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
The pipeline reconciles review state live from GitHub, so a review by **any** operator
|
|
23
|
-
(or done directly on GitHub) advances the track — solver and reviewer needn't match.
|
|
24
|
-
|
|
25
|
-
## Unblock a PR
|
|
26
|
-
|
|
27
|
-
| Situation | Command | What it does |
|
|
28
|
-
|---|---|---|
|
|
29
|
-
| Reviewer asked for changes | `moa wf address <repo> <pr#>` | applies the feedback, pushes to the PR branch |
|
|
30
|
-
| CI is red | `moa wf fix-ci <repo> <pr#>` | reads checks/logs, pushes a fix |
|
|
31
|
-
| Want it to reach APPROVE | `moa wf review-fix <repo> <pr#>` | loops review → fix → re-review until approved |
|
|
32
|
-
|
|
33
|
-
```sh
|
|
34
|
-
moa wf fix-ci <repo> <pr#> --watch # diagnose failing checks → push a fix
|
|
35
|
-
moa wf address <repo> <pr#> --watch # turn review comments into a commit
|
|
36
|
-
moa wf review-fix <repo> <pr#> --watch # converge to APPROVE + a fix commit
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Then merge once approved + green (see **moa-ship-issue**): `moa wf merge <repo> <pr#> --watch`.
|
|
40
|
-
|
|
41
|
-
## Notes
|
|
42
|
-
|
|
43
|
-
- **Self-review:** GitHub won't let a PR's author approve/request-changes their own PR
|
|
44
|
-
(only comment). Review as a different operator — see **moa-profiles**.
|
|
45
|
-
- **`address` vs `review-fix`:** `address` applies existing feedback once; `review-fix`
|
|
46
|
-
owns the whole review↔fix loop until it converges.
|
|
47
|
-
- Inspect progress with `moa wf get <id> --watch`; failed checks and cost are shown there.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: moa-run-task
|
|
3
|
-
description: >-
|
|
4
|
-
Run an ad-hoc Moa agent task outside the GitHub workflow — `moa run "<prompt>" --dir
|
|
5
|
-
<path> --watch`, inspect with `moa task`, cancel a run, and track cost. Use for one-off
|
|
6
|
-
coding or analysis tasks not tied to an issue or PR.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Ad-hoc agent tasks with Moa
|
|
10
|
-
|
|
11
|
-
For work that isn't an issue/PR workflow, run the agent directly. Tasks are async:
|
|
12
|
-
`moa run` returns immediately as `queued`, then the run goes
|
|
13
|
-
`queued → running → succeeded | failed | canceled`. Requires a connected CLI (see
|
|
14
|
-
**moa-setup**).
|
|
15
|
-
|
|
16
|
-
## Run
|
|
17
|
-
|
|
18
|
-
```sh
|
|
19
|
-
moa run "add a hello() to src/index.ts" --watch
|
|
20
|
-
moa run "<prompt>" --dir /path/to/repo --watch # run against a specific directory
|
|
21
|
-
moa run "<prompt>" --autonomous --watch # less interactive, more autonomy
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
`--watch` streams the live activity feed until the task finishes (and exits non-zero
|
|
25
|
-
if it fails).
|
|
26
|
-
|
|
27
|
-
## Inspect & manage
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
moa tasks # recent tasks (--limit N, default 30; --json for raw)
|
|
31
|
-
moa task <id> # one task: result, sessionId, numTurns, costUsd
|
|
32
|
-
moa task <id> --json # raw API response
|
|
33
|
-
moa cancel <taskId> # kill a running task (cancels its claude child)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
`moa task <id>` accepts a unique id prefix.
|
|
37
|
-
|
|
38
|
-
## Notes
|
|
39
|
-
|
|
40
|
-
- Each task is one `claude` child process; **cancel** kills it.
|
|
41
|
-
- Cost: every finished task reports `costUsd`; `moa status --spend` shows the cumulative
|
|
42
|
-
total for the operator.
|
|
43
|
-
- For GitHub-driven work (issue→PR, review, fix-CI, merge), use the workflow skills:
|
|
44
|
-
**moa-ship-issue** and **moa-review-pr**.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: moa-setup
|
|
3
|
-
description: >-
|
|
4
|
-
Install and connect the `moa` CLI (@fnmoa/cli) to a Moa workspace — npm install,
|
|
5
|
-
`moa login`, verify the Claude/GitHub connectors, and run a first status check.
|
|
6
|
-
Use when setting up Moa for the first time, moving to a new machine, or
|
|
7
|
-
troubleshooting auth errors like "auto-bootstrap is unavailable".
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# Setting up the `moa` CLI
|
|
11
|
-
|
|
12
|
-
`moa` is a terminal client for a Moa **workspace** (an HTTP API). It authenticates
|
|
13
|
-
with an `x-api-key` and defaults to `https://api.fnmoa.com`.
|
|
14
|
-
|
|
15
|
-
## 1. Install
|
|
16
|
-
|
|
17
|
-
```sh
|
|
18
|
-
npm i -g @fnmoa/cli
|
|
19
|
-
moa --help
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## 2. Connect
|
|
23
|
-
|
|
24
|
-
```sh
|
|
25
|
-
moa login # interactive: server URL (default api.fnmoa.com) + API key
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
`moa login` also starts automatically the first time you run bare `moa` with no
|
|
29
|
-
config. It saves to `~/.moa/cli.json` and verifies the key against the server. Grab
|
|
30
|
-
your API key from the Moa dashboard.
|
|
31
|
-
|
|
32
|
-
Non-interactive equivalent (CI, scripts):
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
moa config set url https://api.fnmoa.com
|
|
36
|
-
moa config set key <api-key>
|
|
37
|
-
# or per-shell: export MOA_API_URL=… MOA_API_KEY=…
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## 3. Verify
|
|
41
|
-
|
|
42
|
-
```sh
|
|
43
|
-
moa whoami # which operator am I (+ GitHub login)
|
|
44
|
-
moa setup # connector status: claude (connected?) · github (@login?)
|
|
45
|
-
moa status # server snapshot: oracles, task/session counts, queue
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Troubleshooting
|
|
49
|
-
|
|
50
|
-
- **`auto-bootstrap is unavailable … (enrolled to a control-plane)`** — the workspace
|
|
51
|
-
requires a pre-issued key. Run `moa login` (or `moa config set key <key>`); the key
|
|
52
|
-
comes from the dashboard, not auto-bootstrap.
|
|
53
|
-
- **`cannot reach <url>`** — wrong URL or server down. Re-check with `moa config`, fix
|
|
54
|
-
with `moa config set url <url>`.
|
|
55
|
-
- **`key rejected`** — the key is wrong/expired; re-run `moa login` with a fresh key.
|
|
56
|
-
- **Connectors not connected** (`moa setup` shows red) — connect Claude/GitHub from the
|
|
57
|
-
dashboard; the workflows need them.
|
|
58
|
-
|
|
59
|
-
Config precedence per field: `env ($MOA_API_URL / $MOA_API_KEY) → active profile → default`.
|
|
60
|
-
For multiple operators or orgs, see the **moa-profiles** skill.
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: moa-ship-issue
|
|
3
|
-
description: >-
|
|
4
|
-
Turn a GitHub issue into a merged PR with Moa — `moa wf solve` to implement and open
|
|
5
|
-
a PR, review it, then `moa wf merge`. Watch each run's live timeline. Use when you
|
|
6
|
-
want Moa to implement a known issue end-to-end and ship it.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Ship an issue with Moa (issue → PR → merge)
|
|
10
|
-
|
|
11
|
-
Moa reads the issue, writes the code behind a verify gate (the repo's tests), and
|
|
12
|
-
opens a PR — the git/gh is deterministic; the agent only reasons. It never commits or
|
|
13
|
-
merges on its own; the workflow does. Requires a connected CLI (see **moa-setup**).
|
|
14
|
-
|
|
15
|
-
Repos are `owner/repo`. Add `--watch` to stream the step timeline until the run ends
|
|
16
|
-
(a watch exits non-zero if the run fails/cancels).
|
|
17
|
-
|
|
18
|
-
## The happy path
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
moa wf solve <repo> <issue#> --watch # agent codes → verify gate → opens PR
|
|
22
|
-
moa wf review <repo> <pr#> --watch # structured verdict + inline comments
|
|
23
|
-
moa wf merge <repo> <pr#> --watch # guarded: needs approved + green
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Check state any time:
|
|
27
|
-
|
|
28
|
-
```sh
|
|
29
|
-
moa track <repo> # the issue's pipeline stage (… → branched → pr → merged)
|
|
30
|
-
moa wf list # recent runs
|
|
31
|
-
moa wf get <id> --watch # one run + its step timeline (and cost)
|
|
32
|
-
moa wf pending # your review inbox (issues/PRs awaiting you)
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Variations
|
|
36
|
-
|
|
37
|
-
| Goal | Command |
|
|
38
|
-
|---|---|
|
|
39
|
-
| Issue → branch only (no PR), re-runnable | `moa wf branch <repo> <issue#>` |
|
|
40
|
-
| Open a PR from an existing branch | `moa wf open-pr <repo> <issue#>` |
|
|
41
|
-
| Apply review feedback to the PR | `moa wf address <repo> <pr#>` |
|
|
42
|
-
| Get failing CI green | `moa wf fix-ci <repo> <pr#>` |
|
|
43
|
-
| Review → fix → re-review until APPROVE | `moa wf review-fix <repo> <pr#>` |
|
|
44
|
-
|
|
45
|
-
For reviewing/unblocking PRs in depth, see **moa-review-pr**.
|
|
46
|
-
|
|
47
|
-
## Notes
|
|
48
|
-
|
|
49
|
-
- **Author ≠ reviewer:** GitHub blocks approving your own PR. Use a second operator
|
|
50
|
-
(see **moa-profiles**) or let the `review` workflow post the verdict.
|
|
51
|
-
- **Verify gate:** `solve` runs the repo's tests before pushing — a repo with no test
|
|
52
|
-
script weakens the signal.
|
|
53
|
-
- **Cost:** each run reports `costUsd`; `moa wf get <id>` shows per-run cost. Add
|
|
54
|
-
`moa status --spend` for the cumulative total.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: moa-triage-audit
|
|
3
|
-
description: >-
|
|
4
|
-
Discover and categorize work with Moa — `moa wf triage` to categorize/label an issue,
|
|
5
|
-
and `moa wf report-issue` to audit a repo and file new GitHub issues. Use to triage an
|
|
6
|
-
incoming issue or have Moa audit a codebase and file what it finds.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Triage & audit with Moa
|
|
10
|
-
|
|
11
|
-
Requires a connected CLI (see **moa-setup**). Repos are `owner/repo`; add `--watch` to
|
|
12
|
-
stream the timeline.
|
|
13
|
-
|
|
14
|
-
## Triage an existing issue
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
moa wf triage <repo> <issue#> --watch # read-only: categorize / suggest labels
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Use it to sort an incoming issue before deciding whether to `solve` it
|
|
21
|
-
(see **moa-ship-issue**).
|
|
22
|
-
|
|
23
|
-
## Audit a repo and file issues
|
|
24
|
-
|
|
25
|
-
`report-issue` is **repo-level** (no issue/PR number): the agent reads the repo, recalls
|
|
26
|
-
past hotspots from memory, audits it — optionally focused by `--instruction` — and files
|
|
27
|
-
its findings as GitHub issue(s).
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
moa wf report-issue <repo> --watch
|
|
31
|
-
moa wf report-issue <repo> --instruction "audit src/ for missing input validation and unhandled edge cases" --watch
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Omit `--instruction` for a general audit; the agent decides what's worth filing. This is
|
|
35
|
-
how you point Moa at a codebase to *discover* work rather than act on a known item. It
|
|
36
|
-
files issues on the **target repo** — it is not a channel for reporting bugs about Moa
|
|
37
|
-
itself.
|
|
38
|
-
|
|
39
|
-
## See what's open
|
|
40
|
-
|
|
41
|
-
```sh
|
|
42
|
-
moa gh issues # open issues Moa can see
|
|
43
|
-
moa gh pulls # open PRs
|
|
44
|
-
moa track <repo> # per-issue pipeline stages
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
Next: turn a filed/triaged issue into a PR with **moa-ship-issue**.
|