docs: 整理文档目录结构 — 清理过时文档、归集功能子目录、统一命名规范

清理:
- 删除 34 份过时文档(gap reports/QA临时报告/验收报告/阶段性文档)
- 删除 docs/.hermes/skills 第三方 skills 副本(16 文件)
- 删除 skills-lock.json

目录归集:
- 根目录仅保留 README.md 索引
- product/ — 产品与架构设计(PRD + ARCHITECTURE + P2设计文档 + AI/企业路线图)
- tracking/ — Chatwoot parity 开发跟踪
- requirements/ — M01-M12 模块需求
- plans/ — 历史实现计划
- parity/ — 路由 parity 与前端契约
- qa/ — QA 报告与测试计划
- ops/ — 运维部署

命名规范:
- 全小写 kebab-case,禁止全大写文件名
- product/tracking/ops 用 NN- 序号前缀
- requirements 用 MNN- 两位零填充模块号
- plans/qa 用 YYYY-MM-DD- 日期前缀
- requirements M1-M9 零填充为 M01-M09(修复字典序)

同步更新:
- backend/cmd/route_parity/main.go 路径默认值
- backend/scripts/parity_frontend_smoke.sh 报告路径
- 所有 docs 内部交叉引用
- .gitignore 排除编译产物 (backend/gochat, backend/route_parity)
- 新增迁移 000052/000053
- 前端 WS 相关修改
This commit is contained in:
2026-07-09 14:53:27 +08:00
parent 805402f938
commit 0dabb8cfa5
136 changed files with 1240 additions and 14484 deletions
@@ -11,8 +11,8 @@ This file records current focused tests that act as contract fixtures for fronte
| Owner Area | Frontend Contract Source | GoChat Evidence | Current Status | Next Evidence Needed |
| --- | --- | --- | --- | --- |
| Dashboard literal APIs | `dashboard/api/specs/labels.spec.js`, `macros.spec.js`, `notifications.spec.js`, `reports.spec.js`, `search.spec.js`, `slaReports.spec.js` | label/macro/notification/analytics/search/SLA focused handler fixtures listed in `docs/parity/frontend_contract_inventory.md` | Fixture covered for labels, macros, notifications, APIV2 reports, search, and applied-SLA literal frontend paths | Keep as drift guard; add dedicated fixtures only if Woochat introduces new dashboard API literals. |
| Widget and survey literals | `widget/api/*`, `survey/api/*`, `dashboard/api/teams.js`, `summaryReports.js`, `userNotificationSettings.js`, `webhooks.js`, `yearInReview.js` | widget handler, public CSAT, team, summary-report, notification-setting, webhook, and year-in-review focused fixtures listed in `docs/parity/frontend_contract_inventory.md` | Fixture covered for all remaining frontend inventory rows; inventory has 0 `Mapped; needs fixture/smoke evidence` rows | Keep full regression, route parity, and live browser smoke as release gates before declaring product-level completion. |
| Dashboard literal APIs | `dashboard/api/specs/labels.spec.js`, `macros.spec.js`, `notifications.spec.js`, `reports.spec.js`, `search.spec.js`, `slaReports.spec.js` | label/macro/notification/analytics/search/SLA focused handler fixtures listed in `docs/parity/frontend-contract-inventory.md` | Fixture covered for labels, macros, notifications, APIV2 reports, search, and applied-SLA literal frontend paths | Keep as drift guard; add dedicated fixtures only if Woochat introduces new dashboard API literals. |
| Widget and survey literals | `widget/api/*`, `survey/api/*`, `dashboard/api/teams.js`, `summaryReports.js`, `userNotificationSettings.js`, `webhooks.js`, `yearInReview.js` | widget handler, public CSAT, team, summary-report, notification-setting, webhook, and year-in-review focused fixtures listed in `docs/parity/frontend-contract-inventory.md` | Fixture covered for all remaining frontend inventory rows; inventory has 0 `Mapped; needs fixture/smoke evidence` rows | Keep full regression, route parity, and live browser smoke as release gates before declaring product-level completion. |
| Auth/Profile/Account | `dashboard/api/endPoints.js`, `dashboard/api/account.js`, `dashboard/api/mfa.js`, `CacheEnabledApiClient.js` | API/enterprise smoke sign-in, validate-token, profile; browser login + dashboard token validation; `internal/handler/api/v1/auth_handler_test.go::TestChatwootAuthSignInReturnsDeviseHeadersAndUserPayload`; `internal/handler/api/v1/auth_handler_test.go::TestChatwootAuthValidateTokenReturnsPayloadData`; `internal/handler/api/v1/profile_handler_test.go::TestGet_Success`; `internal/handler/api/v1/profile_handler_test.go::TestSetAvailability_ReturnsChatwootUserSerializer`; `internal/handler/api/v1/profile_handler_test.go::TestSetAutoOffline_ReturnsChatwootUserSerializer`; `internal/handler/api/v1/profile_handler_test.go::TestSetActiveAccount_UpdatesMembershipActiveAt`; `internal/handler/api/v1/mfa_handler_test.go::TestProfileMFA_StatusUsesChatwootRawPayload`; `internal/handler/api/v1/mfa_handler_test.go::TestProfileMFA_EnableVerifyBackupAndDisableUseFrontendPayloads`; `internal/handler/api/v1/account_handler_test.go::TestCacheKeys_Success`; `internal/repository/account_repo_test.go::TestAccountUserRepo_UpdateActiveAt_SetsCurrentTimestamp`; auth/CORS token-header tests | Fixture covered for auth/profile bootstrap, availability, auto-offline, active account, MFA payloads, and account cache keys | Keep as drift guard; broaden only if Woochat adds new auth/account API calls. |
| SSO/Identity | `dashboard/api/samlSettings.js` | `internal/handler/api/v1/account_saml_settings_handler_test.go::TestAccountSamlSettingsHandlerTestSuite/TestChatwootFrontendCollectionCRUDPayloads`; `RegisterAccountSamlSettingsRoutes` | Fixture covered for Woochat SAML settings collection GET/POST/PUT/DELETE, `{ saml_settings: ... }` create/update wrapper, raw `response.data` payload, `sso_url`/`certificate` aliases, fingerprint/id fields, delete/not-found behavior, and legacy id-route compatibility | Keep as drift guard; end-to-end SSO login, LDAP, and OIDC remain deployment/feature-gated outside this settings API contract. |
| Inbox/Agents/Assignment | `dashboard/api/inboxes.js`, `agents.js`, `teams.js`, `assignmentPolicies.js`, `agentCapacityPolicies.js`, `assignableAgents.js` | API/enterprise smoke inbox list and agent-capacity list/users; `internal/handler/api/v1/inbox_handler_parity_test.go::TestInboxHandler_ChatwootSerializerParity`; `internal/handler/api/v1/inbox_handler_parity_test.go::TestInboxHandler_HealthReturnsWhatsAppCloudRawPayload`; `internal/handler/api/v1/inbox_handler_parity_test.go::TestInboxHandler_HealthReturnsProviderFailureState`; `internal/handler/api/v1/inbox_member_handler_test.go::TestAccountScopedInboxMembers_ChatwootPayloadAndDiffUpdate`; `internal/handler/api/v1/assignment_policy_handler_test.go::TestInboxAssignmentPolicy_ChatwootRoutes`; `internal/handler/api/v1/agent_capacity_handler_test.go::TestChatwootPolicyInboxLimitAndUserFlow`; `internal/handler/api/v1/agent_capacity_handler_test.go::TestChatwootPolicyInboxLimitAndUserValidationErrors`; `internal/handler/api/v1/facebook_callbacks_handler_test.go::TestFacebookCallbacks_RegisterFacebookPage`; `internal/handler/api/v1/tiktok_channel_handler_test.go::TestTikTokChannel_Create_ChatwootSetupPayloadAndConfig`; LINE/Twilio setup config assertions in `internal/handler/api/v1/line_channel_handler_test.go` and `internal/handler/api/v1/twilio_channel_handler_test.go`; root OAuth callback inbox config assertions in `internal/router/router_test.go::TestChannelCallbacksCreateInboxesAndRedirect`; assignable-agent route tests | Fixture covered for inbox list/detail/channel settings, members, health, provider failure state, Facebook callback-created inbox/channel config, root OAuth-created Instagram/TikTok/Twitter inbox config, TikTok/LINE/Twilio setup-created inbox/channel config, assignment-policy inbox override, agent-capacity user create/list/delete, inbox-limit create/update/delete, inbox avatar/campaigns/sync-template literal runtime paths, account create literal path, account-scoped agent bulk-create runtime path, and validation/not-found envelopes on Chatwoot literal nested paths | Keep as drift guard; add new provider callback fixtures only when Woochat adds channel setup UI calls or provider payloads change. |
@@ -38,4 +38,4 @@ Phase 6 is therefore in Review for the inspected placeholder surface. Reopen it
## B12 Readiness
`scripts/parity_frontend_smoke.sh --check` passed and refreshed `docs/parity/frontend_smoke_report.md`. The first check attempt failed because `/tmp` was full; rerunning with workspace-local `GOCACHE`, `GOTMPDIR`, and `TMPDIR` succeeded. Live API/browser/enterprise smoke remains pending because it requires the full PostgreSQL, Redis, Meilisearch, GoChat, Vite, and Chrome stack.
`scripts/parity_frontend_smoke.sh --check` passed and refreshed `docs/parity/frontend-smoke-report.md`. The first check attempt failed because `/tmp` was full; rerunning with workspace-local `GOCACHE`, `GOTMPDIR`, and `TMPDIR` succeeded. Live API/browser/enterprise smoke remains pending because it requires the full PostgreSQL, Redis, Meilisearch, GoChat, Vite, and Chrome stack.
@@ -2,7 +2,7 @@
Generated from:
- GoChat route dump: `docs/parity/gochat_routes.txt`
- GoChat route dump: `docs/parity/gochat-routes.txt`
- Chatwoot route source: `reference/chatwoot/config/routes.rb`
This report covers tracked frontend-critical Chatwoot routes from `reference/chatwoot/config/routes.rb`, including API v1 account routes, Captain/Copilot, assignment policies, widget/public APIs, and API v2 reports. Ruby is not installed in the workspace, so Chatwoot routes are sourced from static route declarations instead of `bin/rails routes`.