bmad-plus 0.23.1 → 0.25.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 (108) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +37 -16
  3. package/SECURITY.md +2 -2
  4. package/package.json +3 -3
  5. package/readme-international/README.de.md +37 -16
  6. package/readme-international/README.es.md +37 -16
  7. package/readme-international/README.fr.md +37 -16
  8. package/src/bmad-plus/agents/agent-architect-dev/SKILL.md +13 -0
  9. package/src/bmad-plus/agents/agent-architect-dev/bmad-skill-manifest.yaml +1 -1
  10. package/src/bmad-plus/agents/agent-maker/SKILL.md +4 -0
  11. package/src/bmad-plus/agents/agent-orchestrator/SKILL.md +13 -0
  12. package/src/bmad-plus/agents/agent-orchestrator/bmad-skill-manifest.yaml +1 -1
  13. package/src/bmad-plus/agents/agent-quality/SKILL.md +13 -0
  14. package/src/bmad-plus/agents/agent-quality/bmad-skill-manifest.yaml +1 -1
  15. package/src/bmad-plus/agents/agent-strategist/SKILL.md +13 -0
  16. package/src/bmad-plus/agents/agent-strategist/bmad-skill-manifest.yaml +1 -1
  17. package/src/bmad-plus/data/role-triggers.yaml +134 -0
  18. package/src/bmad-plus/module-help.csv +1 -0
  19. package/src/bmad-plus/module.yaml +35 -0
  20. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/analyst-agent.md +10 -0
  21. package/src/bmad-plus/packs/pack-dev-studio/categories/analysis/tech-writer-agent.md +7 -0
  22. package/src/bmad-plus/packs/pack-dev-studio/categories/architecture/architect-agent.md +11 -0
  23. package/src/bmad-plus/packs/pack-dev-studio/categories/planning/pm-agent.md +10 -0
  24. package/src/bmad-plus/packs/pack-ghostwriter/SKILL.md +23 -0
  25. package/src/bmad-plus/packs/pack-ghostwriter/bmad-skill-manifest.yaml +13 -0
  26. package/src/bmad-plus/packs/pack-ghostwriter/ghostwriter.md +28 -0
  27. package/src/bmad-plus/packs/pack-ghostwriter/intake.yaml +73 -0
  28. package/src/bmad-plus/packs/pack-ghostwriter/languages/en.md +11 -0
  29. package/src/bmad-plus/packs/pack-ghostwriter/languages/fr-FR.md +15 -0
  30. package/src/bmad-plus/packs/pack-ghostwriter/languages/glossary.md +14 -0
  31. package/src/bmad-plus/packs/pack-ghostwriter/languages/pt-BR.md +11 -0
  32. package/src/bmad-plus/packs/pack-ghostwriter/profiles/README.md +22 -0
  33. package/src/bmad-plus/packs/pack-ghostwriter/profiles/author-note-fr.yaml +20 -0
  34. package/src/bmad-plus/packs/pack-ghostwriter/profiles/character-dialogue-fr.yaml +20 -0
  35. package/src/bmad-plus/packs/pack-ghostwriter/profiles/customer-reply-pt-br.yaml +20 -0
  36. package/src/bmad-plus/packs/pack-ghostwriter/profiles/service-report-en.yaml +20 -0
  37. package/src/bmad-plus/packs/pack-ghostwriter/references/evaluation.md +5 -0
  38. package/src/bmad-plus/packs/pack-ghostwriter/references/provenance.md +32 -0
  39. package/src/bmad-plus/packs/pack-ghostwriter/schemas/config.schema.json +82 -0
  40. package/src/bmad-plus/packs/pack-ghostwriter/schemas/review-result.schema.json +212 -0
  41. package/src/bmad-plus/packs/pack-ghostwriter/schemas/run-manifest.schema.json +197 -0
  42. package/src/bmad-plus/packs/pack-ghostwriter/schemas/voice-profile.schema.json +55 -0
  43. package/src/bmad-plus/packs/pack-ghostwriter/shared/catalog.json +14 -0
  44. package/src/bmad-plus/packs/pack-ghostwriter/shared/editorial-contract.md +38 -0
  45. package/src/bmad-plus/packs/pack-ghostwriter/shared/execution.md +44 -0
  46. package/src/bmad-plus/packs/pack-ghostwriter/tools/inspect-typography.cjs +273 -0
  47. package/src/bmad-plus/packs/pack-ghostwriter/workflows/agent-output-review.md +25 -0
  48. package/src/bmad-plus/packs/pack-ghostwriter/workflows/draft.md +26 -0
  49. package/src/bmad-plus/packs/pack-ghostwriter/workflows/humanize.md +52 -0
  50. package/src/bmad-plus/packs/pack-ghostwriter/workflows/improve.md +26 -0
  51. package/src/bmad-plus/packs/pack-ghostwriter/workflows/localize.md +24 -0
  52. package/src/bmad-plus/packs/pack-ghostwriter/workflows/voice-profile.md +24 -0
  53. package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/README.md +57 -0
  54. package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/brief.md +23 -0
  55. package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/check.cjs +128 -0
  56. package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/jury.json +129 -0
  57. package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/opening.md +1 -0
  58. package/src/bmad-plus/packs/pack-ghostwriter/workshops/council/select.cjs +54 -0
  59. package/src/bmad-plus/packs/pack-ghostwriter/workshops/freytag-pyramid/README.md +32 -0
  60. package/src/bmad-plus/packs/pack-ghostwriter/workshops/freytag-pyramid/specialist.md +12 -0
  61. package/src/bmad-plus/packs/pack-ghostwriter/workshops/hero-journey/README.md +44 -0
  62. package/src/bmad-plus/packs/pack-ghostwriter/workshops/hero-journey/specialist.md +17 -0
  63. package/src/bmad-plus/packs/pack-ghostwriter/workshops/in-medias-res/README.md +15 -0
  64. package/src/bmad-plus/packs/pack-ghostwriter/workshops/in-medias-res/specialist.md +15 -0
  65. package/src/bmad-plus/packs/pack-ghostwriter/workshops/kishotenketsu/README.md +26 -0
  66. package/src/bmad-plus/packs/pack-ghostwriter/workshops/kishotenketsu/specialist.md +10 -0
  67. package/src/bmad-plus/packs/pack-ghostwriter/workshops/narrative-arc/README.md +24 -0
  68. package/src/bmad-plus/packs/pack-ghostwriter/workshops/narrative-arc/specialist.md +9 -0
  69. package/src/bmad-plus/packs/pack-ghostwriter/workshops/snowflake-method/README.md +15 -0
  70. package/src/bmad-plus/packs/pack-ghostwriter/workshops/snowflake-method/specialist.md +15 -0
  71. package/src/bmad-plus/packs/pack-ghostwriter/workshops/story-circle/README.md +28 -0
  72. package/src/bmad-plus/packs/pack-ghostwriter/workshops/story-circle/specialist.md +10 -0
  73. package/src/bmad-plus/packs/pack-ghostwriter/workshops/story-spine/README.md +28 -0
  74. package/src/bmad-plus/packs/pack-ghostwriter/workshops/story-spine/specialist.md +9 -0
  75. package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/README.md +39 -0
  76. package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/briefs/objection.md +27 -0
  77. package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/briefs/proposal.md +15 -0
  78. package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/example.md +11 -0
  79. package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/objections.json +103 -0
  80. package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/proposals.json +79 -0
  81. package/src/bmad-plus/packs/pack-ghostwriter/workshops/three-act/specialist.md +9 -0
  82. package/src/bmad-plus/packs/pack-memory/templates/session-handoff.md +3 -0
  83. package/src/bmad-plus/packs/pack-seo/seo-chief.md +2 -0
  84. package/src/bmad-plus/packs/pack-shield/shield-orchestrator.md +6 -0
  85. package/src/bmad-plus/skills/bmad-plus-challenge/SKILL.md +149 -0
  86. package/src/bmad-plus/skills/bmad-plus-intake/SKILL.md +4 -2
  87. package/src/bmad-plus/skills/bmad-plus-intake/ref/intake-format.md +9 -0
  88. package/src/bmad-plus/skills/ghostwriter-edit/SKILL.md +16 -0
  89. package/src/bmad-plus/skills/ghostwriter-humanize/SKILL.md +16 -0
  90. package/src/bmad-plus/skills/ghostwriter-localize/SKILL.md +16 -0
  91. package/src/bmad-plus/skills/ghostwriter-verify/SKILL.md +16 -0
  92. package/src/bmad-plus/skills/ghostwriter-voice/SKILL.md +16 -0
  93. package/src/bmad-plus/skills/ghostwriter-write/SKILL.md +16 -0
  94. package/tools/build/intake-contract.js +97 -1
  95. package/tools/cli/bmad-plus-cli.js +1 -0
  96. package/tools/cli/commands/ghostwriter.js +76 -0
  97. package/tools/cli/commands/install.js +4 -0
  98. package/tools/cli/commands/intake.js +4 -0
  99. package/tools/cli/lib/ghostwriter-fidelity.js +352 -0
  100. package/tools/cli/lib/ghostwriter-manifest.js +238 -0
  101. package/tools/cli/lib/ghostwriter-nexus.js +542 -0
  102. package/tools/cli/lib/ghostwriter-project.js +304 -0
  103. package/tools/cli/lib/ghostwriter-quantities.js +239 -0
  104. package/tools/cli/lib/ghostwriter-structured.js +154 -0
  105. package/tools/cli/lib/ghostwriter.js +263 -0
  106. package/tools/cli/lib/nexus-process.js +44 -1
  107. package/tools/cli/lib/nexus.js +18 -0
  108. package/tools/cli/lib/packs.js +184 -17
