1---2name: chous3description: Use Chous in .NET repositories that ship sizeable frontend codebases and want file-structure linting, naming convention enforcement, and folder-layout policy as a CLI gate. USE FOR: growing frontend trees; naming, folder, or file-placement policy; CI checks for frontend layout drift. DO NOT USE FOR: semantic code bugs, type errors, or framework API misuse; CSS, HTML, or JS rule enforcement inside files. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.4---56# Chous for Frontend File-Structure Linting in .NET Repositories78## Trigger On910- the repo has a growing frontend tree and the user asks about naming conventions, folder structure, or file placement rules11- the repo wants to enforce layout policy for `ClientApp/`, `src/`, `apps/`, or `packages/`12- architectural drift in the frontend file tree is a larger problem than syntax errors1314## Do Not Use For1516- semantic code bugs, type errors, or framework API misuse17- CSS, HTML, or JS rule enforcement inside files18- very small repos where a structure linter would add more ceremony than value1920## Inputs2122- the nearest `AGENTS.md`23- `package.json`24- any existing `.chous` file25- the frontend tree that needs policy enforcement2627## Workflow28291. Define the structure problem first:30 - naming convention drift31 - component placement32 - forbidden folders or files33 - monorepo frontend boundaries342. Start from `chous init` or a known preset, then tighten only the rules the repo can explain.353. Keep the checked-in `.chous` file readable enough that future contributors understand the policy.364. Add repeatable commands such as:37 - `npx chous`385. Exclude generated folders, build artifacts, and vendored assets so the signal stays architectural.396. Use Chous as a supplement to semantic linters, not as their replacement.407. Re-run after moves or refactors to confirm the structure policy still matches the intended design.4142## Bootstrap When Missing43441. Detect current state:45 - `rg --files -g 'package.json' -g '.chous'`46 - `rg -n '"chous"' --glob 'package.json' .`472. Start with the official no-install or global paths:48 - `npx chous`49 - `npm install -g chous`503. Initialize config when the repo truly wants structure policy:51 - `npx chous init`524. Add a repeatable command to `AGENTS.md` and `package.json`, then verify with:53 - `npx chous`545. Return `status: configured` if the repo now has a checked-in structure-lint baseline, or `status: improved` if an existing baseline was tightened.556. Return `status: not_applicable` when the repo is too small or too fluid to justify a structure-lint gate right now.5657## Handle Failures5859- If Chous flags large parts of the tree after the first rollout, the rule set is probably too strict for the repo's current maturity; start from the preset and tighten incrementally.60- Generated or vendored folders should be excluded instead of repeatedly ignored in reviews.61- If contributors cannot explain what a rule protects, simplify the `.chous` policy before enforcing it in CI.6263## Deliver6465- a checked-in frontend structure policy66- repeatable file-tree linting commands67- explicit exclusions for generated and vendored folders6869## Validate7071- the `.chous` rules reflect real architecture intent72- generated output is excluded73- Chous is used alongside, not instead of, semantic linters74- the policy remains understandable after the first rollout7576## Ralph Loop77781. Plan: analyze current state, target outcome, constraints, and risks.792. Execute one step and produce a concrete delta.803. Review the result and capture findings.814. Apply fixes in small batches and rerun checks.825. Update the plan after each iteration.836. Repeat until outcomes are acceptable.847. If a dependency is missing, bootstrap it or return `status: not_applicable` with a reason.8586### Required Result Format8788- `status`: `complete` | `clean` | `improved` | `configured` | `not_applicable` | `blocked`89- `plan`: concise plan and current step90- `actions_taken`: concrete changes made91- `verification`: commands, checks, or review evidence92- `remaining`: unresolved items or `none`9394## Example Requests9596- "Enforce frontend folder naming and placement rules."97- "Add file-structure linting to the web client."98- "Why is our frontend tree drifting even though code linting passes?"