• - bInvalid(是否作废)/sFormId(界面ID) 由主表专属审核列移入基础标准列,所有表(含从表)均含;主表专属审核列减为 bCheck/tCheckDate/sCheckPerson/sStatus(4列)
    - 主表渲染 15 列顺序与基线一致(4 审核列插在 bInvalid 与 sFormId 之间);从表 10→12;bInvalid 仍钉死裸 bit
    - db-design 步骤B 要求1 新增: 金额/数量小数列统一 decimal(18,6)(REQ 明确要求可偏离)
    - 同步 header/table 模板 + db-design C.1/C.2 + db-init A.1 + README A3
    - 审计(多代理)+validate-ddl 实测均通过(decimal(18,6)/bit 4维一致;bit(1)负例正确 fail)
    zichun authored
     
    Browse Dir »
  • - 基础标准列(所有表)新增 sMakePerson(varchar50,制单人,app-assigned) / tUpdateDate(datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP)
    - 主表(表清单第一张)无条件 +6 审核列: bInvalid/bCheck(bit) tCheckDate(datetime) sCheckPerson(审核人)/sStatus/sFormId(varchar50); 全 NOT NULL 无 SQL 默认 app-assigned
    - 从表 sParentId 不变(紧随 sId); 匈牙利前缀图例加 b=bit
    - 同步 header/table 模板 + db-design C.1/C.2 + db-init A.1 DDL 译法 + README A3
    - db-init 钉死 bInvalid/bCheck 裸写 bit(禁 bit(1)) 对齐 validate-ddl 不归一化 BIT 长度(audit D5-1)
    zichun authored
     
    Browse Dir »
  • 标准列:每表 7 列(新增 iOrder/sMemo;sId/sBrandsId/sSubsidiaryId 改 varchar(50) NOT NULL),从表额外 +sParentId 共 8 列。docs-03 模板 + A3 渲染规则 + A4 DDL 默认值翻译(CURRENT_TIMESTAMP / DEFAULT '1111111111' / iOrder app-assigned)。
    
    去外键:A3 不再推导 FK 约束(改语义引用关系,无 ON DELETE/ON UPDATE,应用层维护一致性);A4 DDL 不生成 ALTER ADD FOREIGN KEY;validate-ddl 移除外键维度 5→4 维(表/列/类型/索引),单测 45 pass/0 fail;coding.mjs 种子/sentinel「FK 有序」→「按语义引用有序」(保留先被引用方后引用方/不可悬空)。
    
    注:db-design-gen 的 docs/06 读取清单/步骤B 两条 bullet 与本区域改动同处一个 diff hunk,随本提交落入(实属 docs/06 feature 的 A3 接入)。
    zichun authored
     
    Browse Dir »
  • - coding-start / plan-start:去掉已失效的「git 就绪由本入口预检/校验」表述(git 闸已移入 coding.mjs 运行时)
    - skeleton-gen:删除「A2 不再单独出 docs/06/07/09」「原 docs/09 并入」等历史演进注释
    - downstream-gen:描述去掉「A6 已并入此处」历史包袱
    - CLAUDE-template:补全被截断的 migration 规约残句(旧 V_n.sql 保持原样、永不回改)
    - README:修正悬空的「🧭 通用工作准则」引用、删「4 条通用准则」、模板计数 26→19、coding-start git 就绪描述
    zichun authored
     
    Browse Dir »
  • - A2 skeleton-gen 末尾新增 step F:创建空白 docs/06-实现策略.md,QA 闸循环至用户确认填完才进 A3(原 F 进入 A3 顺延为 G)
    - A3 db-design-gen 读取清单 + 步骤B + 参考接入 docs/06
    - A5 downstream-gen docs/02 构建顺序 / docs/05 端点 + 参考接入 docs/06
    - coding.mjs deriveSpecPrompt(前端+后端)把 docs/06 作为 spec 收集上下文
    zichun authored
     
    Browse Dir »

  • - 子模块代码:大写短码(USR/ROLE) → 大驼峰英文名、不限长度(UserInfo/Role)
    - 功能名:英文大写 [A-Z0-9_]/下划线(PWD_RESET) → 大驼峰 [A-Za-z0-9]/直接拼接(PwdReset)
    - 模块代码不变(大写短码 USR);结构仍 <模块代码>-<子模块代码>-<功能名> 恒 3 段
    - 规范示例统一 USR-USR-LOGIN → USR-UserInfo-Login;docs-01 五列示例行同步
    - 同步 7 文件:README/coding.mjs/scope-lock/docs-01/CLAUDE/plan-start/docs-04
    zichun authored
     
    Browse Code »


  • - index 模板:三列 → 五列(模块代码/模块名称/子模块代码/子模块名称/核心功能点),一行一个子模块
    - 卡片文件名:REQ-XXX-NNN.md → <req_id>.md,req_id 恒 3 段(如 USR-USR-LOGIN),功能名由 CC 据核心功能点推断(英文大写、[A-Z0-9_]、多词下划线、子模块内唯一),保持文件名==req_id 不变量
    - scope-lock:五列解析 + 按模块代码聚合建目录 + req_id 生成规则;E.1 glob 改 */*.md 跳过 _module.md
    - db-design-gen/downstream-gen:REQ-*.md glob 同步;docs/05 结构检查锚点 ### REQ- → 三级标题端点段
    - CLAUDE/docs-04 模板 commit 后缀、plan-start 示例、coding.mjs 提示词文案(238/1322)、README 同步
    - docs-08 checkbox 文本与 scope-lock Edit 锚点逐字节同步;流程/闸门/tag 机制零改动
    zichun authored
     
    Browse Code »
  • 行为门 v3(docs/design/2026-06-05-frontend-behavior-stage-gate.md):
    - 行为验收从 per-FE review approve 子门迁回阶段末尾一次(phase Behavior,
      featureLoop 后、testGate 前),保留 fix 循环(BEHAVIOR_STAGE_MAX=3 轮,
      fix 后全量前端单测复验再重跑门)
    - req-done/<FE> 语义降为「仅静态 review 过」;行为绿改由 reportPrompt 校验
      阶段级证据(module-reports/frontend-phase-behavior-r*-a*.md 最后一份非 RED)
    - build-failed 取消「兄弟未实现」短路(阶段末尾全 FE 已实现);断言作用域 =
      全部 FE spec「行为验收作用域」小节并集,缺小节记 scope-missing 阻断 green
    - 新增样式层 styleIssues(颜色 token 比对 + layout sanity 共 6 kind),
      降维并入 behaviorHard 与交互硬问题同口径 fix;环境仲裁透传 riders 计数
    
    前端测试目录隔离(对齐后端 src/main↔src/test 物理分离):
    - 锁定约定:单测 frontend/tests/** 镜像 src/(smoke 归 tests/__smoke__/ 且
      以 .test.* 结尾),e2e 在 frontend/e2e/,frontend/src/ 禁任何测试产物;
      vitest include 统一限定 tests/**/*.test.*
    - 五层防线:docs-04 模板 §2.1 锁定约定 / planPrompt+tddPrompt 硬护栏 /
      fe-skeleton 单测基线 / code-reviewer 新增第 8 维「测试文件隔离」
    - legacy 守卫:frontend/src/ 内已存在 colocated 测试时绝不收窄 include
      (防旧单测静默停跑),骨架幂等检测同步豁免,留人工迁移
    
    经两轮多代理对抗审计(34 agents),确认项均已修复。
    zichun 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 »

  • …n-check + projectRoot
    
    git 就绪(默认分支/工作树干净/功能分支创建与合并)改由 coding.mjs runBranchSetup 运行时把守;
    入口只校验 Plan 完成态(docs/08 §一 全勾)并取 projectRoot 绝对路径传入 Workflow。
    相应收窄 allowed-tools(去掉 git status/branch/checkout 授权)。
    zichun authored
     
    Browse Dir »
  • 缺值类(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 »

  • zichun authored
     
    Browse Dir »
  • validate-ddl now recognizes the db-init A.1 DDL form (CREATE TABLE →
    CREATE INDEX → ALTER TABLE ADD FK), so schemas with out-of-body indexes/
    FKs no longer report false-positive index/FK diffs. Adds a second parse
    pass (mergeStandaloneIndexes / mergeStandaloneForeignKeys), string-literal
    blanking so DEFAULT/COMMENT text isn't mistaken for real DDL, backtick
    non-ASCII identifier support across all matchers (H3), and shared index-
    column normalization (strip backtick / prefix-length / ASC|DESC) on both
    docs and DDL sides. Chinese 主键/唯一 index labels map to PRIMARY/UNIQUE.
    
    apply-ddl resolves mysql2 from the target project dir (not the plugin),
    rejects 【人工填写】 credential placeholders before connecting, and exits 2
    on missing config/DDL paths. setup-test-db template validates schema as an
    ASCII identifier before interpolating it into DROP/CREATE. db-init gains a
    B.1 toolchain precheck (mysql2 module + mysql client) before any DROP.
    zichun authored
     
    Browse Code »
  • - db-design-gen: drop unused `AskUserQuestion` grant (the A0 convention-
      confirm step was removed; conventions are now fixed in step B). Update the
      stale README A3 row that still described the dropped AskUserQuestion flow.
    - downstream-gen: drop unused `Skill` grant (terminal A step — it stops for
      /plan-start, never dispatches).
    - skeleton-gen: QA banner 产出清单 referenced docs/07, which was removed
      (the skill itself states A2 no longer emits docs/06/07/09) → drop it.
    - project-init: align description with body + README — dependency check is
      auto-install-then-stop, not give-instructions-and-stop.
    zichun authored
     
    Browse Dir »
  • - check 1 grep set: remove `待补` — it is used nowhere as a placeholder
      convention (real tokens are 【人工填写:…】 / TBD(...) / {{...}}), so it
      matched nothing.
    - replace the inaccurate "(与 scope-lock E.1 同集合)" note: this terminal gate
      greps a superset (`{{` + `TBD` + `【人工填写`) precisely because the
      TBD(A3/A5 自动补) placeholders legitimately deferred at A1 must be resolved
      by now — explaining the value-add over E.1 instead of claiming false parity.
    zichun authored
     
    Browse Dir »
  • - docs/10 was generated once at A5 and never read back by any skill,
      workflow, or gate (the `acceptance` hits elsewhere are the per-REQ card
      field, unrelated). Removing it costs the pipeline nothing.
    - delete docs-10-header-template.md; drop step E + its checkbox, banner
      entry, description mention, and reference-list entry from the skill;
      renumber old step F → E.
    - drop the docs/10 checkbox from docs-08-initial-template.md.
    - update README (A5 flow line, A5 table row, template-table row).
    zichun authored
     
    Browse Dir »
  • - docs-05 header: collapse the `## 全局约定` block (response-format JSON +
      auth/pagination placeholders) into a single pointer to docs/04 (the
      conventions SSoT). Also fixes a broken ref — it cited "docs/04 § 1.4
      错误码段位", but § 1.4 is 统一响应格式 and no such section exists.
    - docs-02: remove the free-form `## 三、关键说明 {{notes}}` filler section
      (the skill defines no source for it).
    zichun authored
     
    Browse Dir »
  • - resolveDbConfig only ever received the 5 DB_* keys dbEnvFromConfig emits;
      the MYSQL_*/DB_PASS/DB_NAME fallbacks had no producer (dead speculative
      generality, a dotenv-era leftover). Remove them.
    - collapse the config → DB_* env-shape → connection two-hop: resolveDbConfig
      now reads config.database.{host,port,user,password,schema} directly, and
      dbEnvFromConfig is removed.
    - CLI contract (node apply-ddl.mjs <configPath> <ddlPath>), the only caller
      via db-init, is unchanged.
    - rewrite tests to the parsed-config shape; drop the alias-only tests. 53 pass.
    zichun authored
     
    Browse Dir »
  • - step B: remove the inline `node -e` mysql SELECT-1 probe (3rd copy of the
      YAML parser + a connection test C.1 setup-test-db.mjs already performs);
      keep only the cheap 5-field non-empty/placeholder credential check, fold
      the Glob existence check into Read, drop now-unused Glob from allowed-tools
    - checkboxes: A.3 → `DDL ↔ docs/03 5 维一致(validate-ddl.mjs)`; drop the
      misleading "apply 后 5 维一致" item in D (apply does not change V1, nothing
      re-validates); rename the creds checkbox to "5 项非空校验通过"
    - sync the A4 block in docs-08-initial-template.md (5 → 4 sub-items)
    - update frontmatter description to match the new flow
    zichun authored
     
    Browse Dir »
  • …0 convention machinery
    
    - schema 约定(iIncrement 主键 / sId 业务ID / sBrandsId+sSubsidiaryId 多租户 / tCreateDate / 匈牙利前缀)从「A0 询问 + 可配置 {{}} 占位 + docs/04 § 四」改为**固定写死**在 docs-03-header-template + docs-03-table-template
    - remove A0 step(约定固定,无需向用户确认);B 内联引用固定标准列(去掉指向尚未生成的 docs/03 的前向引用);C.1/C.2 去掉 {{PK_CONVENTION}}/{{TENANT_COLS}}/{{COL_PREFIX_RULE}} 填充/展开
    - docs/04 § 四 不再被任何环节创建或引用(schema 约定单一来源 = docs/03)
    zichun authored
     
    Browse Dir »
  • - delete docs-07-env-template.md (§一 依赖↔docs/04 §零; §二 端口↔config-vars.yaml; §四 命令↔docs/04 §零 build/lint/unit/e2e; §三 规则折入 config-vars.yaml 头)
    - skeleton-gen: B.1 (gen docs/07) removed → B = just append docs/04 §一+; add 'A2 不再单独出 docs/06/07/09 — 各内容归属' note; frontmatter/checkbox/E.1-scan/参考 drop docs/07
    - config-vars.yaml header: + 2 guardrails (配置值不散落; base_package 锁定后复用)
    - plan-start drop 'docs/07 仅承载规则' note; docs-08 checkbox; README A2 row + template table
    zichun authored
     
    Browse Dir »
  • - 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 »
  • - delete lib/merge-gitignore.mjs + merge-gitignore.test.mjs: over-engineered for a once-run greenfield step (base .gitignore usually absent; duplicate ignore patterns are harmless)
    - D now uses C.1-style Read+Write: Write template if no .gitignore, else append missing lines (consistent with render.mjs removal + scope-lock direct-write)
    - removes the 'pre-Write empty .gitignore' fragility (Write self-creates); skeleton-gen drops Bash(node *) from allowed-tools
    zichun authored
     
    Browse Dir »
  • zichun authored
     
    Browse Dir »
  • 尾部 6/6 reset-test-db 与下次运行的 1/x setup-test-db 重复(都 DROP+CREATE),对正确性零贡献;删除后闸门为 detect→setup→build→lint→test→e2e,重编号 1/5..5/5。
    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 »
  • - skeleton-gen B.1: remove stale line claiming 根包名/命名空间 placeholder is filled at docs/09 top (docs/09 has no such placeholder; base_package lives in config-vars.yaml since A1)
    - docs-05-header: 端口 占位 -> pointer to config-vars.yaml backend.http_port (was a duplicate 【人工填写】 of the same port)
    zichun authored
     
    Browse Dir »
  • - README (A0 row + prerequisites): dep check now auto-installs missing tools (was: print guide + halt, no auto-install), matching project-init SKILL
    - project-init SKILL: fix typo 失败失败 -> 失败
    - CLAUDE template rule #5: inline cross-module 留痕 requirement (soft-rule S2 table was removed)
    zichun authored
     
    Browse Dir »
  • - A0 SKILL: drop inline cross-platform dep-check script + OS install guides; dep check now auto-installs missing tools (was detect-only); trim 用 Edit/用 Bash 等工具名提示
    - CLAUDE template: remove B 阶段流程 / 占位符约定 / 🚩 中断机制 / 🟡 软规则(S1,S2) / 硬规则#6 / 禁止项#2 等小节
    - docs-01 index: drop trailing 填写说明
    zichun authored
     
    Browse Dir »
  • …o-chain, docs/06+A6 removal
    zichun authored
     
    Browse Code »