@archme/cli 0.11.0 → 0.11.1

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 (2) hide show
  1. package/dist/cli.js +9 -10
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -13157,7 +13157,7 @@ function buildStoryCoverageGate(opts) {
13157
13157
  function buildFormatRefStories(opts) {
13158
13158
  const draftBlock = opts.persistentDrafts ? FORMAT_REF_DRAFT_STORIES_BLOCK : "";
13159
13159
  const uncoveredSubFlowRule = opts.persistentDrafts ? CROSS_REF_UNCOVERED_DRAFT_STUB : CROSS_REF_UNCOVERED_REAL_STORY;
13160
- const hierarchyExample = opts.persistentDrafts ? `- Example: storyUpdates: [{add: [{id: "auth", title: "Authentication", description: "User auth flows", draft: true, userStories: [{id: "login", title: "log in with email", draft: true, acceptanceCriteria: ["< 1s response"]}]}]}]` : `- Example: storyUpdates: [{add: [{id: "auth", title: "Authentication", description: "User auth flows", userStories: [{id: "login", title: "log in with email", acceptanceCriteria: ["< 1s response"], sequence: "sequenceDiagram\\n ..."}]}]}]`;
13160
+ const hierarchyExample = opts.persistentDrafts ? `- Example: storyUpdates: [{add: [{id: "auth", title: "Authentication", description: "User auth flows", draft: true, userStories: [{id: "login", title: "log in with email", draft: true}]}]}]` : `- Example: storyUpdates: [{add: [{id: "auth", title: "Authentication", description: "User auth flows", userStories: [{id: "login", title: "log in with email", sequence: "sequenceDiagram\\n ..."}]}]}]`;
13161
13161
  return `Recursive story hierarchy:
13162
13162
  - Stories can contain child stories via userStories: [...] \u2014 parent stories act as feature groups
13163
13163
  - Use top-level stories with description, links, and nested children to organize by feature area
@@ -13174,11 +13174,6 @@ Story description format (markdown, 1-4 sentences \u2014 render target is a narr
13174
13174
  - Good: "A signed-out user requests a reset link by email and sets a new password from that link. Links expire after an hour and work once."
13175
13175
  - Bad (3x too long, implementation-level, changelog-style): "The forgot-password handler generates a token via crypto.randomUUID(), inserts a row into password_reset_tokens with expires_at = now() + 1 hour, emails it through the SendGrid client, and the reset endpoint validates the token with FOR UPDATE SKIP LOCKED before calling auth.admin.updateUserById..."
13176
13176
 
13177
- Acceptance criteria format:
13178
- - Each criterion should be an observable guarantee or behavior someone could verify without reading the code.
13179
- - Bad: "RLS policy checks auth.uid() against org_members", "Uses FOR UPDATE SKIP LOCKED in claim query"
13180
- - Good: "Only org members can view jobs", "Concurrent workers never claim the same job"
13181
-
13182
13177
  ${draftBlock}Sequence diagram format:
13183
13178
  - Each story has a "sequence" field containing a Mermaid sequence diagram string
13184
13179
  - Use architecture dot-paths as participant IDs (e.g., root.api.gateway)
@@ -13352,14 +13347,13 @@ Connection format:
13352
13347
  FORMAT_REF_DRAFT_STORIES_BLOCK = `Draft stories:
13353
13348
  - Set draft: true for stories where the architecture isn't built yet
13354
13349
  - Draft inheritance: if a parent has draft: true, all descendants are implicitly draft (skip validation)
13355
- - Draft stories can omit sequence entirely \u2014 they're pure requirements
13350
+ - Draft stories can omit sequence entirely \u2014 a title and description are enough
13356
13351
  - Draft stories skip all validation (waypoints, connectivity)
13357
- - Use acceptanceCriteria: string[] for PRD-style requirements on draft stories
13358
13352
  - When architecture supports the story, add a sequence and set draft: false
13359
- - Example draft: {id: "send_push", title: "Send push notification", draft: true, acceptanceCriteria: ["Delivered within 5s", "Supports iOS and Android"]}
13353
+ - Example draft: {id: "send_push", title: "Send push notification", draft: true, description: "A user gets a push notification on iOS or Android within seconds of the event."}
13360
13354
 
13361
13355
  `;
13362
- CROSS_REF_UNCOVERED_DRAFT_STUB = `- If no existing story covers the sub-flow but it is reusable across multiple parent stories, create a draft story for it (acceptanceCriteria only, no sequence) and reference that draft. The draft can be wired up later.`;
13356
+ CROSS_REF_UNCOVERED_DRAFT_STUB = `- If no existing story covers the sub-flow but it is reusable across multiple parent stories, create a draft story for it (title and description only, no sequence) and reference that draft. The draft can be wired up later.`;
13363
13357
  CROSS_REF_UNCOVERED_REAL_STORY = `- If no existing story covers the sub-flow but it is reusable across multiple parent stories, create a real story for it \u2014 with its own sequence traced from the code \u2014 and reference that. Do not leave a sequence-less draft stub.`;
13364
13358
  FORMAT_REF_STORIES = buildFormatRefStories({ persistentDrafts: true });
13365
13359
  }
@@ -13625,6 +13619,8 @@ var init_validationCodes = __esm({
13625
13619
  STORY_MISSING_SEQUENCE_FOR_LEAF: "story.add.missing-sequence-for-leaf",
13626
13620
  /** Parent story id referenced by `under` was not found. */
13627
13621
  STORY_UNDER_PARENT_NOT_FOUND: "story.add.under-parent-not-found",
13622
+ /** An MCP write set `acceptanceCriteria`, which only people author. */
13623
+ STORY_ACCEPTANCE_CRITERIA_AGENT_WRITE: "story.add.acceptance-criteria-agent-write",
13628
13624
  // ──────────────────────────────────────────────────────────────────────────
13629
13625
  // story.remove
13630
13626
  // ──────────────────────────────────────────────────────────────────────────
@@ -19549,6 +19545,9 @@ Rules:
19549
19545
  ## Data Shape (schemas)
19550
19546
  A data-shape change with unchanged topology is still an architectural change \u2014 the same components can talk in the same order while the shape of the data on the wire changes. If this change adds, removes, or retypes a **DB column**, a **function/RPC parameter**, or a **response/return field**, update the \`schema\` of the affected storage component (table, RPC, queue, any persistence layer) and the **input/output interface children** the data flows through. Compact format: \`{ field: type, field?: type, field!: generated, arr: type[], ... }\`. For a **persisted table**, set \`schemaKind: "table"\` + \`schemaName\` on the component and tag key columns inline (\`id: uuid @pk\`, \`user_id?: uuid @fk(auth.users.id)\`); keep DDL, RLS policies, and indexes OUT of \`schema\` \u2014 those are code (the anchored migration). Match the code exactly \u2014 do NOT invent fields the code doesn't have; a \`schema\` more complete than the code can prove is over-claiming.
19551
19547
 
19548
+ ## Behaviour at a step
19549
+ A behaviour change with unchanged participants is still an architectural change: the same components talk in the same order, but what a step does or guarantees has changed (the caller's real IP now reaches the backend, a failed call is now retried, a limit is now enforced). Show it in the \`sequence\` of the story that draws that step \u2014 reword that arrow, or add a short Note at that step when no arrow can carry it (see Sequence wording). A component \`description\` edit on its own barely shows in review, so it does not stand in for the sequence edit.
19550
+
19552
19551
  ## Draft Story Guidance
19553
19552
  \`draft: true\` is a transient build mechanic, not a deliverable: it skips sequence validation while a story is being assembled, and a parent's draft flag propagates to all descendants (suppressing \`autoCreateConnectionsFromStories\`). Feature-group parent stories that have real, sequenced children are NOT drafts. You may set it mid-run to defer validation while assembling a story, but finish the run with zero drafts you created or touched: give each a real sequence and set \`draft: false\`, or remove it. Pre-existing drafts you didn't touch are not yours to sweep.
19554
19553
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@archme/cli",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Map your codebase into a living architecture diagram: run `archme init` in a repo to scan it, `archme daemon start` to keep it current on every commit.",
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE",