11 Commits

Author SHA1 Message Date
SpecialX
6051f84a65 docs: 恢复分支开发模式 - AI 不切换分支,默认多AI协作,经验沉淀不标注AI身份 2026-07-10 13:46:47 +08:00
SpecialX
f15912c7ee docs: 文档体系修正 - 模块边界强化与按需阅读架构 2026-07-10 13:33:31 +08:00
SpecialX
0a71b02e04 fix: code compliance audit and fix across all services
Some checks failed
CI / quality-ts (push) Failing after 48s
CI / quality-go (push) Failing after 4s
CI / quality-proto (push) Failing after 2s
CI / deploy (push) Has been skipped
NestJS (6 services): implement @RequirePermission decorator with
SetMetadata+Reflector, register APP_GUARD globally, fix as assertions
to type guards, add explicit return types, fix import type for express,
fix /metrics implicit any, replace native Error with ApplicationError,
remove typeorm remnants, register LifecycleService.

teacher-bff: add logger, ApplicationError, GlobalErrorFilter, forward
real userId to downstream, log downstream failures, migrate health
controller to shared/health.

Go (2 services): interface to any, doc comments, CORS dev whitelist,
JWT secret fail-fast, push-gateway internal API auth, metrics and
readyz endpoints, remove dead code.

Python (2 services): lifespan return type, dev_mode to bool, data-ana
APIRouter, ai POST body model, ClickHouse async wrapping.
2026-07-09 17:28:27 +08:00
SpecialX
f1e466a772 fix(infra): resolve NestJS dist build and Prometheus target issues
Some checks failed
CI / quality-go (push) Failing after 5s
CI / quality-proto (push) Failing after 3s
CI / deploy (push) Has been skipped
CI / quality-ts (push) Failing after 50s
NestJS: disable incremental in 6 services tsconfig.json to fix dist
not emitted when nest-cli deleteOutDir conflicts with tsc tsbuildinfo.
classes/iam: import HealthModule in AppModule to fix /healthz 404.
classes: rewrite HealthController to Drizzle getDb from TypeORM DI.
teacher-bff: add /metrics endpoint for Prometheus scraping.
infra: add node/mysql/redis exporters to observability profile.
mysql-exporter v0.15.1 uses command-line flags not DATA_SOURCE_NAME.
prometheus: enable web.enable-lifecycle for hot reload.
2026-07-09 15:12:15 +08:00
SpecialX
959d58a95d docs: add full-stack runbook and one-click scripts
Some checks failed
CI / quality-ts (push) Failing after 51s
CI / quality-go (push) Failing after 3s
CI / quality-proto (push) Failing after 2s
CI / deploy (push) Has been skipped
start-all/stop-all/health-check/test-cdc PowerShell scripts.

Compatible with PowerShell 5.1 (ASCII only, no emoji).
2026-07-09 13:47:46 +08:00
SpecialX
68ddff1065 refactor(infra): 重构为 no-push 本地构建部署模式
Some checks failed
CI / quality-go (push) Failing after 3s
CI / quality-proto (push) Failing after 2s
CI / quality-ts (push) Failing after 47s
CI / deploy (push) Has been skipped
- 删除 6 个分散 workflow(ci-ts/ci-go/ci-proto/ci-py/docker/deploy)
- 合并为单个 ci.yml:3 个 quality job 并行 + deploy job 串行
- 全部使用官方镜像(node:22-alpine/golang:1.22-alpine/bufbuild/buf/docker:25-git)
- deploy job 用 DooD 模式挂载 /var/run/docker.sock
- docker-compose.deploy.yml 改用 build: 替代 image:(no-push)
- 新增 docker-compose.tools.yml 一次性预拉所有 CI 镜像
- 支持 workflow_dispatch 指定 commit_sha 回滚
- 更新 project_rules §15 与 cicd-runbook.md 为 no-push 模式
- 新增设计文档 docs/superpowers/specs/2026-07-08-cicd-no-push-local-build-design.md
2026-07-08 17:12:57 +08:00
SpecialX
a1d7fcfd71 docs(docs): 新增 CICD 参考实现规范
Some checks failed
CI TypeScript / quality (push) Failing after 6s
CI TypeScript / arch-scan (push) Has been skipped
CI TypeScript / docker-build (map[context:. dockerfile:apps/teacher-portal/Dockerfile name:teacher-portal]) (push) Has been skipped
CI TypeScript / docker-build (map[context:. dockerfile:services/classes/Dockerfile name:classes]) (push) Has been skipped
Docker Build & Push / build-push (map[context:. dockerfile:apps/teacher-portal/Dockerfile name:teacher-portal]) (push) Failing after 3s
Docker Build & Push / build-push (map[context:. dockerfile:services/classes/Dockerfile name:classes]) (push) Failing after 10s
Docker Build & Push / build-push (map[context:./services/api-gateway dockerfile:services/api-gateway/Dockerfile name:api-gateway]) (push) Failing after 8s
CI Go / quality (push) Failing after 1m4s
CI Go / docker-build (push) Has been skipped
- project_rules §15.7: 参考项目位置 + 关键配置点(container/runner 标签/部署方式/网络)

