diff --git a/.agents/skills/hyb-oa-delivery/SKILL.md b/.agents/skills/hyb-oa-delivery/SKILL.md deleted file mode 100644 index 9b9d65b2..00000000 --- a/.agents/skills/hyb-oa-delivery/SKILL.md +++ /dev/null @@ -1,144 +0,0 @@ ---- -name: hyb-oa-delivery -description: "Use for hyb-oa project delivery tasks: natural-language triage, Trellis task planning, implementing Fastify/Prisma or React/Vite changes, refining PC/mobile/WeCom UI, reimbursement/invoice/OCR/attachment work, trial-run troubleshooting, automated/visual verification, and Chinese batch commits." ---- - -# hyb-oa Delivery - -Use this skill when working in `/home/shunli/Projects/hyb-oa` or when the user asks to continue planning, implementation, trial-run validation, visual QA, reimbursement/invoice improvements, Enterprise WeChat checks, deployment preparation, or project-wide review. - -## Required Reading - -Read only what is relevant: - -- Always read `AGENTS.md`, `.trellis/workflow.md`, `.trellis/spec/hyb-oa/index.md`, and the current `.trellis/tasks//prd.md` for non-trivial work. TRELLIS2 makes the Trellis task directory the execution contract; Issue CSV is historical audit or optional export material, while `docs/` remains the business fact source. -- After R5, first check the historical R5/R6 contract status before planning trial-run or follow-up work; R5 must remain the completed gate, and new expansion work should use a Trellis task after TRELLIS2. -- For UI/page work, PC/mobile/WeCom experience, approval UX, or domestic OA benchmarking, read `docs/产品设计规则.md` and `references/visual-qa.md`. DG8 makes Feishu workbench/approval the single main UI/layout reference, with Hyinda branding and project rules taking priority. DG9 adds the A/B/C page layering and shared workbench/mobile samples; choose the DG9 sample before designing or coding a page. Other products are only function/process/control references. Mobile page work must treat `docs/产品设计规则.md` as the source of truth for the unified mobile shell, icon grid, card lists, deep Push pages, sticky actions, safe-area, and cross-viewport matrix. 移动页必须先对齐该设计事实源,再进入实现或验证。 -- For approval workflow, roles, self-approval, notification, deeplink, reminder, or escalation work, read `docs/需求-统一审批中心规约.md`. -- For HR lifecycle, employee onboarding/offboarding, Enterprise WeChat directory sync, account disablement, or Enterprise WeChat API work, read `docs/需求-企业微信基础设施规约.md`, `docs/企微API能力目录.md`, `docs/管理员手册.md`, the current Trellis task, and relevant historical HCLT/HRWD/WAPI/WRRA evidence first. -- For any Enterprise WeChat capability, Secret, callback, approval, check-in, HR assistant, or contact-directory task, read `docs/企微API能力目录.md` before planning or coding. WAPI fixes the current Secret matrix: contacts use `WECOM_CONTACT_SECRET`; workbench/OAuth/messages/HR assistant/roster/check-in/approval use `WECOM_AGENT_SECRET`; `WECOM_CHECKIN_SECRET` is only an explicit check-in override; `WECOM_HR_ASSISTANT_SECRET` is historical compatibility and not a default. Do not write runtime code that tries multiple Secrets to guess the correct one. -- For Enterprise WeChat-first HR/attendance runtime migration, read `docs/企微优先开发路线图.md` before planning or coding. WDRG makes the roadmap authoritative for stage order; WAPI adds the runtime-first stage before deep mirror work; WRRA states that WOUA `PASS_WITH_FINDINGS` does not clear deep mirror work; WOUA-FIX has now soft-archived the 7 OA active test accounts missing in WeCom, fixed the `T0000` seed reactivation behavior, transferred the `SMOKE201` test-manager side effects, and rerun WOUA with `oaActiveMissingInWecom=0`. WCPC has rerun the capability POC with an existing active test account and reached `GO_TO_HR_MASTER_SYNC`; WHMS/WHMSLIVE has implemented, deployed, and publicly verified `wecom_hr_master_sync_v1`, with the production flag restored to `force_off` and production real-employee batch apply not approved. WMSG1 proves real app-message delivery and Deeplink return only; WAPC1 fixes the approval configuration preparation checklist before mirror work; WAPC2 adds the leave/missed-punch approval template and low-risk `sp_no` read-only POC runner. WPROC1/WPROC2 fixed the engineering process gate; WEGOV1 is the route gate, and WACP3R has now rerun the compensation-pull POC by automatically discovering OA-POC leave/missed-punch template IDs from `SMOKE002` creator. Public report `/app/artifacts/qa-flow/wecom-approval-compensation-poc-20260519T115944Z/summary.json` is `PASS_WITH_FINDINGS`: compensation pull and detail read work, with finding that callback evidence files are not persisted across deploys. WREAD1/WREAD1F have now completed real-device readability confirmation for leave and missed-punch: public report `/app/artifacts/qa-flow/wecom-approval-readability-gate-20260519T133628Z/summary.json` is `PASS_READABLE`; the user confirmed cards/lists/details are readable, reject has second confirmation, and approve is single-tap. WADM1 has completed the self-owned archive/mirror data-model design. WARCH1 has implemented and publicly verified the minimum leave/missed-punch archive slice: Prisma archive/callback/compensation/finding tables, callback DB persistence with non-200 retry on DB failure, compensation persistence behind `--persist-to-db` + `WECOM_ARCHIVE_WRITE=1`, and offline `npm run check:wecom-approval-archive`; public reports `/app/artifacts/qa-flow/wecom-approval-compensation-poc-20260519T160306Z/summary.json` and `/app/artifacts/qa-flow/wecom-approval-archive-20260519T160330Z/summary.json` are `PASS_WITH_FINDINGS`, with 2 archived histories readable and only a historical pre-WARCH1 callback gap finding. WARCH2 has now added the formal OA read-only archive API/page: `/api/wecom/approval-archive`, `/wecom-approval-archive`, and `/mobile/wecom-approval-archive` read OA DB only, do not call WeCom API or read WeCom Secrets, and enforce self/direct-report/HR-admin visibility with unmapped applicant records HR/admin-only. WROAD2+OPS is the controlled launch gate: use test accounts `SMOKE002 -> SMOKE101`, observe/admin-alert via employee_no `HYD000006` (the employee id for `wangshunli`), run daily checks for 3 days, allow only compensation archive writes to OA DB via `WECOM_ARCHIVE_WRITE=1`, and do not create WeCom templates/approvals, write WeCom, or expand real users. Day 0 public report `/app/artifacts/qa-flow/wroad2-ops-20260520-041941/summary.json` is `PASS_WITH_FINDINGS`: WeCom runtime, compensation archive persistence, offline archive read, and privacy smoke pass; findings are missing live-smoke login credentials/pending OCR subcheck and historical callback gap. It still does not implement full mirror, outing/overtime live, emergency mode, writeback, or RuleOps. WAUTO1 adds `scripts/qa/collect-wecom-controlled-trial-evidence.sh` for read-only controlled-trial evidence aggregation; it must not set `WECOM_ARCHIVE_WRITE=1`, `WECOM_CHECKIN_ARCHIVE_WRITE=1`, or `WECOM_APPROVAL_FIXTURE_WRITE=1`. WEXT1LD is the outing/overtime live-before dry-run gate and does not authorize live fixture creation. WFULLSMOKE1 adds `scripts/qa/run-three-day-full-goal-smoke.sh` as the three-day full-goal smoke controller; it may create only OA test business data marked `TEST-SMOKE-WFULL`, and must not write WeCom, create outing/overtime fixtures, enable real employees, make real payments, connect real payment providers, write ERP, or import bank statements. WTCLOSE2 adds the final test-account closeout and disables WFULLSMOKE1 public writes during that closeout. WPROC2 adds the executable `process gate`: before WAPC2F or other high-risk WeCom work, run `node scripts/qa/check-process-contract.mjs --baseline` and the issue-specific profile check to enforce DoR/DoD, fixed Secret source, non-self approval, live write switches, missing-config classification, and redaction boundaries. Do not start `wecom_attendance_approval_mirror_v1`, `oa_hr_emergency_mode_v1`, `wecom_recovery_writeback_v1`, or `wecom_ruleops_v1` without WROAD2-CLOSEOUT, WROAD2-BIZ1, WAPPR1, WRULE1, WAUTO1/WEXT1LD, WFULLSMOKE1 evidence, WTCLOSE2, WEXT1-FORMAL, WREAL1 question gates or explicit approval, and the next stage's own Issue CSV and acceptance gates. -- WARCH3/WCHECK1/WEXT1 update the route after WROAD2 Day 0: WARCH3 adds `scripts/qa/run-warch3-ops-daily.sh`, `deploy/trialrun/install-warch3-ops-timer.sh`, and `npm run send:wecom-ops-alert` for 07:30 systemd巡检和脱敏企微告警;public report `/app/artifacts/qa-flow/warch3-ops-20260520-054841/summary.json` is `PASS_WITH_FINDINGS`, and WOPS1 now fixes alert noise: default recipient is `HYD000006` (the employee_no for `wangshunli`), repeated known findings are skipped via `artifacts/qa-flow/warch3-ops-alert-state.json`, and only blocked/failure/new-finding/status-worsening/force sends a message. WOPS1 public rerun `/app/artifacts/qa-flow/warch3-ops-20260520-070731/summary.json` is `PASS_WITH_FINDINGS`, and alert report `/app/artifacts/qa-flow/wecom-ops-alert-20260520T070740Z/summary.json` is `PASS_ALERT_SKIPPED_NO_FINDINGS` with `no_new_findings_or_status_worsening`. WCHECK1 adds `npm run check:wecom-checkin-summary-archive`, daily/monthly check-in summaries, and rule snapshots with `--persist-to-db` + `WECOM_CHECKIN_ARCHIVE_WRITE=1` as the only OA DB write gate; public reports `/app/artifacts/qa-flow/wecom-checkin-summary-archive-20260520T054907Z/summary.json` and `/app/artifacts/qa-flow/wecom-checkin-summary-archive-20260520T054926Z/summary.json` are `PASS_CHECKIN_ARCHIVE_READY` and `PASS_CHECKIN_ARCHIVE_OFFLINE_READY`. WEXT1 only extends approval fixtures for `--target=outing --target=overtime` dry-run; public report `/app/artifacts/qa-flow/wecom-approval-fixtures-20260520T054940Z/summary.json` is `PASS_FIXTURE_DRY_RUN_READY`. WAUTO1/WEXT1LD now add a read-only evidence aggregation script and a live-before dry-run contract; WFULLSMOKE1 adds full-domain main-path smoke orchestration across WeCom HR/attendance, OA-primary reimbursement/procurement/contract-project/payment-batch flows, mobile/WeCom entry, and ops checks. These do not create outing/overtime WeCom templates/approvals, expand real users, or implement full mirror/emergency/writeback/RuleOps. WEXT1-FORMAL needs WREMOTE1/WFULLSMOKE2 remote closeout, a new Issue CSV, and explicit approval for manual formal-template submission; WREAL1 real users are asked only after leave, missed punch, outing, and overtime test-account evidence plus approver-rule gate, WRULE1, WFULLSMOKE1, WTCLOSE2 and WEXT1-FORMAL are passable/explainable. -- WROAD2-BIZ1/WAPPR1/WRULE1 adjust the post-WOPS1 route: during the 3-day window, add manual business smoke on test accounts without replacing WARCH3 automation. `SMOKE002` should try WeCom check-in and submit low-risk leave/missed-punch, `SMOKE101` must open details before approving, and `HYD000006` checks OA archived approval/check-in summaries. WAPPR1 treats "applicant must manually choose approver" as a blocking rule finding: test templates remain `SMOKE002 -> SMOKE101`, formal leave/missed-punch/outing/overtime templates must auto-resolve approvers from direct manager, department owner, or configured approval role, and applicant-chosen arbitrary approvers/self-approval must block WREAL1. Official WeCom APIs do not expose a read-only native-template approval-rule configuration surface: `gettemplatedetail` returns controls, `getapprovaldetail` returns actual submitted flow, and `applyevent use_template_approver=1` is a write-style check, so do not design WAPPR1 as pure API automation. WRULE1 adds `npm run check:wecom-approval-rule-validator` to compare OA theoretical approvers with archived WeCom actual approval chains; it is read-only, does not read WeCom backend rules, and does not replace WAPPR1 A/B/C/D manual gates. WAUTO1 can automate evidence collection, and WFULLSMOKE1 can aggregate full-domain smoke evidence, but WAPPR1 choices A/B/C/D and real-device business actions remain manual gates. Do not start WEXT1-FORMAL, WREAL1, deep mirror, emergency, writeback, or RuleOps until WROAD2-CLOSEOUT, WROAD2-BIZ1, WAPPR1, WRULE1, WAUTO1/WEXT1LD, WFULLSMOKE1, WTCLOSE2, WREMOTE1/WFULLSMOKE2, and the relevant question gates or explicit approval are complete. -- WROUTE2 locks the post-WFULLSMOKE1 route: first close out test-account evidence, then ask for WREMOTE1/WFULLSMOKE2 remote closeout and WEXT1-FORMAL formal-template outing+overtime manual test, then ask WREAL1 with exactly 1 real employee + 1 approver/admin observer, then prioritize `wecom_attendance_approval_mirror_v1` minimum complete mirror. WTCLOSE1 adds the small-team execution rule: because the company has fewer than 10 people, WAPPR1 targets option A for leave/missed-punch/outing/overtime; formal HR/attendance approvals use one direct manager or configured approval role with admin fallback/blocking when the approver chain is missing, unavailable, invisible, unbound, or self-approval. WRULE1 enforces this as an OA-side validator over archived WeCom approval details; `PASS_RULE_MATCH` or explainable `PASS_WITH_ADMIN_FALLBACK` can support test-account closeout, while `FAIL_APPLICANT_CAN_CHOOSE`, `FAIL_SELF_APPROVAL`, `FAIL_APPROVER_MISMATCH`, missing manual gates, or external config blockers stop WEXT1-FORMAL/WREAL1. WTCLOSE1 only authorizes WAUTO1/WFULLSMOKE1 aggregation and WEXT1LD dry-run; WTCLOSE2 only performs final test-account evidence closeout. Neither authorizes WeCom writes, real employees, outing/overtime fixture creation, emergency mode, writeback, or RuleOps. -- WAPPR1 2026-05-21 manual gate result: the user set the test employee's direct manager to the test supervisor and confirmed on a real device that leave, missed punch, outing, and overtime all auto-fill the test supervisor and the applicant cannot delete/change/add approvers. Treat all four templates as A / `PASS_APPROVER_RULES_READY`, but still require WRULE1 actual-chain validation, WROAD2-BIZ1 business evidence, WTCLOSE2 final test-account closeout, and explicit WEXT1-FORMAL/WREAL1 question gates before any WeCom write or real-employee trial. -- WTCLOSE2/WTCLOSE2F adds `scripts/qa/run-wecom-test-account-final-closeout.sh` as the final automatic test-account closeout before WEXT1-FORMAL. Enterprise WeChat API checks must run from the deployment server trusted IP, so use `bash scripts/qa/run-wecom-test-account-final-closeout.sh --remote`; local direct execution is blocked by default and may only be used for syntax/static gates. The remote run reruns `/ready`, WAUTO1, WFULLSMOKE1 with `WFULLSMOKE_ALLOW_PUBLIC_WRITES=0`, outing/overtime dry-run without live flags, and WRULE1 with `--manual-gate=all:A`; it must not set WeCom write switches, create templates/approvals, enable real employees, or treat WAPPR1=A as live approval. Do not treat previous local missing-env/DB WTCLOSE2 output as a WeCom business blocker. -- WREMOTE1/WFULLSMOKE2/WEXT1-FORMAL supersedes the earlier fixture-creation route for the next step: first deploy/sync and run WTCLOSE2 from the deployment server trusted IP, then run WFULLSMOKE2 from the deployment server with `WFULLSMOKE_ALLOW_PUBLIC_WRITES=1` when OA `TEST-SMOKE-WFULL` public test data is approved, then use existing formal WeCom outing/overtime templates by having `SMOKE002` manually submit and `SMOKE101` review details before approving. WEXT1F adds `WEXT1F_MANUAL_CONFIRMATION=SMOKE002_SUBMITTED_SMOKE101_REVIEWED bash scripts/qa/run-wecom-formal-outing-overtime-evidence.sh --remote` for the post-manual evidence run: it explicitly pulls `--target=outing --target=overtime` with `--filter-creator-employee-no=SMOKE002`, may persist only to OA archive via `WECOM_ARCHIVE_WRITE=1` + `--persist-to-db`, and then runs archive offline read + WRULE1. Missing manual confirmation must produce `PAUSED_MANUAL_CONFIRMATION` and no WeCom API calls. Public WEXT1F rerun `/app/artifacts/qa-flow/wecom-formal-outing-overtime-evidence-20260522-104521/summary.json` is `PASS_WITH_FINDINGS`: outing/overtime read/archive/rule validation work and privacy smoke pass, and both outing and overtime are archived as approved; remaining callback duplicate/history-window observations do not block the WREAL1 question gate, but do not auto-start real users without explicit approval. Do not auto-create outing/overtime OA-POC templates, auto-submit approvals, write WeCom, broadly pull formal-template records from other employees, or run WeCom API evidence locally in this route. WREAL1 uses `/tmp/hyb-oa-wreal1.env` for real employee/approver values and must not write real employee identifiers to repo docs, Issue CSV, or chat. -- OAOPS1 is the current post-WeCom lane for OA-primary maturation: WeCom check-in, missed punch, outing, leave, and overtime are frozen for now as WeCom-owned HR/attendance with OA archive/audit. The active route returns to OA-primary real use for a 7-day small-team stabilization window. Public OA may hold real business data for reimbursement/PDF OCR, approval, procurement/expense, contract registry, projects, payment batches, bank receipt attachments, AP/accounting handoff, mobile/WeCom entry, and audit. Use `scripts/qa/run-oa-real-use-daily.sh` for daily read-only checks; real business writes are manual in public OA. Do not upload confidential contract bodies, sensitive quotes, cost detail, bank statement originals, raw invoice images, or secrets to repo docs, chat, or reports. Keep image OCR, complex BPM, budgets, ERP, bank-statement import, real payment-provider integration, WeCom HR deep mirror, emergency takeover, recovery writeback, and RuleOps frozen unless a new Issue CSV explicitly approves them. -- WAPC2FLIVE supersedes the WAPC2F dry-run gap for OA-POC samples: after user approval, the runner was corrected to the official `template_name` + `property` controls create-template payload, deployed with `SYNC_ENV=0`, and the public live report `/app/artifacts/qa-flow/wecom-approval-fixtures-20260519T053400Z/summary.json` reached `PASS_FIXTURE_CREATED`; leave/missed-punch OA-POC templates and low-risk test approvals were created and retained for audit, with WAPC2 auto-rerun `PASS_APPROVAL_POC`. WCBK1 has added and deployed read-only `GET/POST /api/wecom/approval/callback`, `wecomCallbackCrypto`, `npm run check:wecom-approval-callback-poc`, and the `wecom-callback` process gate. After remote callback config was set, public report `/app/artifacts/qa-flow/wecom-approval-callback-poc-20260519T083422Z/summary.json` reached `PASS_CALLBACK_URL_VERIFIED`; after `SMOKE101` approved an existing OA-POC missed-punch test approval, `/app/artifacts/qa-flow/wecom-approval-callback-poc-20260519T092648Z/summary.json` reached `PASS_CALLBACK_EVENT_CONFIRMED` with one redacted event. WACP3/WACP3R has added and deployed `npm run check:wecom-approval-compensation-poc`, `POST /cgi-bin/oa/getapprovalinfo` read support, and automatic template discovery by `SMOKE002` creator; WREAD1 deploy reran WACP3R at `/app/artifacts/qa-flow/wecom-approval-compensation-poc-20260519T125515Z/summary.json` and then generated `/app/artifacts/qa-flow/wecom-approval-readability-gate-20260519T125532Z/summary.json` as `PAUSED_MANUAL_CONFIRMATION`. WREAD1F then fixed duplicate OA-POC template names by adding timestamp uniqueness and created fresh leave/missed-punch approvals at `/app/artifacts/qa-flow/wecom-approval-fixtures-20260519T131958Z/summary.json`; final WREAD1 manual report `/app/artifacts/qa-flow/wecom-approval-readability-gate-20260519T133628Z/summary.json` is `PASS_READABLE`. This clears leave/missed-punch readability only; mirror data model, minimum archive, emergency mode, writeback, RuleOps, and outing/overtime sample decisions remain later gates. -- ASSET1 is the current unified asset registry lane after OAOPS1: reuse the existing asset module for fixed assets plus electronic document/system/repository/backup asset metadata. Number families are `FA-YYYY-NNNNNN`, `EA-DOC-YYYY-NNNNNN`, `EA-SYS-YYYY-NNNNNN`, `EA-REPO-YYYY-NNNNNN`, and `EA-BKP-YYYY-NNNNNN`; `VER-NNNNN` is historical lookup only. `EA-ACC` is deferred: never store passwords, token, Secret, private keys, source bundles, full config, confidential document bodies, complete local paths, sensitive quotes, bank statement originals, or raw invoice images in OA, repo docs, chat, or reports. Git remains the source of truth for code; OA only stores repository metadata and responsibility. Historical company directory imports may only use redacted metadata from `00_保密索引`, default dry-run, with sensitive text/path guards. -- OSMOKE1 is the current OA-only smoke account governance lane after ASSET1D/OAOPS1 blockers: do not request more Enterprise WeChat accounts just to test OA-primary reimbursement/assets/finance/AP/contracts/permissions. Enterprise WeChat smoke accounts remain for HR/attendance evidence; admin/finance/hr/ceo OA regression accounts are OA-only smoke accounts and may be active in OA without WeCom binding. Use `npm run repair:oa-only-smoke` from `server/` for dry-run first; apply requires `--apply` plus `OA_ONLY_SMOKE_REPAIR_APPLY=1`, must not reset passwords, print secrets, affect real employees, or write WeCom. `audit-wecom-oa-user-consistency` classifies env-listed, explicit allowlisted, or `SMOKE*`/`smoke-*`/test-named OA-only smoke accounts as `oaOnlySmokeExempted` so they are not archived as missing in WeCom; `run-oa-real-use-daily.sh` includes OA-only smoke readiness before asset/finance UI automation. -- OALAUNCH1 is the current final-enable gate after OAOPS1/ASSET1D/OSMOKE1: do not treat ASSET1D completion or `PASS_OA_REAL_USE_DAILY_READY` as final launch approval. Use `scripts/qa/run-oa-final-launch-readiness.sh` to aggregate evidence only; it must not create business data, execute payments, write WeCom, reset/restore the production DB, print secrets, or mark final launch ready without real business closeout, 7-day stabilization, permission matrix acceptance, backup/restore drill evidence, data-governance/training acceptance, and Day 7 Go/No-Go. Valid conclusions are `PASS_OA_LAUNCH_READY`, `PASS_WITH_FINDINGS`, `PAUSED_MANUAL_CONFIRMATION`, and `SKIP/BLOCKED_BY_EXTERNAL_CONFIG`. Permission or backup/restore fixes require read-only reviewer review before launch acceptance. -- OPOLICY1 is the current policy-system alignment lane after OMAT1/OALAUNCH1 review: external company policies under `/home/shunli/Projects/faculty-daily-assistant/公司/制度体系建设_20260524` are adjusted to a small-team V1口径 first, then hyb-oa facts are aligned. Treat policy parameters, data-retention boundaries, seal-use ledger, approval-exception SOP, policy signoff, and P2 freeze rules as OALAUNCH1 data-governance gates. Do not assume budget hard control, complex procurement/tendering, e-signature, full e-archive, ERP/bank deep integration, or AI rule writes are pre-launch requirements. For V1, contract registry summary/archive/offline archive fields and existing attachment audit can carry seal-use traceability; announcements/manual evidence can carry policy notices/signoff until a later Issue proves dedicated schema is required. Never copy sensitive policy text, thresholds, confidential contract bodies, credentials, or full local paths into repo docs. -- OAFLOW1 is the current OA reimbursement approval hardening lane: `wangshunli/HYD000006` as `ceo + admin` must not be assigned a fake direct manager, must not self-approve, and `admin` must not be treated as business approval authority. Reimbursement `approval_rules` now support `ownerSelfFallbackRole`; OAFLOW1 V1 only allows `finance_mgr` or null, and existing enabled rules default to `finance_mgr`. For CEO owner self-applications with no direct manager, build and persist a new workflow snapshot by replacing the first `manager` node with `finance_mgr`, removing the owner's own `ceo` node and duplicate fallback role. Precheck, submit, and approval advancement must use the same snapshot; public deployment and low-risk owner reimbursement verification require separate approval and must not execute real payment. -- OAFRONT6 is the current frontend maturity small-step lane after OAFRONT5: use `issues/2026-05-25_12-29-03-oa-frontend-maturity-small-step-v1.csv` for scoped design follow-ups only. Route-title cleanup, asset registry sectioning, mobile visual-matrix stability, contract registry form grouping, and long-number display compaction are implemented, deployed, and publicly rerun; report `artifacts/qa-flow/oafront3-pc-readonly-visual-20260525-202712/summary.json` is `PASS_PC_READONLY_VISUAL_READY` with `findingCount=0`. Portal observation remains later feedback-driven work. Do not treat OAFRONT6 as approval for a broad redesign, business logic changes, public writes, deployment, or final launch readiness; further implementation still needs `docs/产品设计规则.md`, focused Playwright/visual evidence, and OALAUNCH1 gates. -- OAKISS1 is the current all-business-flow KISS review lane after OAFRONT6/OALAUNCH1: use `issues/2026-05-25_20-53-34-oa-business-flow-kiss-review-v1.csv` to record review evidence and suggestions across reimbursement/OCR, approval, procurement/expense, contracts/projects, payment/AP, invoice pool, assets, permissions, mobile/WeCom entry, and operations. It follows MAGI wording as an audit structure only: review first, run read-only evidence and record gaps second, then produce KISS keep/simplify/defer/manual-SOP recommendations. It must not create business data, execute payments, delete data, write WeCom, change production config, or replace OALAUNCH1 gates. Current evidence includes OAOPS1 daily `artifacts/qa-flow/oa-real-use-daily-20260525-205848/summary.json`, OALAUNCH1 `artifacts/qa-flow/oa-final-launch-readiness-20260525-211233/summary.json`, permission matrix `artifacts/qa-flow/oa-permission-matrix-20260525T130601Z/summary.json`, PC visual `artifacts/qa-flow/oafront3-pc-readonly-visual-20260525-210819/summary.json`, remote owner route `owner-application-approval-route-20260525-oakiss1`, and ASSET1D evidence. Treat the top remaining launch gates as real business closeout, 7-day stabilization, backup/restore drill, and data-governance/training acceptance. -- PCDESIGN1 is the current PC all-page design review lane after OAKISS1: use `issues/2026-05-25_21-27-56-oa-pc-page-design-review-v1.csv` for PM/design-director review evidence and suggestions only. Current evidence includes key PC visual matrix `artifacts/qa-flow/pcdesign1-pc-readonly-visual-20260525-2128/summary.json` as `PASS_PC_READONLY_VISUAL_READY` for 7 roles/32 routes and all-static route scan `artifacts/qa-flow/pcdesign1-all-pc-static-20260525-2133/summary.json` as `PASS_PC_STATIC_ROUTE_SCAN_READY` for 45 static PC routes. Do not treat PCDESIGN1 as approval for broad redesign or code changes; the top suggested focus areas are HR/attendance OA-entry boundary cleanup, frozen-module entry labeling, high-density B/C page default-view simplification, and dynamic detail page sample evidence. -- TRELLIS2 is the current development-process migration lane after TRELLIS1: use `.trellis/tasks/05-26-trellis2-official-task-contract/` as the execution contract. Trellis task/spec/workflow is now the default development entry; Issue CSV remains historical audit or optional export material, docs remain business facts, `session_auto_commit=false`, `.trellis/workspace/` is local-only by default, and `node scripts/qa/check-trellis-governance.mjs` must pass before commit. This does not change business code, deploy public OA, write public data, or authorize production/WeCom writes. -- OMAT1 is the current maturity-gap review goal after OALAUNCH1: use `issues/2026-05-23_17-20-00-oa-maturity-gap-review-v1.csv` as historical review ledger for every problem or suggestion. It includes domestic benchmark sources, a domain capability comparison matrix, manual decision Q&A checklist, review decision packet, status audit, and MAGI round reviews in the manual trial-run report, the small-team rule that maturity means controlled operation before feature breadth, explicit adopt/defer/reject decision回填, and a need for a concise evidence view. Follow the MAGI cycle wording as audit structure only: review/evaluate first, record or solve bounded evidence gaps second, then prioritize direction. Do not implement OMAT1 suggestions until the user chooses adopt/defer/reject and a Trellis task exists for the adopted work. -- WEGOV1 changes the current WeCom route to "Enterprise WeChat owns mature HR/attendance flows; OA stores self-owned history, audit, entry, messages, and emergency fallback." Treat four domains explicitly: WeCom-owned domain is check-in, leave, missed punch, outing, overtime, leave balance, and HR assistant; OA-owned domain remains reimbursement, procurement, contracts, projects, payments, invoices, bank receipts, sensitive attachments, and operating audit; OA archive domain stores WeCom business history, full external keys, and necessary snapshots; OA emergency domain is manually enabled only when WeCom is unavailable. Do not assume a full isolated WeCom sandbox; use the controlled test domain `SMOKE002 -> SMOKE101`, `OA-POC` templates, low-risk approvals, synthetic tests, public live runners, and limited real-device confirmation. WARCH1 now supplies the minimum leave/missed-punch archive implementation, WARCH2 supplies the formal read-only history query surface, and WROAD2 supplies controlled ops daily checks. Do not start deep mirror until WROAD2-CLOSEOUT, WROAD2-BIZ1, WAPPR1, WRULE1, WAUTO1/WEXT1LD, WFULLSMOKE1, WTCLOSE2, WEXT1-FORMAL, WREAL1 question gates or explicit approval, and the mirror stage's own contract are complete. -- For reimbursement, invoice, OCR, duplicate invoice, or attachment work, read `docs/报销发票附件规则.md` and `references/reimbursement.md`. -- For local/WeCom/public trial-run, OCR runtime, Caddy, or DB drift work, read `docs/试运行与自动化验证手册.md` and `references/trialrun.md`. -- For how this skill should evolve, read `docs/Agent开发交付实践.md`. - -## Natural-Language Triage - -Users may assign work with a plain paragraph. Before asking follow-up questions, classify the request into defect, feature, acceptance feedback, plan, review, QA, deployment, design, or product-flow optimization. - -Default behavior: - -1. Extract intent, target surface, constraints, approval state, and next action. -2. Check existing assets before declaring a blocker: `issues/`, `docs/`, `artifacts/`, `output/`, scripts, Playwright tests, runbooks, and prior trial-run evidence. -3. Ask only when required by `AGENTS.md` or safety: missing approval for non-trivial coding, destructive data work, production config, secrets/accounts, conflicting goals, or unclear high-risk acceptance. -4. Treat a plain "确认" as approval for the immediately preceding explicit plan or Trellis task, unless multiple candidates exist. -5. If the user asks whether a problem is real, verify first with automation, code inspection, public checks, or visual evidence before proposing broad changes. - -## Delivery Loop - -1. Check `git status --short`; do not revert unrelated user changes. -2. Identify or create the current Trellis task before non-trivial work. Same-type trial-run feedback, real-device feedback, single-surface defects, and small follow-up fixes should update the active task or create a child task instead of reintroducing one-off CSVs. Create a new Issue CSV only when the user explicitly needs a legacy/export audit packet. -3. State the implementation approach before editing code; if already approved, proceed. -4. Keep changes scoped to the current Issue. -5. Prefer existing project patterns, official SDKs, and the main UI/layout hierarchy in `docs/产品设计规则.md`; for page work, classify the page into DG9 A/B/C layering and reuse the matching workbench/mobile sample before adding local layout code. Do not mix multiple competitor visual systems or copy competitor flows/text directly. -6. Verify with the narrowest relevant automated tests, then expand by risk. -7. Use Playwright screenshots or visual metrics for PC/mobile/WeCom UI changes. New or changed mobile pages must join the unified responsive system and the 320/360/375/390/393/414/430px 统一视觉矩阵 rather than adding page-specific layout fixes. -8. Dedicated `/mobile` pages must use the shared mobile slot/card/list/sticky-action system from `docs/产品设计规则.md`: fixed icon/avatar/status slots, `minmax(0, 1fr)` copy slots, `mobile-card`/mobile list cards, `mobile-field-row`, mobile tokens, and no desktop `card-std p-4/p-5/p-6` as a mobile main container. -9. Mobile homepage, approval, notification, and business cards must follow the display dedupe rules in `docs/产品设计规则.md`: one pending/progress summary per page, notifications as event stream with direct target links, bottom badges as counts only, and one visible business identifier/status per card or row. -10. Update Trellis task notes/status only after the stated task test plan passes. -11. Commit in Chinese batches with the Trellis task name or task ID. -12. 面向用户可测试的改动,最终必须明确“是否已部署”。只有部署与公网检查通过后,才能告知用户可以去企业微信或公网试运行环境测试。 - -## Default Verification Matrix - -Backend: - -```bash -cd server && npm run prisma:validate -cd server && node --check src/routes/reimbursements.js -cd server && node --check src/routes/workflow.js -``` - -Frontend: - -```bash -cd client && npm run typecheck -cd client && npm run build -``` - -Cross-device UI: - -```bash -cd client && npx playwright test --workers=1 --reporter=list -``` - -Docs/Skill: - -```bash -python3 /home/shunli/.codex/skills/plan/scripts/validate_issues_csv.py -python3 /home/shunli/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/hyb-oa-delivery -git diff --check -``` - -## Stop Conditions - -Pause for user confirmation before: - -- Resetting, rebuilding, or destructively modifying a database. -- Resolving Prisma migration drift by editing migration history. -- Changing production Caddy/systemd/remote deployment state. -- Using or exposing real secrets. -- Reverting unrelated dirty files. - -## Output Contract - -Final responses should include: - -- What changed. -- What was verified, with commands. -- 面向用户可测改动的部署状态:commit hash、公网 URL、`/ready`、公网前端资源/文案检查,以及用户现在是否可以测试。 -- What remains blocked and why. -- Commit hashes when commits were made. - -## R6 and Trial-Run Defaults - -- R6 historical expansion required a dedicated contract; after TRELLIS2, equivalent expansion work must start from a Trellis task that fixes users, roles, time window, rollback contact, issue log, and daily closeout rhythm. -- R6 scope defaults to reimbursement, leave, procurement, approval, Enterprise WeChat entry/notification, finance payment/export. -- Do not expand to budget, ERP, AI, full travel, or complex BPM during R6; record those as follow-up Issues. -- Enterprise WeChat personal app message is the formal approval notification channel after R5; mock and group bots are not acceptance evidence for R6 business notification. -- After WAPI, ERP is not a future OA integration target. HR/attendance employee daily approvals (leave, missed punch, outing, overtime) should reuse mature Enterprise WeChat capabilities first, while OA provides self-owned archive, domain-based mirror, manual takeover, recovery writeback, finance closeout, and audit. Reimbursement, payment batches, AP, accounting handoff, procurement, expenses, contracts, projects, sensitive attachments, invoices, bank receipts, and accounting handoff materials remain OA-primary unless a later Issue changes that domain explicitly. OA-primary approvals may send Enterprise WeChat personal-app notifications, but messages must contain only dehydrated title/type/no/status/deeplink; do not upload procurement forms, contract bodies, quotes, supplier files, invoices, bank receipts, or accounting materials to WeCom native approvals or WeCom attachments. Current WAPI rule: contacts read with `WECOM_CONTACT_SECRET`; HR assistant/roster/check-in/approval default to `WECOM_AGENT_SECRET`, with `WECOM_CHECKIN_SECRET` only as explicit check-in override; no runtime Secret guessing. Current stage order is `WOPS1 巡检告警降噪 -> WROAD2-CLOSEOUT 三天验收 -> WROAD2-BIZ1 三天业务冒烟 -> WAPPR1 审批规则规范化 -> WRULE1 审批链校验器 POC -> WAUTO1 自动证据汇总 -> WEXT1LD 外出/加班 dry-run -> WFULLSMOKE1 三天全域最终目标测试 -> WROUTE2 测试号收口到最小镜像路线锁定 -> WTCLOSE2 测试号最终收口与证据复核 -> WTCLOSE2F 远端可信 IP 执行口径修正 -> WREMOTE1/WFULLSMOKE2 远端收口 -> WEXT1-FORMAL 正式模板外出/加班测试 -> 四类测试号证据和审批规则门禁通过后问答 WREAL1 小范围真实试用(首批 1 名真实员工 + 1 名审批人/管理员观察) -> wecom_attendance_approval_mirror_v1 最小完整镜像 -> oa_hr_emergency_mode_v1 -> wecom_recovery_writeback_v1 -> wecom_ruleops_v1`. UI and API work must distinguish `OA 主办`, `企微主办`, `OA 自建留存`, and `OA 应急接管`. Do not treat WEXT1 dry-run, WEXT1LD, WFULLSMOKE1, WROUTE2, WTCLOSE2, or WTCLOSE2F as permission to live-create outing/overtime templates or approvals; live needs explicit user approval. -- Current post-WROAD2 route wording is: `WOPS1 巡检告警降噪 -> WROAD2-CLOSEOUT 三天验收 -> WROAD2-BIZ1 三天业务冒烟 -> WAPPR1 审批规则规范化 -> WRULE1 审批链校验器 POC -> WAUTO1 自动证据汇总 -> WEXT1LD 外出/加班 dry-run -> WFULLSMOKE1 三天全域最终目标测试 -> WROUTE2 测试号收口到最小镜像路线锁定 -> WTCLOSE2 测试号最终收口与证据复核 -> WTCLOSE2F 远端可信 IP 执行口径修正 -> WREMOTE1/WFULLSMOKE2 远端收口 -> WEXT1-FORMAL 正式模板外出/加班测试 -> 四类测试号证据和审批规则门禁通过后问答 WREAL1 小范围真实试用(首批 1 名真实员工 + 1 名审批人/管理员观察) -> wecom_attendance_approval_mirror_v1 最小完整镜像`. WREAL1-PREP only prepared the checklist and does not enable real employees. Do not treat WEXT1 dry-run, WEXT1LD, WFULLSMOKE1, WROUTE2, WTCLOSE2, or WTCLOSE2F as permission to live-create outing/overtime templates or approvals; live needs explicit user approval. -- WMSG1 has verified real Enterprise WeChat personal-app delivery and Deeplink return: report `/app/artifacts/qa-flow/wecom-runtime-ready-20260518T234431Z/summary.json` has `checks.message.status=OK`, `errcode=0`, and `recipientCount=1`; the user confirmed receiving "OA 运行就绪检查" and opening the OA notifications page from the message. This only clears message/deeplink runtime evidence; template/detail, callback evidence, compensation pull, readability, self-owned archive model design, and minimum archive implementation are covered by WAPC2FLIVE/WCBK1/WACP3R/WREAD1/WADM1/WARCH1 in the OA-POC leave/missed-punch scope, while deep mirror work remains a separate later gate. -- WAPC1 has fixed the WeCom approval configuration preparation gate: first templates are leave, missed punch, outing, and overtime; each needs template ID, scope, fields, approver rules, visible scope, and self-built app permission; low-risk test `sp_no` must not contain procurement, contract, reimbursement, invoice, bank receipt, sensitive attachment, or real sensitive business material; callback URL/Token/EncodingAESKey are deployment-only values and must not be written to repo docs or Issue CSV. Do not implement real approval callback handling, deep mirror, emergency mode, recovery writeback, or RuleOps until a later approved Issue covers the POC or implementation. -- WAPC2 has added the WeCom approval template/detail read-only POC runner for leave and missed punch. Use `npm run check:wecom-approval-poc`; pass template IDs with `--template=leave:` / `--template=missed_punch:` and low-risk test approval numbers with `--sp-no=leave:` / `--sp-no=missed_punch:`. The runner must use only `WECOM_AGENT_SECRET`, redact full template IDs and `sp_no`, and never output form values, attachments, comments, full userid, token, Secret, or raw payload. -- WPROC1 fixes the WeCom approval engineering process. Future WeCom work must satisfy route gate, capability gate, and implementation gate; use automatic runners before asking the user to do manual work. WPROC2 makes this executable through `node scripts/qa/check-process-contract.mjs --baseline` plus issue-specific profiles such as `--profile wecom-approval-fixture`; run it before WAPC2F and later high-risk WeCom contracts. Manual work is limited to write approval, secrets/callback config, WeCom backend settings that cannot be API-driven, real-device confirmation, and risk decisions. High-risk stages require POC before implementation: callback signature/decryption/idempotency, compensation pull, mirror data model, then mirror implementation. -- WAPC2F has added the WeCom approval fixture dry-run runner. Use `npm run check:wecom-approval-fixtures`; it defaults to applicant `SMOKE002`, approver `SMOKE101`, fixed `WECOM_AGENT_SECRET`, minimal generic OA-POC leave/missed-punch template payloads, and no write token or WeCom writes. Real fixture creation requires `--live --create-templates --submit-test-approvals` plus one-process `WECOM_APPROVAL_FIXTURE_WRITE=1` and explicit user approval. The public dry-run report is `/app/artifacts/qa-flow/wecom-approval-fixtures-20260519T045001Z/summary.json` with `PASS_FIXTURE_DRY_RUN_READY`. -- WAPC2FLIVE has executed that approved live path once after fixing the template payload shape; current public evidence is `/app/artifacts/qa-flow/wecom-approval-fixtures-20260519T053400Z/summary.json`, `PASS_FIXTURE_CREATED`, `checks.autoRerun.status=OK`, and `PASS_APPROVAL_POC`. Do not create more approval fixtures without a Trellis task and explicit approval. -- WCBK1 has implemented and verified the WeCom approval callback read-only POC path. Use `npm run check:wecom-approval-callback-poc`; default synthetic mode verifies local encrypted callback samples, while `--live` checks the configured public callback URL and redacted event evidence. The route uses only `WECOM_APPROVAL_CALLBACK_URL`, `WECOM_CALLBACK_TOKEN`, `WECOM_CALLBACK_ENCODING_AES_KEY`, and `WECOM_CORP_ID`; do not use contact Secret or legacy callback env names. Current public status is `PASS_CALLBACK_EVENT_CONFIRMED`: URL verification passed, and one existing OA-POC missed-punch approval handled by `SMOKE101` produced a redacted approval-status event. Do not store raw XML, ciphertext, full `sp_no`, full userid, Token, EncodingAESKey, form values, attachments, comments, or raw payload. -- Approval-chain correctness can be proven by PC or automation, while Enterprise WeChat validates entry, binding,免登录, notification, deeplink, and mobile layout. -- If real-device mobile validation is paused after automation passes, record the gate as `PAUSED`; do not close RS6/UI6/R6 mobile blockers until representative real-device confirmation is recorded. -- Role-specific pages should use one shared OA/mobile framework and tailor summaries, entries, actions, and sensitive fields by role. Do not create unrelated UI systems for employee, approver, finance, admin, or CEO views. -- After MUD6, `R6-ISSUE-001` is treated as resolved based on representative real-device confirmation; future mobile regressions should be recorded as new Issues rather than reopening the old WCM6/MME6 gate unless the same production behavior returns. -- After AP6, approval reminder, overdue reminder, and workflow productivity summary are current product facts, not open planning items. Reuse `POST /api/workflow/tasks/:taskId/remind`, `GET /api/workflow/tasks/summary`, `job:workflow-overdue-reminders`, existing workflow history, audit logs, notifications, and WeCom personal app delivery semantics. Do not add a parallel reminder channel, change approval status from reminders, or expand into complex BPM/SLA escalation without a new Issue. -- After DG7/MRF7, mobile approval is an "approval and progress" entry: employees may use it for submitted-item progress, while approvers use it for assigned tasks. Do not reintroduce disabled approval tabs for ordinary employees, duplicated home pending lists, or notification cards that only bounce users back to the notification center when a business target exists. -- After RI6, LP6, ME6 automation, QG6, MIF7/MIF7T, MIF7TD, R7/OPS7/DOC7 draft materials, R7EP automatic gates, and OPS8 remote read-only checks, treat `ME6-3` as closed by representative iPhone 12, iPhone 14, and Redmi K60 Enterprise WeChat feedback. R7EP may conclude that the project can enter R7E human confirmation, but `R7E-*` true execution rows must stay `TODO` until the user confirms participants, roles, window, rollback contact, issue owner, daily closeout, and pause/rollback decision maker. Do not start real R7 from documentation or automation gates alone; future mobile or real-device regressions must be recorded as new Issues such as UX8/R7E follow-ups. -- After DCL7, document governance must start from `docs/文档索引.md` and `docs/文档事实源状态矩阵.md`. Use Chinese-first current docs. Confirmed obsolete docs may be physically removed from the current tree and restored from git history when needed; do not create `docs/archive/` just to move clutter. Do not rewrite old Issue CSV snapshots when cleaning current docs. diff --git a/.agents/skills/hyb-oa-delivery/agents/openai.yaml b/.agents/skills/hyb-oa-delivery/agents/openai.yaml deleted file mode 100644 index 109e6740..00000000 --- a/.agents/skills/hyb-oa-delivery/agents/openai.yaml +++ /dev/null @@ -1,4 +0,0 @@ -interface: - display_name: "hyb-oa交付" - short_description: "按hyb-oa自然语言派工、Issue合同和试运行规则推进交付" - default_prompt: "继续推进hyb-oa需求,先自动拆解自然语言输入,读取Issue CSV和项目事实源,尽量用自动化与视觉验证。" diff --git a/.agents/skills/hyb-oa-delivery/references/reimbursement.md b/.agents/skills/hyb-oa-delivery/references/reimbursement.md deleted file mode 100644 index 1aae7f82..00000000 --- a/.agents/skills/hyb-oa-delivery/references/reimbursement.md +++ /dev/null @@ -1,35 +0,0 @@ -# Reimbursement Reference - -Primary fact source: `docs/报销发票附件规则.md`. - -## Checks Before Editing - -- PC and mobile must have the same business capability. -- Ordinary users should see "添加发票", not "绑定整单", "不绑定明细", "发票池", or "ERP 同步". -- Invoice constraints belong on the server; frontend restrictions are only convenience. -- Attachments are supporting materials and must not enter invoice OCR or invoice dedup. - -## Backend Hotspots - -- `server/src/routes/invoicePool.js` -- `server/src/routes/invoicePool/read.js` -- `server/src/jobs/ocrJob.js` -- `server/src/services/invoiceGovernance.js` -- `server/src/routes/reimbursements.js` -- `server/prisma/schema.prisma` - -## Frontend Hotspots - -- `client/src/pages/ReimbursementDetailPage.tsx` -- `client/src/pages/MobileReimbursementDetailPage.tsx` -- `client/src/pages/InvoicePoolPage.tsx` -- `client/src/api/invoicePool.ts` -- `client/src/api/reimbursements.ts` - -## Minimum Tests - -- Invoice upload/dedup tests. -- OCR job duplicate handling tests. -- Reimbursement invoice bind/unbind tests. -- Attachment upload/download/delete tests. -- PC and mobile Playwright flow. diff --git a/.agents/skills/hyb-oa-delivery/references/trialrun.md b/.agents/skills/hyb-oa-delivery/references/trialrun.md deleted file mode 100644 index 8faaa988..00000000 --- a/.agents/skills/hyb-oa-delivery/references/trialrun.md +++ /dev/null @@ -1,43 +0,0 @@ -# Trial-Run Reference - -Primary fact source: `docs/试运行与自动化验证手册.md`. - -## Automatic First - -Use automation before asking the user to manually reproduce: - -- Backend unit/regression commands. -- Frontend typecheck/build. -- Playwright PC/mobile/WeCom UA. -- Visual screenshots under `output/playwright//`. - -## Manual Stop Points - -Ask the user to act or confirm for: - -- Enterprise WeChat admin console changes. -- Phone Enterprise WeChat real login/authorization confirmation. -- Production Caddy/domain/systemd/database changes. -- Prisma migration drift resolution. - -## Common WeCom Checks - -- App homepage URL and callback URL. -- Trusted domain verification file. -- Visible range includes the user. -- OAuth returns `UserId`. -- Local OA account is bound to WeCom userId. -- Cookies survive Caddy reverse proxy. - -## OCR Checks - -When upload stays in "上传中" or "识别中", inspect: - -1. Upload response. -2. Invoice DB status. -3. OCR provider mode. -4. OCR worker/job status. -5. Tencent credentials and network. -6. Dedup result. -7. Status polling endpoint. -8. Frontend cache invalidation. diff --git a/.agents/skills/hyb-oa-delivery/references/visual-qa.md b/.agents/skills/hyb-oa-delivery/references/visual-qa.md deleted file mode 100644 index 782cdd94..00000000 --- a/.agents/skills/hyb-oa-delivery/references/visual-qa.md +++ /dev/null @@ -1,38 +0,0 @@ -# Visual QA Reference - -Primary fact source: `docs/产品设计规则.md`. - -## Brand Baseline - -Use `www.hyinda.com` as the visual reference: - -- Brand blue around `rgb(0,57,138)`. -- White, light gray-blue, slate text. -- Clean cards, restrained radius, no black-heavy mobile navigation. -- OA pages should feel like a workbench, not a marketing page. - -## PC Checks - -- Header has title, core filters, primary action only. -- Tables do not expose UUID as the main business number. -- Actions are consistent: view/edit/delete/withdraw use coherent variants. -- Destructive actions need confirmation. - -## Mobile/WeCom Checks - -- No desktop sidebar/topbar. -- No visible desktop table as primary layout. -- Bottom nav is compact and selected state is solid, not thin outline. -- Dialogs do not auto-focus search inputs unless it is clearly a search task. -- Text does not overflow buttons/cards. -- Common flows fit the viewport without incoherent blank/packed regions. - -## Playwright Metrics - -Collect or assert when relevant: - -- `scrollWidth <= viewportWidth + 2`. -- visible table count is 0 on mobile workflow pages. -- bottom nav height is reasonable. -- active nav background is visible and not black/empty outline. -- body text excludes banned internal terms. diff --git a/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/check.jsonl b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/check.jsonl new file mode 100644 index 00000000..420bf5fd --- /dev/null +++ b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/check.jsonl @@ -0,0 +1,4 @@ +{"file": ".trellis/spec/hyb-oa/index.md", "reason": "hyb-oa spec entry point for verification"} +{"file": ".trellis/spec/hyb-oa/project-governance.md", "reason": "verify Trellis task contract and approval rules"} +{"file": ".trellis/spec/hyb-oa/docs-and-evidence.md", "reason": "verify docs registry and evidence consistency"} +{"file": ".trellis/spec/hyb-oa/security-privacy.md", "reason": "verify no sensitive data is introduced"} diff --git a/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/implement.jsonl b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/implement.jsonl new file mode 100644 index 00000000..21b72bce --- /dev/null +++ b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/implement.jsonl @@ -0,0 +1,4 @@ +{"file": ".trellis/spec/hyb-oa/index.md", "reason": "hyb-oa spec entry point for Trellis-only governance"} +{"file": ".trellis/spec/hyb-oa/project-governance.md", "reason": "Trellis task contract and approval rules"} +{"file": ".trellis/spec/hyb-oa/docs-and-evidence.md", "reason": "docs registry and evidence-source rules"} +{"file": ".trellis/spec/hyb-oa/security-privacy.md", "reason": "privacy and sensitive-data boundaries during docs migration"} diff --git a/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/implement.md b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/implement.md new file mode 100644 index 00000000..9abf8115 --- /dev/null +++ b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/implement.md @@ -0,0 +1,24 @@ +# Implementation Notes + +## Approach + +- Remove the project-local delivery skill as an executable governance source. +- Move current operational guidance to Trellis workflow/spec/task files and existing docs fact sources. +- Keep historical Issue CSVs untouched. +- Update governance checks so deleted skill references in current governance files fail the Trellis gate. + +## Files + +- `AGENTS.md` +- `docs/Agent开发交付实践.md` +- `docs/文档索引.md` +- `docs/文档事实源状态矩阵.md` +- `scripts/qa/audit-docs.mjs` +- `scripts/qa/check-process-contract.mjs` +- `scripts/qa/check-trellis-governance.mjs` +- `.trellis/tasks/05-26-trellis2-official-task-contract/` +- `.agents/skills/` + +## Rollback + +This is a docs/governance-only cleanup. Roll back by reverting this task's file changes and restoring the deleted project skill files from git history if the Trellis-only gate proves too strict. diff --git a/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/prd.md b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/prd.md new file mode 100644 index 00000000..538ef15a --- /dev/null +++ b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/prd.md @@ -0,0 +1,82 @@ +# Remove hyb-oa Delivery Skill And Enforce Trellis-Only Governance + +## Goal + +Make Trellis the single development and governance entry point for hyb-oa by +removing the project-local `hyb-oa-delivery` skill and moving any current +governance responsibility to `.trellis/workflow.md`, `.trellis/spec/hyb-oa/`, +current Trellis task PRDs, and `docs/` fact sources. + +## Scope + +- Remove `.agents/skills/hyb-oa-delivery/` from the repo. +- Update `AGENTS.md` so it no longer requires or recommends the project skill. +- Update docs and registries that currently list `hyb-oa-delivery` as a current + fact source. +- Update governance QA scripts so they validate Trellis workflow/spec/docs/task + contracts without requiring the deleted skill path. +- Preserve Trellis built-in skills such as `trellis-start`, `trellis-before-dev`, + `trellis-check`, `trellis-update-spec`, and `trellis-meta`. +- Preserve `docs/` as the business fact source and historical Issue CSVs as + audit evidence only. + +## Out Of Scope + +- No backend or frontend business-code changes. +- No deployment or public OA verification. +- No database, Enterprise WeChat, payment, production config, or real-data write. +- No deletion or bulk rewrite of historical `issues/*.csv` files. +- No removal of generic Trellis skills generated by Trellis init. + +## Requirements + +- `hyb-oa-delivery` must no longer be an auto-triggerable project skill. +- Stable project rules that still matter must be reachable through + `.trellis/spec/hyb-oa/` and `docs/文档索引.md`, not through the deleted skill. +- Governance checks must fail if future docs or scripts still require the + deleted skill as a current path. +- Historical mentions may remain only when clearly historical evidence, not as + a current execution source. +- The current task must remain the execution contract for this migration. + +## Acceptance + +- `.agents/skills/hyb-oa-delivery/` is deleted. +- `AGENTS.md` describes Trellis-only entry and no longer points to + `.agents/skills/hyb-oa-delivery`. +- `docs/文档索引.md` and `docs/文档事实源状态矩阵.md` no longer register the deleted + skill as a current fact source. +- `scripts/qa/check-trellis-governance.mjs` and + `scripts/qa/check-process-contract.mjs` no longer require the deleted skill. +- `rg -n "hyb-oa-delivery|\\.agents/skills/hyb-oa-delivery|项目 Skill 优先"` + returns no current operational references, except this task or historical + notes if explicitly marked as historical. +- Trellis governance and docs registry checks pass. + +## Test Plan + +- `python3 ./.trellis/scripts/task.py validate 05-26-hyb-oa-delivery-trellis-only` +- `node --check scripts/qa/check-trellis-governance.mjs` +- `node --check scripts/qa/check-process-contract.mjs` +- `node --check scripts/qa/audit-docs.mjs` +- `node scripts/qa/check-trellis-governance.mjs` +- `node scripts/qa/check-process-contract.mjs --baseline --json` +- `node scripts/qa/audit-docs.mjs --check-registry` +- `rg -n "hyb-oa-delivery|\\.agents/skills/hyb-oa-delivery|项目 Skill 优先" AGENTS.md .trellis docs scripts .agents .codex .github` +- `git diff --check` + +## Privacy + +Do not write passwords, token, Secret, real invoice originals, contract bodies, +bank materials, full accounts, complete local paths, or raw payloads in Trellis +tasks, docs, reports, or chat. + +## Implementation Plan + +1. Remove project-skill references from AGENTS and docs current-source lists. +2. Update governance scripts to require Trellis spec/docs instead of the deleted + project skill. +3. Delete `.agents/skills/hyb-oa-delivery/`. +4. Run the test plan above. +5. If checks expose stale references, update only current governance/docs paths + needed for Trellis-only consistency. diff --git a/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/task.json b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/task.json new file mode 100644 index 00000000..4abd80f2 --- /dev/null +++ b/.trellis/tasks/05-26-hyb-oa-delivery-trellis-only/task.json @@ -0,0 +1,39 @@ +{ + "id": "hyb-oa-delivery-trellis-only", + "name": "hyb-oa-delivery-trellis-only", + "title": "Remove hyb-oa delivery skill and enforce Trellis-only governance", + "description": "Remove the project-local hyb-oa-delivery skill and make Trellis workflow/spec/tasks/docs the single governance entry point.", + "status": "in_progress", + "dev_type": "docs", + "scope": "trellis-governance", + "package": "docs", + "priority": "P2", + "creator": "shunli", + "assignee": "shunli", + "createdAt": "2026-05-26", + "completedAt": null, + "branch": null, + "base_branch": "main", + "worktree_path": null, + "commit": null, + "pr_url": null, + "subtasks": [], + "children": [], + "parent": null, + "relatedFiles": [ + "AGENTS.md", + ".trellis/spec/hyb-oa/", + "scripts/qa/check-trellis-governance.mjs", + "scripts/qa/check-process-contract.mjs", + "scripts/qa/audit-docs.mjs", + "docs/文档索引.md", + "docs/文档事实源状态矩阵.md", + "docs/Agent开发交付实践.md", + ".agents/skills/hyb-oa-delivery/" + ], + "notes": "No business code, no deployment, no public OA data writes. Requires user approval before deleting the project-local skill.", + "meta": { + "contractMode": "trellis_task", + "intent": "trellis_only_governance" + } +} \ No newline at end of file diff --git a/.trellis/tasks/05-26-trellis2-official-task-contract/prd.md b/.trellis/tasks/05-26-trellis2-official-task-contract/prd.md index 8a2140fa..f3dae149 100644 --- a/.trellis/tasks/05-26-trellis2-official-task-contract/prd.md +++ b/.trellis/tasks/05-26-trellis2-official-task-contract/prd.md @@ -29,7 +29,7 @@ holds the PRD, implementation context, verification context and finish record. without requiring Issue CSV bindings. - Current active Trellis tasks have PRD/test/scope information sufficient for the new check. -- Documentation and the project skill agree on Trellis task-first operation. +- Documentation, AGENTS and Trellis specs agree on Trellis task-first operation. ## Test Plan @@ -38,7 +38,6 @@ holds the PRD, implementation context, verification context and finish record. - `node --check scripts/qa/check-trellis-governance.mjs` - `node scripts/qa/check-trellis-governance.mjs` - `node scripts/qa/audit-docs.mjs --check-registry` -- `python3 /home/shunli/.codex/skills/.system/skill-creator/scripts/quick_validate.py .agents/skills/hyb-oa-delivery` - `git diff --check` - `bash scripts/check-minimal.sh` diff --git a/.trellis/tasks/05-26-trellis2-official-task-contract/task.json b/.trellis/tasks/05-26-trellis2-official-task-contract/task.json index bedf9447..173bf03a 100644 --- a/.trellis/tasks/05-26-trellis2-official-task-contract/task.json +++ b/.trellis/tasks/05-26-trellis2-official-task-contract/task.json @@ -24,15 +24,15 @@ "AGENTS.md", ".trellis/workflow.md", ".trellis/spec/hyb-oa/project-governance.md", + ".trellis/spec/hyb-oa/index.md", "scripts/qa/check-trellis-governance.mjs", "docs/Agent开发交付实践.md", "docs/文档索引.md", - "docs/文档事实源状态矩阵.md", - ".agents/skills/hyb-oa-delivery/SKILL.md" + "docs/文档事实源状态矩阵.md" ], "notes": "No business code, no deployment, no public OA data writes. TRELLIS2 intentionally creates no Issue CSV.", "meta": { "contractMode": "trellis_task", "supersedesPolicy": "TRELLIS1 dual-track Issue CSV binding" } -} \ No newline at end of file +} diff --git a/AGENTS.md b/AGENTS.md index e63e4c2f..0b5e8abc 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,7 +15,7 @@ - 编码前先方案:非微小改动必须先给实现方案并等待批准。 - 先有 Trellis task 再开发:非微小改动必须先创建或更新 `.trellis/tasks//`。 - 计划工具约束:使用 Codex 原生 `update_plan` 做执行清单,不用外部自定义 plan 替代。 -- 项目 Skill 优先:hyb-oa 交付、试运行、视觉复核、报销/OCR/附件、企业微信或部署类任务继续使用 `.agents/skills/hyb-oa-delivery`,再按 Trellis task/spec 组织上下文。 +- Trellis-only:hyb-oa 交付、试运行、视觉复核、报销/OCR/附件、企业微信或部署类任务统一从当前 Trellis task、`.trellis/workflow.md`、`.trellis/spec/hyb-oa/` 和 `docs/` 组织上下文。 - 中文沟通;commit message 使用中文并引用 Trellis task 名称或任务 ID。 - 不泄露密码、token、Secret、真实票据、合同正文、银行资料、完整账号、完整本地路径或原始 payload。 - 不轻易新建文档;优先更新现有事实源、模块规约、操作手册、证据文档或当前 Trellis task。 @@ -29,7 +29,6 @@ - 产品与视觉规则:`docs/产品设计规则.md` - 报销、发票、OCR、附件规则:`docs/报销发票附件规则.md` - 试运行与自动化验证:`docs/试运行与自动化验证手册.md` -- 项目交付 Skill:`.agents/skills/hyb-oa-delivery/SKILL.md` - Trellis workflow:`.trellis/workflow.md` - Trellis project specs:`.trellis/spec/hyb-oa/` diff --git a/docs/Agent开发交付实践.md b/docs/Agent开发交付实践.md index af14958a..e42f1597 100644 --- a/docs/Agent开发交付实践.md +++ b/docs/Agent开发交付实践.md @@ -47,16 +47,16 @@ Trellis 的定位是“开发执行合同和上下文组织层”,不是业务 历史 `issues/*.csv` 不删除、不批量回写;需要表格化审计时,可以从 Trellis task 摘要导出,而不是重新维护一套并行合同。 -### 3. Skill 只沉淀操作流程 +### 3. Trellis spec 固化操作流程 -Skill 用于减少重复沟通和降低遗漏风险,适合沉淀: +TRELLIS2 后,项目不再维护独立的交付 Skill。每轮固定流程、验证顺序和高频边界应按稳定程度分别落到 `.trellis/workflow.md`、`.trellis/spec/hyb-oa/`、当前 Trellis task 或 `docs/`: -- 每轮交付固定流程。 -- 试运行和验证顺序。 -- Playwright 视觉巡检要求。 -- 报销、发票、企业微信等高频业务的检查入口。 +- 每轮交付固定流程:优先进入 `.trellis/workflow.md` 或 `.trellis/spec/hyb-oa/project-governance.md`。 +- 试运行和验证顺序:优先进入 `docs/试运行与自动化验证手册.md` 或对应 Trellis task。 +- Playwright 视觉巡检要求:优先进入 `docs/产品设计规则.md` 和相关 QA 脚本。 +- 报销、发票、企业微信等高频业务入口:优先进入对应业务规约和 `.trellis/spec/hyb-oa/` 领域 spec。 -Skill 不复制长文档。详细业务规则放在 `docs/`,稳定开发规则沉淀到 `.trellis/spec/`,Skill 通过 references 指向需要时再读取。 +详细业务规则放在 `docs/`,稳定开发规则沉淀到 `.trellis/spec/`,当前任务上下文由 `.trellis/tasks//prd.md`、`implement.jsonl` 和 `check.jsonl` 串联。 ### 4. 文档保存事实源 @@ -78,7 +78,7 @@ AGENTS.md 只放 Trellis-first 入口和硬约束,不复制长规则。 - 后端:`npm run prisma:validate`、`node --check`、相关 Vitest、回归脚本。 - 前端:`npm run typecheck`、`npm run build`。 - 视觉:Playwright PC、mobile、WeCom UA 截图和 DOM 指标。 -- 文档/Skill:CSV validator、Skill quick_validate、`git diff --check`。 +- 文档/流程:Trellis governance check、docs registry check、`git diff --check`。 验证失败时先定位是代码问题、测试桩问题、环境问题还是数据问题。数据库迁移漂移、生产配置、远程服务变更属于高风险操作,必须暂停确认。 @@ -155,7 +155,7 @@ commit message 使用中文并引用 Trellis task 名称或任务 ID,例如 `t agent 在声明 blocker 前,必须先查项目内已有资产: -- `issues/*.csv`、`docs/`、`.agents/skills/hyb-oa-delivery/` 和 `AGENTS.md`。 +- `issues/*.csv`、`docs/`、`.trellis/spec/hyb-oa/`、当前 Trellis task 和 `AGENTS.md`。 - 已有测试脚本、Playwright 用例、回归脚本、试运行报告和覆盖矩阵。 - `artifacts/`、`output/`、手工复核证据、测试样本和历史日志。 - 环境变量示例、部署 runbook、可用的公网健康检查和本地启动脚本。 @@ -230,5 +230,5 @@ agent 在声明 blocker 前,必须先查项目内已有资产: 当连续两轮以上重复提醒同一类 agent 行为,或者同一类遗漏导致返工时,先判断: - 是项目事实源:更新 `docs/`。 -- 是每轮操作流程:更新 `.agents/skills/hyb-oa-delivery/`。 +- 是每轮操作流程:更新 `.trellis/workflow.md`、`.trellis/spec/hyb-oa/` 或当前 Trellis task。 - 是不可违反硬规则:更新 `AGENTS.md`。 diff --git a/docs/文档事实源状态矩阵.md b/docs/文档事实源状态矩阵.md index fb13b72d..74070bc0 100644 --- a/docs/文档事实源状态矩阵.md +++ b/docs/文档事实源状态矩阵.md @@ -137,10 +137,10 @@ | `WECOM-API-CATALOG` | `docs/企微API能力目录.md` | 集成事实源 | 企微 API 能力目录和 Secret 矩阵事实源 | `CURRENT` | product/backend/qa | `WAPI,WRRA,WAPC1,WAPC2,WPROC1,WPROC2,WAPC2F,WAPC2FLIVE,WCBK1,WEGOV1,WACP3,WACP3R,WREAD1,WADM1,WARCH1,WARCH2,WROAD2,WARCH3,WCHECK1,WEXT1,WAPPR1,WTCLOSE1,WRULE1,WTCLOSE2` | 官方企业微信开发者中心链接/Issue CSV | none | 2026-05-22 | `rg` | high | 企微开发先读;只保存摘要、链接和项目决策,不保存 Secret、token、完整 userid、手机号、邮箱或原始 payload;记录审批补偿、打卡摘要、巡检只写 OA 留存、不写企业微信、企微原生审批规则不可只读 API 化、需人工门禁,以及 WRULE1/WTCLOSE2 只读审批链校验和最终收口边界 | | `DELIVERY` | `docs/开发交付与变更管理规约.md` | 开发治理 | 开发交付事实源 | `CURRENT` | dev/qa | `GOV8,WDRG,WRRA,WAPC1,WPROC1,WPROC2,WCBK1,WEGOV1,WOPS1,WROAD2C,WROAD2B,WAPPR1,WAUTO1,WEXT1LD,WFULLSMOKE1` | `rg` | none | 2026-05-20 | `rg` | high | Issue、review、commit、交付规则;WFULLSMOKE1 后固定 WAUTO1、WEXT1LD、全域最终目标测试和 WEXT1-FORMAL/WREAL1 前置门禁 | | `QA-GATE` | `docs/测试规约与回归门禁.md` | 测试验收 | 测试和回归门禁事实源 | `CURRENT` | qa | `QAF8,GOV8,WPROC1,WPROC2,WAPC2FLIVE,WCBK1,WEGOV1` | 回归脚本/Playwright | none | 2026-05-19 | `rg` | high | 测试计划、DONE 门禁、企微三层门禁、自动化优先、非自审、无完整 sandbox 假设、WREAD1 真机可读性和 WARCH1 留存验收门禁 | -| `AGENT-PRACTICE` | `docs/Agent开发交付实践.md` | Agent 治理 | Agent 协作事实源 | `CURRENT` | dev | `GOV8,DG8,TRELLIS2` | Skill 校验 | none | 2026-05-26 | `rg` | medium | Agent 协作开发实践、设计主参考层级和 TRELLIS2 官方 task-first 执行合同口径 | +| `AGENT-PRACTICE` | `docs/Agent开发交付实践.md` | Agent 治理 | Agent 协作事实源 | `CURRENT` | dev | `GOV8,DG8,TRELLIS2` | Trellis governance check | none | 2026-05-26 | `rg` | medium | Agent 协作开发实践、设计主参考层级和 TRELLIS2 官方 task-first 执行合同口径 | | `AGENTS` | `AGENTS.md` | 执行硬约束 | 项目硬规则 | `CURRENT` | lead | `GOV8` | 人工核对 | none | 2026-05-13 | `rg` | high | 不可违反约束 | -| `SKILL-HYB` | `.agents/skills/hyb-oa-delivery/SKILL.md` | Skill | 项目交付 Skill | `CURRENT` | dev | `GOV8,DG8,WFDG,WDRG,WCP1,WCPC,WHMS,WHMSLIVE,WOUA,WAPI,WRRA,WRV1,WRA1,WMSG1,WAPC1,WAPC2,WPROC1,WPROC2,WAPC2F,WAPC2FLIVE,WCBK1,WEGOV1,WACP3,WACP3R,WREAD1,WREAD1F,WADM1,WARCH1,WARCH2,WROAD2,WARCH3,WCHECK1,WEXT1,WOPS1,WROAD2C,WROAD2B,WAPPR1,WRULE1,WAUTO1,WEXT1LD,WFULLSMOKE1,WROUTE2,WTCLOSE1,WTCLOSE2,WREAL1P,OAOPS1,ASSET1,OSMOKE1,OALAUNCH1,OMAT1,OPOLICY1,OAFLOW1,OAFRONT6,TRELLIS2` | quick_validate | none | 2026-05-26 | `quick_validate.py` | medium | 每轮交付操作入口;TRELLIS2 后非微小工作先读当前 Trellis task;企微/OA 后续先读 API 能力目录、Secret 矩阵、路线图、ASSET1 资产边界、OSMOKE1、OALAUNCH1、OPOLICY1、OAFLOW1 和 OAFRONT6;不得绕过真实业务闭环、权限矩阵、备份恢复、制度签收、Day 7 Go/No-Go 或后续独立合同直接宣布最终启用完成 | | `TRELLIS-WORKFLOW` | `.trellis/workflow.md` | Trellis | 开发主流程入口 | `CURRENT` | dev | `TRELLIS2` | `check-trellis-governance` | `AGENTS.md,.trellis/spec/hyb-oa/` | 2026-05-26 | `node scripts/qa/check-trellis-governance.mjs` | medium | TRELLIS2 后后续非微小开发默认从官方 Trellis task 进入;Issue CSV 只作历史审计或可选导出格式,docs 仍是业务事实源 | +| `TRELLIS-SPEC` | `.trellis/spec/hyb-oa/index.md` | Trellis | 项目稳定规则入口 | `CURRENT` | dev | `TRELLIS2` | `check-trellis-governance` | `AGENTS.md,.trellis/workflow.md` | 2026-05-26 | `node scripts/qa/check-trellis-governance.mjs` | medium | TRELLIS2 后稳定开发规则、高频工程边界和业务域实施约束从 `.trellis/spec/hyb-oa/` 注入;详细业务事实仍以 docs 为准 | | `REQ-WF` | `docs/需求-统一审批中心规约.md` | 需求事实源 | 审批模块规约 | `CURRENT` | product/backend | `AP6,WF8,WFOC,DBWFOC,WFDG,WOUA,WAPI,WRRA,WRV1,WRA1,WMSG1,WAPC1,WAPC2,WPROC1,WPROC2,WAPC2F,WAPC2FLIVE,WCBK1,WEGOV1,WACP3,WACP3R,WREAD1,WREAD1F,WADM1,WARCH1,WAPPR1,WAUTO1,WEXT1LD,WFULLSMOKE1,WTCLOSE1,WRULE1,WTCLOSE2,OAFLOW1` | workflow 回归 | none | 2026-05-24 | `rg` | high | OA 主办审批、企微主办 HR/考勤审批、OA 自建留存、真实回调事件证据、WACP3R 补偿拉取 findings、WREAD1 请假/补卡真机可读性结论、WARCH1 最小历史留存、WAPPR1 审批规则规范化和 API 不支持读取规则边界、WTCLOSE1 小团队一层审批 + 管理员兜底目标 A、WRULE1 理论审批人与实际审批链校验、WTCLOSE2 测试号最终收口、OAFLOW1 负责人本人报销兜底、WAUTO1/WEXT1LD/WFULLSMOKE1 前置和 OA 应急接管边界 | | `REQ-OCR` | `docs/需求-报销发票OCR规约.md` | 需求事实源 | OCR 模块规约 | `CURRENT` | product/backend | `RI6,OCR8,BIZ8` | OCR 回归 | none | 2026-05-13 | `rg` | high | OCR 和发票边界 | | `RULE-REIMB` | `docs/报销发票附件规则.md` | 需求事实源 | 报销发票附件规则 | `CURRENT` | product/finance | `RI6,BIZ8` | 报销回归 | none | 2026-05-13 | `rg` | high | 报销、发票、附件细则 | @@ -180,7 +180,8 @@ | `docs/开发交付与变更管理规约.md` | 当前事实源 | Trellis task、review、提交和交付 | | `docs/Agent开发交付实践.md` | 当前事实源 | Agent 协作开发实践 | | `AGENTS.md` | 当前事实源 | 项目硬约束 | -| `.agents/skills/hyb-oa-delivery/SKILL.md` | 当前事实源 | 项目交付 Skill | +| `.trellis/workflow.md` | 当前执行合同 | Trellis task 开发主流程入口 | +| `.trellis/spec/hyb-oa/index.md` | 当前执行合同 | 稳定开发规则和高频工程边界入口 | ## 当前操作手册 diff --git a/docs/文档索引.md b/docs/文档索引.md index 8fa74081..377f0869 100644 --- a/docs/文档索引.md +++ b/docs/文档索引.md @@ -10,7 +10,7 @@ ## 读取规则 -- 判断当前需求、开发、验收:读当前 Trellis task、当前 PRD、模块规约和本索引。 +- 判断当前需求、开发、验收:读当前 Trellis task、`.trellis/spec/hyb-oa/`、当前 PRD、模块规约和本索引。 - 判断历史证据:读轻量历史索引,必要时用 `git show :` 恢复旧文档。 - 判断冲突:当前 Trellis task PRD/设计 > 当前 PRD/模块规约 > 设计和产品规则 > 当前操作手册 > 技术参考 > 历史证据。 - 英文文件名只在技术生态或脚本强引用时保留,例如 `docs/mcp-tools.md`。 @@ -220,6 +220,7 @@ R6 -> PC6 -> PA6 -> FL6 -> AP6 -> RI6 -> LP6 -> ME6/QG6 -> DG7/MRF7 -> MIA7 -> M | [Agent开发交付实践](./Agent开发交付实践.md) | Agent 协作和交付实践 | | [AGENTS 项目规则](../AGENTS.md) | 执行硬约束 | | [Trellis Workflow](../.trellis/workflow.md) | TRELLIS2 后官方 Trellis task 开发主流程入口 | +| [Trellis Project Specs](../.trellis/spec/hyb-oa/index.md) | TRELLIS2 后稳定开发规则和高频工程边界入口 | ## 当前操作手册 diff --git a/scripts/qa/audit-docs.mjs b/scripts/qa/audit-docs.mjs index fcdd6a49..e8b91a29 100644 --- a/scripts/qa/audit-docs.mjs +++ b/scripts/qa/audit-docs.mjs @@ -39,7 +39,8 @@ const requiredCorePaths = [ 'docs/产品设计规则.md', 'docs/产品口径.md', 'AGENTS.md', - '.agents/skills/hyb-oa-delivery/SKILL.md', + '.trellis/workflow.md', + '.trellis/spec/hyb-oa/index.md', ]; function printHelp() { diff --git a/scripts/qa/check-process-contract.mjs b/scripts/qa/check-process-contract.mjs index 9ab31a28..99731ecd 100644 --- a/scripts/qa/check-process-contract.mjs +++ b/scripts/qa/check-process-contract.mjs @@ -440,7 +440,8 @@ export function evaluateBaseline({ root = repoRoot } = {}) { "docs/企微API能力目录.md", "docs/文档索引.md", "docs/文档事实源状态矩阵.md", - ".agents/skills/hyb-oa-delivery/SKILL.md", + ".trellis/workflow.md", + ".trellis/spec/hyb-oa/project-governance.md", WAPC2F_ISSUE, ]; diff --git a/scripts/qa/check-trellis-governance.mjs b/scripts/qa/check-trellis-governance.mjs index bdf65fa1..4f2a59d3 100644 --- a/scripts/qa/check-trellis-governance.mjs +++ b/scripts/qa/check-trellis-governance.mjs @@ -19,10 +19,12 @@ const requiredSpecs = [ ]; const requiredDocMentions = [ + "AGENTS.md", "docs/Agent开发交付实践.md", "docs/文档索引.md", "docs/文档事实源状态矩阵.md", - ".agents/skills/hyb-oa-delivery/SKILL.md", + ".trellis/workflow.md", + ".trellis/spec/hyb-oa/index.md", ]; const validTaskStatuses = new Set(["planning", "in_progress", "review", "completed"]); @@ -242,6 +244,31 @@ function checkDocsRegistration(result) { if (result.status === "PASS") pass(result, "docs_registration", `${requiredDocMentions.length} fact sources mention Trellis`); } +function checkRemovedProjectSkillReferences(result) { + const removedSkill = ["hyb", "oa", "delivery"].join("-"); + const removedSkillPath = [".agents", "skills", removedSkill, "SKILL.md"].join("/"); + const removedSkillDir = [".agents", "skills", removedSkill].join("/"); + const legacyPriorityText = ["项目", "Skill 优先"].join(" "); + const files = [ + "AGENTS.md", + "docs/Agent开发交付实践.md", + "docs/文档索引.md", + "docs/文档事实源状态矩阵.md", + "scripts/qa/audit-docs.mjs", + "scripts/qa/check-process-contract.mjs", + ]; + + for (const file of files) { + if (!exists(file)) continue; + const text = readText(file); + const staleTerms = [removedSkill, removedSkillPath, removedSkillDir, legacyPriorityText].filter((term) => text.includes(term)); + if (staleTerms.length > 0) { + fail(result, "removed_project_skill.reference", `${file} still references removed project delivery skill`); + } + } + if (result.status === "PASS") pass(result, "removed_project_skill", "current governance files are Trellis-only"); +} + function checkSensitiveData(result) { const scanFiles = [ "AGENTS.md", @@ -270,6 +297,7 @@ try { checkCoreFiles(result); checkTaskContracts(result); checkDocsRegistration(result); + checkRemovedProjectSkillReferences(result); checkSensitiveData(result); } catch (error) { fail(result, "exception", error instanceof Error ? error.message : String(error));