yadflow 2.5.0 → 2.7.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 (124) hide show
  1. package/CHANGELOG.md +8 -2
  2. package/README.md +65 -22
  3. package/bin/yad.mjs +27 -1
  4. package/cli/docs.mjs +298 -0
  5. package/cli/doctor.mjs +1 -0
  6. package/cli/manifest.mjs +23 -2
  7. package/cli/ship.mjs +37 -0
  8. package/docs/index.html +44 -13
  9. package/package.json +2 -2
  10. package/skills/sdlc/config.yaml +26 -2
  11. package/skills/sdlc/install.sh +1 -1
  12. package/skills/sdlc/module-help.csv +11 -4
  13. package/skills/yad-checks/references/check-gates.md +58 -2
  14. package/skills/yad-checks/templates/checks/commit-message.sh +82 -0
  15. package/skills/yad-checks/templates/github/yad-checks.yml +27 -0
  16. package/skills/yad-checks/templates/github/yad-hub-checks.yml +36 -0
  17. package/skills/yad-checks/templates/gitlab/yad-checks.gitlab-ci.yml +20 -0
  18. package/skills/yad-checks/templates/gitlab/yad-hub-checks.gitlab-ci.yml +39 -0
  19. package/skills/yad-commit/SKILL.md +66 -0
  20. package/skills/yad-connect-docs/SKILL.md +132 -0
  21. package/skills/yad-connect-docs/references/docs-registry.md +74 -0
  22. package/skills/yad-docs/SKILL.md +159 -0
  23. package/skills/yad-docs/references/data-mapping.md +75 -0
  24. package/skills/yad-docs/references/theme-map.md +69 -0
  25. package/skills/yad-docs/templates/app/README.md +31 -0
  26. package/skills/yad-docs/templates/app/eslint.config.js +23 -0
  27. package/skills/yad-docs/templates/app/index.html +17 -0
  28. package/skills/yad-docs/templates/app/package-lock.json +4030 -0
  29. package/skills/yad-docs/templates/app/package.json +35 -0
  30. package/skills/yad-docs/templates/app/public/favicon.svg +28 -0
  31. package/skills/yad-docs/templates/app/public/logo.svg +39 -0
  32. package/skills/yad-docs/templates/app/public/vite.svg +1 -0
  33. package/skills/yad-docs/templates/app/src/App.tsx +98 -0
  34. package/skills/yad-docs/templates/app/src/components/Auth/LoginPage.tsx +101 -0
  35. package/skills/yad-docs/templates/app/src/components/Canvas/AnimatedMessage.tsx +101 -0
  36. package/skills/yad-docs/templates/app/src/components/Canvas/ConnectionLine.tsx +90 -0
  37. package/skills/yad-docs/templates/app/src/components/Canvas/FlowCanvas.tsx +216 -0
  38. package/skills/yad-docs/templates/app/src/components/Canvas/SystemComponent.tsx +153 -0
  39. package/skills/yad-docs/templates/app/src/components/Controls/PlaybackBar.tsx +284 -0
  40. package/skills/yad-docs/templates/app/src/components/Controls/StepDetail.tsx +167 -0
  41. package/skills/yad-docs/templates/app/src/components/DetailPanel/HandlerLogicSnippet.tsx +41 -0
  42. package/skills/yad-docs/templates/app/src/components/DetailPanel/RequestPayloadPreview.tsx +46 -0
  43. package/skills/yad-docs/templates/app/src/components/DetailPanel/RightPanel.tsx +88 -0
  44. package/skills/yad-docs/templates/app/src/components/DetailPanel/StatusCard.tsx +76 -0
  45. package/skills/yad-docs/templates/app/src/components/DetailPanel/TriggerEventCard.tsx +45 -0
  46. package/skills/yad-docs/templates/app/src/components/DocLayout/DocPageShell.tsx +80 -0
  47. package/skills/yad-docs/templates/app/src/components/DocLayout/DocSectionCard.tsx +55 -0
  48. package/skills/yad-docs/templates/app/src/components/DocLayout/DocTableOfContents.tsx +79 -0
  49. package/skills/yad-docs/templates/app/src/components/DocLayout/RoleCard.tsx +67 -0
  50. package/skills/yad-docs/templates/app/src/components/DocSections/ApiReferenceSection.tsx +108 -0
  51. package/skills/yad-docs/templates/app/src/components/DocSections/CancelabilitySection.tsx +73 -0
  52. package/skills/yad-docs/templates/app/src/components/DocSections/CriticalRunbookSection.tsx +177 -0
  53. package/skills/yad-docs/templates/app/src/components/DocSections/DataMigrationSection.tsx +102 -0
  54. package/skills/yad-docs/templates/app/src/components/DocSections/DbSchemaSection.tsx +98 -0
  55. package/skills/yad-docs/templates/app/src/components/DocSections/DeploymentGuideSection.tsx +104 -0
  56. package/skills/yad-docs/templates/app/src/components/DocSections/DriverIntegrationSection.tsx +127 -0
  57. package/skills/yad-docs/templates/app/src/components/DocSections/ExecutiveSummarySection.tsx +69 -0
  58. package/skills/yad-docs/templates/app/src/components/DocSections/FlowOverviewSection.tsx +73 -0
  59. package/skills/yad-docs/templates/app/src/components/DocSections/FlowPathsChecklistSection.tsx +96 -0
  60. package/skills/yad-docs/templates/app/src/components/DocSections/MiddlewareChainSection.tsx +107 -0
  61. package/skills/yad-docs/templates/app/src/components/DocSections/MonitoringAlertingSection.tsx +106 -0
  62. package/skills/yad-docs/templates/app/src/components/DocSections/NotificationLocalizationSection.tsx +102 -0
  63. package/skills/yad-docs/templates/app/src/components/DocSections/PMRoadmapSection.tsx +133 -0
  64. package/skills/yad-docs/templates/app/src/components/DocSections/PerformanceTestingSection.tsx +91 -0
  65. package/skills/yad-docs/templates/app/src/components/DocSections/RiderIntegrationSection.tsx +99 -0
  66. package/skills/yad-docs/templates/app/src/components/DocSections/SecuritySection.tsx +74 -0
  67. package/skills/yad-docs/templates/app/src/components/DocSections/StatusMachineSection.tsx +90 -0
  68. package/skills/yad-docs/templates/app/src/components/DocSections/TestPlanSection.tsx +163 -0
  69. package/skills/yad-docs/templates/app/src/components/Logs/SystemLogsTerminal.tsx +126 -0
  70. package/skills/yad-docs/templates/app/src/components/Navigation/TopNavBar.tsx +90 -0
  71. package/skills/yad-docs/templates/app/src/components/Reference/BullMQJobsList.tsx +60 -0
  72. package/skills/yad-docs/templates/app/src/components/Reference/DecisionTreeView.tsx +49 -0
  73. package/skills/yad-docs/templates/app/src/components/Reference/DeeplinkActionsChips.tsx +69 -0
  74. package/skills/yad-docs/templates/app/src/components/Reference/DriverUIStatesTable.tsx +61 -0
  75. package/skills/yad-docs/templates/app/src/components/Reference/FeatureFlagMatrix.tsx +73 -0
  76. package/skills/yad-docs/templates/app/src/components/Reference/RiderUIStatesTable.tsx +61 -0
  77. package/skills/yad-docs/templates/app/src/components/Reference/RulesLegendPanel.tsx +217 -0
  78. package/skills/yad-docs/templates/app/src/components/Reference/StakeholderToggle.tsx +41 -0
  79. package/skills/yad-docs/templates/app/src/components/Reference/TroubleshootingSection.tsx +93 -0
  80. package/skills/yad-docs/templates/app/src/components/Sidebar/PathSelector.tsx +148 -0
  81. package/skills/yad-docs/templates/app/src/components/Sidebar/SidebarFooter.tsx +40 -0
  82. package/skills/yad-docs/templates/app/src/components/Sidebar/StepList.tsx +234 -0
  83. package/skills/yad-docs/templates/app/src/components/shared/Badge.tsx +28 -0
  84. package/skills/yad-docs/templates/app/src/components/shared/CommandPalette.tsx +213 -0
  85. package/skills/yad-docs/templates/app/src/components/shared/Icon.tsx +21 -0
  86. package/skills/yad-docs/templates/app/src/components/shared/Tooltip.tsx +42 -0
  87. package/skills/yad-docs/templates/app/src/data/components.ts +74 -0
  88. package/skills/yad-docs/templates/app/src/data/docSections.ts +231 -0
  89. package/skills/yad-docs/templates/app/src/data/paths.ts +2319 -0
  90. package/skills/yad-docs/templates/app/src/data/referenceData.ts +392 -0
  91. package/skills/yad-docs/templates/app/src/data/roles.ts +145 -0
  92. package/skills/yad-docs/templates/app/src/data/types.ts +79 -0
  93. package/skills/yad-docs/templates/app/src/hooks/useAnimationQueue.ts +41 -0
  94. package/skills/yad-docs/templates/app/src/hooks/usePlayback.ts +100 -0
  95. package/skills/yad-docs/templates/app/src/hooks/useStakeholderFilter.ts +10 -0
  96. package/skills/yad-docs/templates/app/src/index.css +121 -0
  97. package/skills/yad-docs/templates/app/src/main.tsx +13 -0
  98. package/skills/yad-docs/templates/app/src/pages/RoleSelectPage.tsx +34 -0
  99. package/skills/yad-docs/templates/app/src/pages/StakeholderDocPage.tsx +98 -0
  100. package/skills/yad-docs/templates/app/src/pages/SubPathDetailPage.tsx +282 -0
  101. package/skills/yad-docs/templates/app/src/store/useAuthStore.ts +42 -0
  102. package/skills/yad-docs/templates/app/src/store/useFlowStore.ts +197 -0
  103. package/skills/yad-docs/templates/app/src/utils/iconMap.ts +46 -0
  104. package/skills/yad-docs/templates/app/tsconfig.app.json +28 -0
  105. package/skills/yad-docs/templates/app/tsconfig.json +7 -0
  106. package/skills/yad-docs/templates/app/tsconfig.node.json +26 -0
  107. package/skills/yad-docs/templates/app/vite.config.ts +10 -0
  108. package/skills/yad-docs-overview/SKILL.md +129 -0
  109. package/skills/yad-docs-overview/references/pipeline-model.md +102 -0
  110. package/skills/yad-docs-sync/SKILL.md +99 -0
  111. package/skills/yad-docs-sync/references/staleness.md +81 -0
  112. package/skills/yad-engineer-review/SKILL.md +86 -0
  113. package/skills/{yad-ship → yad-engineer-review}/references/ship-and-record.md +2 -2
  114. package/skills/{yad-ship → yad-engineer-review}/templates/.coderabbit.yaml +1 -1
  115. package/skills/yad-epic/references/state-schema.md +1 -1
  116. package/skills/yad-implement/SKILL.md +1 -1
  117. package/skills/yad-implement/references/implement-conventions.md +1 -1
  118. package/skills/yad-open-pr/SKILL.md +72 -0
  119. package/skills/yad-pr-template/templates/checks/pr-template.sh +62 -0
  120. package/skills/yad-pr-template/templates/checks/pr-title.sh +51 -0
  121. package/skills/yad-run/SKILL.md +2 -2
  122. package/skills/yad-run/references/run-loop.md +4 -4
  123. package/skills/yad-ship/SKILL.md +44 -66
  124. package/skills/yad-spec/SKILL.md +1 -1