@@ -35,6 +35,8 @@ overrides numeric placeholders in report templates.
35
35
  - **Auto-generate code fixes** for common issues (meta tags, schema JSON-LD, robots.txt improvements)
36
36
  - Estimate impact and effort for each recommendation
37
37
 
38
+ **When to challenge**: open the Core skill `bmad-plus-challenge` before a strategy or roadmap is fixed, when the target markets, the business goal or the pages that must rank are unstated and the audit data does not settle them. Pass the reason, the open decision and what the audit established, with its sources. Do not open it to prioritise the findings of an audit or for a quick win. At most 6 questions per round, a soft cap of 5 rounds, and "stop" ends it at any time. Write the roadmap only after the user confirms the end; build on its `decisions.md`.
39
+
38
40
  ### Role: Reporter
39
41
  **Trigger**: Report generation, export, summary
40
42
  - Produce structured Markdown reports
@@ -179,6 +179,12 @@ Produce a unified report using the `shared/audit-report-template.md` format, hig
179
179
 
180
180
  ---
181
181
 
182
+ ## When to Challenge
183
+
184
+ Open the Core skill `bmad-plus-challenge` before a compliance scope is fixed, when the frameworks, the systems in scope, the data categories or the jurisdictions are not stated and the project files do not settle them. Pass the reason, the open decision and what you already know, with sources. Do not open it for a single-framework question, a control lookup or a review of a stated scope. At most 6 questions per round, a soft cap of 5 rounds, and "stop" ends it at any time. An open scope item stays `unknown` with its risk in the report. Start the analysis only after the user confirms the end; build on its `decisions.md`.
185
+
186
+ ---
187
+
182
188
  ## Interactive Menu
183
189
 
184
190
  When the user is unsure which framework to use, present this interactive guide:
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: bmad-plus-challenge
3
+ description: Stress-test a plan, a design or a decision with the user before any work starts, or attack an existing plan file. Map the choices the plan depends on, look in the project before asking, ask the whole open frontier in one numbered round with a recommended answer for each question, and log every decision as answered, defaulted or unknown in decisions.md. Use when someone says "stress-test", "challenge my plan", "poke holes", "grill the plan", "challenge mon plan", "critique mon plan", "trouve les failles", or when an agent is about to act on a plan whose dependencies are not settled.
4
+ ---
5
+
6
+ # Challenge a plan
7
+
8
+ ## Overview
9
+
10
+ A plan fails where a choice it depends on was never made, or was made on a guess. This skill
11
+ finds those choices before work starts, settles them with the user in few rounds, and writes down
12
+ what was decided, on what basis and at what risk. It asks; it never builds, edits or runs
13
+ anything.
14
+
15
+ ```
16
+ plan ─► decision tree ─► look in the project ─► frontier ─► one numbered round ─► user answers
17
+ ▲ │
18
+ └───────────── answers unlock the next questions ◄──────────────────────┘
19
+ user confirms the end ─► decisions.md ─► hand over
20
+ ```
21
+
22
+ ## When to activate
23
+
24
+ - The user asks to stress-test, challenge, critique or poke holes in a plan, a design or a decision.
25
+ - The user names a plan file to attack (see "Adversarial mode").
26
+ - An agent is about to act on a plan with open dependencies (see "Called by another agent").
27
+
28
+ Do not challenge trivial work: a change that one person reverts in minutes, a request that already
29
+ says exactly what to do, a question with one obvious answer (ask it plainly), a decision a
30
+ `decisions.md` of this subject already covers, or a pack that declares its own questions (see
31
+ "What this skill is not").
32
+
33
+ ## Protocol
34
+
35
+ 1. **Frame.** Restate the plan in two or three lines and pick a subject slug (lowercase, hyphens).
36
+ If `_bmad-output/<subject>/decisions.md` exists, read it and resume from it.
37
+ 2. **Build the decision tree.** List the choices the plan rests on. Give each an id (`d1`, `d2`…)
38
+ and the ids that must be settled before it can even be asked: "which database" waits for
39
+ "single tenant or multi-tenant". Show the user a compact indented tree once, in round 1.
40
+ 3. **Look before you ask.** For every open choice, search the repository, the installed project
41
+ files (`AGENTS.md`, `README`, `package.json`, `docs/`, `project-context.md`) and
42
+ `_bmad-output/`. When the answer is there, do not ask: state what you found and where
43
+ ("`d3` is settled by `package.json`: Node 20"), record it, and move on. The user can overrule it
44
+ in the next message.
45
+ 4. **Find the frontier.** The frontier is every open choice whose prerequisites are all settled
46
+ (answered, defaulted or unknown). Ask the whole frontier in one numbered round, at most 6
47
+ questions. With more, take the ones whose wrong answer costs most and carry the rest over.
48
+ Never put a question in a round while a prerequisite of it is still open, even when its answer
49
+ looks obvious.
50
+ 5. **Ask with a recommendation.** Each question carries the answer you recommend, phrased so that a
51
+ bare "yes" accepts it, and one line of why:
52
+
53
+ ```
54
+ 2. Do users sign in with an email link only?
55
+ Recommended: yes, email link only, no passwords to store or reset.
56
+ Why: the audience is occasional and the plan has no support staff.
57
+ ```
58
+
59
+ Ask in the user's language. A question is one decision, never a bundle.
60
+ 6. **Record what you heard**, one status per decision, the same words as the pack intake:
61
+ - `answered`: the user gave the answer, or said "yes" to a recommendation. A fact found in a
62
+ file counts, with the file as its source.
63
+ - `defaulted`: the user delegated ("your call", "use your defaults") and your recommendation
64
+ stands. It is a proposal the user let stand, not a fact the user gave, and every deliverable
65
+ built on it says so.
66
+ - `unknown`: nobody knows yet. Keep the risk: what breaks if the plan goes ahead on the wrong
67
+ guess, and who or what could settle it.
68
+ 7. **Loop.** Each answer can unlock questions, remove some or add new ones: update the tree, find
69
+ the new frontier, ask the next round. Stop when no choice is open.
70
+ 8. **Soft cap of 5 rounds.** After round 5, stop asking. Summarise what is still open, what each
71
+ open item blocks, and let the user say "stop" or "continue". "Continue" buys more rounds, and
72
+ the summary comes back after each further round. The user can say "stop" at any time: every
73
+ open choice is then recorded `unknown` with its risk, and your recommendation is kept in the
74
+ notes, not adopted.
75
+ 9. **Confirm the end.** Show the table of decisions and ask whether to close the session. Until
76
+ the user confirms, nothing is executed and nothing is written: no commands beyond reading,
77
+ no file created, no plan edited.
78
+ 10. **Write and hand over.** Write `_bmad-output/<subject>/decisions.md` (layout below); a file
79
+ that already exists is updated row by row, never replaced. Then offer
80
+ to hand it to the agent the plan needs next: Atlas for a brief or a PRD, Forge for an
81
+ architecture or a refactor, Nexus for a sprint, a swarm or a parallel run.
82
+
83
+ ## decisions.md
84
+
85
+ ```markdown
86
+ # Decisions — <subject>
87
+
88
+ <One line: the plan, the date (YYYY-MM-DD) and the mode (interview or adversarial).>
89
+
90
+ ## Decisions
91
+
92
+ | ID | Decision | Status | Answer | Source | Risk |
93
+ |----|----------|--------|--------|--------|------|
94
+ | d1 | Who signs in | answered | Staff only | user | |
95
+ | d2 | Session length | defaulted | 12 hours | recommendation | Staff are logged out mid-task if shifts run longer |
96
+ | d3 | Data retention | unknown | | | Deletion rules unknown: a legal review may force a rewrite |
97
+
98
+ ## Open items
99
+
100
+ - d3: what is missing, who can settle it, what it blocks.
101
+
102
+ ## Next
103
+
104
+ Hand over to Forge: why this agent, and what it should read first.
105
+ ```
106
+
107
+ One table, one row per decision. `Source` is `user`, a file path, or `recommendation` for a
108
+ `defaulted` row. `Risk` stays empty on an `answered` row and is never empty on `defaulted` or
109
+ `unknown`. `Open items` lists every `unknown` row and anything the user left unanswered; write
110
+ `None.` when there is none.
111
+
112
+ ## Adversarial mode
113
+
114
+ The user names a plan file ("challenge `docs/plan.md`"). Read it. Do not edit it.
115
+
116
+ 1. List the assumptions the plan rests on, written or implied, as `a1`, `a2`… with one line each.
117
+ 2. Rank them by how much breaks if the assumption is false and how little evidence supports it.
118
+ 3. Attack the weakest first: give the failure scenario in one or two sentences, what the project
119
+ already shows for or against (with the path), and the question or the cheapest test that would
120
+ settle it.
121
+ 4. Assumptions that depend on others wait, as in the decision tree. Rounds, recommendations,
122
+ the soft cap, the "stop" exit and the end-of-session confirmation work as in the protocol.
123
+ 5. `decisions.md` keeps the same layout. Each row is an assumption, the answer is the verdict
124
+ (holds, fails, or what must change), and `Open items` carries the changes the plan needs.
125
+
126
+ ## Called by another agent
127
+
128
+ An agent that is about to act on shaky inputs can open this skill. It states, before the first
129
+ round:
130
+
131
+ - **why** it calls (the plan is about to be frozen, an architecture starts, a run launches);
132
+ - **which decision is open**;
133
+ - **what it already knows**, each fact with its source.
134
+
135
+ What the caller knows is settled: record it with the source `caller: <agent>`, do not search for
136
+ it again and do not ask the user to confirm it. If a lookup you made anyway contradicts it, say so
137
+ once and let the user rule. Start with the open decision and its tree. When the caller names no
138
+ open decision, hand that back instead of opening a session.
139
+
140
+ The result is the same `decisions.md`, handed back to the caller. The caller resumes its own work
141
+ only after the user has confirmed the end of the session.
142
+
143
+ ## What this skill is not
144
+
145
+ - Not the pack intake. When a pack declares its questions, `bmad-plus intake` asks them and keeps
146
+ the book; this skill discovers the questions a plan needs when nobody wrote them down.
147
+ - Not a code review or a test: it does not read the implementation to judge it.
148
+ - Not the plan itself. It settles the choices; Atlas, Forge or Nexus write and run the plan.
149
+ - Not a gate. The user decides, and "stop" always works.
@@ -38,10 +38,12 @@ nor marked unknown with its risk. Never invent an answer.
38
38
  `_bmad-output/<pack>/intake.json`; the brief goes where the pack's first step reads it.
