Skip to content

chore(repo): EN-first docs, AGENTS.md, config hardening, guards dedup - #10

Merged
samson910022 merged 2 commits into
mainfrom
chore/en-first-docs-agents-guards
Sep 9, 2026
Merged

samson910022 merged 2 commits into
mainfrom
chore/en-first-docs-agents-guards

Conversation

@samson910022

Copy link
Copy Markdown
Owner

Summary

Three staged workstreams, each fix-reviewed to PASS by dedicated review subagents (fix => review loops closed):

Stage 1 — docs-i18n (EN-first)

  • Root README.md rewritten as English canonical; original preserved byte-identical as README.zh-CN.md (+ bidirectional language bars, Issues link added).
  • docs/README.md rewritten as English index (+ translation-status table, architecture row); docs/README.zh-CN.md Chinese mirror added.
  • Fixed kimi-k2.5 sample drift in docs/configuration.md; fixed bare USE_ISOLATED_HOME/DEBUG env aliases in guides (canonical OPENCODE_* + file-key notes).

Stage 2 — AGENTS.md + env config + .gitignore

  • New AGENTS.md: overview, stack/commands (no lint script), layout, env canonical table (env > file > default + known dual-entry drifts documented, not silently changed), tool-safety, secrets/prohibited, EN-first, commit/PR checklist.
  • .gitignore hardened: .env.* + !.env.example, coverage/, IDE, .opencode/, tgz, tsbuildinfo, custom-bin/, docs/host-deployments.md (migrated from local-only .git/info/exclude so it propagates on clone).
  • .env.example / config.json.example completed; docker-compose.yml / Dockerfile pass through missing vars with behavior-preserving defaults (BIND fold untouched); removed ghost npm run lint doc.

Stage 3 — architecture (maintainability/extensibility)

  • Extracted src/utils/guards.ts (asRecord/toErrorMessage single source; 7 files deduped 7->1 / 6->3; variant-B intentionally kept in system.ts/collector.ts per header note).
  • New docs/architecture.md: runtime shape, request template + intentional differences, extension points, no-touch list, unimplemented roadmap (preflight/stream-kit/withSessionRetry/config-unify).

Verification

  • npm run typecheck + npm run build green
  • npm test -- --runInBand: 7 suites, 191 tests pass
  • docker compose config valid; added defaults match index.ts prod defaults
  • Secret scan on full diff: 0 hits; .env/config.json/dist/custom-bin/host-deployments untracked, .env.example tracked
  • Per-stage review subagents + final 3-angle review + close-confirm all PASS

- Stage 1 docs-i18n: root README.md rewritten as English canonical,
  original preserved as README.zh-CN.md; docs/README.md rewritten as
  English index with docs/README.zh-CN.md mirror; fixed kimi-k2.5
  sample drift and bare USE_ISOLATED_HOME/DEBUG aliases in guides.
- Stage 2 config: new AGENTS.md (project manual, env canonical table,
  tool-safety, secrets, EN-first, commit/PR rules); .gitignore
  hardened (.env.*, coverage, IDE, .opencode, tgz, tsbuildinfo,
  custom-bin, host-deployments); examples/compose/Dockerfile
  completed with behavior-preserving defaults; removed ghost lint doc.
- Stage 3 architecture: extracted src/utils/guards.ts (asRecord /
  toErrorMessage single source, 7 files deduped, variant-B kept in
  system/collector); new docs/architecture.md with extension points,
  no-touch list and roadmap.
- Verified: typecheck + build green, 191 jest tests pass,
  docker compose config valid, no secrets in diff.
@samson910022
samson910022 merged commit eed60ed into main Sep 9, 2026
3 checks passed
@samson910022
samson910022 deleted the chore/en-first-docs-agents-guards branch September 9, 2026 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant