Repository navigation
chore: add .failproofai config directory #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
035c640
94f93bb
a5c44bd
7cafd8f
dc8b3ac
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "enabledPolicies": [ | ||
| "sanitize-jwt", | ||
| "sanitize-api-keys", | ||
| "sanitize-connection-strings", | ||
| "sanitize-private-key-content", | ||
| "sanitize-bearer-tokens", | ||
| "protect-env-vars", | ||
| "block-env-files", | ||
| "block-read-outside-cwd", | ||
| "block-sudo", | ||
| "block-curl-pipe-sh", | ||
| "block-rm-rf", | ||
| "block-failproofai-commands", | ||
| "block-secrets-write", | ||
| "block-push-master", | ||
| "block-force-push", | ||
| "block-work-on-main", | ||
| "warn-git-amend", | ||
| "warn-git-stash-drop", | ||
| "warn-all-files-staged", | ||
| "warn-destructive-sql", | ||
| "warn-schema-alteration", | ||
| "warn-package-publish", | ||
| "warn-global-package-install", | ||
| "warn-large-file-write", | ||
| "warn-background-process", | ||
| "warn-repeated-tool-calls", | ||
| "require-commit-before-stop", | ||
| "require-push-before-stop", | ||
| "require-pr-before-stop", | ||
| "require-ci-green-before-stop" | ||
| ], | ||
| "policyParams": { | ||
| "block-force-push": { | ||
| "hint": "Create a new branch from your current HEAD (e.g. `git checkout -b <new-branch>`) and push that instead." | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| /** | ||
| * workflow-policies.mjs — Convention-based workflow policies for this repo | ||
| * | ||
| * Automatically loaded from .failproofai/policies/ — no config changes needed. | ||
| */ | ||
| import { customPolicies, allow, instruct } from "failproofai"; | ||
|
|
||
| // Remind to update CHANGELOG before committing | ||
| customPolicies.add({ | ||
| name: "changelog-check", | ||
| description: "Remind Claude to update CHANGELOG.md before committing", | ||
| match: { events: ["PreToolUse"] }, | ||
| fn: async (ctx) => { | ||
| if (ctx.toolName !== "Bash") return allow(); | ||
| const cmd = String(ctx.toolInput?.command ?? ""); | ||
| if (/git\s+commit/.test(cmd)) { | ||
| return instruct( | ||
| "Check whether CHANGELOG.md needs an update for this commit. " + | ||
| "Every PR must include an entry under the `## Unreleased` section. " + | ||
| "Use the appropriate subsection: Features, Fixes, Docs, or Dependencies." | ||
| ); | ||
| } | ||
| return allow(); | ||
| }, | ||
| }); | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,6 +2,13 @@ | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## Unreleased | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Features | ||||||||||||||||||||||
| - Add `changelog-check` convention policy to remind agent to update CHANGELOG before committing | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Docs | ||||||||||||||||||||||
| - Document cross-cutting `hint` param in built-in policies reference and add `block-force-push` hint example | ||||||||||||||||||||||
| - Add `block-force-push` hint to project config suggesting fresh branch as alternative | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add PR numbers to the new These entries should include the PR reference suffix to match the repo changelog convention. ✏️ Proposed fix ### Features
-- Add `changelog-check` convention policy to remind agent to update CHANGELOG before committing
+- Add `changelog-check` convention policy to remind agent to update CHANGELOG before committing (`#94`)
### Docs
-- Document cross-cutting `hint` param in built-in policies reference and add `block-force-push` hint example
-- Add `block-force-push` hint to project config suggesting fresh branch as alternative
+- Document cross-cutting `hint` param in built-in policies reference and add `block-force-push` hint example (`#94`)
+- Add `block-force-push` hint to project config suggesting fresh branch as alternative (`#94`)Based on learnings: Update 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ## 0.0.2-beta.7 — 2026-04-14 | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| ### Features | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broaden commit detection to avoid missing valid
git commitforms.Current regex can miss commands like
git -c key=value commit -m ..., so reminders won’t trigger consistently.🔧 Proposed fix
📝 Committable suggestion
🤖 Prompt for AI Agents