reffy-cli 1.7.0 → 1.7.1
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/README.md +78 -2
- package/dist/plan.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -37,6 +37,8 @@ Command summary:
|
|
|
37
37
|
- `reffy remote workspace create|get` and `reffy remote project register|list`: control-plane operations against the workspace manager actor.
|
|
38
38
|
- `reffy diagram render`: renders Mermaid diagrams as SVG or ASCII, including spec-aware generation from compatible `spec.md` files.
|
|
39
39
|
|
|
40
|
+
Run `reffy <command> --help` for the full flag list of any command. Most commands accept `--repo PATH` so they can be invoked from outside the project root (useful for agent harnesses).
|
|
41
|
+
|
|
40
42
|
Output modes:
|
|
41
43
|
|
|
42
44
|
- `--output text` (default)
|
|
@@ -56,7 +58,7 @@ reffy plan create --change-id add-login-flow --artifacts login-idea.md
|
|
|
56
58
|
reffy plan list --output json
|
|
57
59
|
reffy plan archive add-login-flow
|
|
58
60
|
reffy spec show auth --output json
|
|
59
|
-
reffy remote init --
|
|
61
|
+
reffy remote init --provision
|
|
60
62
|
reffy remote status --output json
|
|
61
63
|
reffy remote push
|
|
62
64
|
reffy remote ls
|
|
@@ -66,6 +68,35 @@ reffy diagram render --input .reffy/reffyspec/specs/auth/spec.md --format ascii
|
|
|
66
68
|
reffy diagram render --input .reffy/reffyspec/specs/auth/spec.md --format svg --output .reffy/artifacts/auth-spec.svg
|
|
67
69
|
```
|
|
68
70
|
|
|
71
|
+
## Diagnostics and Inspection
|
|
72
|
+
|
|
73
|
+
### `reffy doctor`
|
|
74
|
+
|
|
75
|
+
Audits the local Reffy setup: the `.reffy/` workspace exists, `manifest.json` is valid, managed `AGENTS.md` blocks are in place, and optional tooling (mermaid CLI) is reachable. Useful as a first step when a command is misbehaving in an unfamiliar repo.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
reffy doctor # human-readable check list
|
|
79
|
+
reffy doctor --output json # machine-readable for CI
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### `reffy summarize`
|
|
83
|
+
|
|
84
|
+
Produces a read-only handoff summary of indexed artifacts — titles, kinds, tags, related changes, derived outputs. Use it to brief a fresh agent or to audit what context has accumulated under `.reffy/artifacts/` without opening every file.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
reffy summarize # text overview grouped by kind
|
|
88
|
+
reffy summarize --output json # full structured payload
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### `reffy spec list|show`
|
|
92
|
+
|
|
93
|
+
Inspects the current truth in `.reffy/reffyspec/specs/`. Each capability has its own spec file with requirements and scenarios; `list` enumerates capabilities, `show` prints one spec's requirements.
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
reffy spec list
|
|
97
|
+
reffy spec show remote-workspace-manager --output json
|
|
98
|
+
```
|
|
99
|
+
|
|
69
100
|
## Remote Sync
|
|
70
101
|
|
|
71
102
|
Reffy can publish the local `.reffy/` workspace to a Paseo-backed remote workspace and inspect it later with native CLI commands.
|
|
@@ -239,7 +270,52 @@ A practical pattern is:
|
|
|
239
270
|
3. Keep a clear traceable path from exploratory artifacts to formal specs.
|
|
240
271
|
4. Use Reffy commands for day-to-day workflow.
|
|
241
272
|
|
|
242
|
-
|
|
273
|
+
### Planning lifecycle
|
|
274
|
+
|
|
275
|
+
The end-to-end arc for a non-trivial change:
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
# 1. Capture raw context as artifacts. Each artifact is a free-form
|
|
279
|
+
# markdown note; reindex registers it in the manifest.
|
|
280
|
+
echo "..." > .reffy/artifacts/login-flow-idea.md
|
|
281
|
+
reffy reindex
|
|
282
|
+
|
|
283
|
+
# 2. Scaffold a ReffySpec change from selected artifacts. This creates
|
|
284
|
+
# .reffy/reffyspec/changes/add-login-flow/ with proposal, design,
|
|
285
|
+
# tasks, and a placeholder spec delta — all linked back to the
|
|
286
|
+
# artifacts you passed in.
|
|
287
|
+
reffy plan create \
|
|
288
|
+
--change-id add-login-flow \
|
|
289
|
+
--artifacts login-flow-idea.md \
|
|
290
|
+
--title "Add login flow"
|
|
291
|
+
|
|
292
|
+
# 3. Edit the generated files:
|
|
293
|
+
# - proposal.md: Why / What Changes / Impact / Reffy References
|
|
294
|
+
# - design.md: decisions, data model, open questions
|
|
295
|
+
# - tasks.md: implementation + verification checklists
|
|
296
|
+
# - specs/<capability>/spec.md: ADDED / MODIFIED / REMOVED requirements
|
|
297
|
+
# with at least one Scenario each
|
|
298
|
+
|
|
299
|
+
# 4. Validate before implementing. Catches missing scenarios, malformed
|
|
300
|
+
# delta sections, and broken artifact references.
|
|
301
|
+
reffy plan validate add-login-flow
|
|
302
|
+
|
|
303
|
+
# 5. Implement, tick tasks in tasks.md as you go, re-validate.
|
|
304
|
+
|
|
305
|
+
# 6. Archive once shipped. Moves the change under
|
|
306
|
+
# .reffy/reffyspec/changes/archive/<date>-<change-id>/ and merges
|
|
307
|
+
# the delta spec(s) into the canonical specs in
|
|
308
|
+
# .reffy/reffyspec/specs/.
|
|
309
|
+
reffy plan archive add-login-flow
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
Useful side commands during the arc:
|
|
313
|
+
|
|
314
|
+
- `reffy plan list` — enumerate active and archived changes.
|
|
315
|
+
- `reffy plan show <change-id>` — inspect one change's state without opening every file.
|
|
316
|
+
- `reffy spec list` / `reffy spec show <capability>` — see the canonical specs the deltas will land into.
|
|
317
|
+
|
|
318
|
+
### Reference implementation in this repo
|
|
243
319
|
|
|
244
320
|
- `AGENTS.md`: contains both managed instruction blocks and encodes sequencing.
|
|
245
321
|
- `AGENTS.md`: Reffy block routes ideation/exploration requests to `@/.reffy/AGENTS.md`.
|
package/dist/plan.js
CHANGED
|
@@ -94,7 +94,7 @@ function normalizeHeading(value) {
|
|
|
94
94
|
return value.trim().toLowerCase().replace(/[^a-z0-9 ]+/g, "");
|
|
95
95
|
}
|
|
96
96
|
function extractMarkdownSections(content) {
|
|
97
|
-
const sections =
|
|
97
|
+
const sections = Object.create(null);
|
|
98
98
|
let current = "root";
|
|
99
99
|
sections[current] = [];
|
|
100
100
|
for (const rawLine of content.split(/\r?\n/)) {
|