mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-09-30 03:23:12 +00:00
* chore(governance): make React/TS conventions mandatory via executable gates Add AGENTS.md, QUALITY_GATES.md, ARCHITECTURE_AND_CODE_QUALITY.md, and REVIEW_AND_PR_FRAMEWORK.md as the binding conventions and PR review contract for humans and all coding/review agents. Add a single 'npm run verify' command (format + lint + build + test + governance) and 'npm run governance', which runs a dependency-free godfile ratchet (whole-repo, baseline in scripts/governance-baseline.json) and a changed-file maintainability gate (complexity<=20, function<=150, params<=4, depth<=4) via ESLint. Legacy is handled by ratchets, not relaxation: 5 godfiles over 500 lines are grandfathered debt; maintainability thresholds apply to changed TS/TSX (72 legacy violations across ~51 files otherwise). Add a repo-owned 'governance' CI job that runs 'npm run verify' so every gate is guaranteed from this repository, independent of the org reusable workflow. * fix(governance): make frontend ratchets fail closed
32 lines
1.3 KiB
JSON
32 lines
1.3 KiB
JSON
{
|
|
"version": 1,
|
|
"purpose": "Frozen grandfathered debt inventory for the frontend governance checks. New entries and cap increases fail the governance comparison. Existing caps may only decrease and entries must be removed when compliant.",
|
|
"maxFileLines": 500,
|
|
"godfileDebt": [
|
|
{
|
|
"path": "src/app/(protected)/workorders/[id].tsx",
|
|
"maxLines": 797,
|
|
"reason": "Work-order detail route page; legacy godfile targeted for decomposition into focused state components."
|
|
},
|
|
{
|
|
"path": "src/app/(protected)/workorders/_components/dispatch-detail-modal.tsx",
|
|
"maxLines": 782,
|
|
"reason": "Dispatch detail modal; oversized legacy component pending extraction of sections/fields."
|
|
},
|
|
{
|
|
"path": "src/app/v/[token]/dispatch/[id].tsx",
|
|
"maxLines": 651,
|
|
"reason": "Vendor-portal dispatch detail route; legacy page pending decomposition."
|
|
},
|
|
{
|
|
"path": "src/app/(protected)/vendors/index.tsx",
|
|
"maxLines": 612,
|
|
"reason": "Vendors list route; legacy page with mixed query/filter/table state pending extraction."
|
|
},
|
|
{
|
|
"path": "src/domain/work-orders/mappers/work-order-mapper.ts",
|
|
"maxLines": 572,
|
|
"reason": "API<->domain mapper; long but cohesive mapping logic, pending split by responsibility."
|
|
}
|
|
]
|
|
}
|