Skip to content

/nova-wrap

The step that makes nova-spec learn. Without it, the system has no memory and the next ticket starts from zero.

text
/nova-wrap

What it does, in order

  1. Detects architectural decisions — if a real choice was made with an alternative and trade-off, invokes the write-decision skill. The skill creates context/decisions/<concept>.md and, if it supersedes an old decision, includes > Supersedes: <old>.md and runs git mv context/decisions/<old>.md context/decisions/archived/<old>.md.
  2. Updates services — for each modified service whose public interface changed, invokes update-service-context to rewrite context/services/<svc>.md (≤80 lines, replace, never accumulate).
  3. Captures gotchas — asks if anything counterintuitive emerged that another developer would rediscover. If yes, adds context/gotchas/<concept>.md. Default: don't write — most tickets don't generate a gotcha.
  4. Archives the spec — moves context/changes/active/<TICKET>/context/changes/archive/<TICKET>/.
  5. Commits — uses novaspec/templates/commit.md as the format. Proposes splitting into logical commits if the change is large.
  6. Opens the PR / MR — builds the command via the forge abstraction:
    bash
    npx nova-spec forge pr-command "<title>" "<body>" "<base>"
    This emits gh pr create ... for GitHub or glab mr create ... for GitLab depending on forge.type in config.yml (or auto-detection from git remote). Title format is <TICKET-ID>: <title>. Body uses novaspec/templates/pr-body.md.
  7. Closes the Jira ticket — if jira.skill is set, transitions the ticket to "Done" using jira.transitions.done (or the legacy jira.done_transition_id).
  8. Prints the final summary with all artifacts.

Guardrails

#Check
1Branch matches branch.pattern
5review.md contains ✓ Ready for /nova-wrap
6Superseded decisions are archived (deterministic invariant)

The forge abstraction

nova-wrap never hardcodes gh. The CLI handles the differences:

ForgeCommand emitted
githubgh pr create --base <base> --title <t> --body <b>
gitlabglab mr create --target-branch <base> --title <t> --description <b> --yes

If the CLI is missing (gh: command not found), the command tells you how to install it and offers a manual git push + URL fallback.

GitHub vocabulary is "PR / Pull Request"; GitLab is "MR / Merge Request". npx nova-spec forge term returns PR or MR so user-facing messages match the forge.

See Integrations → Forge for the full setup.

Memory updates

The three skills invoked here are described in Architecture → Memory model. Quick summary:

SkillWhenWhat it writes
write-decisionReal architectural choice with an alternativecontext/decisions/<concept>.md
update-service-contextService's public interface changedRewrites context/services/<svc>.md (≤80 lines)
(gotcha logic)Something counterintuitive surfacedcontext/gotchas/<concept>.md

If you say "no" to all three prompts, /nova-wrap warns: "we're closing without memory, are you sure?" — answer yes if the change really had no architectural weight (most quick-fixes).

What it produces

ArtifactWhere
New decisionscontext/decisions/<concept>.md (and archived copies of superseded ones)
Updated servicescontext/services/<svc>.md
New gotchascontext/gotchas/<concept>.md
Archived speccontext/changes/archive/<TICKET>/
Commit(s)On the ticket branch
PR / MROn GitHub / GitLab
Jira ticketTransitioned to "Done"

Final summary

text
## Ticket PROJ-42 closed

- Spec archived: context/changes/archive/PROJ-42/
- Decisions created: throttling-strategy.md
- Gotchas added: redis-key-collision.md
- Services updated: auth-api
- Commits: 3
- PR: https://github.com/your/repo/pull/123
- Jira: PROJ-42 → Done ✓

Errors you may see

ErrorWhyFix
✗ Review not approvedreview.md missing the ✓ Ready for /nova-wrap lineRun /nova-review until verdict is
gh: command not found / glab: command not foundForge CLI not installedInstall gh or glab; the command falls back to git push + URL
Jira returns 400 on transitionWrong transitions.done ID for your workflowRun npx nova-spec jira transitions PROJ-42 to list, update config.yml
Superseded decision still at rootForgot the git mv to archived/The guardrail blocks; move with git mv

Customizing it

  • PR / MR body → edit novaspec/templates/pr-body.md.
  • Commit format → edit novaspec/templates/commit.md.
  • When to write a decision (e.g. require one for architecture tickets) → edit step 1 of novaspec/commands/nova-wrap.md.
  • Different Jira "Done" workflow → config.ymljira.transitions.done.
  • Switch forge → config.ymlforge.type (github / gitlab / auto / none).

Released under the MIT License.