• - coding.mjs: per-module Seed stage after backend testGate (generate
      sql/seed/NN__<module>.sql, cold-stack verify with PK-range COUNT
      reconciliation); behavior gate step2 -> 5-step ordering (demo seed
      before sentinel, sentinel fixed >=100000 range); fe-skeleton adds
      Playwright globalSetup e2e baseline (seed + admin storageState);
      fe tdd e2e assertion constraints
    - skeleton-gen: new scripts-seed-demo-data-template.mjs (mysql CLI,
      _demo_seed_history idempotency ledger, offline-validatable, atomic
      apply+ledger batch) + lib offline tests (93/93 green)
    - db-init: B.3 re-clean DB after DDL smoke apply (hand schema back to
      Flyway, avoid missing-history-table error); fix step-D typo
    - docs-04/CLAUDE templates: data baseline & demo-seed conventions
      (PK ranges 1-999 init / 1000-9999 seed / >=100000 sentinel)
    zichun authored
     
    Browse Code »
  • yanghl authored
     
    Browse Code »

  • zichun authored
     
    Browse File »
  • …rd, coverage reconciliation, testdb halt)
    
    Post-implementation multi-agent review (6 dims + per-finding adversarial verify) found the control-flow sound and the goal mostly-achieved; this lands the three deterministic, low-risk fixes among the confirmed findings.
    
    - build-failed short-circuit (must-fix): behaviorSubGate now validates the LLM's classification before green-by-skip — requires non-empty rootCausePath AND no interaction/sentinel hard issues riding along; a "dirty" build-failed goes through adjudicate(allowContinue:false) retry/halt instead of silently approving. The skeleton (lazy router + FeStub) makes legit sibling-unimpl build breaks rare, so a build-failed is more likely a real in-FE shared-code regression — the boundary comment §107-108 claimed load-bearing but had zero JS enforcement.
    
    - coverage reconciliation backstop (§3.6): empty-coverage only guarded ==0; now 0<routesReached<routesPlanned with the shortfall unexplained by route-level coverageGaps -> adjudicate(allowContinue:false). Closes the partial-coverage false-green. Counts route-level reasons only; over-counting can only suppress the gate, never false-halt.
    
    - test-DB guard direct-halt now implemented: TESTDB_GUARD_MARK in envError.detail + behaviorTestDbGuardTripped -> immediate HALT on the first result, honoring step2's "no retry, no adjudication" promise (previously prompt-only; a guard trip wrongly entered the generic stack-not-ready retry path, ~5 redundant setup-test-db.mjs runs).
    
    Left as accepted design trade-offs (documented in design §12): self-attested whitelist/route scope, soft-by-source non-data text, disabled-control should-work recovery limited to submit buttons.
    
    Verified: SYNTAX_OK (wrapped check), 87/87 lib tests pass, no time/random builtins. v2 design doc updated (§3/5/6.2/6.3 + new §12).
    zichun authored
     
    Browse Code »
  • Replaces the phase-level read-only behavior-gate with a per-FE acceptance dimension: each FE is approved only when the code-reviewer approves AND runtime behavior verification is green. Behavior defects (dead control / sentinel text mismatch) become fixable must-fix that drive verify->fix->re-verify, not halts.
    
    - reviewWithFixLoop (frontend only, via if(fe)): at the approve gate, behaviorSubGate boots this FE's full stack + seeds sentinels, enumerates this FE's routes, two-tier asserts. Hard issues with a locator -> fixPrompt -> functional reverify -> next behaviorRound; soft text (i18n/literal/semantic) -> adjudicate(continue); behaviorRound bounded by BEHAVIOR_FE_MAX=3, env race by BEHAVIOR_ATTEMPT_MAX=2. Backend featureLoop branch unchanged.
    
    - New runFrontendSkeleton stage (before featureLoop(frontend)): App shell + full lazy router + FeStub placeholders + shared nav, so the app is buildable at every mid-phase point; tdd swaps FeStub->real component per FE. Idempotent via fe-skeleton-done tag.
    
    - BEHAVIOR_GATE_SCHEMA gains build-failed envError kind (sibling-FE-unimpl short-circuit, not a bug) + locator-not-resolvable coverage reason; deriveSpec emits a per-FE route-scope section, reviewer validates it.
    
    - Removed phase-level runBehaviorGate + 'Behavior' phase; kept phase-level testGate (regression). REVIEW_HARD_ROUNDS 8->10.
    
    - Safety: test-DB naming guard pushed into scripts-setup-test-db.mjs template (fail-closed unless name contains test/_dev/_local or ALLOW_NONTEST_DROP=1) + 3 tests.
    
    - agentType stays erp-workflow:code-reviewer. v1 design doc marked SUPERSEDED; v2 design at docs/design/2026-06-02-frontend-behavior-in-review-loop.md.
    
    Verified: wrapped syntax check SYNTAX_OK, 87/87 lib tests pass, no orphan refs, no time/random builtins, top-level return intact. Not yet run end-to-end against a real ERP project.
    zichun authored
     
    Browse File »
  • New 'Behavior' stage between Gate and Milestone, frontend-phase only, after testGate green and before report/milestone. Verifies every interactive control actually works and every text region shows the right content, independent of the tests the tdd agent wrote.
    
    - BEHAVIOR_GATE_SCHEMA / behaviorGateContract() / behaviorGatePrompt() / runBehaviorGate(); reportPrompt now gates the milestone on behavior-gate evidence (frontend-phase-behavior-gate-r*.md, last attempt must be non-RED).
    
    - Two-tier failure: interaction defects (incl. binding-garbage) flake-retry once then hard-halt via adjudicate(allowContinue:false); text issues split by source (sentinel=objective -> no continue; i18n/literal/semantic=adjudicable). Convergence loop re-runs the env + interaction hard gates after any text-layer retry so a refreshed result can't slip a green past the hard gates.
    
    - Full-stack seeded run: test-DB name guard (deterministic halt, not adjudicated), strict 4-phase ordering (empty DB -> boot backend so Flyway builds schema -> seed -> boot frontend), auth bootstrap via storageState, router-config-driven route discovery, ephemeral .tmp/behavior-gate runner with finally teardown, type-legal per-field-unique sentinels.
    
    - agentType uses the plugin-namespaced 'erp-workflow:code-reviewer' (a bare 'code-reviewer' is ambiguous with feature-dev:code-reviewer); README + agents/code-reviewer.md aligned (frontmatter name: stays bare).
    
    - Design: docs/design/2026-06-02-frontend-behavior-gate.md. README + coding-start banner updated.
    zichun authored
     
    Browse File »

  • 缺值类(A)改为 stage 自主决策继续并登记 decisions[];结构违约/重试耗尽(B/C)经新增 adjudicate() 仲裁
    retry/continue/halt(runStage/runAction 包装,ADJUDICATE_MAX=3);dirty 工作树自主恢复(带分支护栏,
    非功能分支/越界改动仍 halt)。review 软5/硬8 轮;docs/08 checkbox 降级为纯可视化(req-done tag 为真值)。
    
    硬边界保持: merge 冲突 / invalid-projectRoot / assertSafeId 注入护栏 / 红色测试绝不 continue 跳过
    (verify/reverify/tdd/report allowContinue:false)。JS HALT throw 37->26。
    zichun authored
     
    Browse Code »

  • - docs-04 template: remove § 2.5 样式与主题 (tokens live in src/styles/tokens.css) + § 3.5 配置与安全 (config in config-vars.yaml, rules in docs/07→now config-vars header)
    - styles-tokens-template.css: fix 3 stale docs/06 refs missed in the earlier docs/06 removal (greps had excluded *.css) → self-contained '色值单一来源 / SSoT'
    - coding.mjs: frontend ref §一 前端架构 → §二 前端规范 (§一 is 后端); backend drop frontend §2.1 → §1.2 分层; 样式/色值 → tokens.css; remove docs/07 from value-lookup order
    zichun authored
     
    Browse Code »
  • - delete docs-09-structure-template.md (its § 二/§ 三 dir layout duplicated docs/04 § 1.2/2.1; § 四 docs-tree was a self-referential maintenance trap; § 五 overlapped docs/04)
    - skeleton-gen B.1 now generates only docs/07; B.2 captures backend/frontend dir layout into docs/04 § 1.2/2.1; frontmatter/checkbox/参考 drop docs/09
    - coding.mjs (6 refs): file placement -> docs/04 § 1.2/2.1; frontend root -> frontend/ convention; cross-module path->module -> docs/08 § 二 路径: field
    - CLAUDE-template rule #2 -> docs/04 § 1.2/2.1; docs-08 checkbox + README A2/template-table drop docs/09
    zichun authored
     
    Browse Dir »
  • - C.1: stop generating sql/migrations/.gitkeep (A4 db-init's Write V1 creates the dir); README A2 drops 'create empty migrations dir'
    - precedence rule: on color conflict, tokens.css wins over prototype (prototype = structure/layout/interaction; tokens.css = color) — encoded in skeleton-gen note, coding.mjs frontend stage, code-reviewer § Design Tokens
    zichun authored
     
    Browse Dir »
  • - delete frontend-scope-lock skill + docs/06 templates (static + module-pagelist)
    - A5 downstream-gen gains prototype/ gate + FE-list derivation -> docs/08 § 三
    - plan-start: drop A6 dispatch row, gate 5->4 items; coding-start A0~A6 -> A0~A5
    - Design Tokens single source = src/styles/tokens.css (code-reviewer, coding.mjs)
    - plugin.json skills 9->8; docs-09 tree drops 06-UI; docs-08 drops A6 section
    zichun authored
     
    Browse Dir »

  • zichun authored
     
    Browse Dir »
  • The TAG_REPORT_FRESHNESS_SCHEMA + checkTagReportFreshPromptM + the
    post-`tag.exists` freshness branch in runMilestone existed to detect
    "tag points at a commit whose § ⑫ is still {{milestone_tag}}". Per the
    original comments, this only catches historical leftovers from the
    pre-fix tag → § ⑫ ordering; the same fix reversed the order so the
    runtime guard is no longer load-bearing. ~25 lines of branchy
    defensive code that the source-level fix already prevents.
    
    If a pre-fix repo has stale milestone tags, delete them with
    `git tag -d milestone/<id>` and re-run coding-start.
    zichun authored
     
    Browse Dir »
  • zichun authored
     
    Browse Dir »
  • Independent Claude + Codex review of the working-tree diff surfaced
    23 issues; all applied in-place across three domains.
    
    workflows/coding.mjs (9):
    - spec/plan/verify/review prompts now git-commit their artifacts
      (closes milestone-dirty-worktree halt risk)
    - CHECKBOX_STATE_SCHEMA requires `state` + defensive guard in reviewWithFixLoop
    - writeDocs08FieldPromptM scopes edits to module via line anchor
    - assertSafeId guards Router output (module/REQ/FE ids)
    - featureLoop captures reviewWithFixLoop's return value
    - dateFromArtifactPath rejects impossible dates (9999-99-99 etc.)
    - terminal HALT review-unresolved message disambiguated
    - updated comment on top-level `return` (ESM vs node --check)
    
    lib/validate-ddl.mjs + tests (10):
    - extractType preserves unsigned/signed modifiers
    - KEY/INDEX fallthrough no longer creates spurious 'KEY' columns
    - FOREIGN KEY REFERENCES accepts schema-qualified `db.table`
    - index keys normalized to name:kind:cols (UNIQUE-aware)
    - FK keys include ON DELETE action (defaults to RESTRICT)
    - CREATE TEMPORARY TABLE parsed
    - parseForeignKeyBullet/parseIndexBullet reject prose bullets
    - +10 regression tests (62 total, all pass)
    - merge-gitignore.mjs docstring synced to implementation
    
    skills/ (4):
    - docs-06 template header: § 一~二 → § 一~三
    - downstream-gen §A steps renumbered 1-7 (was 1,3,4,5,6,7,8)
    - docs-08 initial template adds tokens.css checkbox
    - coding-start drops "已在后台启动" wording (Workflow is synchronous)
    zichun authored
     
    Browse Code »

  • - 新增 scope-lock/templates/config-vars-template.yaml:非敏感项目级配置
      (包名/端口/前端包名/初始账号)+ secrets_ref 键名引用 .env.local;
      A1 E.2 锁定。docs/07 改为只记规则/约定不记具体值。
    - 连带更新 skeleton-gen / plan-start 闸门 2 / frontend-scope-lock /
      CLAUDE-template / README / docs-06·07 模板对齐新的配置分层与 docs/06 小节编号。
    - lib 修复(含回归测试):
      - apply-ddl: 抽出 resolveDbConfig,DB_SCHEMA 为契约 schema 键,缺库名 fail-closed (M1)
      - render: 用 Object.hasOwn 拒绝原型链继承键,guard process.argv[1]
      - validate-ddl: 解析 ### 索引/### 外键 bullet (C2)、剥 SQL 注释防幽灵表 (L4)、PRIMARY 归一化
    - coding.mjs: Router 把全部前端 FE 聚合为单一末尾 frontend-phase 模块;
      新增 branchSetupPrompt 功能分支生命周期 (C1);diff 区间改三点 diff;fix 后复跑 verify。
    zichun authored
     
    Browse Code »
  • The autonomous build changed it to `export default` to satisfy `node --check`,
    but Workflow scripts run in an async wrapper where top-level `return` is the
    result contract (alongside `export const meta`). `export default` would be a
    dead module export and the per-module result summary would be lost.
    zichun authored
     
    Browse Code »
  • zichun authored
     
    Browse Code »