brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
software-clean-code-standardDefines CC-* code rules and waivers. Use when mapping lint findings to rule IDs or tracking complexity mass, erosion, and verbosity across changes.
Independent GitHub snapshot · Automated classification · Original documentation governs
This skill is the authoritative clean code standard for this repository's shared skills. It defines stable rule IDs (CC-*), how to apply them in reviews, and how to extend them safely via language overlays and explicit exceptions.
Judgment over dogma: This standard's CC-* rules are durable (coupling/cohesion, naming, small interfaces, explicit errors). Numeric folklore — hard function-length caps, "comments are a smell," DRY applied absolutely — is not. Robert C. Martin's Clean Code (2nd ed., 2025) and John Ousterhout's A Philosophy of Software Design disagree in a published, public debate on function size and commenting (see references/code-quality-operational-playbook.md § 14); apply the rule ID's intent, not a book's specific numeric prescription, and know when not to refactor (§ 14.3 of the same reference).
| Task | Tool/Framework | Command | When to Use |
|---|---|---|---|
| Cite a standard | CC-* rule ID | N/A | PR review comments, design discussions, postmortems |
| Categorize feedback | CC-NAM, CC-ERR, CC-SEC, etc. | N/A | Keep feedback consistent without "style wars" |
| Add stack nuance | Language overlay | N/A | When the base rule is too generic for a language/framework |
| Allow an exception | Waiver record | N/A | When a rule must be violated with explicit risk |
| Reuse shared checklists | assets/checklists/ | N/A | When you need product-agnostic review/release checklists |
| Reuse utility patterns | references/*-utilities.md | N/A | When extracting shared auth/logging/errors/resilience/testing utilities |
CC-* ID; use software-code-review for the review workflow.CC-* IDs.CC-SEC-* baseline.CC-* rules before proposing new wording or automation; map a tool finding by its failure mode, not by tool severity alone.When citing or enforcing CC-* rules in a review:
CC-SEC-01, CC-ERR-03 (two-digit CC-<CAT>-<NN>; only IDs that exist in the catalog — python3 scripts/check_cc_ids.py [paths] fails on unknown IDs)Feedback needed: [What kind of guidance is this?]
├─ Universal, cross-language rule? → Add/modify `CC-*` in `references/clean-code-standard.md`
│
├─ Language/framework-specific nuance? → Add overlay entry referencing existing `CC-*`
│
└─ One-off constraint or temporary tradeoff?
├─ Timeboxed? → Add waiver with expiry + tracking issue
└─ Permanent? → Propose a new rule or revise scope/exception criteria
Refactor evidence gate.
Do not raise a rule violation solely because code looks unfashionable. Name the maintenance failure it causes: duplicated change, hidden side effect, unsafe coupling, unreadable control flow, or measured complexity hotspot. Preserve stable awkward code when the proposed rewrite lacks a behavior-preserving test or a concrete reduction in change risk; document a narrow exception instead of creating churn.
AI-generated code requires the same CC-* standards plus additional vigilance for these patterns:
| Pattern | CC-* Mapping | Detection |
|---|---|---|
| Hallucinated imports | CC-SEC-05 | npm info / pip index / type-check fails |
| Stale or deprecated APIs | CC-DEP-01 | Compiler warnings, changelog checks |
| Missing error paths | CC-ERR-01, CC-ERR-04 | No catch/finally, no null guards, no timeout |
| Premature abstraction | CC-FUN-06 | Wrappers with single call site, unused generics |
| Confident wrong comments | CC-DOC-01, CC-DOC-02 | Docstrings that don't match implementation |
| Security anti-patterns | CC-SEC-08, CC-SEC-03 | String concatenation in queries, hardcoded tokens |
| Silent fallback or empty catch | CC-ERR-01 | Error path returns a plausible default with no caller-visible failure |
| Weakened or deleted assertion | CC-TST-01, CC-TST-03 | Requirement no longer makes a test fail when reversed |
| Duplicate helper or scope expansion | CC-FUN-05, CC-FUN-06 | Parallel helper appears beside existing behavior or an abstraction has no second use |
For agent change discipline and tests that detect regressions, use coding-behavior.md. For detailed hallucination checks, see references/code-quality-operational-playbook.md § 11.3.
Resources
CC-* rule definitions themselves; open first to find or cite a rule IDCC-*)Templates
Utility Patterns
Related Skills
CC-* IDsCC-SEC-*CC-*.When prior decisions or pitfalls are relevant, consult learnings.consolidated.md if present; use learnings.md only for needed history or as the available fallback. Otherwise skip both.
After applying it, if you encountered a pattern worth remembering, a mistake worth preventing, or a domain fact that surprised you, append one dated bullet to learnings.md via agents-skills-feedback-loop/scripts/append_learning.py. Do not modify SKILL.md itself.