unxed/f4 / .agents/skills/aif-implement
aif-implement
VerifiedExecute implementation tasks from the current plan. Works through tasks sequentially, marks completion, and preserves progress for continuation across sessions. Use when user says "implement", "start coding", "execute plan", or "continue implementation".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 42.8 KB |
| references/IMPLEMENTATION-GUIDE.md | markdown | 4.6 KB |
| references/LOGGING-GUIDE.md | markdown | 2.3 KB |
references/LOGGING-GUIDE.md
View on GitHub# Logging Requirements
**ALWAYS add verbose logging when implementing code.** AI-generated code often has subtle bugs that are hard to debug without proper logging.
## Logging Guidelines
1. **Log function entry/exit** with parameters and return values
2. **Log state changes** - before and after mutations
3. **Log external calls** - API requests, database queries, file operations
4. **Log error context** - include relevant variables, not just error message
5. **Use structured logging** when possible (JSON format)
## Example Pattern
```typescript
function processOrder(order: Order): Result {
console.log('[processOrder] START', { orderId: order.id, items: order.items.length });
try {
const validated = validateOrder(order);
console.log('[processOrder] Validation passed', { validated });
const result = submitToPayment(validated);
console.log('[processOrder] Payment result', { success: result.success, transactionId: result.id });
return result;
} catch (error) {
console.error('[processOrder] ERROR', { orderId: order.id, error: error.message, stack: error.stack });
throw error;
}
}
```
## Log Management Requirements
**Logs must be configurable and manageable:**
1. **Use log levels** - DEBUG, INFO, WARN, ERROR
2. **Environment-based control** - LOG_LEVEL env variable
3. **Easy to disable** - single flag or env var to turn off verbose logs
4. **Consider rotation** - for file-based logs, implement rotation or use existing tools
```typescript
// Good: Configurable logging
const LOG_LEVEL = process.env.LOG_LEVEL || 'debug';
const logger = createLogger({ level: LOG_LEVEL });
// Good: Can be disabled
if (process.env.DEBUG) {
console.log('[debug]', data);
}
// Bad: Hardcoded verbose logs that can't be turned off
console.log(hugeObject); // Will pollute production logs
```
## Why This Matters
- AI-generated code may have edge cases not covered
- Logs help identify WHERE things go wrong
- Debugging without logs wastes significant time
- User can remove logs later if needed, but missing logs during development is costly
- **Production safety** - logs must be reducible to avoid performance issues and storage costs
**DO NOT skip logging to "keep code clean" - verbose logging is REQUIRED during implementation, but MUST be configurable.**
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |