• 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 »
  • - 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 »
  • - 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 »
  • - remove render.mjs/render.test.mjs (scope-lock now writes REQ cards directly)
    - add yaml-config.mjs: minimal 2-level YAML reader (+ tests)
    - apply-ddl: parse config-vars.yaml database: section instead of .env.local dotenv; drop assertSafeDbTarget host-whitelist + schema guards (config-vars.yaml is trusted)
    - merge-gitignore/validate-ddl: self-contained pathToFileURL comment (no longer 'see render.mjs')
    zichun authored
     
    Browse Dir »

  • 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 »