@@ -1,86 +1,64 @@
1
1
  ---
2
2
  name: yad-ship
3
- description: 'Build-half Step E of the gated SDLC — AI review, engineer review, then ship. Wire an advisory AI first-pass (CodeRabbit) on the PR/MR; record the human engineer review with the same human_approve discipline as the front gates (owner + 1 reviewer, escalating to domain owners on high risk / contract / auth / payments the Step D routing); and on merge, record the ship in the epic build-log and update the story state so the epic story task PR chain is traceable. Never auto-advances the human owns the merge. Use when the user says "ship this task", "record the engineer review", or "wire the AI review".'
3
+ description: 'Build-half helper of the gated SDLC — commit AND open the task PR/MR in one step. A thin orchestration over yad-commit then yad-open-pr: commit the staged atomic change by the conventions (Conventional-Commits subject, Task Contract-Change Co-Authored-By trailers, --ai footer, ≤3-file atomic guard), then push the branch and open the PR/MR from the committed template with the roster auto-assigned. The PR step runs ONLY if the commit lands (a failed commit, tripped guard, or --dry-run stops before pushing). Drives the `yad ship` CLI; never merges. Use when the user says "ship this task", "commit and open the PR", or "commit and raise the MR". (For the engineer review + merge, use yad-engineer-review.)'
4
4
  ---
