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).
code-completion-semantic-constraintsAutomatically complete partial code snippets while satisfying semantic constraints including variable types, invariants, pre/post-conditions, interface contracts, and expected input/output behavior. Use when users provide incomplete code with specific requirements like "complete this function that takes a list and returns sorted unique elements" or "fill in…
Independent GitHub snapshot · Automated classification · Original documentation governs
Complete partial code snippets while satisfying specified semantic constraints. Produces compilable code, verification tests, and a detailed report explaining how each constraint was satisfied.
Extract and categorize the provided information:
Partial Code: Identify the incomplete code structure (function signature, class skeleton, method stub, etc.)
Semantic Constraints: Categorize constraints by type:
For each constraint:
Generate code that:
Create minimal test cases that verify:
Document how each constraint was satisfied:
Input:
def process_items(items):
# TODO: complete this function
pass
Constraints:
items is a list of integersOutput: Completed function with sorting logic, tests for empty/normal/duplicate cases, and report explaining constraint satisfaction.
Input:
public class DataCache implements Cache {
// TODO: implement required methods
}
Constraints:
Cache interface (get, put, remove methods)Output: Complete class implementation, concurrency tests, and report mapping each interface method to implementation.
Input:
void update_balance(Account* acc, int amount) {
// TODO: complete
}
Constraints:
acc != NULL && acc->balance >= 0acc->balance >= 0 (balance never negative)amount would make balance negative, set to 0 insteadOutput: Implementation with bounds checking, tests for edge cases, and report showing invariant preservation.
Provide three components:
1. Completed Code
2. Verification Tests
3. Constraint Satisfaction Report
This skill works with any programming language. Adapt constraint types and verification approaches to language-specific features (e.g., type systems, contract programming, assertion libraries).