@hechura/noreaster-cli 0.2.1 → 0.2.3
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.
|
@@ -12,6 +12,11 @@ exports.TEMPLATE_DOC_TYPES = [
|
|
|
12
12
|
"design_system",
|
|
13
13
|
"implementation_plan",
|
|
14
14
|
"prd",
|
|
15
|
+
"technical_design",
|
|
16
|
+
"feature_summary",
|
|
17
|
+
"sprint_plan",
|
|
18
|
+
"executive_summary",
|
|
19
|
+
"rules",
|
|
15
20
|
];
|
|
16
21
|
const AI_WRITING_HINT = `<!-- Writing for AI tools:
|
|
17
22
|
- Be explicit with exact values ("max file size: 10MB", not "reasonable").
|
|
@@ -299,6 +304,172 @@ ${AI_WRITING_HINT}
|
|
|
299
304
|
|
|
300
305
|
## Feature List
|
|
301
306
|
|
|
307
|
+
-
|
|
308
|
+
`;
|
|
309
|
+
const TECHNICAL_DESIGN_TEMPLATE = `# Technical Design
|
|
310
|
+
|
|
311
|
+
${AI_WRITING_HINT}
|
|
312
|
+
|
|
313
|
+
## Technical Context
|
|
314
|
+
|
|
315
|
+
<!-- Co-authored with engineering. -->
|
|
316
|
+
|
|
317
|
+
## Affected Areas
|
|
318
|
+
|
|
319
|
+
<!-- One subsection per project area. -->
|
|
320
|
+
|
|
321
|
+
### Frontend
|
|
322
|
+
|
|
323
|
+
- Services & APIs Affected:
|
|
324
|
+
- Changes needed:
|
|
325
|
+
|
|
326
|
+
### Backend
|
|
327
|
+
|
|
328
|
+
- Services & APIs Affected:
|
|
329
|
+
- Changes needed:
|
|
330
|
+
|
|
331
|
+
## API Contract
|
|
332
|
+
|
|
333
|
+
\`\`\`
|
|
334
|
+
POST /api/v1/[resource]
|
|
335
|
+
Request:
|
|
336
|
+
{
|
|
337
|
+
"field": "type — description"
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
Response (200):
|
|
341
|
+
{
|
|
342
|
+
"field": "type — description"
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
Response (400):
|
|
346
|
+
{
|
|
347
|
+
"error": "VALIDATION_ERROR",
|
|
348
|
+
"message": "Human-readable description"
|
|
349
|
+
}
|
|
350
|
+
\`\`\`
|
|
351
|
+
|
|
352
|
+
## Data Model Changes
|
|
353
|
+
|
|
354
|
+
\`\`\`
|
|
355
|
+
Table: [table_name]
|
|
356
|
+
+ new_column (type, constraints)
|
|
357
|
+
~ modified_column (old_type → new_type)
|
|
358
|
+
\`\`\`
|
|
359
|
+
|
|
360
|
+
## Edge Cases & Error Handling
|
|
361
|
+
|
|
362
|
+
| # | Scenario | Expected Behavior | Error Message (if applicable) |
|
|
363
|
+
|---|----------|-------------------|-------------------------------|
|
|
364
|
+
| 1 | | | |
|
|
365
|
+
|
|
366
|
+
## Dependencies & Risks
|
|
367
|
+
|
|
368
|
+
-
|
|
369
|
+
|
|
370
|
+
## Open Questions
|
|
371
|
+
|
|
372
|
+
- [ ]
|
|
373
|
+
|
|
374
|
+
## Decision Log
|
|
375
|
+
|
|
376
|
+
| Date | Decision | Rationale | Decided By |
|
|
377
|
+
|------|----------|-----------|------------|
|
|
378
|
+
| | | | |
|
|
379
|
+
`;
|
|
380
|
+
const FEATURE_SUMMARY_TEMPLATE = `# Feature Summary
|
|
381
|
+
|
|
382
|
+
${AI_WRITING_HINT}
|
|
383
|
+
|
|
384
|
+
## Problem
|
|
385
|
+
|
|
386
|
+
## Outcome
|
|
387
|
+
|
|
388
|
+
## In Scope
|
|
389
|
+
|
|
390
|
+
-
|
|
391
|
+
|
|
392
|
+
## Out of Scope
|
|
393
|
+
|
|
394
|
+
-
|
|
395
|
+
|
|
396
|
+
## Key Decisions
|
|
397
|
+
|
|
398
|
+
-
|
|
399
|
+
`;
|
|
400
|
+
const SPRINT_PLAN_TEMPLATE = `# Sprint Plan
|
|
401
|
+
|
|
402
|
+
${AI_WRITING_HINT}
|
|
403
|
+
|
|
404
|
+
## Sprint Goal
|
|
405
|
+
|
|
406
|
+
## Scope
|
|
407
|
+
|
|
408
|
+
-
|
|
409
|
+
|
|
410
|
+
## Deliverables
|
|
411
|
+
|
|
412
|
+
| Item | Owner | Done when |
|
|
413
|
+
|------|-------|-----------|
|
|
414
|
+
| | | |
|
|
415
|
+
|
|
416
|
+
## Risks & Dependencies
|
|
417
|
+
|
|
418
|
+
-
|
|
419
|
+
|
|
420
|
+
## Notes
|
|
421
|
+
|
|
422
|
+
-
|
|
423
|
+
`;
|
|
424
|
+
const EXECUTIVE_SUMMARY_TEMPLATE = `# Executive Summary
|
|
425
|
+
|
|
426
|
+
${AI_WRITING_HINT}
|
|
427
|
+
|
|
428
|
+
## Situation
|
|
429
|
+
|
|
430
|
+
## Recommendation
|
|
431
|
+
|
|
432
|
+
## Status
|
|
433
|
+
|
|
434
|
+
## Decisions Needed
|
|
435
|
+
|
|
436
|
+
-
|
|
437
|
+
|
|
438
|
+
## Next Steps
|
|
439
|
+
|
|
440
|
+
-
|
|
441
|
+
`;
|
|
442
|
+
const RULES_TEMPLATE = `# Project Rules
|
|
443
|
+
|
|
444
|
+
${AI_WRITING_HINT}
|
|
445
|
+
|
|
446
|
+
## Purpose
|
|
447
|
+
|
|
448
|
+
<!-- Binding constraints for agents implementing work in this project.
|
|
449
|
+
Prefer exact, enforceable rules over vibes. -->
|
|
450
|
+
|
|
451
|
+
## Must
|
|
452
|
+
|
|
453
|
+
- Agents must [specific required behavior].
|
|
454
|
+
|
|
455
|
+
## Must Not
|
|
456
|
+
|
|
457
|
+
- Agents must not [specific forbidden behavior].
|
|
458
|
+
|
|
459
|
+
## Coding Standards
|
|
460
|
+
|
|
461
|
+
- Language / framework conventions:
|
|
462
|
+
- File and module layout:
|
|
463
|
+
- Testing expectations:
|
|
464
|
+
|
|
465
|
+
## Constraints
|
|
466
|
+
|
|
467
|
+
| Constraint | Rationale |
|
|
468
|
+
|------------|-----------|
|
|
469
|
+
| | |
|
|
470
|
+
|
|
471
|
+
## Open Questions
|
|
472
|
+
|
|
302
473
|
-
|
|
303
474
|
`;
|
|
304
475
|
const TEMPLATES = {
|
|
@@ -309,6 +480,11 @@ const TEMPLATES = {
|
|
|
309
480
|
design_system: DESIGN_SYSTEM_TEMPLATE,
|
|
310
481
|
implementation_plan: IMPLEMENTATION_PLAN_TEMPLATE,
|
|
311
482
|
prd: PRD_TEMPLATE,
|
|
483
|
+
technical_design: TECHNICAL_DESIGN_TEMPLATE,
|
|
484
|
+
feature_summary: FEATURE_SUMMARY_TEMPLATE,
|
|
485
|
+
sprint_plan: SPRINT_PLAN_TEMPLATE,
|
|
486
|
+
executive_summary: EXECUTIVE_SUMMARY_TEMPLATE,
|
|
487
|
+
rules: RULES_TEMPLATE,
|
|
312
488
|
};
|
|
313
489
|
function isTemplateDocType(value) {
|
|
314
490
|
return value != null && exports.TEMPLATE_DOC_TYPES.includes(value);
|
package/package.json
CHANGED
|
@@ -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.3 <command>` or `noreaster <command>` after global install (`npm install -g @hechura/noreaster-cli@0.2.3`)
|
|
14
14
|
- In this repo: `npm run agent -- <command>`
|
|
15
15
|
2. Default API base URL:
|
|
16
16
|
- `https://noreaster.vercel.app`
|
|
@@ -30,17 +30,23 @@ PRD → Feature → Feature PRD (feature_description) → Feature Spec (design_s
|
|
|
30
30
|
→ Work Items → Implementation Plan docs → GitHub PRs
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
###
|
|
33
|
+
### The source-of-truth document set
|
|
34
34
|
|
|
35
|
-
UI labels are for humans; CLI/API payloads use `doc_type` values:
|
|
35
|
+
Project documents are the versioned source of truth for how a project is built. Read the relevant docs before doing work; treat their contents as binding unless a human approves a change. UI labels are for humans; CLI/API payloads use `doc_type` values:
|
|
36
36
|
|
|
37
|
-
| UI label | `doc_type` |
|
|
38
|
-
| --- | --- |
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
| Design
|
|
43
|
-
|
|
|
37
|
+
| UI label | `doc_type` | Purpose — how agents use it |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| Rules | `rules` | Binding agent execution constraints for the project (must / must-not, coding standards). **Always load and apply before implementing work items.** |
|
|
40
|
+
| PRD | `prd` | Product requirements: problem, goals, personas, feature list. Governs *what* to build and why. |
|
|
41
|
+
| Architecture | `architecture` | System overview: services, data flows, infrastructure. Governs *where* code lives and how systems connect. |
|
|
42
|
+
| Technical Design | `technical_design` | Project-level technical design: affected areas, API contracts, data model, edge cases. Governs implementation shape. |
|
|
43
|
+
| Design System | `design_system` | UI system: tokens, typography, components, a11y rules. All UI work must conform to it. |
|
|
44
|
+
| Feature Summary | `feature_summary` | Concise feature overview: problem, outcome, in/out of scope. Orients agents before deeper docs. |
|
|
45
|
+
| Sprint Plan | `sprint_plan` | Sprint goal, scope, deliverables, risks. Governs what belongs in the current sprint. |
|
|
46
|
+
| Executive Summary | `executive_summary` | Stakeholder-facing status and decisions. Read for context; humans own the framing. |
|
|
47
|
+
| General Context | `general_context` | Background context for the project or engagement. Read early; useful constraints often live here. |
|
|
48
|
+
| Feature PRD | `feature_description` | Feature-scoped requirements (feature-linked, not a Core Document). |
|
|
49
|
+
| Feature Spec | `design_spec` | Feature-scoped technical design (feature-linked, not a Core Document). |
|
|
44
50
|
|
|
45
51
|
Do not invent types like `feature_prd`. Use the `doc_type` column in create/update payloads and `docs template <docType>`.
|
|
46
52
|
|
|
@@ -50,7 +56,7 @@ Ownership defaults:
|
|
|
50
56
|
- Feature Spec: engineering-owned
|
|
51
57
|
- Work-item breakdowns: submitted by external agents as draft runs; humans review/apply
|
|
52
58
|
- Implementation plans: authored by a developer's agent, linked to a work item
|
|
53
|
-
- PRs: linked manually or via inbound webhook matching `
|
|
59
|
+
- PRs: linked manually or via inbound webhook matching `{ticket_prefix}-<n>` (e.g. `AIM-12`)
|
|
54
60
|
|
|
55
61
|
## Lifecycle Gates
|
|
56
62
|
|
|
@@ -72,12 +78,16 @@ Before implementing a work item, load the governing docs — do not invent contr
|
|
|
72
78
|
1. Fetch the work item: `tasks get <id>`
|
|
73
79
|
2. Follow `source_document_id` (or the feature's Feature Spec / `design_spec`) and read it: `docs get <id>`
|
|
74
80
|
3. Load project foundation docs:
|
|
81
|
+
- `docs list --project-id <id> --type rules` — **apply these Rules when implementing**; treat Must / Must Not as binding
|
|
75
82
|
- `docs list --project-id <id> --type architecture`
|
|
76
83
|
- `docs list --project-id <id> --type design_system`
|
|
84
|
+
- `docs list --project-id <id> --type technical_design`
|
|
85
|
+
- `docs list --project-id <id> --type general_context` (constraints and background often live here)
|
|
77
86
|
4. If an ADR governs the change, read it (`--type adr`) before contradicting prior decisions.
|
|
78
87
|
|
|
79
88
|
Compliance rules while coding:
|
|
80
89
|
|
|
90
|
+
- Honor project Rules (`doc_type: rules`) — do not violate Must / Must Not or coding standards
|
|
81
91
|
- Honor the Feature Spec's API contract and data model verbatim
|
|
82
92
|
- Every edge-case table row becomes a required test
|
|
83
93
|
- UI work must conform to the approved design-system doc (tokens, components, a11y)
|
|
@@ -87,7 +97,24 @@ Compliance rules while coding:
|
|
|
87
97
|
On completion:
|
|
88
98
|
|
|
89
99
|
- Record deviations under the design/implementation notes **Deviations from Spec** section
|
|
90
|
-
- Link the PR with `
|
|
100
|
+
- Link the PR with `{ticket_prefix}-<n>` in the branch name or title (`tasks pr-link` if needed)
|
|
101
|
+
|
|
102
|
+
## Recording decisions in the source of truth
|
|
103
|
+
|
|
104
|
+
The document set only works as a source of truth if decisions land in it explicitly. Agents may update project documents, but every decision made during work must be recorded — never applied silently in code alone.
|
|
105
|
+
|
|
106
|
+
Rules:
|
|
107
|
+
|
|
108
|
+
- Every content update writes a new revision. Always pass `change_summary` stating what changed and why:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
noreaster docs update <id> --data '{"content":"...","change_summary":"Recorded decision: switched session storage to Redis (perf, NOR-42)"}'
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
- Architectural decisions (technology choices, service boundaries, data model direction) go in a new ADR (`doc_type: "adr"`), not buried in an edit. Then update the affected `architecture` / `technical_design` doc to reflect it, with a `change_summary` referencing the ADR.
|
|
115
|
+
- Implementation decisions that deviate from or refine an approved doc: update the governing doc's **Decision Log** / **Deviations from Spec** section with date, decision, rationale, and who decided — plus a `change_summary`.
|
|
116
|
+
- Never rewrite history: use `docs revisions <id>` to inspect prior versions; corrections are new revisions, not silent replacements.
|
|
117
|
+
- Approved docs are gated: content edits to an `approved` doc still record revisions, but status changes go through review (`reviews request` → human approval). If your change invalidates an approval, say so and request re-review rather than working around it.
|
|
91
118
|
|
|
92
119
|
## Work Discovery
|
|
93
120
|
|
|
@@ -114,9 +141,9 @@ Do not invent silent auto-apply behavior.
|
|
|
114
141
|
|
|
115
142
|
## NOR Short IDs and PR Linking
|
|
116
143
|
|
|
117
|
-
- Work items have
|
|
118
|
-
- Branch convention: `
|
|
119
|
-
- Put `
|
|
144
|
+
- Work items have per-project short IDs rendered as `{ticket_prefix}-<n>` (starting at 1 per project)
|
|
145
|
+
- Branch convention: `{prefix}-<n>-<kebab-title>` (e.g. `aim-12-fix-login`)
|
|
146
|
+
- Put `{ticket_prefix}-<n>` in the branch name or PR title so the webhook can auto-link
|
|
120
147
|
- Manual link: `tasks pr-link <id> --url <github-pr-url>`
|
|
121
148
|
- Unlink: `tasks pr-unlink <id> --url <github-pr-url>`
|
|
122
149
|
- PR merge never silently moves work-item status; humans accept "PR merged — move to done?"
|
|
@@ -201,7 +228,7 @@ Empty `content` on create is seeded from the template for that `doc_type`.
|
|
|
201
228
|
## Quick Command Examples
|
|
202
229
|
|
|
203
230
|
```bash
|
|
204
|
-
npm install -g @hechura/noreaster-cli@0.2.
|
|
231
|
+
npm install -g @hechura/noreaster-cli@0.2.3
|
|
205
232
|
noreaster skill install
|
|
206
233
|
noreaster my-work
|
|
207
234
|
noreaster features list --project-id <project-id>
|