{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "lakeday-org-perch--add-custom-lint-rule",
 "repo": "lakeday-org/perch",
 "repo_url": "https://github.com/lakeday-org/perch",
 "repo_slug": "lakeday-org-perch",
 "title": "Write a custom rule for your own code standard",
 "page_title": "How to write a custom rule for your own code standard with Perch",
 "summary": "Add a plain-English rule to Perch.yaml so Perch checks a practice your team cares about.",
 "who": "A team lead who has a house rule, such as keeping secrets out of logs, that generic linters do not check.",
 "problem": "Built-in checks do not cover every team standard, and a written rule is easy to forget in review.",
 "outcome": "A committed rule in Perch.yaml that Perch applies to matching files on every scan.",
 "steps": [
  "Open `perch.yaml` in the project root, or create it",
  "Add a rule with `name`, `where`, `each`, and `ensure` fields, as shown in the README example",
  "Run `perch scan` to apply the new rule",
  "Run `perch issues` to review what the rule found",
  "Commit `perch.yaml` so the rule applies to the team"
 ],
 "agent_prompt": "In the perch repo at <project path>, add a rule named private-logs to perch.yaml with where set to src/**/*.ts, each set to method, and ensure set to 'Keep passwords and access tokens out of logs.' Run `perch scan`. Verify that the scan output includes findings from this rule.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "Rule syntax beyond the README example (such as `sees` and `min`) is documented elsewhere, so this example covers only the basic fields.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "javascript",
 "requirements": [
  "Node.js with npm, to install the @lakeday/perch package",
  "A Perch Cloud account, created by running perch login (the first $5 is free)",
  "A project folder with source code to scan"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/lakeday-org-perch/add-custom-lint-rule/",
 "md": "https://dedupedai.com/use-cases/lakeday-org-perch/add-custom-lint-rule/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/lakeday-org-perch--add-custom-lint-rule.json",
 "api_version": "v1"
}