- cicd-runbook §10: 参考项目对照表(配置项、关键差异、修改流程、冲突处理)

- 修正 cicd-runbook runner 标签:self-hosted,deploy → ubuntu-latest
2026-07-08 16:12:45 +08:00
SpecialX
d19285a977 docs(docs): 新增本地启动/多AI协作/CI-CD 使用手册
- local-dev-runbook.md: 8 章本地启动手册(环境依赖/端口分配/开发模式/生产模式/裸机运行/常见问题)

- multi-ai-collaboration.md: 15 章多AI协作文档(角色定义/模块分工/分支策略/PR流程/审核合并/跨模块变更)

- cicd-runbook.md: 10 章 CI/CD 使用手册(架构总览/一次性配置/日常使用/镜像管理/部署验证/回滚)

- README.md: 文档清单新增三个 runbook 链接
2026-07-08 15:14:30 +08:00
SpecialX
b39095cbdd docs: git-workflow v1.1 与 CODEOWNERS 规范
- git-workflow.md v1.1: scope-enum 对齐实际服务名(identity→iam 等)
- git-workflow.md: 新增 §4.7 模块 Owner 与 CODEOWNERS 章节
- git-workflow.md: husky hooks 与实际文件对齐,新增 pre-push 说明
- .github/CODEOWNERS: 定义各模块 owner team 与 PR 合并职责
- .github/pull_request_template.md: PR 模板
2026-07-08 12:53:18 +08:00
SpecialX
3fbb97791d fix(docs): 修复 project_rules.md P0 损坏并同步所有引用
- 根目录 project_rules.md 损坏(72 字节乱码),已删除
- 从 CICD 项目迁移完整版至 .trae/rules/project_rules.md(17881 字节)
- 更新 MIGRATION_GUIDE/README/coding-standards 引用至 .trae/rules/
- P0 紧急修复,影响所有 AI 工作流程
2026-07-08 12:50:00 +08:00
SpecialX
2ba4250165 feat(p1): complete P1 foundation stage
Some checks failed
CI Go / test (push) Has been cancelled
CI Proto / lint (push) Has been cancelled
CI Python / test (push) Has been cancelled
CI TypeScript / test (push) Has been cancelled
- monorepo: pnpm workspace + go.work + pyproject.toml + commitlint/husky
- infra: docker-compose (minimal + full profiles) + init-sql + prometheus
- arch-scan: multi-language scanner skeleton (TS/Go/Python/Proto)
- shared-proto: buf v2 + classes.proto (ClassService CRUD contract)
- api-gateway: Go/Gin + JWT HS256 auth + reverse proxy + request ID
- classes: NestJS golden template (error system + observability + middleware + CRUD + tests)
- teacher-portal: Next.js + paper-feel UI design system
- CI/CD: 4 workflows (go/ts/py/proto)
- docs: migration guide + project_rules + coding-standards + git-workflow + ui-design-system + 004 + 9 module READMEs + known-issues + spec/plan migration + roadmap
2026-07-07 23:39:37 +08:00