comment-policy
Skill9 starsChanged 27 days agoMITView on GitHub
Use when writing or editing code, adding/changing comments, or before committing a code diff — delivers FR-22's tripwire + retrieval-pointer comment policy at write time. Do NOT use for prose/doc edits, non-code tickets, or as a review gate (that's `code-review`).
2 other projects use a version of this.
Adopted by
Most recently taken up by
- guang-lee-cn/scaffold-skillstheir own version, first seen Nov 8, 2026
- a16z/jolttheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- a16z/jolt★ 1.1ksame name
- guang-lee-cn/scaffold-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository119 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/fusebase-flow-always.mdcCursor rule
- .cursor/rules/fusebase-flow-implementation.mdcCursor rule
- .cursor/rules/fusebase-flow-security.mdcCursor rule
- .cursor/rules/fusebase-flow-specs.mdcCursor rule
- .cursor/rules/fusebase-flow-validation.mdcCursor rule
- api-explorationSkill
- app-api-contract-testingSkill
- app-backendSkill
- app-business-docsSkill
- app-dev-practicesSkill
- app-e2e-testsSkill
- app-quality-patternsSkill
- app-routingSkill
- app-secretsSkill
- app-sidecarSkill
- app-ui-designSkill
- business-logic-guardianSkill
- client-vs-internalSkill
- code-reviewSkill
- communicationSkill
- design-discovery-ideationSkill
- dev-debug-logsSkill
- documentation-budgetSkill
- file-uploadSkill
- find-wasted-codeSkill
- find-wasted-effortSkill
- fusebase-cliSkill
- fusebase-dashboardsSkill
- fusebase-flow-health-checkSkill
- fusebase-gateSkill
- fusebase-portal-specific-appsSkill
- git-history-diagnosticSkill
- git-workflowSkill
- handling-authentication-errorsSkill
- handoffSkill
- implementation-planningSkill
- invite-with-passwordSkill
- lightweight-laneSkill
- liveness-disciplineSkill
- managed-integrationsSkill
- mcp-gate-debugSkill
- module-size-disciplineSkill
- north-starSkill
- phase-auditSkill
- product-apps-decompositionSkill
- product-docs-firstSkill
- product-ownerSkill
- project-onboardingSkill
- release-deploy-reportingSkill
- remote-logsSkill
- repo-onboarding-context-mapSkill
- requirements-specificationSkill
- role-disciplineSkill
- security-permissions-reviewSkill
- skill-authoringSkill
- smoke-testingSkill
- task-delegationSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 94
When you delegate any code-writing/implementation slice to a sub-agent, paste this block into its prompt (push — sub-agents do not reliably …
- Distinctive: line 108
Storage ≠ retrieval — the pointer is NOT a duplicate: When an agent opens a file the external records aren't in its context, so deleting …
- Very specific: line 146
Do not become a regex/lint/gate comment-matcher — tripwire-vs-restate is semantic, not pattern-matchable (FR-22).
- Distinctive: line 147
Do not match surrounding comment density upward.
- Distinctive: line 148
Do not strip a retrieval pointer as if it were a duplicate.
- Distinctive: line 149
Do not apply to prose/doc files — this is the code carrier.
- Distinctive: line 150
Do not retroactively rewrite existing files outside an explicit Lightweight pass.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Comment policy (FR-22 write-time carrier)
Style: Mode-B-lite. The write-time home of FR-22. Loads for code-writing agents (and their sub-agents) so the rule reaches the writer's context at the moment comments are written — not just at review. Rule body aligns with FR-22 in
FLOW_RULES.md; rationale + evidence live indocs/comment-policy.md.
Purpose
Flow source is read by AI agents, not humans line-by-line. WHAT-restating prose, rationale already homed in a decision/ticket/memory, and changelog comments serve an absent audience and cost context budget on every load. The base "match surrounding comment density" instruction is a one-directional ratchet and every Stop-hook gate is comment-blind, so over-commenting is invisible to the loop. This skill delivers the explicit override at write time.
When to invoke
- Writing or editing code in any language.
- Adding, changing, or reviewing your own comments before a commit.
- About to commit a code diff (final comment pass).
- A handoff or task involves implementation, refactor, or scaffold.
Do not invoke when
- Editing prose / docs / specs / decisions / handoffs (these are human-or-AI-read narrative, not code).
- The ticket is non-code (config-only rename, doc-only change with no source edit).
- You want review-time enforcement — that is
code-review(the review dimension), not this write-time carrier.
Required inputs
| Input | Where it lives | If missing |
| The code diff being written | working tree | nothing to apply the policy to — skip |
| Trust-critical carve-out set | policies/comment-policy.yml: trust_critical_globs | treat all paths as routine (carve-outs are opt-in per project) |
| Rationale / audit prompt | docs/comment-policy.md (framework-dev) · references/audit-prompt.md (consumer-reachable) | proceed from the two-kinds rule below |
Procedure
For comments introduced or necessarily changed by this task, write only two kinds; remove everything else. Pre-existing comments you did not need to touch stay as they are (flow-skills/zoom-out/references/karpathy-guidelines.md §3); cleaning them is the separate pass in § Escalation path.
1. Tripwire (keep)
A constraint an editing agent could violate without realizing, that is not obvious from local code. One line by default; ≤~4 lines only for security / auth / concurrency / platform-quirk.
# empirical floor — don't lower below 0.82 (decision B2)
threshold = 0.82# additive — reordering breaks back-compat with serialized v1 payloads
FIELDS = (...)2. Retrieval pointer (keep)
A ≤1-line tag naming the external WHY-home so an agent whose context is just the open file knows where the rationale lives.
COOLDOWN_S = 30 # (backlog 156)3. Remove (everything else)
| Remove | Why | Replace with |
WHAT-restating prose (# loop over users) | the code already says it; the reader is an agent | nothing |
| Rationale/diagnosis already in a decision/ticket/memory | duplicate of an external record | the ≤1-line pointer |
Changelog / history (# changed 2026-06-04: was X) | the change is in git | nothing |
Worked example
Task T42 edits one retry loop in comment-heavy sync.ts.
- New constant
MAX_RETRIES = 5gets a tripwire:# upstream rate limit — keep ≤5 (decision B4). - A draft
# retry the jobthe task wrote inside the loop restates WHAT → removed before commit. - The loop's pre-existing
# loop over jobsis not changed by the edit → left untouched; mention it for a separate Lightweight cleanup pass. - The touched line's
(backlog 156)pointer stays.
Output: comment-policy review: applied (FR-22).
Delegation push block (for code-writing sub-agents)
When you delegate any code-writing/implementation slice to a sub-agent, paste this block into its prompt (push — sub-agents do not reliably auto-load this skill):
COMMENT POLICY (FR-22) — applies to all code you write:
In comments you introduce or necessarily change, write ONLY two kinds; remove everything else. Leave untouched pre-existing comments alone.
1) TRIPWIRE — a constraint an editor could break unknowingly, not obvious from local code (≤1 line; ≤4 lines only for security/auth/concurrency/platform).
2) RETRIEVAL POINTER — a ≤1-line tag naming the external WHY-home, e.g. "(decision B2)" or "backlog 156".
REMOVE: comments that restate what the code does; rationale already recorded in a decision/ticket/memory; changelog/history (it's in git).
Do NOT match surrounding comment density upward. Keep pointers — they are not duplicates.Two subtleties (do not over-simplify)
- Do NOT "match surrounding comment density" upward. Comments this task introduces or necessarily changes follow this policy even in comment-heavy files — the FR-22 exception to "Match existing style" in
flow-skills/zoom-out/references/karpathy-guidelines.md§3. This clause is what breaks the harness density-ratchet — without it the policy is silently overridden. - Storage ≠ retrieval — the pointer is NOT a duplicate. When an agent opens a file the external records aren't in its context, so deleting the one-line pointer orphans a correct record the agent now has no trigger to open. Kill the prose; keep the pointer.
Content gate forbidden — artifact-level checks encouraged
Two distinct enforcement layers; do not conflate them (conflating them led maintainers to build nothing):
| Layer | Inspects | Verdict |
| Comment CONTENT (tripwire-vs-restate) | the words inside a comment | FORBIDDEN as a gate — semantic, not pattern-matchable; a regex/lint gate trains agents to write worse comments to pass it. Enforced write-time (this skill) + review-time (code-review) only. |
| Process ARTIFACTS (handoff-contains-block; review-ran signal) | whether the handoff carries the FR-22 push block; whether the review marker was emitted | ENCOURAGED — inspects process artifacts, never comment semantics; fully FR-22-safe. E.g. comment_policy_review_applied (warn-only) in policies/required-artifacts.yml, detected by stop.py. |
The "no gate" rule is about comment content only. It does not forbid the safe artifact-level checks that make FR-22 delivered-by-construction and visible to the loop.
Carve-out (trust-critical paths)
Trust-critical paths — auth / identity / session / gate code, DB migrations, and anything in policies/comment-policy.yml: trust_critical_globs — keep their multi-line tripwires. Apply the rule fully to CRUD / routine code. The set is project-settable (architecture-dependent: whether a separate instruction layer is read instead of source varies by project). Run references/audit-prompt.md against a project to derive its set before adopting.
Output artifacts
| Artifact | Path or location | Mode |
| Comment-policy-compliant code diff | working tree | (behavioral; no separate artifact) |
Failure cases
| Failure mode | Detection | Response |
| Diff carries WHAT-restate / changelog / duplicate-rationale comments | self-review before commit; code-review at review-time | strip the prose; keep tripwires + pointers |
| A pointer was deleted as a "duplicate" | external record now has no in-context trigger | restore the ≤1-line pointer |
| Tempted to add a regex/lint comment gate | this skill or a hook proposes pattern-matching comments | refuse — FR-22 forbids it; enforcement is write-time + code-review, never a gate |
Escalation path
- Carve-out set unknown for this project → run
references/audit-prompt.md; ask the operator in chat text (FR-19) which globs to set inpolicies/comment-policy.yml. - Cleaning existing over-commented files → a separate explicit Lightweight pass (FR-21); not retroactive, comments strip from build output so no deploy.
Anti-patterns
- Do not become a regex/lint/gate comment-matcher — tripwire-vs-restate is semantic, not pattern-matchable (FR-22).
- Do not match surrounding comment density upward.
- Do not strip a retrieval pointer as if it were a duplicate.
- Do not apply to prose/doc files — this is the code carrier.
- Do not retroactively rewrite existing files outside an explicit Lightweight pass.
Clean-room note
Original Fusebase Flow content. Designed after reviewing public AI coding workflow patterns; no third-party code, prompts, skill files, or hook scripts are copied. See docs/source-map.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