5
5
 
6
- # SDLC — Review & Ship (build-half Step E)
6
+ # SDLC — Commit + Open PR/MR (build-half helper)
7
7
 
8
- **Goal:** Take a task PR/MR that has passed the **check gates** (Step C) through two sets of eyes and
9
- out to production: an **AI first-pass** (advisory) and a **human engineer review** (the authority),
10
- then **ship** merge, record the ship, and update the story state. This is the last build-half step
11
- (build plan §E). It is a **human gate**, the same `human_approve` discipline as the front states:
12
- **nothing auto-advances**; the engineer owns the merge.
8
+ **Goal:** Do the two routine build-half hand-actions for ONE atomic task in a single step **commit by
9
+ convention, then open the task PR/MR** so an implemented diff becomes a reviewable PR/MR without two
10
+ separate invocations. It is a thin wrapper over `yad-commit` and `yad-open-pr`; it holds no logic of
11
+ its own and **never merges**. The engineer review + merge are Step E (`yad-engineer-review`).
13
12
 
14
13
  ## Conventions
15
14
 
16
- - `{project-root}` resolves from the project working directory the **product** repo (the source of
17
- truth: it holds the story and the build ledger).
18
- - Code repos are separate git repos under `{project-root}/demo-repos/<repo>/`.
19
- - The build ledger is `{project-root}/epics/<epic>/.sdlc/build-log.json` (append-only).
20
- - The engineer-review rule reuses `yad-review-gate`: base = at least one `owner` AND one distinct
21
- `reviewer`; **escalated** (the PR's Impact & Risk is `high`, or it touches contract/auth/payments) =
22
- base PLUS one `domain-owner` per touched domain the same routing `yad-pr-template`'s
23
- `risk-route.sh` prints.
24
- - AI review wiring: `templates/.coderabbit.yaml` `<repo>/.coderabbit.yaml`.
15
+ - Run **inside the code repo** under `{project-root}/demo-repos/<repo>/` (or `--repo <name>`), on the
16
+ task branch with the atomic change **already staged** (`git add`).
17
+ - Inherits every convention of the two steps it wraps:
18
+ - Commit: subject `<type>: <lowercase imperative, no trailing period>`, fixed trailer order
19
+ `Task Contract-Change Co-Authored-By`, the `--ai` co-author footer, the ≤3-file atomic guard
20
+ (`../yad-commit/SKILL.md`).
21
+ - PR/MR: pushed branch, the committed template prefilled, title defaulting to the commit subject,
22
+ roster auto-assign, risk routing (`../yad-open-pr/SKILL.md`).
23
+ - **Order matters:** the PR/MR is opened **only if the commit lands**. A failed commit, a tripped
24
+ atomic guard, or `--dry-run` stops the step before anything is pushed.
25
25
 
26
26
  ## Inputs
27
27
 
28
- - `epic` / `story` / `task` / `repo` — the PR under review (the task branch `feat/<story>-<task>-…`).
29
- - `action` `ai-review` | `approve` | `ship` (default `ai-review`).
30
- - For `approve`: the reviewer `name` and `role` (`owner` | `reviewer` | `domain-owner`), and for a
31
- domain owner the `domain`.
28
+ - `type` / `message` — the commit type + subject (required), `--type <t> -m "<subject>"`.
29
+ - `ai` co-author footer: `claude|copilot|cursor|coderabbit|none` (default `none`).
30
+ - `task` Task trailer (optional; derived from the branch when omitted).
31
+ - `contractChange` — flag; marks the contract surface touched (commit trailer + PR escalation).
32
+ - `repo` / `risk` / `base` / `platform` / `title` — PR/MR options (see `yad-open-pr`).
32
33
 
33
34
  ## On Activation
34
35
 
35
- ### Step 1 — `ai-review` (advisory first pass)
36
- Ensure the AI reviewer is wired: copy `templates/.coderabbit.yaml` to `<repo>/.coderabbit.yaml` (commit
37
- on the default branch if missing). CodeRabbit reviews each PR automatically and posts comments — it is
38
- a **second set of eyes, never the authority**: it cannot approve or merge. Where CodeRabbit can't run
39
- (no remote), run an equivalent AI first-pass by hand and capture its notes. Record that the AI review
40
- ran; surface its findings to the engineer. Do **not** treat AI approval as a gate.
36
+ ### Step 1 — Confirm the staged atomic change
37
+ Confirm you are on the task branch (not the default branch) and the atomic change is staged within its
38
+ file boundary. Preview the commit with `--dry-run` if unsure.
41
39
 
42
- ### Step 2 — `approve` (the engineer review the human gate)
43
- A human engineer reads the diff **against the spec** (`specs/<story>/`) and the acceptance criteria,
44
- and records an approval. Determine the rule from the PR's Impact & Risk block (run
45
- `../yad-pr-template/templates/checks/risk-route.sh` on the PR body): base, or escalated to a
46
- domain-owner per touched domain. Record each approval; re-evaluate whether the rule is satisfied.
47
- Recording an approval does **not** ship — shipping is a separate, explicit step. Front-half discipline:
48
- the gate talks only through files; refuse to treat AI review as a human approval.
40
+ ### Step 2 — Commit + open in one step
41
+ Run from the repo root:
42
+ ```
43
+ yad ship --type <type> -m "<subject>" [--ai <id>] [--task <id>] [--contract-change] \
44
+ [--repo <name>] [--risk <level>] [--title "<subject>"]
45
+ ```
46
+ The CLI runs `yad commit` and, only if it succeeds, `yad open-pr` committing the change, pushing the
47
+ branch, and opening the PR/MR with the template prefilled and reviewers auto-assigned.
49
48
 