39
39
  2. **Plan.** `bmad-plus intake plan --intake FILE --answers FILE --json`. Exit 0 means ready;
40
40
  exit 2 means a must-have is open. `next` lists what to ask now, must-haves first, in the
41
- file's order, never more than `max_per_message`.
41
+ file's order, never more than `max_per_message`. A question that waits for another
42
+ (`after`) is not in `next`; `blocked` names it and what it waits for.
42
43
  3. **Ask in the user's language** (`language: user`) or in the tag the intake names. One
43
44
  message, the questions of `next`, each with its choices or bounds when it has them, and
44
- the default where one exists ("5 unless you say otherwise"). Do not pad, do not rephrase
45
+ the default where one exists ("5 unless you say otherwise") or the question's `suggest` as
46
+ a recommendation, never as a recorded answer. Do not pad, do not rephrase
45
47
  the question's intent, do not ask what is already recorded.
46
48
  4. **Record what you heard.** `bmad-plus intake record --intake FILE --answers FILE --set
47
49
  id=VALUE ... --json`. A value is checked against the question's kind and bounds and
@@ -49,6 +49,15 @@ sections:
49
49
  - `must_have: true` requires `risk_if_unknown` and forbids `default`: the user answers it or
50
50
  marks it unknown. A question that is not must-have may carry a `default`, valid for its kind.
51
51
  - `feeds` names the artifact anchors the answer fills (`file#anchor`); informative.
52
+ - `after: [id, ...]` (optional) makes a question wait for other questions of the file, in any
53
+ section: `plan` keeps it out of `next` while any of them has no entry in the answers, and lists
54
+ it under `blocked` with the ids it waits for. Any entry settles a prerequisite, `unknown`
55
+ included. The list holds distinct ids of other questions and forms no cycle; `check` refuses
56
+ the rest. A file that declares no `after` has no `blocked` in its plan. A blocked must-have
57
+ still counts as missing.
58
+ - `suggest: text` (optional, at most 4000 characters) is a recommendation `plan` shows next to
59
+ the question, on a must-have too. It is not a default: it is never recorded for the user,
60
+ never counted and never written to the brief. The user still answers.
52
61
  - Question ids are `snake_case` and unique across the whole file; section ids are slugs.
53
62
 
