@hechura/noreaster-cli 0.2.4 → 0.2.5
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/dist/commands/my-work.js
CHANGED
|
@@ -5,7 +5,7 @@ const http_1 = require("../http");
|
|
|
5
5
|
function registerMyWorkCommands(parent) {
|
|
6
6
|
parent
|
|
7
7
|
.command("my-work")
|
|
8
|
-
.description("Discover assigned work items, pending reviews, open gates
|
|
8
|
+
.description("Discover assigned work items, pending reviews, and open gates")
|
|
9
9
|
.action(async () => {
|
|
10
10
|
const result = await (0, http_1.apiRequest)((0, http_1.resolveConfig)(), "GET", "/api/agent/my-work");
|
|
11
11
|
console.log(JSON.stringify(result, null, 2));
|
package/dist/commands/reviews.js
CHANGED
|
@@ -51,14 +51,45 @@ function registerReviewCommands(parent) {
|
|
|
51
51
|
const result = await (0, http_1.apiRequest)((0, http_1.resolveConfig)(), "PATCH", `/api/agent/documents/${documentId}/reviews/${reviewId}`, { action: "check", item_key: itemKey, checked: !options.unchecked });
|
|
52
52
|
console.log(JSON.stringify(result, null, 2));
|
|
53
53
|
});
|
|
54
|
+
reviews
|
|
55
|
+
.command("comments")
|
|
56
|
+
.description("List comments and threads for a document")
|
|
57
|
+
.argument("<documentId>")
|
|
58
|
+
.action(async (documentId) => {
|
|
59
|
+
const result = await (0, http_1.apiRequest)((0, http_1.resolveConfig)(), "GET", `/api/agent/documents/${documentId}/comments`);
|
|
60
|
+
console.log(JSON.stringify(result, null, 2));
|
|
61
|
+
});
|
|
54
62
|
reviews
|
|
55
63
|
.command("comment")
|
|
56
64
|
.description("Add a comment to a document")
|
|
57
65
|
.argument("<documentId>")
|
|
58
66
|
.requiredOption("--body <text>", "Comment body")
|
|
59
67
|
.option("--review-id <reviewId>")
|
|
68
|
+
.option("--parent-comment-id <commentId>", "Reply to a root comment")
|
|
69
|
+
.option("--anchor-quote <text>", "Exact markdown block text to anchor")
|
|
70
|
+
.option("--anchor-block-index <index>", "Zero-based markdown block index")
|
|
60
71
|
.action(async (documentId, options) => {
|
|
61
|
-
const
|
|
72
|
+
const hasAnchorQuote = typeof options.anchorQuote === "string";
|
|
73
|
+
const hasAnchorIndex = options.anchorBlockIndex !== undefined;
|
|
74
|
+
if (hasAnchorQuote !== hasAnchorIndex) {
|
|
75
|
+
throw new Error("--anchor-quote and --anchor-block-index must be provided together");
|
|
76
|
+
}
|
|
77
|
+
const anchorBlockIndex = hasAnchorIndex ? Number(options.anchorBlockIndex) : null;
|
|
78
|
+
if (anchorBlockIndex !== null &&
|
|
79
|
+
(!Number.isInteger(anchorBlockIndex) || anchorBlockIndex < 0)) {
|
|
80
|
+
throw new Error("--anchor-block-index must be a non-negative integer");
|
|
81
|
+
}
|
|
82
|
+
if (options.parentCommentId && (options.reviewId || hasAnchorQuote)) {
|
|
83
|
+
throw new Error("Replies cannot include --review-id or anchor options");
|
|
84
|
+
}
|
|
85
|
+
const result = await (0, http_1.apiRequest)((0, http_1.resolveConfig)(), "POST", `/api/agent/documents/${documentId}/comments`, {
|
|
86
|
+
body: options.body,
|
|
87
|
+
review_id: options.reviewId ?? null,
|
|
88
|
+
parent_comment_id: options.parentCommentId ?? null,
|
|
89
|
+
anchor: hasAnchorQuote
|
|
90
|
+
? { quote: options.anchorQuote, blockIndex: anchorBlockIndex }
|
|
91
|
+
: null,
|
|
92
|
+
});
|
|
62
93
|
console.log(JSON.stringify(result, null, 2));
|
|
63
94
|
});
|
|
64
95
|
reviews
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,6 @@ const meetings_1 = require("./commands/meetings");
|
|
|
15
15
|
const timeline_1 = require("./commands/timeline");
|
|
16
16
|
const features_1 = require("./commands/features");
|
|
17
17
|
const reviews_1 = require("./commands/reviews");
|
|
18
|
-
const draft_runs_1 = require("./commands/draft-runs");
|
|
19
18
|
const my_work_1 = require("./commands/my-work");
|
|
20
19
|
const skill_1 = require("./commands/skill");
|
|
21
20
|
async function main() {
|
|
@@ -27,7 +26,6 @@ async function main() {
|
|
|
27
26
|
(0, docs_1.registerDocumentCommands)(program);
|
|
28
27
|
(0, features_1.registerFeatureCommands)(program);
|
|
29
28
|
(0, reviews_1.registerReviewCommands)(program);
|
|
30
|
-
(0, draft_runs_1.registerDraftRunCommands)(program);
|
|
31
29
|
(0, my_work_1.registerMyWorkCommands)(program);
|
|
32
30
|
(0, skill_1.registerSkillCommands)(program);
|
|
33
31
|
(0, projects_1.registerProjectCommands)(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hechura-manager-noreaster
|
|
3
|
-
description: Operates Hechura Manager / Noreaster via the official agent CLI and PAT-scoped APIs, including the feature-spec process chain. Use when the user asks to manage Noreaster projects, tasks, sprints, customers, prospects, meetings, timeline entries, documents, features, reviews,
|
|
3
|
+
description: Operates Hechura Manager / Noreaster via the official agent CLI and PAT-scoped APIs, including the feature-spec process chain. Use when the user asks to manage Noreaster projects, tasks, sprints, customers, prospects, meetings, timeline entries, documents, features, reviews, direct work-item breakdowns, PR links, team/admin agent routes, or references HECHURA_AGENT_TOKEN, agent scopes, or noreaster.vercel.app docs. Also trigger for process phrases like "pick up my next work item", "create the feature breakdown", "what gates are open", "link this PR", or "install the noreaster skill".
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Hechura Manager / Noreaster Operations
|
|
@@ -10,7 +10,7 @@ Use this skill for operational work in Noreaster through the official agent CLI
|
|
|
10
10
|
## Execution Defaults
|
|
11
11
|
|
|
12
12
|
1. Prefer the published CLI:
|
|
13
|
-
- `npx @hechura/noreaster-cli@0.2.
|
|
13
|
+
- `npx @hechura/noreaster-cli@0.2.5 <command>` or `noreaster <command>` after global install (`npm install -g @hechura/noreaster-cli@0.2.5`)
|
|
14
14
|
- In this repo: `npm run agent -- <command>`
|
|
15
15
|
2. Default API base URL:
|
|
16
16
|
- `https://noreaster.vercel.app`
|
|
@@ -54,7 +54,7 @@ Ownership defaults:
|
|
|
54
54
|
|
|
55
55
|
- PRD / Feature / Feature PRD: PM-owned
|
|
56
56
|
- Feature Spec: engineering-owned
|
|
57
|
-
- Work-item breakdowns:
|
|
57
|
+
- Work-item breakdowns: created directly by external agents; humans review the resulting items in sprint and work-item context
|
|
58
58
|
- Implementation plans: authored by a developer's agent, linked to a work item
|
|
59
59
|
- PRs: linked manually or via inbound webhook matching `{ticket_prefix}-<n>` (e.g. `AIM-12`)
|
|
60
60
|
|
|
@@ -65,7 +65,6 @@ Illegal transitions are refused server-side with HTTP 409 and `gate_not_satisfie
|
|
|
65
65
|
Common gates:
|
|
66
66
|
|
|
67
67
|
- Feature PRD (`feature_description`) must be approved before Feature Spec (`design_spec`) can be approved
|
|
68
|
-
- Feature Spec must be approved before draft-run apply creates work items
|
|
69
68
|
- Document → `approved` is a direct status transition (`docs transition <id> approved`); no approved review is required. Reviews remain available as an optional collaboration surface.
|
|
70
69
|
- Agent document reads return `approved` docs by default; use `--include-drafts` only when intentionally working on drafts
|
|
71
70
|
|
|
@@ -116,6 +115,21 @@ noreaster docs update <id> --data '{"content":"...","change_summary":"Recorded d
|
|
|
116
115
|
- Never rewrite history: use `docs revisions <id>` to inspect prior versions; corrections are new revisions, not silent replacements.
|
|
117
116
|
- Content edits to an `approved` doc still record revisions. Approval itself is a human decision made by changing the document status; if your change invalidates an approval, say so explicitly rather than working around it.
|
|
118
117
|
|
|
118
|
+
## Document comment threads
|
|
119
|
+
|
|
120
|
+
Always list comments before replying, resolving, or adding a related comment:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
noreaster reviews comments <documentId>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
- Add a general document comment: `reviews comment <documentId> --body "Comment"`
|
|
127
|
+
- Reply to a root comment: `reviews comment <documentId> --body "Reply" --parent-comment-id <commentId>`
|
|
128
|
+
- Anchor a new thread to a markdown block: `reviews comment <documentId> --body "Comment" --anchor-quote "<exact block markdown>" --anchor-block-index <index>`
|
|
129
|
+
- Both anchor options are required together. The index is zero-based across markdown blocks separated by blank lines; fenced code remains one block.
|
|
130
|
+
- Replies inherit the root anchor and cannot include `--review-id` or anchor options.
|
|
131
|
+
- Resolve the root when addressed: `reviews resolve-comment <documentId> <commentId>`.
|
|
132
|
+
|
|
119
133
|
## Work Discovery
|
|
120
134
|
|
|
121
135
|
Start here when asked to pick up next work:
|
|
@@ -128,16 +142,18 @@ Returns:
|
|
|
128
142
|
|
|
129
143
|
- assigned work items for this agent
|
|
130
144
|
- open reviews for the principal owner (or unassigned open reviews)
|
|
131
|
-
- features with open gates (Feature PRD approved awaiting Feature Spec; Feature Spec approved awaiting
|
|
132
|
-
|
|
145
|
+
- features with open gates (Feature PRD approved awaiting Feature Spec; Feature Spec approved awaiting work items)
|
|
146
|
+
|
|
147
|
+
## Creating Feature Work Items
|
|
133
148
|
|
|
134
|
-
|
|
149
|
+
When `my-work` reports a Feature Spec approved and awaiting work items:
|
|
135
150
|
|
|
136
|
-
1.
|
|
137
|
-
2.
|
|
138
|
-
3.
|
|
151
|
+
1. Read the approved Feature Spec and the project's area registry.
|
|
152
|
+
2. Create each work item directly with `tasks create`.
|
|
153
|
+
3. Include `feature_id`, `source_document_id`, `source_section` when applicable, `generation_method: "ai_extract"`, and the relevant `area`.
|
|
154
|
+
4. Verify the created items with `tasks list --project-id <projectId>`.
|
|
139
155
|
|
|
140
|
-
|
|
156
|
+
Humans review and adjust created items in sprint and work-item context; there is no intermediate review/apply step.
|
|
141
157
|
|
|
142
158
|
## NOR Short IDs and PR Linking
|
|
143
159
|
|
|
@@ -211,8 +227,7 @@ Empty `content` on create is seeded from the template for that `doc_type`.
|
|
|
211
227
|
- `timeline`: list/get/create/update/delete
|
|
212
228
|
- `docs`: list/get/create/update/transition/revisions/delete
|
|
213
229
|
- `features`: list/get/create/update/transition/delete
|
|
214
|
-
- `reviews`: request/approve/request-changes/check/comment/resolve-comment
|
|
215
|
-
- `draft-runs`: list/get/submit/apply
|
|
230
|
+
- `reviews`: request/approve/request-changes/check/comments/comment/resolve-comment
|
|
216
231
|
- `messages`: list/create
|
|
217
232
|
- `team`: invite/update-role/remove
|
|
218
233
|
- `admin`: agents/tokens/monitoring lifecycle commands
|
|
@@ -228,11 +243,11 @@ Empty `content` on create is seeded from the template for that `doc_type`.
|
|
|
228
243
|
## Quick Command Examples
|
|
229
244
|
|
|
230
245
|
```bash
|
|
231
|
-
npm install -g @hechura/noreaster-cli@0.2.
|
|
246
|
+
npm install -g @hechura/noreaster-cli@0.2.5
|
|
232
247
|
noreaster skill install
|
|
233
248
|
noreaster my-work
|
|
234
249
|
noreaster features list --project-id <project-id>
|
|
235
|
-
noreaster
|
|
250
|
+
noreaster tasks create --data '{"project_id":"<project-id>","feature_id":"<feature-id>","source_document_id":"<design-spec-id>","generation_method":"ai_extract","title":"[BE - api] Add login","type":"task","priority":"high","area":"be-api"}'
|
|
236
251
|
noreaster tasks pr-link <task-id> --url 'https://github.com/owner/repo/pull/12'
|
|
237
252
|
```
|
|
238
253
|
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerDraftRunCommands = registerDraftRunCommands;
|
|
4
|
-
const http_1 = require("../http");
|
|
5
|
-
function registerDraftRunCommands(parent) {
|
|
6
|
-
const draftRuns = parent.command("draft-runs").description("Manage external draft work-item runs");
|
|
7
|
-
draftRuns
|
|
8
|
-
.command("list")
|
|
9
|
-
.description("List draft runs for a feature")
|
|
10
|
-
.argument("<featureId>")
|
|
11
|
-
.action(async (featureId) => {
|
|
12
|
-
const result = await (0, http_1.apiRequest)((0, http_1.resolveConfig)(), "GET", `/api/agent/features/${featureId}/draft-runs`);
|
|
13
|
-
console.log(JSON.stringify(result, null, 2));
|
|
14
|
-
});
|
|
15
|
-
draftRuns
|
|
16
|
-
.command("get")
|
|
17
|
-
.description("Get a draft run")
|
|
18
|
-
.argument("<featureId>")
|
|
19
|
-
.argument("<runId>")
|
|
20
|
-
.action(async (featureId, runId) => {
|
|
21
|
-
const result = await (0, http_1.apiRequest)((0, http_1.resolveConfig)(), "GET", `/api/agent/features/${featureId}/draft-runs/${runId}`);
|
|
22
|
-
console.log(JSON.stringify(result, null, 2));
|
|
23
|
-
});
|
|
24
|
-
draftRuns
|
|
25
|
-
.command("submit")
|
|
26
|
-
.description("Submit a draft run for a feature")
|
|
27
|
-
.argument("<featureId>")
|
|
28
|
-
.requiredOption("--data <json>", "JSON payload with source_document_id and items")
|
|
29
|
-
.action(async (featureId, options) => {
|
|
30
|
-
const result = await (0, http_1.apiRequest)((0, http_1.resolveConfig)(), "POST", `/api/agent/features/${featureId}/draft-runs`, (0, http_1.parsePayload)(options.data));
|
|
31
|
-
console.log(JSON.stringify(result, null, 2));
|
|
32
|
-
});
|
|
33
|
-
draftRuns
|
|
34
|
-
.command("apply")
|
|
35
|
-
.description("Apply a draft run (creates work items)")
|
|
36
|
-
.argument("<featureId>")
|
|
37
|
-
.argument("<runId>")
|
|
38
|
-
.option("--data <json>", "Optional edited items payload")
|
|
39
|
-
.action(async (featureId, runId, options) => {
|
|
40
|
-
const payload = options.data ? (0, http_1.parsePayload)(options.data) : {};
|
|
41
|
-
const result = await (0, http_1.apiRequest)((0, http_1.resolveConfig)(), "POST", `/api/agent/features/${featureId}/draft-runs/${runId}/apply`, payload);
|
|
42
|
-
console.log(JSON.stringify(result, null, 2));
|
|
43
|
-
});
|
|
44
|
-
}
|