50
- ### Step 3 — `ship` (merge + record + update state)
51
- Ship **iff ALL hold**: the check gates pass (Step C), the AI review has run (advisory), and the
52
- engineer-review rule is satisfied (Step 2). Then:
53
- - **Merge** the task branch into the repo's default branch (the human performs/authorises the merge).
54
- - **Record the ship** — append to `epics/<epic>/.sdlc/build-log.json`:
55
- ```json
56
- { "story": "<story>", "task": "<task>", "repo": "<repo>", "branch": "feat/<story>-<task>-…",
57
- "pr": "<url|#>", "mergeCommit": "<sha>", "gates": ["spec-link","contract-check","build-test-lint"],
58
- "ai_review": "coderabbit (advisory)", "engineer_review": [{"approver":"<name>","role":"<role>","domain":"<opt>"}],
59
- "risk": "<low|medium|high>", "shippedAt": "<YYYY-MM-DD>" }
60
- ```
61
- - **Update the story state** — when **every** task in `specs/<story>/tasks.md` has a ship record, set
62
- the story frontmatter `status: shipped`; otherwise `status: in-build`. The chain
63
- **epic → story → task → PR → mergeCommit** is now traceable end to end.
64
- - **Finalize the trust verdict (Phase 4).** If this story has a `build-state/<story>.json` (it ran
65
- through `yad-run`), the engineer **confirms or overrides** the provisional trust verdict that the
66
- orchestrator derived for this run, and the final verdict is written to
67
- `epics/<epic>/.sdlc/trust-log.json`. The human has the last word on the trust signal: a diff merged
68
- as authored is `approved-unchanged`; one the engineer edited before merge is `approved-with-edits`;
69
- a rejected one is `rejected`. This is the evidence that later earns a step its `machine_advance`
70
- (it never weakens the merge gate — the engineer still owns the merge).
49
+ ### Step 3 — Route + stop (no merge)
50
+ On `high` risk or a contract touch, run `bash checks/risk-route.sh <pr-body>` for the required
51
+ domain-owner reviewers. Report the commit + the PR/MR URL. The PR now runs the check gates (Step C);
52
+ the engineer review and merge are Step E (`yad-engineer-review`).
71
53
 
