yadflow 2.2.0 → 2.4.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.
- package/CHANGELOG.md +16 -5
- package/README.md +75 -22
- package/cli/doctor.mjs +45 -3
- package/cli/epic-state.mjs +19 -2
- package/cli/errors.mjs +2 -0
- package/cli/manifest.mjs +23 -1
- package/cli/setup.mjs +109 -10
- package/docs/index.html +62 -11
- package/package.json +5 -3
- package/skills/sdlc/config.yaml +41 -4
- package/skills/sdlc/install.sh +1 -1
- package/skills/sdlc/module-help.csv +6 -1
- package/skills/yad-analysis/SKILL.md +10 -5
- package/skills/yad-connect-design/SKILL.md +1 -1
- package/skills/yad-connect-design/references/design-registry.md +4 -2
- package/skills/yad-connect-learning/SKILL.md +140 -0
- package/skills/yad-connect-learning/references/learning-context.md +79 -0
- package/skills/yad-connect-learning/references/learning-registry.md +60 -0
- package/skills/yad-connect-testing/SKILL.md +121 -0
- package/skills/yad-connect-testing/references/testing-context.md +67 -0
- package/skills/yad-connect-testing/references/testing-registry.md +55 -0
- package/skills/yad-epic/SKILL.md +10 -5
- package/skills/yad-epic/references/state-schema.md +42 -11
- package/skills/yad-hub-bridge/SKILL.md +2 -2
- package/skills/yad-learn/SKILL.md +146 -0
- package/skills/yad-learn/references/learning-state.md +75 -0
- package/skills/yad-review-gate/SKILL.md +14 -11
- package/skills/yad-review-gate/references/gating.md +1 -1
- package/skills/yad-run/references/run-loop.md +3 -3
- package/skills/yad-spec/SKILL.md +3 -1
- package/skills/yad-status/SKILL.md +35 -15
- package/skills/yad-stories/SKILL.md +3 -1
- package/skills/yad-test-cases/SKILL.md +173 -0
- package/skills/yad-test-cases/references/test-cases-schema.md +70 -0
package/docs/index.html
CHANGED
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
<div class="lane">
|
|
285
285
|
<div class="lane-title">0 · One-time setup (team lead, per project)</div>
|
|
286
286
|
<div class="flow-v">
|
|
287
|
-
<div class="node plain"><strong>Install the module</strong><small><code>npx yadflow setup</code> — copies the
|
|
287
|
+
<div class="node plain"><strong>Install the module</strong><small><code>npx yadflow setup</code> — copies the 22 skills into your IDE dirs</small></div>
|
|
288
288
|
<div class="arrow-v">▼</div>
|
|
289
289
|
<div class="node plain"><strong>Wire each repo</strong><small><code>yad-checks</code> · <code>yad-pr-template</code> · <code>yad-review-comments</code> (CI gates, PR template, comment scaffold)</small></div>
|
|
290
290
|
<div class="arrow-v">▼</div>
|
|
@@ -292,6 +292,10 @@
|
|
|
292
292
|
<div class="arrow-v">▼</div>
|
|
293
293
|
<div class="node plain"><strong>Connect a design tool</strong><small><code>yad-connect-design</code> → <code>design.json</code> (Figma-first, pluggable) so <code>yad-ui</code> can materialize the screens <em>(optional — degrades to markdown-only)</em></small></div>
|
|
294
294
|
<div class="arrow-v">▼</div>
|
|
295
|
+
<div class="node plain"><strong>Connect a testing tool</strong><small><code>yad-connect-testing</code> → <code>testing.json</code> (Playwright-first, pluggable) so <code>yad-test-cases</code> can implement the automation <em>(optional — degrades to artifacts-only)</em></small></div>
|
|
296
|
+
<div class="arrow-v">▼</div>
|
|
297
|
+
<div class="node plain"><strong>Connect a learning tool</strong><small><code>yad-connect-learning</code> → <code>learning.json</code> (DeepTutor-first, pluggable) so the learning layer can tutor in context <em>(optional — degrades to harness-native)</em></small></div>
|
|
298
|
+
<div class="arrow-v">▼</div>
|
|
295
299
|
<div class="node plain"><strong>Optional: hub on a platform</strong><small>detect GitHub/GitLab + reviewer roster, so reviews run on real PRs/MRs</small></div>
|
|
296
300
|
</div>
|
|
297
301
|
</div>
|
|
@@ -321,7 +325,9 @@
|
|
|
321
325
|
<div class="arrow-v">▼</div>
|
|
322
326
|
<div class="node gate">gate · stories review<small><strong>per-repo:</strong> base rule + the engineer of each touched repo</small></div>
|
|
323
327
|
<div class="arrow-v">▼</div>
|
|
324
|
-
<div class="node sentinel"><strong>ready-for-build</strong><small>the front half is done — building can start</small></div>
|
|
328
|
+
<div class="node sentinel"><strong>ready-for-build</strong><small>the gating front half is done — building can start (and <code>yad-test-cases</code> opens in parallel)</small></div>
|
|
329
|
+
<div class="arrow-v">▼</div>
|
|
330
|
+
<div class="node artifact"><strong>yad-test-cases</strong> <em>(parallel · non-blocking)</em><small>opens when the stories gate passes and runs <strong>alongside the build half</strong> — with the test architect → <code>test-cases.md</code> + the automation tests in the connected testing tool (<code>test-links.json</code>) → its own base-rule review. Never blocks <code>ready-for-build</code>.</small></div>
|
|
325
331
|
</div>
|
|
326
332
|
</div>
|
|
327
333
|
|
|
@@ -371,9 +377,10 @@
|
|
|
371
377
|
contract.md the LOCKED shared surface (APIs, events, data model)
|
|
372
378
|
ui-design.md + DESIGN.md (+ the screens in the connected design tool)
|
|
373
379
|
stories/ one file per story (EP-<slug>-S01.md …)
|
|
380
|
+
test-cases.md the test cases (+ the automation tests when a testing tool is connected)
|
|
374
381
|
reviews/ reviewer comments, per artifact
|
|
375
382
|
.sdlc/ state.json · approvals.json · contract-lock.json
|
|
376
|
-
design-links.json · build-state/ · trust-log.json · build-log.json
|
|
383
|
+
design-links.json · test-links.json · build-state/ · trust-log.json · build-log.json
|
|
377
384
|
|
|
378
385
|
each code repo/
|
|
379
386
|
specs/<story-id>/ spec, plan, tasks (+ link.md back to the story)
|
|
@@ -440,8 +447,8 @@ each code repo/
|
|
|
440
447
|
<div class="term"><strong>State machine</strong><span class="badge b-core">core</span><br>The core design: the workflow is a fixed set of <em>states</em> (steps). Each state does its work and waits at a gate. The states never change — only the <em>trigger</em> (who moves work forward) changes. That is what lets the team start fully manual and automate gradually without rebuilding anything.</div>
|
|
441
448
|
<div class="term"><strong>Product hub (product repo)</strong><span class="badge b-core">core</span><br>The git repo that holds the shared “thinking”: epics, architecture, the contract, UI design, stories, reviews and all state. The brain of the project. Code never lives here.</div>
|
|
442
449
|
<div class="term"><strong>Code repo</strong><span class="badge b-core">core</span><br>A separate git repo holding real application code (e.g. backend, mobile, dashboard). Each story’s spec lives inside the code repo it belongs to, with a link back to the story in the hub.</div>
|
|
443
|
-
<div class="term"><strong>Skills source (this repo)</strong><span class="badge b-core">core</span><br>The <code>yadflow</code> repo itself — where the
|
|
444
|
-
<div class="term"><strong>Front half (“decide” / the brain)</strong><span class="badge b-core">core</span><br>The first half of the workflow, run once per epic in the product hub: analysis (optional) → epic → architecture + contract → UI design → stories — each followed by a human review gate. Permanently human-approved.</div>
|
|
450
|
+
<div class="term"><strong>Skills source (this repo)</strong><span class="badge b-core">core</span><br>The <code>yadflow</code> repo itself — where the 22 skills live and where you pull updates from. No real product work happens inside it.</div>
|
|
451
|
+
<div class="term"><strong>Front half (“decide” / the brain)</strong><span class="badge b-core">core</span><br>The first half of the workflow, run once per epic in the product hub: analysis (optional) → epic → architecture + contract → UI design → stories — each followed by a human review gate, ending at <code>ready-for-build</code>. <strong>Test cases</strong> is a parallel, non-blocking track that opens at the stories gate and runs alongside the build half. Permanently human-approved.</div>
|
|
445
452
|
<div class="term"><strong>Back half / build half (“build”)</strong><span class="badge b-core">core</span><br>The second half, run once per story per code repo, inside that repo: spec → implement → checks → PR → ship. These mechanical steps may earn automation over time.</div>
|
|
446
453
|
<div class="term"><strong>Gate</strong><span class="badge b-core">core</span><br>A stopping point after a step. The step writes its output and <em>waits</em>; a human must approve before the workflow moves on. “Every step stops at a gate” is the heart of the whole system.</div>
|
|
447
454
|
<div class="term"><strong>Assistance dial</strong><span class="badge b-core">core</span><br>A per-step setting for how much AI helps with the work: <code>none</code>, <code>review</code> (AI checks human work), or <code>heavy</code> (AI does the drafting, human directs).</div>
|
|
@@ -520,7 +527,7 @@ each code repo/
|
|
|
520
527
|
<div class="term"><strong>Trust threshold</strong><span class="badge b-auto">automation</span><br>The bar a step must clear to earn automation — by default at least 5 runs with ≥80% “approved-unchanged” (configurable in <code>config.yaml</code>).</div>
|
|
521
528
|
<div class="term"><strong>Run verdicts</strong><span class="badge b-auto">automation</span><br>How each engineer review scores an automated run: <code>approved-unchanged</code> (merged exactly as authored — the strongest signal), <code>approved-with-edits</code> (a human fixed it first), <code>rejected</code> (failed).</div>
|
|
522
529
|
<div class="term"><strong>Kill switch</strong><span class="badge b-auto">automation</span><br><code>yad-run action: kill</code> — one move that forces <em>every</em> step system-wide back to <code>human_approve</code> instantly, no code change needed. <code>unkill</code> restores earned automation. Automation is always reversible in one move.</div>
|
|
523
|
-
<div class="term"><strong>Locked steps</strong><span class="badge b-auto">automation</span><br>The steps that may <em>never</em> be set to <code>machine_advance</code>: all
|
|
530
|
+
<div class="term"><strong>Locked steps</strong><span class="badge b-auto">automation</span><br>The steps that may <em>never</em> be set to <code>machine_advance</code>: all five front authoring steps, their reviews, and the engineer review. A front state advances only on a human act.</div>
|
|
524
531
|
<div class="term"><strong>Fleet roll-up</strong><span class="badge b-auto">automation</span><br>The cross-epic summary <code>yad-status</code> prints: where every epic stands, which steps are “earned but still manual” (nudge cost), at a glance.</div>
|
|
525
532
|
|
|
526
533
|
<h3>Tools the workflow builds on</h3>
|
|
@@ -531,7 +538,7 @@ each code repo/
|
|
|
531
538
|
<div class="term"><strong>CodeRabbit</strong><span class="badge b-tool">tools</span><br>An AI code-review service used as the advisory first pass on PRs. Optional; never the merge authority.</div>
|
|
532
539
|
<div class="term"><strong>Graceful degradation</strong><span class="badge b-tool">tools</span><br>The rule that every optional tool (Spec Kit, Impeccable, Repomix, CodeRabbit) can be absent: the workflow falls back to doing the work directly and <em>records</em> that the tool was missing. You can start with none of them.</div>
|
|
533
540
|
<div class="term"><strong>Tool-agnostic rule</strong><span class="badge b-tool">tools</span><br>Talk to every tool through its commands and files, never through its internal code — so each tool stays swappable.</div>
|
|
534
|
-
<div class="term"><strong>Skill</strong><span class="badge b-tool">tools</span><br>One of the
|
|
541
|
+
<div class="term"><strong>Skill</strong><span class="badge b-tool">tools</span><br>One of the 22 named agents (e.g. <code>yad-epic</code>) you invoke by name in your AI IDE. Each skill does one step’s work, writes files, and stops at its gate.</div>
|
|
535
542
|
<div class="term"><strong>The <code>yad</code> CLI</strong><span class="badge b-tool">tools</span><br>A zero-dependency command-line tool (npm: <code>yadflow</code>) that installs, wires and reconciles the workflow (<code>setup</code>, <code>check --fix</code>, <code>update</code>) and runs the deterministic pieces (<code>gate</code>, <code>commit</code>, <code>open-pr</code>, <code>repo</code>).</div>
|
|
536
543
|
|
|
537
544
|
<h3>People & AI roles</h3>
|
|
@@ -574,7 +581,7 @@ each code repo/
|
|
|
574
581
|
<div class="flow-v">
|
|
575
582
|
<div class="node plain"><strong>Setup</strong><small>install skills · create the hub repo · create empty code repos · wire each repo (CI gates + PR template) · <s>connect-repos</s> <em>skipped — nothing to map yet</em></small></div>
|
|
576
583
|
<div class="arrow-v">▼</div>
|
|
577
|
-
<div class="node artifact"><strong>Front half</strong><small>(analysis) → epic → architecture + contract → UI (<code>craft</code> → <code>extract</code>) → stories — all human-gated</small></div>
|
|
584
|
+
<div class="node artifact"><strong>Front half</strong><small>(analysis) → epic → architecture + contract → UI (<code>craft</code> → <code>extract</code>) → stories — all human-gated; then test cases runs in parallel with the build half</small></div>
|
|
578
585
|
<div class="arrow-v">▼</div>
|
|
579
586
|
<div class="node"><strong>Build half</strong><small>spec → implement → checks → PR → ship, per story per repo — specs exist for 100% of the code from day one</small></div>
|
|
580
587
|
<div class="arrow-v">▼</div>
|
|
@@ -674,7 +681,7 @@ each code repo/
|
|
|
674
681
|
|
|
675
682
|
<!-- ======================================================= -->
|
|
676
683
|
<section id="skills">
|
|
677
|
-
<h2>6. The
|
|
684
|
+
<h2>6. The 22 skills — what each does, how to use it, and when</h2>
|
|
678
685
|
<p>A <strong>skill</strong> is an agent you invoke <em>by name</em> in your AI IDE — you just ask in
|
|
679
686
|
plain words, e.g. <em>“run <code>yad-epic</code>”</em>, adding any inputs the skill needs
|
|
680
687
|
(<code>repo: backend</code>, <code>story: EP-…-S01</code>, <code>action: wire</code>, …).
|
|
@@ -685,11 +692,13 @@ each code repo/
|
|
|
685
692
|
<tr><th>Skill</th><th>Half</th><th>One line</th></tr>
|
|
686
693
|
<tr><td><a href="#sk-connect"><code>yad-connect-repos</code></a></td><td>Setup</td><td>Register a code repo with the hub + cache its code-map.</td></tr>
|
|
687
694
|
<tr><td><a href="#sk-connect-design"><code>yad-connect-design</code></a></td><td>Setup</td><td>Connect a design tool (Figma-first) so <code>yad-ui</code> can materialize the screens.</td></tr>
|
|
695
|
+
<tr><td><a href="#sk-connect-testing"><code>yad-connect-testing</code></a></td><td>Setup</td><td>Connect a testing tool (Playwright-first) so <code>yad-test-cases</code> can implement the automation.</td></tr>
|
|
688
696
|
<tr><td><a href="#sk-analysis"><code>yad-analysis</code></a></td><td>Front</td><td><em>(Optional)</em> pressure-test an idea into <code>analysis.md</code>.</td></tr>
|
|
689
697
|
<tr><td><a href="#sk-epic"><code>yad-epic</code></a></td><td>Front</td><td>Start a feature: write <code>epic.md</code>, assign the ID.</td></tr>
|
|
690
698
|
<tr><td><a href="#sk-arch"><code>yad-architecture</code></a></td><td>Front</td><td>Author <code>architecture.md</code> + the locked <code>contract.md</code>.</td></tr>
|
|
691
699
|
<tr><td><a href="#sk-ui"><code>yad-ui</code></a></td><td>Front</td><td>Author <code>ui-design.md</code> + <code>DESIGN.md</code>; materialize the screens in the connected design tool.</td></tr>
|
|
692
700
|
<tr><td><a href="#sk-stories"><code>yad-stories</code></a></td><td>Front</td><td>Break the epic into repo-tagged stories.</td></tr>
|
|
701
|
+
<tr><td><a href="#sk-test-cases"><code>yad-test-cases</code></a></td><td>Front</td><td>With the test architect, author the test cases; implement the automation when a testing tool is connected.</td></tr>
|
|
693
702
|
<tr><td><a href="#sk-gate"><code>yad-review-gate</code></a></td><td>Cross-cutting</td><td>Review / comment / approve / advance <strong>any</strong> gate.</td></tr>
|
|
694
703
|
<tr><td><a href="#sk-bridge"><code>yad-hub-bridge</code></a></td><td>Cross-cutting</td><td>Run front-half reviews over real PRs/MRs and sync them back.</td></tr>
|
|
695
704
|
<tr><td><a href="#sk-comments"><code>yad-review-comments</code></a></td><td>Setup</td><td>Install the structured review-comment scaffolds.</td></tr>
|
|
@@ -729,6 +738,40 @@ yad-connect-design action: disconnect</code></pre>
|
|
|
729
738
|
<div class="row"><span class="lbl lbl-when">When</span> During one-time setup (the wizard records it), and again any time you switch design tools. <strong>No design tool? Skip it</strong> — <code>yad-ui</code> simply authors the Markdown, exactly as before.</div>
|
|
730
739
|
</div>
|
|
731
740
|
|
|
741
|
+
<div class="skillcard" id="sk-connect-testing">
|
|
742
|
+
<h4><code>yad-connect-testing</code></h4>
|
|
743
|
+
<div class="row"><span class="lbl lbl-what">What</span> Connects a <strong>testing tool</strong> to the product hub so the test-cases step can implement the <em>actual</em> automation tests inside it, alongside the Markdown. <strong>Playwright-first but pluggable</strong> (a testing-tool adapter; <code>cypress</code> and <code>pytest</code> are second providers). It records the tool + project/suite references in <code>testing.json</code> through your own authenticated MCP session — <strong>no tokens are ever stored</strong> — and degrades to artifacts-only when no testing-tool MCP is available.</div>
|
|
744
|
+
<div class="row"><span class="lbl lbl-how">How</span> Run it in the product hub, once per project:</div>
|
|
745
|
+
<pre><code>yad-connect-testing action: connect tool: playwright project_url: tests/playwright.config.ts
|
|
746
|
+
yad-connect-testing action: list # show the connection + whether the MCP is available
|
|
747
|
+
yad-connect-testing action: refresh # re-detect the MCP (after authenticating a session)
|
|
748
|
+
yad-connect-testing action: disconnect</code></pre>
|
|
749
|
+
<div class="row"><span class="lbl lbl-when">When</span> During one-time setup (the wizard records it), and again any time you switch testing tools. <strong>No testing tool? Skip it</strong> — <code>yad-test-cases</code> simply authors the test cases, exactly as before.</div>
|
|
750
|
+
</div>
|
|
751
|
+
|
|
752
|
+
<div class="skillcard" id="sk-connect-learning">
|
|
753
|
+
<h4><code>yad-connect-learning</code></h4>
|
|
754
|
+
<div class="row"><span class="lbl lbl-what">What</span> Connects a <strong>learning/tutoring tool</strong> to the product hub so the cross-cutting <strong>learning layer</strong> can tutor any team member, at any stage, in the context of what's being built. <strong>DeepTutor-first but pluggable.</strong> Unlike the design/testing tools, DeepTutor is a <strong>CLI subprocess</strong> (like Repomix's <code>npx</code>) — it ships no MCP — so this skill detects the <code>deeptutor</code> binary on PATH and optionally builds a project knowledge base from the SDLC artifacts + secret-scanned code-maps. It records the connection in <code>learning.json</code> — <strong>no tokens are ever stored</strong> — and degrades to <strong>harness-native</strong> tutoring when DeepTutor isn't installed.</div>
|
|
755
|
+
<div class="row"><span class="lbl lbl-how">How</span> Run it in the product hub, once per project:</div>
|
|
756
|
+
<pre><code>yad-connect-learning action: connect tool: deeptutor
|
|
757
|
+
yad-connect-learning action: list # show the connection + whether the CLI is available
|
|
758
|
+
yad-connect-learning action: refresh # re-detect the CLI + rebuild the knowledge base
|
|
759
|
+
yad-connect-learning action: disconnect</code></pre>
|
|
760
|
+
<div class="row"><span class="lbl lbl-when">When</span> During one-time setup (the wizard records it), and again any time you switch learning tools. <strong>No DeepTutor? Skip it</strong> — <code>yad-learn</code> still tutors using the harness model reading your artifacts.</div>
|
|
761
|
+
</div>
|
|
762
|
+
|
|
763
|
+
<h3>The learning layer — tutor any member, any stage (cross-cutting)</h3>
|
|
764
|
+
|
|
765
|
+
<div class="skillcard" id="sk-learn">
|
|
766
|
+
<h4><code>yad-learn</code></h4>
|
|
767
|
+
<div class="row"><span class="lbl lbl-what">What</span> The <strong>learning layer</strong>. At <em>any</em> SDLC stage a team member can ask to learn a concept and be tutored <em>in the context of what the team is building</em> — e.g. "teach me why the architecture hash-locks the contract surface." It routes to the connected learning tool (DeepTutor, grounded in the project knowledge base) or degrades to <strong>harness-native</strong> tutoring, renders a tutorial artifact, and appends to a per-member <strong>learning ledger</strong> kept <strong>local-only</strong> (gitignored — never committed or pushed, to the hub or any code repo) so it stays a private, personal skills log (<code>yad-status</code> rolls up the local records). <strong>Purely opt-in — it never blocks a gate</strong> and never touches epic state, approvals, or the contract lock.</div>
|
|
768
|
+
<div class="row"><span class="lbl lbl-how">How</span> Any time, from any stage:</div>
|
|
769
|
+
<pre><code>run yad-learn — concept: "contract versioning" epic: EP-istifta-inquiries stage: architecture-review
|
|
770
|
+
yad-learn action: list # your local skills-log records for this epic
|
|
771
|
+
yad-learn action: complete concept: "contract versioning" # mark it learned</code></pre>
|
|
772
|
+
<div class="row"><span class="lbl lbl-when">When</span> Whenever a member wants to understand what is being built — to review a gate with confidence, onboard onto a domain, or grow a skill. It is additive and reversible: learning never gates the work.</div>
|
|
773
|
+
</div>
|
|
774
|
+
|
|
732
775
|
<h3>Front half — author the thinking (in the product hub)</h3>
|
|
733
776
|
|
|
734
777
|
<div class="skillcard" id="sk-analysis">
|
|
@@ -768,7 +811,15 @@ yad-connect-design action: disconnect</code></pre>
|
|
|
768
811
|
<div class="row"><span class="lbl lbl-what">What</span> With the pm AI, slices the approved epic into user stories small enough to build — one file each under <code>stories/</code>, with stable IDs (<code>EP-<slug>-S01</code>…) and a <code>repos:</code> tag naming which code repos must implement each one. Reads epic + architecture + contract + UI as input.</div>
|
|
769
812
|
<div class="row"><span class="lbl lbl-how">How</span> In the product hub, after the UI gate passes:</div>
|
|
770
813
|
<pre><code>run yad-stories — epic: EP-istifta-inquiries</code></pre>
|
|
771
|
-
<div class="row"><span class="lbl lbl-when">When</span>
|
|
814
|
+
<div class="row"><span class="lbl lbl-when">When</span> After the UI gate passes. Stops at the <strong>stories review gate</strong> (per-repo rule). When it passes the epic is <code>ready-for-build</code> — the build half can start, and <code>yad-test-cases</code> opens in parallel.</div>
|
|
815
|
+
</div>
|
|
816
|
+
|
|
817
|
+
<div class="skillcard" id="sk-test-cases">
|
|
818
|
+
<h4><code>yad-test-cases</code></h4>
|
|
819
|
+
<div class="row"><span class="lbl lbl-what">What</span> With the <strong>test architect</strong> AI (Murat), authors the risk-based test cases that cover the approved stories → <code>test-cases.md</code> (cases prioritised P0–P3, with story→case traceability). When a testing tool is connected (<code>yad-connect-testing</code>), it also <strong>implements the automation tests in that tool</strong> — generating them into the connected code repo(s) or linking an existing suite — and records the case→test map in <code>test-links.json</code>; otherwise it stays artifacts-only. Reads epic + architecture + contract + UI + stories as input.</div>
|
|
820
|
+
<div class="row"><span class="lbl lbl-how">How</span> In the product hub, after the stories gate passes:</div>
|
|
821
|
+
<pre><code>run yad-test-cases — epic: EP-istifta-inquiries</code></pre>
|
|
822
|
+
<div class="row"><span class="lbl lbl-when">When</span> A <strong>parallel, non-blocking</strong> track: it opens the moment the stories gate passes — the epic is already <code>ready-for-build</code>, so this runs <strong>alongside the build half</strong>, not before it. Stops at its own <strong>test-cases review gate</strong> (base rule); that review never blocks building.</div>
|
|
772
823
|
</div>
|
|
773
824
|
|
|
774
825
|
<h3>The review gate & its plumbing (cross-cutting)</h3>
|
|
@@ -897,7 +948,7 @@ yad-status EP-istifta-inquiries # one epic in detail</code></pre>
|
|
|
897
948
|
|
|
898
949
|
<div class="skillcard">
|
|
899
950
|
<h4><code>npx yadflow setup</code></h4>
|
|
900
|
-
<div class="row"><span class="lbl lbl-what">What</span> The guided first-run wizard.
|
|
951
|
+
<div class="row"><span class="lbl lbl-what">What</span> The guided first-run wizard. Ten steps: preflight (git/node check), install all 22 skills into the IDE dirs you pick, detect the hub’s platform + record the reviewer roster, connect a design tool (Figma-first; optional), connect a testing tool (Playwright-first; optional), connect a learning tool (DeepTutor-first; optional), connect your code repos, wire each one (CI gates, PR template, comment scaffold), optionally write the AI-review config, and stamp the installed version.</div>
|
|
901
952
|
<div class="row"><span class="lbl lbl-how">How</span></div>
|
|
902
953
|
<pre><code>cd <product-hub-repo>
|
|
903
954
|
npx yadflow setup</code></pre>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yadflow",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Yadflow — the gated, team, multi-repo SDLC: author → review → build with a PR-driven review gate and a zero-dependency `yad` CLI (setup, gate, commit, open-pr, repo). A BMAD module +
|
|
3
|
+
"version": "2.4.0",
|
|
4
|
+
"description": "Yadflow — the gated, team, multi-repo SDLC: author → review → build with a PR-driven review gate and a zero-dependency `yad` CLI (setup, gate, commit, open-pr, repo). A BMAD module + 22 yad-* skills.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "AbdelRahman Nasr",
|
|
7
7
|
"license": "MIT",
|
|
@@ -50,7 +50,9 @@
|
|
|
50
50
|
"bmad",
|
|
51
51
|
"workflow",
|
|
52
52
|
"cli",
|
|
53
|
-
"spec-driven-development"
|
|
53
|
+
"spec-driven-development",
|
|
54
|
+
"learning",
|
|
55
|
+
"deeptutor"
|
|
54
56
|
],
|
|
55
57
|
"devDependencies": {
|
|
56
58
|
"@eslint/js": "^9.39.4",
|
package/skills/sdlc/config.yaml
CHANGED
|
@@ -20,12 +20,12 @@ output_folder: "{project-root}/_bmad-output"
|
|
|
20
20
|
defaults:
|
|
21
21
|
assistance: review # none | review | heavy
|
|
22
22
|
automation: human_approve # human_approve | machine_advance
|
|
23
|
-
# Front steps (analysis [optional], epic, architecture, ui-design, stories) are locked to
|
|
23
|
+
# Front steps (analysis [optional], epic, architecture, ui-design, stories, test-cases) are locked to
|
|
24
24
|
# human_approve and may NOT be set to machine_advance in this version (build plan §1, §8.7).
|
|
25
25
|
front_steps_locked: true
|
|
26
26
|
# Each front authoring step opens its own branch at the start of the step (the <step> is the step id:
|
|
27
|
-
# analysis | epic | architecture | ui-design | stories). Git/greenfield-safe; distinct
|
|
28
|
-
# bridge's review branch (hub.artifact_branch). See yad-epic/references/state-schema.md.
|
|
27
|
+
# analysis | epic | architecture | ui-design | stories | test-cases). Git/greenfield-safe; distinct
|
|
28
|
+
# from the bridge's review branch (hub.artifact_branch). See yad-epic/references/state-schema.md.
|
|
29
29
|
front_authoring_branch: "<step>/EP-<slug>"
|
|
30
30
|
|
|
31
31
|
# Team review gate defaults (build plan §3 piece 2, §4).
|
|
@@ -134,6 +134,43 @@ design:
|
|
|
134
134
|
# NO tokens in the registry (project_url/files are plain references, never credentials).
|
|
135
135
|
auth: user
|
|
136
136
|
|
|
137
|
+
# Testing tool (yad-connect-testing) — the test-cases step (yad-test-cases) materializes the actual
|
|
138
|
+
# automation tests inside a connected testing tool, alongside test-cases.md. The tool is reached through
|
|
139
|
+
# its MCP (a harness MCP server, like the design tool — NOT a CLI), detected per provider and DEGRADING
|
|
140
|
+
# to artifacts-only when absent. Playwright-first but PLUGGABLE: a testing-tool adapter, like the
|
|
141
|
+
# design-tool adapter. Connection is one-per-project, recorded at setup; the per-epic case->test map
|
|
142
|
+
# (test-links.json) is written by yad-test-cases per epic.
|
|
143
|
+
testing:
|
|
144
|
+
registry: "{project-root}/.sdlc/testing.json" # project-wide testing connection (NOT per-epic)
|
|
145
|
+
tools: [playwright, cypress, pytest] # supported adapters; an unknown tool falls back to `primary`
|
|
146
|
+
primary: playwright # the default/named provider
|
|
147
|
+
degrade: artifacts-only # no tool / no MCP => yad-test-cases authors test-cases.md only
|
|
148
|
+
links: "{project-root}/epics/EP-<slug>/.sdlc/test-links.json" # per-epic case->test map (yad-test-cases)
|
|
149
|
+
# Auth: `yad-connect-testing` connects through the LOCAL user's own authenticated MCP session and stores
|
|
150
|
+
# NO tokens in the registry (project_url/suites are plain references, never credentials).
|
|
151
|
+
auth: user
|
|
152
|
+
|
|
153
|
+
# Learning tool (yad-connect-learning) — the cross-cutting LEARNING LAYER. At any SDLC stage a team member
|
|
154
|
+
# can invoke `yad-learn` to be tutored on a concept IN THE CONTEXT of what is being built, and the request
|
|
155
|
+
# is recorded in a personal, LOCAL-ONLY skills log (gitignored, never committed/pushed; surfaced read-only
|
|
156
|
+
# by yad-status for the local learner). The tool is
|
|
157
|
+
# DeepTutor (https://github.com/HKUDS/DeepTutor) — an Apache-2.0 Python CLI, reached as a SUBPROCESS like
|
|
158
|
+
# Repomix's `npx` (it has NO MCP), NOT the MCP shape of the design/testing tools. DeepTutor-first but
|
|
159
|
+
# PLUGGABLE: a learning-tool adapter. Connection is one-per-project, recorded at setup; the per-epic,
|
|
160
|
+
# per-member learning ledger (learning-records.json) + rendered tutorials are written by yad-learn.
|
|
161
|
+
learning:
|
|
162
|
+
registry: "{project-root}/.sdlc/learning.json" # project-wide learning connection (NOT per-epic) — the ONLY committed learning file (no secrets/personal data)
|
|
163
|
+
tools: [deeptutor] # supported adapters; an unknown tool falls back to `primary`
|
|
164
|
+
primary: deeptutor # the default/named provider
|
|
165
|
+
degrade: harness-native # no deeptutor CLI => yad-learn tutors via the harness model
|
|
166
|
+
# reading the project artifacts directly (always works, never blocks)
|
|
167
|
+
records: "{project-root}/epics/EP-<slug>/.sdlc/learning-records.json" # per-epic learning ledger (yad-learn) — LOCAL-ONLY, gitignored, never committed/pushed
|
|
168
|
+
artifacts: "{project-root}/epics/EP-<slug>/learning/" # rendered tutorial markdown (yad-learn) — LOCAL-ONLY, gitignored, never committed/pushed
|
|
169
|
+
capabilities: { explain: chat, deep: deep_research, quiz: deep_question } # yad-learn mode -> deeptutor capability
|
|
170
|
+
# Auth: `yad-connect-learning` uses the LOCAL user's own deeptutor CLI config/session and stores NO
|
|
171
|
+
# tokens in the registry (kb name + sources are plain references, never credentials). Opt-in, never a gate.
|
|
172
|
+
auth: user
|
|
173
|
+
|
|
137
174
|
# Hub platform + front-half review bridge (yad-connect-repos `detect-hub`; yad-review-gate + yad-hub-bridge).
|
|
138
175
|
# The product hub is itself a git repo on a platform. With the bridge enabled, the front-half review/
|
|
139
176
|
# comment/approval cycle runs through a real PR/MR on the hub: a review PR is opened per artifact, reviewers
|
|
@@ -166,7 +203,7 @@ automation:
|
|
|
166
203
|
# Hard lock — the dial-setter REFUSES machine_advance for these, regardless of trust evidence.
|
|
167
204
|
# The front authoring steps (already locked:true in state.json; analysis is optional) + the human
|
|
168
205
|
# merge gate.
|
|
169
|
-
locked_steps: [analysis, epic, architecture, ui-design, stories, engineer-review]
|
|
206
|
+
locked_steps: [analysis, epic, architecture, ui-design, stories, test-cases, engineer-review]
|
|
170
207
|
# Kill switch (phase-4-build-plan.md §Safety): true => every step forced to human_approve
|
|
171
208
|
# system-wide, no per-step edits. One line, instantly reversible. Toggle via `yad-run action: kill`.
|
|
172
209
|
kill_switch: false
|
package/skills/sdlc/install.sh
CHANGED
|
@@ -11,7 +11,7 @@ set -euo pipefail
|
|
|
11
11
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
12
12
|
cd "$ROOT"
|
|
13
13
|
|
|
14
|
-
SKILLS=(yad-analysis yad-epic yad-architecture yad-ui yad-stories yad-connect-repos yad-connect-design yad-spec yad-implement yad-checks yad-pr-template yad-review-comments yad-hub-bridge yad-ship yad-backfill yad-run yad-review-gate yad-status)
|
|
14
|
+
SKILLS=(yad-analysis yad-epic yad-architecture yad-ui yad-stories yad-test-cases yad-connect-repos yad-connect-design yad-connect-testing yad-connect-learning yad-learn yad-spec yad-implement yad-checks yad-pr-template yad-review-comments yad-hub-bridge yad-ship yad-backfill yad-run yad-review-gate yad-status)
|
|
15
15
|
|
|
16
16
|
echo "Installing sdlc module from $ROOT/skills ..."
|
|
17
17
|
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
module,skill,display-name,menu-code,description,action,args,phase,preceded-by,followed-by,required,output-location,outputs
|
|
2
|
+
SDLC Workflow,yad-analysis,Author Analysis,AN,"Optional front state: with the analyst pressure-test a feature idea and write the discovery brief into analysis.md. Assigns the EP-<slug> ID and seeds .sdlc state (the chain that puts analysis before epic). If skipped, the epic step does this shaping inline. Never auto-advances.",,{idea: one-line feature idea},1-front,,yad-review-gate,false,epics/EP-<slug>/,analysis.md state.json
|
|
2
3
|
SDLC Workflow,yad-epic,Author Epic,AE,"Front state 1: shape an idea with analyst then pm into epic.md; assign EP-<slug> ID and seed .sdlc state. Never auto-advances.",,{idea: one-line feature idea},1-front,,yad-review-gate,true,epics/EP-<slug>/,epic.md state.json
|
|
3
|
-
SDLC Workflow,yad-review-gate,Team Review Gate,RG,"Reusable review+approve gate for all
|
|
4
|
+
SDLC Workflow,yad-review-gate,Team Review Gate,RG,"Reusable review+approve gate for all five reviews. Shares an artifact for review, records comments and approvals as files, enforces owner + 1 reviewer (escalates on contract/auth/payments; per-repo routing for stories), advances state only when approved.",,{artifact: file under the epic} {action: open|comment|approve|advance},1-front,,,true,epics/EP-<slug>/reviews/,reviews/*.md approvals.json state.json
|
|
4
5
|
SDLC Workflow,yad-architecture,Author Architecture,AA,"Front state 3: with the architect author architecture.md and the locked contract.md; hash-lock the contract surface. Never auto-advances.",,{epic: EP-<slug>},1-front,yad-review-gate,yad-review-gate,true,epics/EP-<slug>/,architecture.md contract.md contract-lock.json state.json
|
|
5
6
|
SDLC Workflow,yad-ui,Author UI Design,AU,"Front state 5: with the ux-designer author ui-design.md and DESIGN.md, driving Impeccable slash-commands when installed. Never auto-advances.",,{epic: EP-<slug>},1-front,yad-review-gate,yad-review-gate,true,epics/EP-<slug>/,ui-design.md DESIGN.md state.json
|
|
6
7
|
SDLC Workflow,yad-stories,Author Stories,AS,"Front state 7: with the pm break the epic into repo-tagged stories with stable EP-<slug>-S0N IDs, one file each under stories/. Never auto-advances.",,{epic: EP-<slug>},1-front,yad-review-gate,yad-review-gate,true,epics/EP-<slug>/stories/,stories/EP-<slug>-S0N.md state.json
|
|
8
|
+
SDLC Workflow,yad-test-cases,Author Test Cases,TC,"Front state 9 (PARALLEL, non-blocking): opens when the stories gate passes — the epic is already ready-for-build, so the build half can start at the same time the tester works here. With the test architect (Murat) author test-cases.md covering the approved stories, and — when a testing tool is connected (.sdlc/testing.json) — generate/link the actual automation tests in it, recording test-links.json; otherwise produce the test-case artifact only. Its review never moves currentStep off ready-for-build. Never auto-advances.",,{epic: EP-<slug>},1-front,yad-review-gate,yad-review-gate,true,epics/EP-<slug>/,test-cases.md test-links.json state.json
|
|
7
9
|
SDLC Workflow,yad-connect-repos,Connect Code Repos,CR,"Setup/maintenance: connect code repos to the product hub so the front/brain phases are code-aware. Registers each repo (GitHub or GitLab, local-user auth, no stored tokens) in .sdlc/repos.json and caches a Repomix pack + a lightweight code-map (existing endpoints/events/data-models/modules, secret-scanned). Idempotent and refreshable; staleness tracked by HEAD sha. Run at setup or any time a new repo is added. Not a gated state — never touches epic state or approvals.",,{action: connect|refresh|list|disconnect} {repo: <name>} {path: <path-or-absolute>} {git_url: <ssh-or-https>} {domain_owner: <who>},0-setup,,yad-epic,false,.sdlc/,repos.json code-context/<repo>/pack.md code-context/<repo>/code-map.md
|
|
8
10
|
SDLC Workflow,yad-connect-design,Connect Design Tool,CD,"Setup/maintenance: connect a design tool (Figma-first, pluggable) to the product hub so the UI design step can materialize the actual feature design (mobile screens / web pages) inside it, alongside ui-design.md + DESIGN.md. Records the tool + project/file references in .sdlc/design.json (local-user / MCP-session auth, no stored tokens), detecting whether a design-tool MCP is available and degrading to markdown-only when absent. Idempotent and refreshable; one connection per project. Not a gated state — never touches epic state or approvals.",,{action: connect|refresh|list|disconnect} {tool: figma|pencil|none} {project_url: <team/project/file url>} {files: {web,mobile}},0-setup,,yad-ui,false,.sdlc/,design.json
|
|
11
|
+
SDLC Workflow,yad-connect-testing,Connect Testing Tool,CT,"Setup/maintenance: connect a testing tool (Playwright-first, pluggable) to the product hub so the test-cases step can implement the actual automation tests in it, alongside test-cases.md. Records the tool + project/suite references in .sdlc/testing.json (local-user / MCP-session auth, no stored tokens), detecting whether a testing-tool MCP is available and degrading to artifacts-only when absent. Idempotent and refreshable; one connection per project. Not a gated state — never touches epic state or approvals.",,{action: connect|refresh|list|disconnect} {tool: playwright|cypress|pytest|none} {project_url: <project/config reference>} {suites: {<repo>}},0-setup,,yad-test-cases,false,.sdlc/,testing.json
|
|
12
|
+
SDLC Workflow,yad-connect-learning,Connect Learning Tool,CL,"Setup/maintenance: connect a learning/tutoring tool (DeepTutor-first, pluggable) so the cross-cutting learning layer can tutor any team member, at any SDLC stage, in the context of what is being built. Records the tool + an optional grounded knowledge base in .sdlc/learning.json (local-user auth, no stored tokens), detecting whether the DeepTutor CLI is on PATH (a subprocess like Repomix, not an MCP) and degrading to harness-native tutoring when absent. Idempotent and refreshable; one connection per project. Not a gated state — never touches epic state or approvals.",,{action: connect|refresh|list|disconnect} {tool: deeptutor|none} {kb: <name>} {ground: true|false},0-setup,,yad-learn,false,.sdlc/,learning.json
|
|
13
|
+
SDLC Workflow,yad-learn,Learn (Tutor),LN,"Cross-cutting learning layer: at ANY SDLC stage a team member can ask to learn a concept and be tutored in the context of what the team is building. Routes to the connected learning tool (.sdlc/learning.json, DeepTutor-first) grounded in the project knowledge base, or degrades to harness-native tutoring (the harness model reading the artifacts). Renders a tutorial artifact and appends to a per-member learning ledger kept LOCAL-ONLY (gitignored, never committed/pushed to the hub or any code repo) so it stays a private, personal skills log (yad-status rolls up the local records). Purely opt-in — never blocks a gate, never touches epic state, approvals, or the contract lock.",,{concept: <idea>} {context: <focus>} {epic: EP-<slug>} {stage: <sdlc stage>} {member: <who>} {mode: explain|deep|quiz} {action: learn|list|complete},,,,,false,epics/EP-<slug>/,learning-records.json learning/<member>--<concept>.md
|
|
9
14
|
SDLC Workflow,yad-spec,Author Spec,SP,"Build-half Step A: for one ready-for-build story and one of its repos, run the heavy Spec Kit ceremony once (specify→clarify→plan→analyze→checklist→tasks) inside that code repo, writing specs/<story-id>/ in Spec Kit's layout (drives /speckit.* when installed, else hand-authors and records speckit: not-installed). References the locked contract; never re-invents the surface. Writes link.md back to the story. Never auto-advances.",,{epic: EP-<slug>} {story: EP-<slug>-S0N} {repo: <one of story.repos>},3-build,yad-review-gate,,false,demo-repos/<repo>/specs/<story-id>/,spec.md research.md data-model.md contracts/ plan.md tasks.md link.md
|
|
10
15
|
SDLC Workflow,yad-implement,Implement Task,IM,"Build-half Step B: with the dev lens, implement ONE atomic task from a story's tasks.md as a small diff (<=3 files) on its own branch feat/<story>-<task>-<slug> in the code repo. Diff stays inside the task's declared files (flag and STOP if it grows beyond them). Commit ends with a Task: <story>-<task> trailer; add Contract-Change: yes only when the locked contract surface is touched (routes back to the architecture gate). Never auto-advances.",,{epic: EP-<slug>} {story: EP-<slug>-S0N} {repo: <one of story.repos>} {task: T0N},3-build,yad-spec,,false,demo-repos/<repo>/,branch+commit per atomic task
|
|
11
16
|
SDLC Workflow,yad-checks,Check Gates,CK,"Build-half Step C: wire and run the three production-safety CI gates on a code repo — spec-link (every change links a real story/spec via its Task trailer), contract-check (a contract-surface change without Contract-Change + an updated re-locked contract FAILS and routes back to the architecture gate), and build/test/lint. CI-agnostic bash invoked by GitHub Actions and GitLab CI. Blocking in CI; the human still owns the merge. Never auto-advances.",,{repo: <one of an epic's repos>} {action: wire|run} {base: target branch},3-build,yad-implement,,false,demo-repos/<repo>/,checks/*.sh .github/workflows/yad-checks.yml .gitlab-ci.yml
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: yad-analysis
|
|
3
|
-
description: 'Optional front state 1 of the gated SDLC. With the analyst, pressure-test a feature idea and write the discovery brief into analysis.md. Assigns the EP-<slug> ID and seeds .sdlc/ state (the
|
|
3
|
+
description: 'Optional front state 1 of the gated SDLC. With the analyst, pressure-test a feature idea and write the discovery brief into analysis.md. Assigns the EP-<slug> ID and seeds .sdlc/ state (the 12-step chain that puts analysis before epic). Never auto-advances — hands off to the team review gate. Optional: if skipped, the epic step does this shaping inline. Use when the user says "analyse the idea", "start with analysis", or "author the analysis".'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# SDLC — Author Analysis (optional front state 1)
|
|
@@ -11,8 +11,8 @@ state machine in `.sdlc/`. This is a **front state**: human-authored with AI ass
|
|
|
11
11
|
auto-advances**. When the analysis is drafted, control passes to `yad-review-gate`.
|
|
12
12
|
|
|
13
13
|
This step is **optional**. When it runs, it is the entry point: it assigns the ID and seeds the
|
|
14
|
-
**
|
|
15
|
-
analyst shaping inline and seeds the **
|
|
14
|
+
**12-step** chain (`analysis` before `epic`). When it is **skipped**, `yad-epic` does the same
|
|
15
|
+
analyst shaping inline and seeds the **10-step** chain — no behaviour change for teams that skip it.
|
|
16
16
|
|
|
17
17
|
This skill enforces the build plan's core rules: all state lives in files; IDs are generated by the
|
|
18
18
|
engine (never typed by hand); front steps are locked to `human_approve`.
|
|
@@ -88,7 +88,7 @@ code-context: { repos: [], loaded: <YYYY-MM-DD or none> } # which code-maps in
|
|
|
88
88
|
Fill the body with the user; leave `owner` for the user to set.
|
|
89
89
|
|
|
90
90
|
### Step 6 — Seed the state machine
|
|
91
|
-
Create `{project-root}/epics/EP-<slug>/.sdlc/state.json` describing the full **
|
|
91
|
+
Create `{project-root}/epics/EP-<slug>/.sdlc/state.json` describing the full **12-step** front-state
|
|
92
92
|
sequence (analysis before epic), all steps defaulting to `automation: human_approve`, with every
|
|
93
93
|
authoring step **locked**. Use this exact shape (see `references/state-schema.md`):
|
|
94
94
|
|
|
@@ -107,7 +107,9 @@ authoring step **locked**. Use this exact shape (see `references/state-schema.md
|
|
|
107
107
|
{ "id": "ui-design", "type": "author", "artifact": "ui-design.md", "assistance": "review", "automation": "human_approve", "locked": true, "status": "blocked", "risk_tags": [] },
|
|
108
108
|
{ "id": "ui-design-review", "type": "review+approve", "artifact": "ui-design.md", "assistance": "review", "automation": "human_approve", "locked": true, "status": "blocked", "risk_tags": [] },
|
|
109
109
|
{ "id": "stories", "type": "author", "artifact": "stories/", "assistance": "review", "automation": "human_approve", "locked": true, "status": "blocked", "risk_tags": [] },
|
|
110
|
-
{ "id": "stories-review", "type": "review+approve", "artifact": "stories/", "assistance": "review", "automation": "human_approve", "locked": true, "status": "blocked", "risk_tags": [] }
|
|
110
|
+
{ "id": "stories-review", "type": "review+approve", "artifact": "stories/", "assistance": "review", "automation": "human_approve", "locked": true, "status": "blocked", "risk_tags": [] },
|
|
111
|
+
{ "id": "test-cases", "type": "author", "artifact": "test-cases.md", "assistance": "review", "automation": "human_approve", "locked": true, "status": "blocked", "risk_tags": [] },
|
|
112
|
+
{ "id": "test-cases-review", "type": "review+approve", "artifact": "test-cases.md", "assistance": "review", "automation": "human_approve", "locked": true, "status": "blocked", "risk_tags": [] }
|
|
111
113
|
]
|
|
112
114
|
}
|
|
113
115
|
```
|
|
@@ -116,6 +118,9 @@ Notes:
|
|
|
116
118
|
- `analysis-review` carries no `risk_tags` — it is the **base** rule (owner + 1 reviewer).
|
|
117
119
|
- `architecture-review` carries `risk_tags: ["contract"]` so the gate escalates it by default
|
|
118
120
|
(build plan §4): the contract review needs domain owners, not just owner + 1.
|
|
121
|
+
- `test-cases` / `test-cases-review` are a **parallel, non-blocking track**: they seed `blocked` and open
|
|
122
|
+
when `stories-review` passes — the epic is already `ready-for-build` by then, so the build half runs
|
|
123
|
+
alongside the tester (see `../yad-epic/references/state-schema.md`).
|
|
119
124
|
- Also create an empty approvals ledger `{project-root}/epics/EP-<slug>/.sdlc/approvals.json`
|
|
120
125
|
and an empty comments ledger `{project-root}/epics/EP-<slug>/.sdlc/comments.json`, each containing
|
|
121
126
|
`[]`, and the `reviews/` directory.
|
|
@@ -20,7 +20,7 @@ markdown-only exactly as before.
|
|
|
20
20
|
|
|
21
21
|
- `{project-root}` resolves from the project working directory (the **product hub**).
|
|
22
22
|
- The integration is **Figma-first but pluggable** (`config.yaml` `design.tools`): a design-tool
|
|
23
|
-
*adapter*, like the
|
|
23
|
+
*adapter*, like the GitHub/GitLab platform adapter. Figma is the primary provider; `pencil`
|
|
24
24
|
(the `.pen` web/mobile editor) is a second, write-capable provider; `none` → markdown-only.
|
|
25
25
|
- **The design tool is reached through its MCP** (a harness MCP server), NOT a subprocess CLI — the same
|
|
26
26
|
shape as Impeccable's slash-commands, not Repomix's `npx`. The skill detects the MCP and degrades when
|
|
@@ -27,8 +27,10 @@ root, not under any `epics/EP-<slug>/.sdlc/`.
|
|
|
27
27
|
|
|
28
28
|
## Rules
|
|
29
29
|
|
|
30
|
-
- **`tool`** selects the adapter; it MUST be one of `config.yaml` `design.tools` (or `none`).
|
|
31
|
-
tool
|
|
30
|
+
- **`tool`** selects the adapter; it MUST be one of `config.yaml` `design.tools` (or `none`). At
|
|
31
|
+
**connect** time an unknown tool is normalized to `design.primary` with a warning (so the registry
|
|
32
|
+
never persists an unknown value); a registry hand-edited to an unknown or missing tool **fails
|
|
33
|
+
`doctor`** with `YAD-CFG-002` and must be fixed.
|
|
32
34
|
- **Auth is never stored.** No Figma PAT, OAuth token, or any credential in the registry. `project_url`
|
|
33
35
|
and `files` are plain references; `connect` reaches the tool through the user's authenticated MCP
|
|
34
36
|
session.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: yad-connect-learning
|
|
3
|
+
description: 'Connects a learning/tutoring tool (DeepTutor, or another tool — pluggable) to the product hub so the cross-cutting learning layer can tutor any team member, at any SDLC stage, in the context of what is being built. Registers the tool into the project-wide .sdlc/learning.json (local-user auth, no stored tokens), detecting whether the DeepTutor CLI is on PATH and degrading to harness-native tutoring (the harness model reading project artifacts) when it is not. Optionally builds a project knowledge base from the SDLC artifacts + secret-scanned code-maps so tutoring is grounded. Run at setup or any time the learning tool changes. Reusable, idempotent, refreshable. Use when the user says "connect DeepTutor", "connect a learning tool", "refresh the learning connection", or "list the learning connection".'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDLC — Connect a Learning Tool (the cross-cutting learning layer)
|
|
7
|
+
|
|
8
|
+
**Goal:** Let any team member pause at **any** SDLC stage and ask to learn a concept — and get tutored
|
|
9
|
+
*in the context of what the team is actually building*. This skill **connects** a learning tool such as
|
|
10
|
+
**DeepTutor** to the product hub and records *how* to reach it (the tool, the CLI, an optional grounded
|
|
11
|
+
knowledge base) — never a credential. The consumer skill **`yad-learn`** does the tutoring per request
|
|
12
|
+
and records the team's skills.
|
|
13
|
+
|
|
14
|
+
This is **setup/maintenance**, not a gated state — it never touches `.sdlc/state.json` or any epic's
|
|
15
|
+
approvals. It only writes the project-wide learning registry. `yad-learn` consumes it: when DeepTutor is
|
|
16
|
+
available it drives the CLI (grounded in the knowledge base); when nothing is connected, `yad-learn`
|
|
17
|
+
degrades to **harness-native** tutoring — the harness model reads the project artifacts directly and
|
|
18
|
+
explains the concept. The learning layer is **purely opt-in and never blocks a gate**.
|
|
19
|
+
|
|
20
|
+
## Conventions
|
|
21
|
+
|
|
22
|
+
- `{project-root}` resolves from the project working directory (the **product hub**).
|
|
23
|
+
- The integration is **DeepTutor-first but pluggable** (`config.yaml` `learning.tools`): a learning-tool
|
|
24
|
+
*adapter*, like the design/testing adapters. `none` → harness-native (yad-learn still tutors via the
|
|
25
|
+
harness model).
|
|
26
|
+
- **DeepTutor is reached as a CLI SUBPROCESS** (`deeptutor …`), the same shape as Repomix's `npx` — NOT
|
|
27
|
+
an MCP like the design/testing tools (DeepTutor ships no MCP server). The skill detects the **binary on
|
|
28
|
+
PATH** and degrades when it is absent; it never installs DeepTutor.
|
|
29
|
+
- Registry: `{project-root}/.sdlc/learning.json` (project-wide, shared across all epics — NOT per-epic),
|
|
30
|
+
the sibling of `.sdlc/repos.json`, `.sdlc/hub.json`, `.sdlc/design.json`, and `.sdlc/testing.json`.
|
|
31
|
+
- Per-epic, per-member learning records + rendered tutorials are written later by `yad-learn`
|
|
32
|
+
(`epics/EP-<slug>/.sdlc/learning-records.json` and `epics/EP-<slug>/learning/`), not here.
|
|
33
|
+
- Speak in the configured `communication_language`; write documents in `document_output_language`.
|
|
34
|
+
|
|
35
|
+
## Inputs
|
|
36
|
+
|
|
37
|
+
- `action` — `connect` (default) | `refresh` | `list` | `disconnect`.
|
|
38
|
+
- `tool` — `deeptutor` | another adapter id (`config.yaml` `learning.tools`). `none` records a deliberate
|
|
39
|
+
harness-native project.
|
|
40
|
+
- `kb` — optional knowledge-base name (default `yadflow-<project-slug>`). The DeepTutor kb that grounds
|
|
41
|
+
tutoring in this project.
|
|
42
|
+
- `ground` — `true` (default) | `false`. When `true` and DeepTutor is available, build/refresh the
|
|
43
|
+
knowledge base from the SDLC artifacts + code-maps (the "grounded in the project" piece).
|
|
44
|
+
|
|
45
|
+
## On Activation
|
|
46
|
+
|
|
47
|
+
### Step 1 — Resolve the tool and detect the CLI (the learning-tool adapter)
|
|
48
|
+
Determine which tool is being connected from `tool` (default `deeptutor`); reject a `tool` not in
|
|
49
|
+
`config.yaml` `learning.tools` (fall back to the configured `learning.primary` with a warning, the same
|
|
50
|
+
way `registerRepo`/`registerDesign` fall back). Then **detect the tool's CLI on PATH**:
|
|
51
|
+
|
|
52
|
+
- **deeptutor** → run a best-effort `deeptutor --version` (or `deeptutor config show`). If it succeeds,
|
|
53
|
+
record `provider: "deeptutor-cli"` and the reported `version`.
|
|
54
|
+
- another adapter → its named CLI.
|
|
55
|
+
|
|
56
|
+
**Auth is the local user's own** — DeepTutor's own config (`deeptutor init`, `data/user/settings/`) and
|
|
57
|
+
the user's LLM provider keys. The skill **stores no tokens**; `kb`/`kb_sources` are plain references.
|
|
58
|
+
|
|
59
|
+
**Graceful degradation:** if the `deeptutor` binary is not on PATH, record `source: "harness-native"`
|
|
60
|
+
and report that `yad-learn` will still tutor **using the harness model reading the project artifacts**
|
|
61
|
+
(no error — the learning layer is additive and always works; DeepTutor only adds knowledge-base
|
|
62
|
+
grounding, quizzes, and deep research). Do **not** install DeepTutor as part of this step.
|
|
63
|
+
|
|
64
|
+
### Step 2 — Ground it in the project (optional, when DeepTutor is available)
|
|
65
|
+
When `ground: true` and DeepTutor is available, build or refresh a project **knowledge base** so tutoring
|
|
66
|
+
quotes what is actually being built:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
deeptutor kb create <kb> # idempotent: reuse if it exists
|
|
70
|
+
deeptutor kb add <kb> --doc <path> # per source below
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Add only **already-committed** artifacts + the **secret-scanned code-maps** (never raw repos): each
|
|
74
|
+
epic's `epic.md`, `architecture.md`, `contract.md`, `ui-design.md`, the `stories/` files, and every
|
|
75
|
+
`.sdlc/code-context/<repo>/code-map.md`. Record the kb name and the source globs in the registry. Skip
|
|
76
|
+
silently (record `kb: null`) when there are no artifacts yet (greenfield-safe).
|
|
77
|
+
|
|
78
|
+
### Step 3 — Record the connection in the registry
|
|
79
|
+
Upsert into `{project-root}/.sdlc/learning.json` (create the file + parent `.sdlc/` if absent):
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"tool": "deeptutor",
|
|
84
|
+
"provider": "deeptutor-cli",
|
|
85
|
+
"version": "1.4.5",
|
|
86
|
+
"kb": "yadflow-<project-slug>",
|
|
87
|
+
"kb_sources": ["epic.md", "architecture.md", "contract.md", "ui-design.md", "stories/", "code-context/*/code-map.md"],
|
|
88
|
+
"auth": "user",
|
|
89
|
+
"connectedAt": "<YYYY-MM-DD>",
|
|
90
|
+
"lastSyncedAt": "<YYYY-MM-DD>",
|
|
91
|
+
"source": "deeptutor-cli"
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
- `tool: "none"` records a deliberate harness-native project: `{ "tool": "none", "provider": null,
|
|
96
|
+
"kb": null, "source": "harness-native", ... }`.
|
|
97
|
+
- A DeepTutor connection whose CLI is absent records `{ "tool": "deeptutor", "provider": null,
|
|
98
|
+
"kb": null, "source": "harness-native", ... }` until a `refresh` finds the binary.
|
|
99
|
+
- `connect` is **idempotent** — re-running it overwrites the single connection in place; the original
|
|
100
|
+
`connectedAt` is preserved and only `lastSyncedAt` moves.
|
|
101
|
+
|
|
102
|
+
### Step 4 — Report (never auto-advance)
|
|
103
|
+
Report the connected `tool`, its `provider`, whether the CLI is available (or that `yad-learn` will run
|
|
104
|
+
harness-native), the `kb`, and that **`yad-learn` will now tutor team members on request**. Nothing
|
|
105
|
+
auto-advances; this is setup.
|
|
106
|
+
|
|
107
|
+
## Other actions
|
|
108
|
+
|
|
109
|
+
- **`refresh`** — re-detect the CLI, rebuild the knowledge base from the latest artifacts, and update
|
|
110
|
+
`lastSyncedAt`. Same machinery as `connect`. Re-detection may flip `source` between `deeptutor-cli` and
|
|
111
|
+
`harness-native` — report the change.
|
|
112
|
+
- **`list`** — print the current connection: `tool`, `provider`, `version`, the `kb`, and an
|
|
113
|
+
**available/harness-native** flag for the CLI (best-effort). No learning tool connected ⇒
|
|
114
|
+
"harness-native".
|
|
115
|
+
- **`disconnect`** — remove the registry file (or set `tool: "none"`). DeepTutor's own config and
|
|
116
|
+
knowledge bases are **never touched** — only the hub's record of them.
|
|
117
|
+
|
|
118
|
+
## Hard rules
|
|
119
|
+
|
|
120
|
+
- **Local-user auth only; store no tokens.** Connect through the user's own DeepTutor config / LLM keys;
|
|
121
|
+
never embed a key or any credential in the registry. `kb`/`kb_sources` are plain references.
|
|
122
|
+
- **Degrade gracefully.** No DeepTutor CLI → `yad-learn` tutors harness-native with no error. The
|
|
123
|
+
learning layer is additive and always works — never a blocker.
|
|
124
|
+
- **Setup, not a gate.** Never touch `.sdlc/state.json`, approvals, or the contract lock from here.
|
|
125
|
+
- **Idempotent + refreshable.** `connect`/`refresh` are safe to re-run; a project carries one learning
|
|
126
|
+
connection at a time.
|
|
127
|
+
- **Ground only committed, secret-scanned sources.** Feed the knowledge base from committed SDLC
|
|
128
|
+
artifacts + the already-scanned code-maps — never raw repository contents.
|
|
129
|
+
- **Describe the connection; do not tutor here.** This skill records *how to reach* the tool. The actual
|
|
130
|
+
tutoring + the personal, local-only learning records are produced by `yad-learn`, per request.
|
|
131
|
+
- **The registry is the only committed learning file.** `.sdlc/learning.json` is shared, reviewable
|
|
132
|
+
config (no secrets, no personal data). The records ledger and tutorials `yad-learn` writes are
|
|
133
|
+
local-only — gitignored, never committed or pushed.
|
|
134
|
+
|
|
135
|
+
## Reference
|
|
136
|
+
- Registry schema + freshness rule: `references/learning-registry.md`.
|
|
137
|
+
- CLI detection, the knowledge-base build recipe, the mode→capability map, and the harness-native degrade
|
|
138
|
+
path: `references/learning-context.md`.
|
|
139
|
+
- The connect pattern this mirrors (testing tool): `../yad-connect-testing/SKILL.md`.
|
|
140
|
+
- The consumer — how `yad-learn` tutors and writes `learning-records.json`: `../yad-learn/SKILL.md`.
|