nova-spec 1.0.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.
Files changed (34) hide show
  1. package/AGENTS.md +61 -0
  2. package/LICENSE +21 -0
  3. package/README.md +116 -0
  4. package/bin/nova-spec.js +8 -0
  5. package/lib/cli.js +24 -0
  6. package/lib/installer.js +243 -0
  7. package/lib/sync.js +147 -0
  8. package/novaspec/agents/context-loader.md +65 -0
  9. package/novaspec/agents/nova-review-agent.md +73 -0
  10. package/novaspec/commands/nova-build.md +70 -0
  11. package/novaspec/commands/nova-diff.md +64 -0
  12. package/novaspec/commands/nova-plan.md +41 -0
  13. package/novaspec/commands/nova-review.md +35 -0
  14. package/novaspec/commands/nova-spec.md +41 -0
  15. package/novaspec/commands/nova-start.md +82 -0
  16. package/novaspec/commands/nova-status.md +82 -0
  17. package/novaspec/commands/nova-sync.md +46 -0
  18. package/novaspec/commands/nova-wrap.md +94 -0
  19. package/novaspec/config.example.yml +24 -0
  20. package/novaspec/custom/agents/.gitkeep +0 -0
  21. package/novaspec/custom/commands/.gitkeep +0 -0
  22. package/novaspec/custom/skills/.gitkeep +0 -0
  23. package/novaspec/guardrails/checklist.md +34 -0
  24. package/novaspec/skills/close-requirement/SKILL.md +56 -0
  25. package/novaspec/skills/jira-integration/SKILL.md +96 -0
  26. package/novaspec/skills/update-service-context/SKILL.md +60 -0
  27. package/novaspec/skills/write-decision/SKILL.md +69 -0
  28. package/novaspec/templates/commit.md +6 -0
  29. package/novaspec/templates/pr-body.md +20 -0
  30. package/novaspec/templates/proposal.md +49 -0
  31. package/novaspec/templates/review.md +22 -0
  32. package/novaspec/templates/status-report.md +8 -0
  33. package/novaspec/templates/tasks.md +24 -0
  34. package/package.json +36 -0