72
- ### Step 4 — Stop
73
- Report what shipped and the story's state. Do not advance anything else; the front-half `state.json`
74
- stays as it was (`ready-for-build`). The build half is recorded in `build-log.json` + the story status.
54
+ ## Hard rules
75
55
 
76
- ## Hard rules (build plan §E, Cross-cutting)
77
-
78
- - **AI review is advisory, never the authority.** Only a human engineer approval counts toward the gate.
79
- - **High risk routes to domain owners** the same escalation as `yad-review-gate` / `risk-route.sh`.
80
- - **Ship only after gates + engineer review.** No gate skipped; the human owns the merge.
81
- - **Nothing auto-advances.** Step E records human decisions in files; it never machine-advances.
56
+ - **One staged atomic task = one commit = one PR/MR.** Never bundle; never open from the default branch.
57
+ - **No PR without a landed commit.** A failed/`--dry-run` commit stops the step before pushing.
58
+ - **High risk routes to domain owners** the same escalation as the gate.
59
+ - **Shipping here never merges.** The human owns the merge in `yad-engineer-review`.
82
60
 
83
61
  ## Reference
84
- - The build ledger + story-state rules: `references/ship-and-record.md`.
85
- - The escalation reused: `../yad-review-gate/SKILL.md`; the routing helper: `../yad-pr-template/`.
86
- - The gates that must pass first: `../yad-checks/references/check-gates.md`.
62
+ - The two steps this wraps: `../yad-commit/SKILL.md` and `../yad-open-pr/SKILL.md`.
63
+ - The gates the PR must pass: `../yad-checks/references/check-gates.md`.
64
+ - The engineer review + merge that follow: `../yad-engineer-review/SKILL.md`.
@@ -101,7 +101,7 @@ verdict is **anchored to the human who accepts the spec**, never self-graded:
101
101
  `human_edited_spec: true`);
102
102
  - the spec is rejected or the ceremony re-run → `rejected`.
103
103
  `yad-run` records a provisional entry when the spec is generated; this acceptance finalizes it (same
104
- pattern as the engineer review finalizing `implement` at `yad-ship`). Append the finalized entry to
104
+ pattern as the engineer review finalizing `implement` at `yad-engineer-review`). Append the finalized entry to
105
105
  `epics/<epic>/.sdlc/trust-log.json` (schema:
106
106
  `../yad-epic/references/state-schema.md`). **Run standalone, no trust entry is written** — the
107
107
  log measures orchestrated runs. `spec` stays `human_approve` until its slice clears the threshold;