54
63
  ## 2. Answers (`.json`, written by `bmad-plus intake record`)
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: ghostwriter-edit
3
+ description: Restructure an existing draft to help a reader understand, decide or act. Use for substantive editing with an authorized depth of change and a source for each material addition.
4
+ ---
5
+
6
+ # Edit for the reader's task
7
+
8
+ Open the Ghostwriter pack beside the installed skills. Read its [editorial contract](../pack-ghostwriter/shared/editorial-contract.md). The [improve workflow](../pack-ghostwriter/workflows/improve.md) describes the full task. In a source checkout these resources live in `../../packs/pack-ghostwriter/` under the same relative names. If a required resource is missing, identify its path before proceeding.
9
+
10
+ 1. Read the original from beginning to end. Identify its intended result, reader, channel and permitted depth of editing. For reader feedback alone, annotate the original and return the findings without changing it.
11
+ 2. Map each section to the question it answers. Identify repeated explanations, missing prerequisites, assertions without support and exceptions placed too far from the rules they qualify.
12
+ 3. Work on the smallest unit that solves each problem. Move a prerequisite before the step that needs it, bring a condition next to its promise or merge two paragraphs that make the same claim. Preserve the relationship between reasons, outcomes and exceptions when rearranging them.
13
+ 4. Develop a point only from material supplied for this purpose. Record the evidence for substantive additions and the reason for meaningful cuts. Where an unsupported claim needs an owner's decision, flag the passage and the specific missing evidence.
14
+ 5. Compare original and revision, including headings, links and transitions after a move. Confirm the requested action and its conditions still mean the same thing. Deliver the revised copy and, where requested, a separate account of significant changes and unresolved questions.
15
+
16
+ For a returns page with a twenty-day window in the opening and an exception for personalized items in the footer, move the exception beside the eligibility rule. Leave the start date of the twenty days open if the source never defines it.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: ghostwriter-humanize
3
+ description: Humanize a chat reply or draft, remove AI slop and revise repetitive writing patterns while preserving meaning and voice. Explain the limits of editorial changes when a request mentions a watermark.
4
+ ---
5
+
6
+ # Revise for natural expression
7
+
8
+ Open the Ghostwriter pack beside the installed skills. Read its [editorial contract](../pack-ghostwriter/shared/editorial-contract.md). The [humanize workflow](../pack-ghostwriter/workflows/humanize.md) describes the full task. In a source checkout these resources live in `../../packs/pack-ghostwriter/` under the same relative names. If a required resource is missing, identify its path before proceeding.
9
+
10
+ 1. Read the whole message and its conversational context. Identify the actual question, reader and voice. In a mixed document, identify the permitted prose fields and keep the technical regions intact. If you can see only an excerpt, state the extent of the review.
11
+ 2. Locate a few exact passages where wording slows the reader. For AI slop, ask what information the reader would lose if the sentence disappeared. Cut filler, empty praise and unsupported superlatives. For writing patterns, compare nearby paragraphs or chat turns for repeated openings, forced contrasts, artificial groups of three and endings that echo the question. A single word, triad, dash or recurring technical term can be appropriate. Judge its function in this passage.
12
+ 3. Make a targeted edit. Put the useful information where the reader needs it. Keep a genuine qualification, meaningful repetition, customary typographic spacing and the author's rhythm. If the author has asked to keep a particular phrase, preserve it through subsequent passes on this draft. Apply that preference elsewhere only if the author gave it wider scope. Never add a fabricated personal experience, intentional error or filler to simulate a voice.
13
+ 4. Read the revision aloud or sound it out in the context of the next turn. Compare the original and final text for actor, quantities, quotes, links, uncertainty, conditions and actions. Restore any altered commitment.
14
+ 5. If the copy answers the reader, deliver it alone, unchanged when it already works. Flag a missing essential fact in a separate note to the author. In “text only” mode, ask one factual question before drafting only if the gap prevents a usable reply. Otherwise return just the requested text. For an audit, cite the passage and explain its effect on this reader. A stylistic edit establishes neither human authorship nor removal of a statistical watermark.
15
+
16
+ A French support chat opens with “C’est une excellente question. Il convient de noter que le lien expirera vendredi à midi.” If the reader asked when to use the link, “Le lien expirera vendredi à midi.” answers the turn. Retain the hour and day. A later promise of renewal would require evidence.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: ghostwriter-localize
3
+ description: Adapt prose to a target language and market while preserving meaning, variables and commitments. Use for idiomatic localization with an identified audience, glossary and protected content.
4
+ ---
5
+
6
+ # Localize for a specific audience
7
+
8
+ Open the Ghostwriter pack beside the installed skills. Read its [editorial contract](../pack-ghostwriter/shared/editorial-contract.md). The [localize workflow](../pack-ghostwriter/workflows/localize.md) describes the full task. In a source checkout these resources live in `../../packs/pack-ghostwriter/` under the same relative names. If a required resource is missing, identify its path before proceeding.
9
+
10
+ 1. Establish the source and target locale, audience, channel, available space and preferred form of address. Reuse the approved glossary and voice for that market. Resolve ambiguous dates or material regional terms with the supplied context or the author.
11
+ 2. Inventory claims, instructions, quotations, product names, amounts, units, deadlines, exceptions, markup, links and placeholders before drafting. Identify which text fields can change. In structured resources, keep keys, escaping, nesting and variable bindings intact.
12
+ 3. Write a fluent target-language passage around the same reader task. Adjust formality, idiom and unambiguous number or date presentation according to the target locale. Preserve the actual values, currency, units and time zone. A new local guarantee, exchange rate or legal interpretation requires separate authority and evidence.
13
+ 4. Compare source and target side by side, proposition by proposition. Check who acts, when, whether the action is optional, what it costs and which exception applies. Confirm the placeholders remain in the correct clauses at every plural or conditional branch. Re-read the target in isolation for clarity and fit.
14
+ 5. Return the localized copy and any material questions separately. When the source is ambiguous and the choice could change an obligation, retain the ambiguity or identify the passage that needs clarification before use.
15
+
16
+ In a billing message, the English “You may request up to EUR 20 per order” can become “Você pode solicitar até 20 EUR por pedido” in Brazilian Portuguese. Preserve the optional request, the EUR currency, the upper limit and its per-order scope.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: ghostwriter-verify
3
+ description: Compare the exact source and proposed deliverable, identify meaning changes and record the evidence available for editorial review. Use after drafting, editing or localization and when reviewing another agent's output.
4
+ ---
5
+
6
+ # Verify an editorial change
7
+
8
+ Open the Ghostwriter pack beside the installed skills. Read its [editorial contract](../pack-ghostwriter/shared/editorial-contract.md). The [agent-output-review workflow](../pack-ghostwriter/workflows/agent-output-review.md) describes the full task. In a source checkout these resources live in `../../packs/pack-ghostwriter/` under the same relative names. If a required resource is missing, identify its path before proceeding.
9
+
10
+ 1. Obtain the brief, source, candidate, approved profile and scope. Inspect the actual versions that will be delivered. Identify the run and attempt if supplied by the controller. List the selected sections or files and read all of them, including transitions. Record any missing input or unread unit.
11
+ 2. Check protected material with a comparison appropriate to the format. Inspect exact quotations, commands, code, link destinations, keys, variables and markup. For localized quantities and dates compare their values, currency, units and time zone. Record which checks ran and their evidence.
12
+ 3. Match consequential claims in both directions. Look for new commitments, lost exceptions, swapped actors, changed comparisons and substitutions of certainty for possibility. Anchor each finding to a location in the source and the corresponding location or omission in the candidate. Explain its effect on the reader.
13
+ 4. Check factual support only to the depth the brief authorizes. Identify each source actually inspected and mark material unsupported assertions or conflicts. Assess usefulness, clarity, naturalness and fit to the chosen voice separately. Preserving a sentence faithfully leaves its truth an independent question.
14
+ 5. Return the review with coverage, version references, evidence and findings by dimension. Keep the evidence of mechanical checks separate from semantic judgment. Report an interrupted, partial or stale review as incomplete. Recheck changed output. In an orchestrated run, leave acceptance to the controller and supply its expected report format. A self-review cannot satisfy a policy requiring a separate reviewer.
15
+
16
+ If an input reads “Overnight delivery may be available for orders under 5 kg” and the candidate reads “Orders under 5 kg arrive overnight,” record the clause pair and the unsupported guarantee. An unchanged number and unit would pass a numeric check.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: ghostwriter-voice
3
+ description: Select, build or revise a versioned author or brand voice from approved writing samples and explicit preferences. Use when the user wants their own voice, a brand register or a reusable voice profile.
4
+ ---
5
+
6
+ # Build a voice profile
7
+
8
+ Open the Ghostwriter pack beside the installed skills. Read its [editorial contract](../pack-ghostwriter/shared/editorial-contract.md). The [voice-profile workflow](../pack-ghostwriter/workflows/voice-profile.md) describes the full task. In a source checkout these resources live in `../../packs/pack-ghostwriter/` under the same relative names. If a required resource is missing, identify its path before proceeding.
9
+
10
+ 1. Identify whose voice is wanted, the audience, language variant and channel. Reuse an approved profile for that combination when available. For a one-off instruction, apply it to this piece and leave the stored profile alone.
11
+ 2. Ask for an approved excerpt when examples would resolve a material uncertainty. With preferences alone, record them as explicit preferences and leave observations about the author's habits open. Keep samples in their authorized location. Use their references, versions and fingerprints when the profile format requires them.
12
+ 3. Compare passages that perform similar jobs. For each useful observation, note the passage, the choice the author made, the setting in which it works, confidence and any conflicting example. Give the author's explicit preference priority over an inferred habit.
13
+ 4. Test the profile on a passage from the new brief. Carry across choices such as how the author introduces a decision. Take every new factual claim from the new brief or an authorized source. A sample's anecdote, credentials, preference or quotation belongs to its original context.
14
+ 5. Deliver the profile with its scope, version, source references and uncertain observations. Save a project profile only when the user has authorized that write. A lasting correction gets a new version with its reason and predecessor. Preserve earlier profiles and keep generated drafts out of the sample set unless explicitly approved as examples.
15
+
16
+ An editor supplies two status emails beginning with the decision and one formal grant letter beginning with context. Record the decision-first preference for status emails. The grant letter supports a different convention for that audience.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: ghostwriter-write
3
+ description: Draft original reader-facing prose from a brief, notes or permitted sources. Use for a new email, chat response, report, article or other deliverable with a defined reader and purpose.
4
+ ---
5
+
6
+ # Draft from evidence
7
+
8
+ Open the Ghostwriter pack beside the installed skills. Read its [editorial contract](../pack-ghostwriter/shared/editorial-contract.md). The [draft workflow](../pack-ghostwriter/workflows/draft.md) describes the full task. In a source checkout these resources live in `../../packs/pack-ghostwriter/` under the same relative names. If a required resource is missing, identify its path before proceeding.
9
+
10
+ 1. Identify the reader, what they need to know or do, the channel, language and any requested length. Reuse an existing brief, prior turns and selected voice. Ask about a missing detail only when the answer would change the deliverable.
11
+ 2. Read the supplied notes and permitted sources. Identify the evidence for each material claim, who did what, when, under what conditions and with what certainty. Keep quotations, references and fixed technical material available alongside the draft.
12
+ 3. Start with the answer, action or context this particular reader needs first. Choose a form that serves the task. A short status reply may need two sentences. A procedure may need numbered actions and a check after each one.
13
+ 4. Write the draft in the requested voice. Give instructions only for authorized actions supported by the brief. Keep missing evidence out of assertions. Where it changes the reader's decision, state what remains unknown. Never supply an invented quote, customer story, delivery date or experience.
14
+ 5. Read the draft against its source and trace consequential claims, promises and conditions back to specific evidence. Deliver the copy ready for its audience. Keep editorial questions separate from the copy when the delivery mode allows them.
15
+
16
+ For a note saying “The replacement left our warehouse Tuesday. Arrival date pending,” a reply to a customer could read “Your replacement shipped on Tuesday. We’re still waiting for an arrival date.” A promise to follow up tomorrow would need an additional commitment in the brief.
@@ -45,7 +45,10 @@ const QUESTION_KEYS = new Set([
45
45
  'must_have',
46
46
  'feeds',
47
47
  'risk_if_unknown',
48
+ 'after',
49
+ 'suggest',
48
50
  ]);
