doctrina-cli 0.9.0 → 0.11.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/README.md +1 -1
- package/package.json +1 -1
- package/src/commands/completion.js +116 -0
- package/src/commands/constitution.js +138 -0
- package/src/commands/context.js +118 -22
- package/src/commands/coverage.js +41 -16
- package/src/commands/doctor.js +135 -0
- package/src/commands/handoff.js +94 -0
- package/src/commands/init.js +12 -1
- package/src/commands/next.js +32 -16
- package/src/commands/prime.js +118 -0
- package/src/commands/report.js +142 -0
- package/src/commands/show.js +173 -0
- package/src/commands/status.js +70 -40
- package/src/commands/trace.js +15 -2
- package/src/commands/validate.js +97 -1
- package/src/commands/why.js +132 -36
- package/src/index.js +12 -41
- package/src/lib/commands.js +115 -0
- package/src/lib/criteria.js +76 -0
- package/src/lib/index-json.js +1 -0
- package/src/lib/scan.js +7 -0
- package/templates/AGENTS.md.template +3 -2
- package/templates/README.md +7 -1
- package/templates/adapters/aider/CONVENTIONS.md.template +4 -3
- package/templates/adapters/claude/.claude/commands/doctrina-context.md.template +13 -0
- package/templates/adapters/claude/.claude/commands/doctrina-next.md.template +13 -0
- package/templates/adapters/claude/.claude/commands/doctrina-status.md.template +12 -0
- package/templates/adapters/claude/.claude/commands/doctrina-why.md.template +12 -0
- package/templates/adapters/claude/.claude/commands/doctrina-work.md.template +17 -0
- package/templates/adapters/cursor/.cursor/commands/doctrina-context.md.template +10 -0
- package/templates/adapters/cursor/.cursor/commands/doctrina-next.md.template +10 -0
- package/templates/adapters/cursor/.cursor/commands/doctrina-status.md.template +10 -0
- package/templates/adapters/cursor/.cursor/commands/doctrina-why.md.template +9 -0
- package/templates/adapters/cursor/.cursor/commands/doctrina-work.md.template +12 -0
- package/templates/doctrina/index.json.template +3 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Turn a request into a Doctrina change and drive it through the gates
|
|
3
|
+
argument-hint: <prompt describing the change>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Drive the Doctrina spec-driven workflow for **{{PROJECT_NAME}}**.
|
|
7
|
+
|
|
8
|
+
1. `doctrina work "$ARGUMENTS"` — scaffolds the change and prints the playbook.
|
|
9
|
+
(No prompt, but you already edited code? Use `doctrina work --from-diff`.)
|
|
10
|
+
2. Execute the printed playbook in order: read the pack with
|
|
11
|
+
`doctrina context <capability> --concat`, write the spec delta, fill
|
|
12
|
+
`tasks.md`, implement, then `doctrina analyze <id>` → `doctrina change apply <id>`.
|
|
13
|
+
3. Close it: `doctrina close <id>` (verify → coverage → archive → validate) and
|
|
14
|
+
resolve every `error:` before reporting the work done.
|
|
15
|
+
|
|
16
|
+
Reach for the CLI instead of hand-authoring artifacts. Ask the human only on
|
|
17
|
+
genuine ambiguity.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# /doctrina-context — read pack for {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Assemble the context before doing any work.
|
|
4
|
+
|
|
5
|
+
Run `doctrina context <capability> --concat` and read top to bottom:
|
|
6
|
+
AGENTS.md → product.md → the capability spec(s) → open changes → accepted ADRs.
|
|
7
|
+
With no capability it includes every active spec. The change archive is
|
|
8
|
+
excluded by design — run `doctrina why <capability>` when you need history.
|
|
9
|
+
|
|
10
|
+
Do this for ANY task (review, debug, a question), not only new work.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# /doctrina-next — next step for {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Decide the next step from the framework's own signals.
|
|
4
|
+
|
|
5
|
+
1. Run `doctrina next` and `doctrina status` to see open work and gate health.
|
|
6
|
+
2. Do the single highest-priority action it names (resume a change, apply a
|
|
7
|
+
delta, archive, accept an ADR, fix index drift, …).
|
|
8
|
+
3. Re-run `doctrina next` to confirm the item cleared.
|
|
9
|
+
|
|
10
|
+
Use the read-only commands first; never guess what is pending.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# /doctrina-status — health of {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Report the project's health and gate status.
|
|
4
|
+
|
|
5
|
+
Run `doctrina status` for the dashboard (index drift, framework stamp,
|
|
6
|
+
coverage %, trace anchors, verify config, artifact counts). For the
|
|
7
|
+
authoritative gates run `doctrina validate` and `doctrina verify`, and
|
|
8
|
+
`doctrina next` for the recommended action.
|
|
9
|
+
|
|
10
|
+
Summarise what is green, what is not, and the single next step.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# /doctrina-why — provenance for {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Explain why a capability exists and is shaped as it is.
|
|
4
|
+
|
|
5
|
+
Run `doctrina why <capability>` and relay the provenance chain it prints: the
|
|
6
|
+
product intent it Realizes, its purpose and status, the acceptance criteria
|
|
7
|
+
that prove it (with cited evidence), the accepted ADRs that decided it, and
|
|
8
|
+
the archived changes that built it. Read-only — answer from the artifacts,
|
|
9
|
+
don't grep the tree by hand.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# /doctrina-work — drive a change for {{PROJECT_NAME}}
|
|
2
|
+
|
|
3
|
+
Turn the request into a Doctrina change and drive it through the gates.
|
|
4
|
+
|
|
5
|
+
1. Run `doctrina work "<the request>"` (or `doctrina work --from-diff` if you
|
|
6
|
+
already edited code) and follow the printed playbook.
|
|
7
|
+
2. `doctrina context <capability> --concat` → write the spec delta → fill
|
|
8
|
+
`tasks.md` → implement → `doctrina analyze <id>` → `doctrina change apply <id>`.
|
|
9
|
+
3. `doctrina close <id>` (verify → coverage → archive → validate); resolve
|
|
10
|
+
every `error:` before reporting the work done.
|
|
11
|
+
|
|
12
|
+
Prefer the CLI over hand-authoring artifacts. Ask only on genuine ambiguity.
|