yadflow 2.16.1 → 2.18.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.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: yad-reconcile
3
+ description: 'Phase 6 maintenance/CI — the change reconciler (mirrors yad-docs-sync; NEVER a gate). Detects post-lock DRIFT and ORPHANS across feature threads: shipped code or a repo HEAD advance (the repos.json syncedHead-vs-current-HEAD rule) with NO owning change-epic in any thread, a broken lineage (cycle, missing parent, or a thread cache that disagrees with the computed root), and open hotfix reconcile debt — reporting which thread drifted and WHY. `check` (default, read-only) reports; `refresh` points the human at opening a reconcile change-epic with yad-change (never silent); `wire` commits an advisory CI job ([skip ci] + concurrency, like yad-docs-sync) that runs the check on push. The hard merge BLOCK is the lineage-check / epic-open / reconcile-debt CI gates — this only DISCOVERS. Use when the user says "reconcile the changes", "check for thread drift", "is anything shipped without an epic", or "find open hotfix debt".'
4
+ ---
5
+
6
+ # SDLC — Change Reconciler (Phase 6, the drift/orphan sweep)
7
+
8
+ **Goal:** Keep the feature threads honest the way `yad-docs-sync` keeps the doc sites honest — by
9
+ **detecting drift, not authoring**. It answers: is any shipped code missing an owning change-epic in a
10
+ thread? Is any lineage broken? Is any hotfix debt still open (freezing the next change)? It **reports**;
11
+ the human decides. It is **never a gate** — it never touches `state.json`, approvals, or the contract
12
+ lock. The hard enforcement is the CI gates (`lineage-check`, `epic-open`, `reconcile-debt`); this skill
13
+ is the read-only counterpart that surfaces problems *before* a PR hits those gates.
14
+
15
+ ## Conventions
16
+
17
+ - `{project-root}` resolves from the product hub.
18
+ - It drives the **`yad reconcile` CLI** (`cli/thread.mjs`): `yad reconcile [check|refresh|wire]
19
+ [--thread EP-<genesis>]`. The CLI is the engine; this skill orchestrates + explains.
20
+ - The thread is **derived** from `parent:` frontmatter (no registry). Repo drift uses the exact
21
+ `repos.json` `syncedHead`-vs-current-HEAD rule (`config.yaml` `code_context.staleness: head-sha`),
22
+ reused from `yad-docs-sync` / `yad repo`.
23
+ - Refresh is **never silent** — it points at `yad-change`, the same discipline as `yad repo refresh`.
24
+
25
+ ## Inputs
26
+
27
+ - `action` — `check` (default, read-only) | `refresh` | `wire`.
28
+ - `thread` — optional `EP-<genesis>` to scope to one feature thread; default sweeps every thread.
29
+
30
+ ## On Activation
31
+
32
+ ### Step 1 — `check` (default, read-only) — detect drift + orphans + debt
33
+ Run `yad reconcile check` (optionally `--thread EP-<genesis>`). For each thread it reports, in
34
+ `yad check` drift style, any of:
35
+ - **Broken lineage** — a change-epic whose `parent` is missing, a cycle, or a `thread` cache that
36
+ disagrees with the computed root (the same signal `yad doctor` reports).
37
+ - **Orphan / drift** — code shipped (`build-log.json`) or a touched repo's HEAD advanced past its
38
+ `repos.json` `syncedHead` with **no owning change-epic** in any thread — i.e. behaviour reached
39
+ production that no epic in the thread describes. Name the repo (`<repo>: <old>→<new>`).
40
+ - **Open hotfix debt** — a `reconcile-debt.json` entry still `open`; the next normal change on that
41
+ thread is blocked until it is paid.
42
+
43
+ Writes nothing. This is the read-only sweep a human (or CI) runs to see the picture.
44
+
45
+ ### Step 2 — `refresh` (advisory, never silent)
46
+ For each flagged thread, **point the human at the fix** — open a reconcile change-epic with `yad-change`
47
+ (`kind: change`, threaded to the affected feature) to bring the front artifacts back in step with what
48
+ shipped, and pay any open debt (update the artifacts + add a regression test, then set the
49
+ `reconcile-debt.json` entry `status: paid`). It never seeds the epic itself — opening a change-epic is a
50
+ human, triaged act (`yad-change` Step 2).
51
+
52
+ ### Step 3 — `wire` (advisory CI, no block)
53
+ Commit an advisory CI job that runs `yad reconcile --check` on push, carrying `[skip ci]` on any commit
54
+ it makes and a concurrency group — the same loop-prevention `yad-docs-sync` uses. The job **reports**;
55
+ it never blocks. The blocking enforcement is the `yad-checks` gates, not this.
56
+
57
+ ### Step 4 — Report
58
+ Summarise per thread: clean, or the concrete drift/debt found and what to do. Never advance any epic;
59
+ the reconciler is advisory.
60
+
61
+ ## Hard rules
62
+
63
+ - **Never a gate.** It never touches `state.json`, `approvals.json`, or any `contract-lock.json`. Drift
64
+ blocks nothing here — it only flags. The CI gates do the blocking.
65
+ - **Reconcile, don't author.** It detects; opening a change-epic is delegated to `yad-change` (a human,
66
+ triaged act). `refresh` is never silent.
67
+ - **HEAD-sha drift, reused.** Repo drift uses the exact `repos.json` `syncedHead` rule, like
68
+ `yad-docs-sync` and `yad repo`.
69
+ - **Loop-prevention in CI.** The wired job carries `[skip ci]` + a concurrency group.
70
+
71
+ ## Reference
72
+ - The drift/refresh/wire discipline this mirrors: `../yad-docs-sync/SKILL.md`.
73
+ - The thread model + ledgers: `../yad-epic/references/state-schema.md` (Phase 6).
74
+ - The change-epic this hands off to: `../yad-change/SKILL.md`.
75
+ - The gates that block at merge: `../yad-checks/` (lineage-check, epic-open, reconcile-debt).
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: yad-timeline
3
+ description: 'Phase 6 output enrichment (never a gate) — render a feature THREAD as an evolution view AND resolve its current truth. Walks the thread (genesis -> changes -> defects, linked by parent: frontmatter), renders the evolution as the vendored React/Vite/Tailwind shell HTML + a TIMELINE.md summary (each node: kind, what it re-authored vs inherited, ship events, contract re-lock history, open debt), and emits thread-resolved.md — the composed CURRENT-TRUTH map (the latest epic that owns each artifact + the resolved contract-lock hash). That resolved map is the source-of-truth AI/humans read to plan the next change, instead of a stale genesis epic. Degrades to markdown-only when no docs target is connected. Use when the user says "show the feature timeline", "how did this feature evolve", "resolve the current truth", or "render the thread".'
4
+ ---
5
+
6
+ # SDLC — Feature Timeline + Current-Truth Resolver (Phase 6, output enrichment)
7
+
8
+ **Goal:** Make a feature's *evolution* legible and its *current truth* explicit. A feature is a thread of
9
+ linked epics; this skill renders that thread (genesis → changes → defects) as an interactive evolution
10
+ view and resolves the inheritance chain into the authoritative **current artifact set** — so an AI or a
11
+ human planning the next change reads *what the feature actually is now*, not a superseded genesis epic.
12
+ It is an **output enrichment**, exactly like `yad-docs` — **never a gate**: it never touches
13
+ `state.json`, approvals, or the contract lock.
14
+
15
+ ## Conventions
16
+
17
+ - `{project-root}` resolves from the product hub.
18
+ - Reuses the **`yad-docs` shell** verbatim (`../yad-docs/templates/app/`) — generated `src/data/*.ts`,
19
+ themed, deployed via `yad docs deploy`; build-only / markdown-only when no docs target
20
+ (`.sdlc/docs.json`). The resolver part drives the **`yad thread` CLI** (`cli/thread.mjs`).
21
+ - The thread is **derived** from `parent:` frontmatter (no registry). The thread report lives under the
22
+ **genesis** epic (`thread == genesis id`).
23
+ - Deterministic generation (stable-id sort, fixed key order, no timestamps in data files), like
24
+ `yad-docs`, so an unchanged thread re-renders byte-identically.
25
+
26
+ ## Inputs
27
+
28
+ - `thread` — `EP-<genesis>` (or any epic in the thread; it resolves to the root). Ask if not given.
29
+ - `action` — `generate` (default) | `deploy`.
30
+
31
+ ## On Activation
32
+
33
+ ### Step 1 — Resolve the thread
34
+ Run `yad thread <thread> --json` (`resolveThread` + `threadEpics` + `resolveCurrentArtifacts`). This
35
+ gives the genesis-first chain, each epic's lineage (`kind`, `parent`, `inherits`), the resolved
36
+ current-truth map, and any open reconcile debt. **STOP** and report if the lineage is broken (point at
37
+ `yad doctor` / `yad-reconcile`).
38
+
39
+ ### Step 2 — Read each node's evolution facts
40
+ For each epic in the chain read `epic.md` (lineage + the change brief), `.sdlc/change.json` (depth,
41
+ defect block), `.sdlc/build-log.json` (ship events), and the contract-lock (a real lock = a re-lock
42
+ event; a pointer-lock = inherited). Greenfield-safe: an absent input degrades its part of the view.
43
+
44
+ ### Step 3 — Render the evolution view (yad-docs shell)
45
+ Generate the site into `epics/<thread>/timeline-site/` (copy the shell verbatim; generate `src/data/*.ts`
46
+ deterministically; theme from the design system). The thread maps onto the shell primitives:
47
+ - **Flow path** = the thread; **flow steps** = the epics in order (genesis → tip), each step's messages
48
+ = what it re-authored, its side-effects = the ships it produced + any contract re-lock.
49
+ - **System components** = the artifacts (epic/architecture/contract/ui/stories/test-cases), each labelled
50
+ with the epic that currently **owns** it (from the resolved map).
51
+ - Colour nodes by `kind` (feature/change/defect/hotfix); mark sealed epics and open debt.
52
+
53
+ ### Step 4 — Emit `thread-resolved.md` (the current-truth map — derived, non-authoritative)
54
+ Write `epics/<thread>/thread-resolved.md`: for each artifact base, the **owning epic** (the latest in the
55
+ chain that re-authored it) and, for the contract, the **resolved lock hash**. Mark it clearly as a
56
+ *derived, regenerable* file (it is composed from immutable artifacts; it is not itself an artifact). This
57
+ is the file the next `yad-change` / `yad-epic` reads as "the feature's current truth".
58
+
59
+ ### Step 5 — Emit `TIMELINE.md` + (optional) deploy
60
+ Write a short `epics/<thread>/TIMELINE.md` (the chain, what each node changed, ships, open debt) for a
61
+ plain-text read. On `action: deploy`, `yad docs deploy` the site (build-only when no target).
62
+
63
+ ## Hard rules
64
+
65
+ - **Never a gate.** No writes to `state.json`, `approvals.json`, or any `contract-lock.json`. It reads
66
+ the thread and renders it.
67
+ - **Derived, regenerable.** `thread-resolved.md` and the site are composed from immutable artifacts;
68
+ re-running yields byte-identical output. They are enrichment, never the source of approval.
69
+ - **Degrade gracefully.** No docs target → markdown-only (`TIMELINE.md` + `thread-resolved.md`); never
70
+ fail because a tool is absent.
71
+
72
+ ## Reference
73
+ - The resolver + thread engine: `cli/thread.mjs` (`yad thread`), `cli/epic-state.mjs`
74
+ (`resolveThread` / `resolveCurrentArtifacts`).
75
+ - The shell + deterministic generation it reuses: `../yad-docs/SKILL.md`,
76
+ `../yad-docs/references/data-mapping.md`.
77
+ - The thread model + ledgers: `../yad-epic/references/state-schema.md` (Phase 6).
78
+ - The companion report: `../yad-defects/SKILL.md`.