51
+ const QUESTION_ID_RE = /^[a-z][a-z0-9_]*$/;
49
52
  const ENTRY_KEYS = new Set(['status', 'value', 'risk']);
50
53
 
51
54
  const isPlainObject = (value) =>
@@ -164,6 +167,78 @@ function validateQuestion(question, where, problems) {
164
167
  problems.push(`${where}: "feeds" must list artifact anchors such as brief.md#surface`);
165
168
  }
166
169
  }
170
+ if (question.after !== undefined) {
171
+ if (
172
+ !Array.isArray(question.after) ||
173
+ question.after.length === 0 ||
174
+ !question.after.every((id) => typeof id === 'string' && QUESTION_ID_RE.test(id)) ||
175
+ new Set(question.after).size !== question.after.length
176
+ ) {
177
+ problems.push(`${where}: "after" must list distinct question ids`);
178
+ }
179
+ }
180
+ if (question.suggest !== undefined) {
181
+ if (!isText(question.suggest)) {
182
+ problems.push(`${where}: "suggest" must be a non-empty text`);
183
+ } else if (question.suggest.length > MAX_TEXT) {
184
+ problems.push(`${where}: "suggest" is longer than ${MAX_TEXT} characters`);
185
+ } else if (hasControlCharacter(question.suggest)) {
186
+ problems.push(`${where}: "suggest" holds a control character`);
187
+ }
188
+ }
189
+ }
190
+
191
+ /**
192
+ * The `after` links of a file whose questions are otherwise valid: each id must name
193
+ * another question of the file, and the links must not close a loop.
194
+ */
195
+ function validateOrder(intake, problems) {
196
+ const questions = new Map();
197
+ intake.sections.forEach((section, index) =>
198
+ (isPlainObject(section) && Array.isArray(section.questions) ? section.questions : []).forEach(
199
+ (question, position) => {
200
+ if (
201
+ isPlainObject(question) &&
202
+ typeof question.id === 'string' &&
203
+ !questions.has(question.id)
204
+ )
205
+ questions.set(question.id, {
206
+ question,
207
+ label: `sections[${index}].questions[${position}]`,
208
+ });
209
+ }
210
+ )
211
+ );
212
+ const prerequisites = (id) => {
213
+ const after = questions.get(id).question.after;
214
+ return Array.isArray(after)
215
+ ? after.filter((other) => questions.has(other) && other !== id)
216
+ : [];
217
+ };
218
+ for (const [id, { question, label }] of questions) {
219
+ if (!Array.isArray(question.after)) continue;
220
+ for (const other of question.after) {
221
+ if (typeof other !== 'string' || !QUESTION_ID_RE.test(other)) continue;
222
+ if (other === id) problems.push(`${label}: "after" names the question itself`);
223
+ else if (!questions.has(other))
224
+ problems.push(`${label}: "after" names unknown question "${other}"`);
225
+ }
226
+ }
227
+ // Depth-first walk; a question met again while still on the path closes a cycle.
228
+ const state = new Map();
229
+ const walk = (id, path) => {
230
+ state.set(id, 'open');
231
+ for (const other of prerequisites(id)) {
232
+ if (state.get(other) === 'open') {
233
+ const loop = [...path.slice(path.indexOf(other)), id, other];
234
+ problems.push(
235
+ `${questions.get(id).label}: "after" forms a cycle (each waits for the next): ${loop.join(' -> ')}`
236
+ );
237
+ } else if (!state.has(other)) walk(other, [...path, id]);
238
+ }
239
+ state.set(id, 'done');
240
+ };
241
+ for (const id of questions.keys()) if (!state.has(id)) walk(id, []);
167
242
  }
