@grimoire-cc/cli 0.7.1 → 0.7.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grimoire-cc/cli",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "CLI tool for installing Grimoire agent and skill packs",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -57,6 +57,34 @@ Add a reference to the knowledge base in the project's `CLAUDE.md` (create one i
57
57
 
58
58
  Use this when business logic changes. Updates are driven by text input — user stories, change requests, discussion transcripts/summaries — not by code analysis.
59
59
 
60
+ ### Step 0: Triage the Input
61
+
62
+ When the input is unstructured (meeting notes, transcripts, raw discussions), classify each item before proceeding:
63
+
64
+ - **Business rule/constraint** — what the system MUST or MUST NOT allow → document these
65
+ - **UX/presentation decision** — how something is displayed or interacted with → skip. Document only if the UX element is the mechanism that enforces a business constraint (e.g., a button is disabled because the system MUST NOT allow editing after dispatch). The constraint itself is the business rule; the UI mechanism is just implementation detail noted in "Enforced in."
66
+ - **Feature request / planned capability** — something that doesn't exist yet → skip, not documentation material
67
+ - **Scope / phase decision** — what's included in or deferred from a release phase → skip, this is project management, not a business rule
68
+ - **Action item / tangent** — not documentation material → skip
69
+
70
+ **Litmus test:** Would violating this item cause incorrect data, broken invariants, security holes, or compliance violations? If the only consequence is a suboptimal user experience, it's a UX decision, not a business rule.
71
+
72
+ Examples:
73
+ - "Users must not edit shipments after dispatch" → Business rule (data integrity)
74
+ - "Items should not be pre-selected by default" → UX decision (no data/integrity consequence)
75
+ - "Use 'Next' instead of 'Save' on wizard buttons" → UX decision (label preference)
76
+ - "Save as Draft is deferred to phase 2" → Scope decision (skip)
77
+ - "One shipment = one dock in MQS" → Business rule (hard system mapping)
78
+ - "Create Shipment from Orders List needed" → Feature request (skip)
79
+
80
+ Present the classification as a table for the user to confirm before proceeding:
81
+
82
+ | Item | Classification | Reason | Action |
83
+ |------|---------------|--------|--------|
84
+ | ... | Business rule / UX / Feature / Scope / Tangent | Why this classification | Document / Skip |
85
+
86
+ For well-structured input (user stories with clear acceptance criteria, formal change requests), this step can be brief or skipped.
87
+
60
88
  ### Step 1: Understand the Change
61
89
 
62
90
  Read the provided input (user story, change request, discussion transcript/summary). Extract:
@@ -74,6 +102,7 @@ Read the affected Tier 2 file(s). For each change from Step 1, check:
74
102
  - Does it modify an existing rule or add a new one?
75
103
  - Does it affect workflows, entities, or integration points?
76
104
  - Does it invalidate any existing constraints, examples, or counterexamples?
105
+ - **Terminology cross-reference**: Does the input use different terms for concepts already documented? Flag mismatches to the user (e.g., "The transcript says 'Dispatched' — does this map to the existing 'InTransit' status in the docs?"). Check the glossary in `_overview.md` and entity names in affected Tier 2 files.
77
106
 
78
107
  Flag any conflicts or ambiguities to the user before making changes.
79
108
 
@@ -98,6 +127,10 @@ Only add information you are certain about from the provided input.
98
127
  - **New domain areas**: Create a new Tier 2 file and add it to the table of contents in `_overview.md`.
99
128
  - **"Enforced in" fields**: Leave empty or mark with `<!-- TODO: add code location after implementation -->` — code locations are filled in after implementation, not before.
100
129
  - **Diagrams and glossary**: Update as needed to reflect changes.
130
+ - **Feature requests**: MUST NOT be added to business logic docs. If the input contains feature requests or planned capabilities, exclude them and mention to the user what was excluded and why.
131
+ - **UX-only decisions**: Do not document in business logic docs unless they enforce a business constraint (e.g., a disabled button that prevents an invalid state transition is a constraint; a button label rename is not).
132
+ - **Scope/phase annotations**: Do not add "deferred to phase 2" or "planned for future release" annotations. Business logic docs describe what IS true now, not what's planned. If a capability doesn't exist yet, there's nothing to document.
133
+ - **Template compliance**: Do NOT invent new template sections. Only use sections defined in [references/tier2-template.md](references/tier2-template.md). If information doesn't fit an existing section, it likely doesn't belong in business logic docs.
101
134
 
102
135
  ### Step 5: Validate and Present
103
136
 
@@ -193,6 +226,14 @@ Each entry follows:
193
226
  **Affected areas:** Which Tier 2 files are impacted.
194
227
  ```
195
228
 
229
+ **Threshold for a decision log entry** — only add an entry when:
230
+
231
+ - The decision involves a non-obvious tradeoff where rejected alternatives had real consequences
232
+ - Future developers might question or accidentally reverse the decision
233
+ - The "why" is not self-evident from the rule itself
234
+
235
+ Do NOT add decision log entries for: UI label changes, default value tweaks, deferred features without evaluated alternatives, or any decision where there was no meaningful alternative considered.
236
+
196
237
  ## Writing Principles
197
238
 
198
239
  Follow these when writing or updating business logic docs:
@@ -217,7 +258,7 @@ Follow these when writing or updating business logic docs:
217
258
 
218
259
  10. **Use decision trees for complex conditional logic.** Any logic with 3+ branches MUST use sequential if-then format. Mark mutually exclusive paths explicitly. No prose-only descriptions for multi-branch logic.
219
260
 
220
- 11. **Mark information sources.** Tag rules with their origin: `[SOURCE: user-story]`, `[SOURCE: discussion]`, `[SOURCE: change-request]`. During audits (Workflow 3 only), rules surfaced from code analysis get `[SOURCE: code-audit — unconfirmed]` and MUST be confirmed with the user before being treated as business rules. Incorrect docs are worse than missing docs.
261
+ 11. **Mark information sources.** Tag rules with their origin using the format `[SOURCE: type — YYYY-MM-DD]` when a date is available: e.g., `[SOURCE: user-story — 2025-01-15]`, `[SOURCE: discussion — 2025-02-10]`. The date is optional — omit the suffix when no date is explicitly provided (e.g., `[SOURCE: change-request]` is fine). During audits (Workflow 3 only), rules surfaced from code analysis get `[SOURCE: code-audit — unconfirmed]` and MUST be confirmed with the user before being treated as business rules. Incorrect docs are worse than missing docs.
221
262
 
222
263
  12. **State machines over prose for workflows.** Any process with 3+ states MUST use a mermaid stateDiagram plus a transition table. No prose-only workflow descriptions for stateful processes.
223
264
 
@@ -253,6 +294,8 @@ Docs describe the current state, not history:
253
294
  - NEVER use "previously was" / "changed from X to Y" / history annotations — docs describe current state, git tracks history
254
295
  - NEVER leave diagrams contradicting documented transitions
255
296
  - NEVER duplicate rules across files — reference the canonical location instead
297
+ - NEVER add feature requests, roadmap items, or planned capabilities to business logic docs — these are not current-state business rules
298
+ - NEVER invent template sections not defined in `tier2-template.md`
256
299
 
257
300
  ## CLAUDE.md Integration
258
301