@@ -0,0 +1,34 @@
1
+ # Guardrails — Checklist
2
+
3
+ **Execution order: 1 → 2 → 3 → 4 → 5 → 6**
4
+
5
+ ## 1. branch-pattern
6
+ Verify the active ticket branch. Extract `<ticket-id>` from the current git branch.
7
+ - Must follow the pattern `(feature|fix|arch)/<TICKET>-<slug>` from `novaspec/config.yml`.
8
+ - ⛔ **Stop.** Run `/nova-start <TICKET>` first.
9
+
10
+ ## 2. proposal-exists
11
+ Verify the spec is drafted.
12
+ - `context/changes/active/<ticket-id>/proposal.md` must exist.
13
+ - ⛔ **Stop.** Run `/nova-spec` first.
14
+
15
+ ## 3. tasks-exist
16
+ Verify tasks. Quick-fix exception (`fix/` branch).
17
+ - If **not quick-fix**: `context/changes/active/<ticket-id>/tasks.md` must exist.
18
+ - If **quick-fix**: you can continue without `tasks.md`.
19
+ - ⛔ **Stop.** Run `/nova-plan` first.
20
+
21
+ ## 4. all-tasks-done
22
+ Verify tasks completed. Quick-fix exception without `tasks.md`.
23
+ - If **tasks.md exists**: no `- [ ]` should remain.
24
+ - ⛔ **Stop.** Run `/nova-build` first.
25
+
26
+ ## 5. review-approved
27
+ Verify the review was approved.
28
+ - `review.md` must exist with the line `✓ Ready for /nova-wrap`.
29
+ - ⛔ **Stop.** Run `/nova-review` first.
30
+
31
+ ## 6. old-decision-archived
32
+ Validate that superseded decisions are archived.
33
+ - Files in `context/decisions/*.md` with `> Supersedes: X.md` imply that `X.md` lives in `context/decisions/archived/`, not at the root.
34
+ - ⛔ **Stop.** Move the file to `archived/` with `git mv` and retry.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: close-requirement
3
+ description: Turn a vague ticket into a closed requirement with structured questions.
4
+ ---
5
+
6
+ # Close requirement
7
+
8
+ Transform a vague ticket into a requirement with closed decisions.
9
+
10
+ ## Prior context
11
+
12
+ Read before asking:
13
+ - `context/services/<service>.md`
14
+ - 3-5 files from `context/decisions/` whose name is relevant to the ticket (never `archived/`)
15
+ - Files from `context/gotchas/` if any are relevant
16
+
17
+ ## Steps
18
+
19
+ ### 1. Understand the ask
20
+
21
+ What they want, what problem it solves, what's unclear.
22
+
23
+ ### 2. Clarifying questions
24
+
25
+ Goal: force decisions, don't explore.
26
+
27
+ - conversational tone, max 3 questions per turn
28
+ - prefer trade-offs (A vs B) over open-ended
29
+ - include a suggested default anchored in the code
30
+
31
+ ### Mandatory dimensions
32
+
33
+ 1. Shape of the solution
34
+ 2. Expected output
35
+ 3. Behavior (normal, edge, failure)
36
+ 4. Actor and context
37
+ 5. Scope
38
+ 6. Success criteria
39
+
40
+ ### 3. Iterate until closed
41
+
42
+ Don't advance if there are open decisions.
43
+
44
+ ### 4. Confirm before drafting
45
+
46
+ > "All clear. Should I draft the final requirement?"
47
+
48
+ ## Output
49
+
50
+ Template: `novaspec/templates/proposal.md` (use it after confirmation)
51
+
52
+ ## Rules
53
+
54
+ - Don't write code
55
+ - Don't assume missing decisions
56
+ - Don't draft if there are open decisions
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: jira-integration
3
+ description: Read and create tasks in Jira via the REST API. Uses the project's config.yml (`jira` section).
4
+ ---
5
+
6
+ # Jira Integration
7
+
8
+ Read and create issues in Jira using Atlassian's REST API v3.
9
+
10
+ ## Required config in config.yml
11
+
12
+ ```yaml
13
+ jira:
14
+ skill: jira-integration
15
+ url: https://your-org.atlassian.net # no trailing slash
16
+ project: PROJ # default project key
17
+ email: you@email.com
18
+ token: ${JIRA_API_TOKEN} # reference to env variable
19
+ done_transition_id: "41" # find it via GET /rest/api/3/issue/<TICKET>/transitions
20
+ ```
21
+
22
+ Get the token at: https://id.atlassian.com/manage-profile/security/api-tokens
23
+
24
+ ## How to use this skill
25
+
26
+ When the user asks to read or create Jira tasks:
27
+
28
+ 1. **Read the config**: read the project's `config.yml` and extract the `jira` section.
29
+ 2. **Resolve the token**: if the value starts with `${`, read the corresponding env variable (e.g. `$JIRA_API_TOKEN`).
30
+ 3. **Build Basic Auth credentials**: `base64(email:token)`.
31
+ 4. **Call the API** with `curl` for the requested operation.
32
+
33
+ ## Operations
34
+
35
+ ### Read a ticket
36
+
37
+ ```bash
38
+ curl -s \
39
+ -H "Authorization: Basic <BASE64>" \
40
+ -H "Accept: application/json" \
41
+ "https://<url>/rest/api/3/issue/<TICKET_KEY>"
42
+ ```
43
+
44
+ Show the user: key, summary, status (status.name), description, assignee.
45
+
46
+ ### List tickets in a project (recent open ones)
47
+
48
+ ```bash
49
+ curl -s \
50
+ -H "Authorization: Basic <BASE64>" \
51
+ -H "Accept: application/json" \
52
+ "https://<url>/rest/api/3/search?jql=project=<PROJECT>+AND+statusCategory!=Done+ORDER+BY+created+DESC&maxResults=20&fields=summary,status,assignee,priority"
53
+ ```
54
+
55
+ ### Create a ticket
56
+
57
+ ```bash
58
+ curl -s -X POST \
59
+ -H "Authorization: Basic <BASE64>" \
60
+ -H "Content-Type: application/json" \
61
+ -H "Accept: application/json" \
62
+ "https://<url>/rest/api/3/issue" \
63
+ -d '{
64
+ "fields": {
65
+ "project": { "key": "<PROJECT>" },
66
+ "summary": "<TITLE>",
67
+ "description": {
68
+ "type": "doc", "version": 1,
69
+ "content": [{"type": "paragraph", "content": [{"type": "text", "text": "<DESCRIPTION>"}]}]
70
+ },
71
+ "issuetype": { "name": "<TYPE>" }
72
+ }
73
+ }'
74
+ ```
75
+
76
+ ### Transition ticket to Done
77
+
78
+ ```bash
79
+ AUTH=$(echo -n "<email>:<token>" | base64)
80
+ curl -s -X POST \
81
+ -H "Authorization: Basic $AUTH" \
82
+ -H "Content-Type: application/json" \
83
+ "https://<url>/rest/api/3/issue/<TICKET-ID>/transitions" \
84
+ -d "{\"transition\": {\"id\": \"<done_transition_id>\"}}"
85
+ ```
86
+
87
+ Use `done_transition_id` from `config.yml`. To find your transition IDs:
88
+ ```bash
89
+ curl -s -H "Authorization: Basic <BASE64>" "https://<url>/rest/api/3/issue/<ANY-TICKET>/transitions"
90
+ ```
91
+
92
+ ## Notes
93
+
94
+ - If `token` is not in config.yml, ask the user to set it.
95
+ - If the project is not specified in the request, use the `project` from config.yml.
96
+ - On HTTP errors (401, 403, 404), show Jira's error message but never expose the token.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: update-service-context
3
+ description: Update context/services/<svc>.md when service behavior changes.
4
+ ---
5
+
6
+ # Update `context/services/<svc>.md`
7
+
8
+ ## When to update
9
+
10
+ - Add/remove responsibilities
11
+ - Modify public contracts
12
+ - Change integrations
13
+ - Introduce new dependencies
14
+ - Change observable behavior
15
+
16
+ **Don't** for internal changes with no external impact.
17
+
18
+ ## Steps
19
+
20
+ ### 1. Check if it exists
21
+
22
+ The file lives at `context/services/<svc>.md`.
23
+
24
+ If it doesn't exist, ask whether to create it (recommended).
25
+
26
+ ### 2. Identify changes
27
+
28
+ Compare previous state vs new.
29
+
30
+ ### 3. Template
31
+
32
+ Use this basic structure (keep the file ≤80 lines; replace, don't accumulate):
33
+
34
+ ```
35
+ # <svc>
36
+
37
+ ## What it does
38
+ ## Public interfaces
39
+ ## Dependencies
40
+ ## Last update: YYYY-MM-DD — <ticket>
41
+ ```
42
+
43
+ ### 4. Propose diff
44
+
45
+ ```
46
+ ## Proposed changes
47
+ - [before] ...
48
+ - [after] ...
49
+ ```
50
+
51
+ > "Apply, adjust, or cancel?"
52
+
53
+ Only write after confirmation.
54
+
55
+ ## Rules
56
+
57
+ - Don't make up responsibilities
58
+ - If it's internal with no impact, don't update
59
+ - Short file (≤80 lines)
60
+ - Don't repeat decisions here; reference `context/decisions/<file>.md` if applicable
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: write-decision
3
+ description: Create a file in context/decisions/ when a real technical decision with an alternative is made.
4
+ ---
5
+
6
+ # Write decision
7
+
8
+ Create an atomic markdown file under `context/decisions/`. No numbering, no frontmatter, concept-name.
9
+
10
+ ## When to create
11
+
12
+ - **Yes**: choice between real technical alternatives with trade-off, change of an established pattern, new dependency, decision another dev (or you in 6 months) should know.
13
+ - **No**: bug fixes, cosmetic refactor, already-documented patterns, claims with no alternative explored.
14
+
15
+ Default: **don't write**. Most tickets don't generate a decision.
16
+
17
+ ## Steps
18
+
19
+ ### 1. Filename
20
+
21
+ `<concept-kebab-case>.md`. Examples: `symlinks-vs-copy.md`, `guardrails-per-step.md`. **Do not** use `NNNN-` numbering. The name is the index.
22
+
23
+ ### 2. Does it supersede a previous decision?
24
+
25
+ If yes:
26
+ - The new file starts with a line `> Supersedes: <old-file>.md`.
27
+ - Run `git mv context/decisions/<old-file>.md context/decisions/archived/<old-file>.md`.
28
+
29
+ ### 3. Ask for the data
30
+
31
+ > I need:
32
+ > 1. Concept-name for the file
33
+ > 2. Decision (one line)
34
+ > 3. Discarded alternatives and why (brief)
35
+ > 4. Consequences / accepted cost
36
+ > 5. Does it supersede an existing decision? (file name)
37
+
38
+ ### 4. Structure
39
+
40
+ ```
41
+ # <Concept title>
42
+
43
+ [> Supersedes: <old-file>.md ← only if applicable]
44
+
45
+ **Date**: YYYY-MM-DD
46
+
47
+ ## Decision
48
+ <one line>
49
+
50
+ ## Discarded alternative
51
+ <what and why>
52
+
53
+ ## Why
54
+ <the real argument>
55
+
56
+ ## Accepted cost
57
+ <what we lose>
58
+ ```
59
+
60
+ ### 5. Confirm before saving
61
+
62
+ Only write after confirmation.
63
+
64
+ ## Rules
65
+
66
+ - Don't make up alternatives.
67
+ - Fits on a screen or atomicity fails (split into two files).
68
+ - One fact, one file. Never update with new info — create another file with supersede.
69
+ - Never write directly into `context/decisions/archived/`.
@@ -0,0 +1,6 @@
1
+ <type>(<scope>): <summary>
2
+
3
+ <optional body>
4
+
5
+ Refs: <TICKET-ID>
6
+ Decisions: <context/decisions/<file>.md if applicable>
@@ -0,0 +1,20 @@
1
+ ## Ticket
2
+ <link to Jira>
3
+
4
+ ## Summary
5
+ <what changes and why>
6
+
7
+ ## Spec
8
+ context/changes/archive/<ticket-id>/proposal.md
9
+
10
+ ## Decisions
11
+ - context/decisions/<file>.md (if applicable)
12
+
13
+ ## Manual verification
14
+ <steps from tasks.md or the spec>
15
+
16
+ ## Checklist
17
+ - [x] Spec archived
18
+ - [x] Services updated (if applicable)
19
+ - [x] Decision created (if applicable)
20
+ - [x] Review without blockers
@@ -0,0 +1,49 @@
1
+ <!-- Keep this spec ≤ 60 lines. Bullets and tables, not prose. It's loaded on every nova-build turn. -->
2
+ # <TICKET-ID>: <title>
3
+
4
+ ## Story
5
+ As <actor>, I want <capability>, so that <outcome>.
6
+
7
+ ## Goal
8
+ <what becomes possible>
9
+
10
+ ## Context
11
+ <problem and why it matters>
12
+
13
+ ## Scope
14
+ ### In scope
15
+ - <items>
16
+
17
+ ### Out of scope
18
+ - <items>
19
+
20
+ ## Closed decisions
21
+ - <list>
22
+
23
+ ## Expected behavior
24
+ - Normal: <...>
25
+ - Edge cases: <...>
26
+ - Failure: <...>
27
+
28
+ ## Expected output
29
+ <...>
30
+
31
+ ## Success criteria
32
+ - <observables>
33
+
34
+ ## Architectural impact
35
+ - Affected services: <list>
36
+ - Referenced decisions: <list or "none">
37
+ - Requires a new decision?: yes | no | maybe
38
+
39
+ ## Verification without automated tests
40
+ ### Manual flow
41
+ 1. <reproducible steps>
42
+
43
+ ### What to check
44
+ - Logs: <...>
45
+ - DB: <...>
46
+ - API/UI: <...>
47
+
48
+ ## Risks
49
+ - <risk>: <mitigation>
@@ -0,0 +1,22 @@
1
+ # Review: <TICKET-ID>
2
+
3
+ ## Spec compliance
4
+ - [✓/✗] <criterion>: <detail>
5
+
6
+ ## Conventions
7
+ - <findings or "no issues">
8
+
9
+ ## Decisions
10
+ - <conflicts or "no conflicts">
11
+
12
+ ## Risks
13
+ - <risks or "none">
14
+
15
+ ## Blockers
16
+ - <must be resolved before /nova-wrap>
17
+
18
+ ## Suggestions
19
+ - <optional improvements>
20
+
21
+ ## Verdict
22
+ ✓ Ready for /nova-wrap
@@ -0,0 +1,8 @@
1
+ ## Status of ticket <TICKET-ID>
2
+
3
+ Title : <title>
4
+ Branch : <current git branch>
5
+ Step : <step>
6
+ Progress : <N completed> / <M total> tasks ← only if step is "do"
7
+ Next : <next command>
8
+ Archived : context/changes/archive/<ticket-id>/ ← only if step is "archived"
@@ -0,0 +1,24 @@
1
+ # Plan + tasks: <TICKET-ID>
2
+
3
+ ## Strategy
4
+ <2-3 lines on how to approach the change>
5
+
6
+ ## Files to touch
7
+ - `<path>`: <what changes>
8
+
9
+ ## New files
10
+ - `<path>`: <what it contains>
11
+
12
+ ## Safety net
13
+ - Reversibility: <feature flag | toggle | how to revert>
14
+ - What can break: <specific>
15
+ - Rollback plan: <steps>
16
+
17
+ ## Characterization tests (or verification)
18
+ Before modifying existing code:
19
+ - [ ] Test for <behavior> (or reproducible manual steps)
20
+ - [ ] Test for <edge case>
21
+
22
+ ## Tasks (15–60 min)
23
+ - [ ] 1. <concrete task> — <file(s)>
24
+ - [ ] 2. <concrete task> — <file(s)>
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "nova-spec",
3
+ "version": "1.0.0",
4
+ "description": "Spec-Driven Development framework for Claude Code and OpenCode",
5
+ "bin": {
6
+ "nova-spec": "./bin/nova-spec.js"
7
+ },
8
+ "files": [
9
+ "bin/",
10
+ "lib/",
11
+ "novaspec/",
12
+ "AGENTS.md"
13
+ ],
14
+ "scripts": {
15
+ "test": "echo \"No automated tests — use smoke test in CLAUDE.md\""
16
+ },
17
+ "dependencies": {
18
+ "@inquirer/prompts": "^7.0.0"
19
+ },
20
+ "engines": {
21
+ "node": ">=18"
22
+ },
23
+ "license": "MIT",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/Adansuku/nova-spec"
27
+ },
28
+ "keywords": [
29
+ "claude-code",
30
+ "opencode",
31
+ "ai-coding",
32
+ "spec-driven-development",
33
+ "jira",
34
+ "workflow"
35
+ ]
36
+ }