168
243
 
169
244
  /**
@@ -241,6 +316,7 @@ function validateIntake(intake) {
241
316
  validateQuestion(question, label, problems);
242
317
  });
243
318
  });
319
+ validateOrder(intake, problems);
244
320
  return { ok: problems.length === 0, problems };
245
321
  }
246
322
 
@@ -327,12 +403,16 @@ function publicQuestion(question) {
327
403
  ...(question.max !== undefined ? { max: question.max } : {}),
328
404
  ...(question.default !== undefined ? { default: question.default } : {}),
329
405
  ...(question.risk_if_unknown !== undefined ? { risk: question.risk_if_unknown } : {}),
406
+ ...(question.suggest !== undefined ? { suggest: question.suggest } : {}),
330
407
  };
331
408
  }
332
409
 
333
410
  /**
334
411
  * What to ask next and whether the pack may act. Both inputs must be valid.
335
412
  * `ready` holds once every must-have is answered or marked unknown with its risk.
413
+ * A pending question waits while a question in its `after` has no entry yet (answered,
414
+ * defaulted and unknown all settle it): it stays out of `next` and shows in `blocked`
415
+ * with the ids it waits for. `blocked` is present only when the file declares an `after`.
336
416
  */
337
417
  function planIntake(intake, answers = emptyAnswers(intake)) {
338
418
  const limit = intake.max_per_message ?? MAX_PER_MESSAGE.fallback;
@@ -340,7 +420,14 @@ function planIntake(intake, answers = emptyAnswers(intake)) {
340
420
  const recorded = (question) => entryOf(answers.answers, question.id);
341
421
  const pending = questions.filter((question) => recorded(question) === undefined);
342
422
  const missing = pending.filter((question) => question.must_have === true);
343
- const next = [...missing, ...pending.filter((question) => question.must_have !== true)]
423
+ const waitingFor = (question) =>
424
+ (question.after ?? []).filter((id) => entryOf(answers.answers, id) === undefined);
425
+ const blocked = pending.filter((question) => waitingFor(question).length > 0);
426
+ const askable = (question) => !blocked.includes(question);
427
+ const next = [
428
+ ...missing.filter(askable),
429
+ ...pending.filter((question) => question.must_have !== true && askable(question)),
430
+ ]
344
431
  .slice(0, limit)
345
432
  .map(publicQuestion);
346
433
  const unknowns = questions
@@ -360,6 +447,15 @@ function planIntake(intake, answers = emptyAnswers(intake)) {
360
447
  ready: missing.length === 0,
361
448
  missing: missing.map((question) => question.id),
362
449
  next,
450
+ ...(questions.some((question) => question.after !== undefined)
451
+ ? {
452
+ blocked: blocked.map((question) => ({
453
+ id: question.id,
454
+ mustHave: question.must_have === true,
455
+ waitingFor: waitingFor(question),
456
+ })),
457
+ }
458
+ : {}),
363
459
  unknowns,
364
460
  counts: {
365
461
  questions: questions.length,
@@ -117,6 +117,7 @@ for (const modulePath of [
117
117
  './commands/update-check',
118
118
  './commands/update-policy',
119
119
  './commands/studio',
120
+ './commands/ghostwriter',
120
121
  './commands/nexus',
121
122
  './commands/swarm',
122
123
  './commands/uat',
@@ -0,0 +1,76 @@
1
+ 'use strict';
2
+
3
+ const path = require('node:path');
4
+ const ghostwriter = require('../lib/ghostwriter');
5
+
6
+ const append = (value, entries) => [...entries, value];
7
+
8
+ module.exports = {
9
+ command: 'ghostwriter <action> [run-id]',
10
+ description: 'Prepare an editorial revision, execute it through Nexus, and check its evidence',
11
+ options: [
12
+ ['-d, --directory <path>', 'Installed project directory'],
13
+ ['--workflow <id>', 'Editorial workflow'],
14
+ ['--input <path>', 'One selected project-relative prose file'],
15
+ ['--source <path>', 'Additional factual source (repeatable)', append, []],
16
+ ['--brief <path>', 'Project-relative editorial brief'],
17
+ ['--profile <id>', 'Versioned voice profile (default preserves the draft voice)'],
18
+ ['--locale <locale>', 'Target locale'],
19
+ ['--source-locale <locale>', 'Locale of the source text'],
20
+ ['--content-type <type>', 'Editorial genre (default documentation)'],
21
+ [
22
+ '--field <pointer>',
23
+ 'Editable RFC 6901 field in a JSON or YAML input (repeatable)',
24
+ append,
25
+ [],
26
+ ],
27
+ ['--mode <mode>', 'manual, host_policy or orchestrated'],
28
+ ['--attempt <id>', 'Exact current execution attempt for collection'],
29
+ ['--retry', 'Create a new attempt after a terminal execution'],
30
+ ['--codex <path>', 'Absolute path to the Codex CLI for the orchestrated backend'],
31
+ ['--model <id>', 'Request a model for the observed Codex sessions'],
32
+ ['--json', 'Print the machine-readable result'],
33
+ ],
34
+ action: async (action, id, options = {}) => {
35
+ const root = path.resolve(options.directory || process.cwd());
36
+ try {
37
+ let result;
38
+ if (action === 'prepare' && !id && options.input && options.workflow) {
39
+ result = ghostwriter.prepare(root, options);
40
+ } else if (action === 'run' && id) {
41
+ result = await ghostwriter.run(root, id, options);
42
+ } else if (['collect', 'check', 'gate'].includes(action) && id) {
43
+ if (action === 'collect' && !options.attempt)
44
+ throw new Error('collect requires --attempt attempt-N.');
45
+ result = await ghostwriter.evaluate(root, id, action, options.attempt);
46
+ } else {
47
+ throw new Error(
48
+ 'Use prepare --workflow ID --input FILE, run ID, collect ID --attempt ATTEMPT, check ID or gate ID.'
49
+ );
50
+ }
51
+ if (options.json) console.log(JSON.stringify(result, null, 2));
52
+ else if (result.status === 'prepared')
53
+ console.log(
54
+ 'Prepared ' + result.run_id + '\n' + result.manifest_path + '\nExecution has not started.'
55
+ );
56
+ else
57
+ console.log(
58
+ [result.run_id + ': ' + result.gate.verdict, ...result.gate.reasons, result.receipt_path]
59
+ .filter(Boolean)
60
+ .join('\n')
61
+ );
62
+ // Running a worker and recording evidence are distinct actions; only gate/check assign delivery exit codes.
63
+ if (action === 'run' && result.collection_required === true) process.exitCode = 0;
64
+ else
65
+ process.exitCode = result.gate
66
+ ? { accepted: 0, findings: 1, incomplete: 2 }[result.gate.verdict]
67
+ : 0;
68
+ } catch (error) {
69
+ const verdict = ['check', 'collect', 'gate', 'run'].includes(action) ? 'incomplete' : 'error';
70
+ process.exitCode = verdict === 'error' ? 1 : 2;
71
+ if (options.json)
72
+ console.log(JSON.stringify({ schema_version: 1, status: verdict, error: error.message }));
73
+ else console.error('Ghostwriter: ' + error.message);
74
+ }
75
+ },
76
+ };
@@ -576,6 +576,10 @@ module.exports = {
576
576
  agentGuide.push(` ${i.guide_design.padEnd(28)} → "/design read"`);
577
577
  }
578
578
 
579
+ if (selectedPacks.includes('ghostwriter')) {
580
+ agentGuide.push(` ${packLabel('ghostwriter').padEnd(28)} → "/ghostwriter"`);
581
+ }
582
+
579
583
  if (selectedPacks.includes('shield')) {
580
584
  agentGuide.push(
581
585
  ` ${(i.guide_shield || '🛡️ GRC Compliance').padEnd(28)} → "Shield, audit my SaaS for GDPR"`
@@ -21,11 +21,15 @@ function describePlan(result) {
21
21
  if (question.choices) hints.push(`choices: ${question.choices.join(', ')}`);
22
22
  if (question.default !== undefined)
23
23
  hints.push(`default: ${JSON.stringify(question.default)}`);
24
+ if (question.suggest !== undefined) hints.push(`suggest: ${question.suggest}`);
24
25
  lines.push(
25
26
  ` - ${question.id} [${question.kind}] ${question.ask}${hints.length ? ` (${hints.join('; ')})` : ''}`
26
27
  );
27
28
  }
28
29
  }
30
+ for (const blocked of result.blocked ?? []) {
31
+ lines.push(`Blocked: ${blocked.id} — waits for ${blocked.waitingFor.join(', ')}`);
32
+ }
29
33
  for (const unknown of result.unknowns) {
30
34
  lines.push(`Unknown: ${unknown.id}${unknown.risk ? ` — risk: ${unknown.risk}` : ''}`);
31
35
  }