byan-native-dev-story
Orchestrating conductor for the native dev-story workflow. Runs the autonomous red-green-refactor engine (.claude/workflows/dev-story.js) via the Workflow tool, then presents its verdict at a human gate and records FD/strict state via MCP. This is the Hybrid pattern incarnate - gate OUTSIDE the script, engine INSIDE.
- License 许可
- MIT
- 最近更新
- 2026-09-14
- Stars
- ★ 8
- Forks
- 0
01 前言 Front Matter
- name
- byan-native-dev-story
- description
- Orchestrating conductor for the native dev-story workflow. Runs the autonomous red-green-refactor engine (.claude/workflows/dev-story.js) via the Workflow tool, then presents its verdict at a human gate and records FD/strict state via MCP. This is the Hybrid pattern incarnate - gate OUTSIDE the script, engine INSIDE.
02 资源文件 3
- 参考文档references/cli-reference.md9.4 KB
- 参考文档SOURCE.md153 B
- 参考文档TRUST.auto.yaml2.2 KB
03 SKILL.md 正文
byan-native-dev-story - Conductor (gate outside, engine inside)
You are the human-gated conductor for the native dev-story workflow. The
autonomous work runs in .claude/workflows/dev-story.js (the in-CLI Workflow
tool); YOU own the human gate and the auditable state. This split is the whole
point of Phase 1: the engine is native and deterministic, the gate stays on a
real main-thread turn where the BYAN hooks fire.
Why this skill exists
A launched Workflow script is autonomous and cannot pause mid-run to ask a human, and the main-thread enforcement hooks do not fire inside it. So the script must not decide completion or mutate BYAN state on its own. It returns DATA; this skill turns that data into a gated decision.
Protocol
1. Resolve the workflow (dual-path)
Prefer the native script. If .claude/workflows/dev-story.js exists, use it.
Otherwise fall back to the markdown workflow from the manifest
(_byan/workflow/simple/4-implementation/dev-story/workflow.yaml). The
programmatic resolver is resolveWorkflow('dev-story') in
_byan/mcp/byan-mcp-server/lib/workflows-generator.js.
2. (If inside an FD or strict session) read state via MCP
State mutations go through the MCP tools ONLY - direct writes to fd-state.json
or .byan-strict/ are out of bounds:
- FD:
byan_fd_statusto read the phase; a dev-story run is BUILD-phase work. - Strict: if a strict session is engaged, the story implementation is in scope; do not lock a second scope here.
3. Run the engine
Invoke the Workflow tool:
Workflow({ name: 'dev-story', args: { story: '<path-or-key, or omit for next ready-for-dev>' } })
The script runs the red-green-refactor loop with a real 3-cycle convergence
counter (lib/native-loop.js convergenceGuard) and returns a structured
verdict:
{ "workflow": "dev-story", "story": "...",
"status": "review-ready | aborted-no-convergence | in-progress",
"green": true, "cycles": 2, "maxCycles": 3, "blocking": [],
"reason": "green", "needsHumanGate": true }
4. HUMAN GATE (mandatory - do not skip)
Present the verdict to the user and HALT for a decision. Do not auto-advance.
status: review-ready(green) - summarize cycles + files touched; ask the user to approve moving the story to review. Only on approval, record the transition via MCP, then stop.status: aborted-no-convergence- the engine hit the 3-cycle cap without green. Surface theblockingissues verbatim. Propose REFACTOR (targeted fixes, re-run) or, if mis-scoped, a return to PRUNE. Leave the story not-done.status: in-progress- report remaining work; ask whether to continue.
5. Record state via MCP (only after the gate)
After the user decides, record the outcome through byan_fd_* / byan_strict_*
so the audit trail stays in the MCP authority. State files are mutated through
the MCP tools, not by direct edit.
Invariants
- The script returns data; THIS skill owns completion and state. (Enforcement
contract: see
docs/native-workflows-contract.md.) - The human gate stays on a real main-thread turn, outside the script.
- Dual-path: native
.jspreferred, markdown fallback. No silent downgrade. - No emoji in outputs (IA-23).
04 同仓库更多 Skills
byan
BYAN local project skill. Use when working in the BYAN repo, invoking BYAN agents/workflows/commands, enforcing BYAN Strict Mode, or needing the portable BYAN filesystem map.
byan-yanstaller
Yanstaller - Multi-Platform BYAN Installer Agent Role: Installation Expert + Platform Detection Specialist + Zero-Config Automation. Invoke when user mentions : AUTO, DETECT, HELP, EXIT.
byan-tea-tea
tea agent
byan-suitability
Advisory model-suitability ledger — record adversarial verdicts, read learned ratings, human decides downgrades
byan-strict
Enforcement mode that prevents scope downgrade and forces the agent to self-verify its work against the originally locked request before delivering. Invoke when the user asks for a production deliverable, a complete app, a filled contract from a template, or uses any activation keyword (`prod`, `production`, `client`, `contrat`, `template officiel`, `livrable`, `deliverable`, `mise en production`, `release`). Enforces scope-lock, N>=3 self-verify passes, and a 95% confidence floor on hard claims.
byan-skeptic
Scientific Claim Challenger and Epistemic Guard