Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions scratchpad/dev.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Developer Instructions

**Version**: 2.6
**Last Updated**: 2026-02-20
**Version**: 2.7
**Last Updated**: 2026-02-22
**Purpose**: Consolidated development guidelines for GitHub Agentic Workflows

This document consolidates specifications from the scratchpad directory into unified developer instructions. It provides architecture patterns, security guidelines, code organization rules, and testing practices.
Expand Down Expand Up @@ -597,6 +597,28 @@ func generateAttribution(workflowName, runURL string, issue int) string {
}
```

### TypeScript Type Definitions for Handlers

Safe output handler development is supported by TypeScript type definitions in `actions/setup/js/types/`:

| File | Purpose |
|------|---------|
| `handler-factory.d.ts` | Types for `HandlerFactoryFunction`, `MessageHandlerFunction`, `HandlerConfig`, `HandlerResult` |
| `safe-outputs.d.ts` | JSONL output item types for all safe output operations |
| `safe-outputs-config.d.ts` | Configuration interfaces for each safe output type (e.g., `CreateIssueConfig`) |
| `github-script.d.ts` | GitHub Script context types available in handler functions |

**Handler Factory Pattern** (typed):
```typescript
// A handler main() function follows this signature
const main: HandlerFactoryFunction = async (config?: HandlerConfig): Promise<MessageHandlerFunction> => {
return async (message: any, resolvedTemporaryIds: ResolvedTemporaryIds): Promise<HandlerResult> => {
// process message
return { success: true };
};
};
```

---

## Testing Guidelines
Expand Down Expand Up @@ -1782,6 +1804,7 @@ type Everything interface {
---

**Document History**:
- v2.7 (2026-02-22): Fixed 3 tone issues (engine-review-summary.md: removed 'production-ready' and 'Easy to understand and follow'; go-type-patterns.md: replaced 'Easy refactoring'; serena-tools-quick-reference.md: replaced '✓ Perfect' with '✓ Complete'), added TypeScript type definitions section for safe output handler development (PR #17605)
- v2.6 (2026-02-20): Fixed 8 tone issues across 4 spec files, documented post-processing extraction pattern and CLI flag propagation rule from PR #17316, analyzed 61 files
- v2.5 (2026-02-19): Fixed 6 tone issues in engine review docs, added Engine-Specific MCP Config Delivery section (Gemini pattern), analyzed 61 files
- v2.4 (2026-02-17): Quality verification - analyzed 4 new files, zero tone issues found across all 61 files
Expand Down
4 changes: 2 additions & 2 deletions scratchpad/engine-review-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,13 +273,13 @@ All implementations follow established patterns and are thoroughly tested.

## Conclusion

The agentic engine architecture is **production-ready**. It follows SOLID principles, has comprehensive test coverage, and provides clear extensibility patterns through:
The agentic engine architecture follows SOLID principles, has comprehensive test coverage, and provides clear extensibility patterns through:

1. **Interface Segregation**: Focused interfaces composed together
2. **BaseEngine Defaults**: Sensible defaults for all methods
3. **Shared Helpers**: Reduce duplication and ensure consistency
4. **Comprehensive Testing**: Automated validation of compliance
5. **Clear Patterns**: Easy to understand and follow
5. **Clear Patterns**: Consistent interfaces with documented extension points

The architecture **requires no structural changes**. The only gap was comprehensive documentation for adding new engines, which has been addressed with:

Expand Down
2 changes: 1 addition & 1 deletion scratchpad/go-type-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type Version string
- Self-documenting code - the type name explains the purpose
- Type safety - prevents mixing different concepts that share the same underlying type
- Clear intent - signals to readers what the value represents
- Easy refactoring - can change underlying implementation without affecting API
- Enables refactoring without breaking API contracts - underlying implementation can change independently

### Examples in Codebase

Expand Down
2 changes: 1 addition & 1 deletion scratchpad/serena-tools-quick-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
|--------|-------|--------|
| Total Tool Calls | 44 | ✓ |
| Serena Tool Calls | 9 (20.45%) | ⚠️ Low |
| Response Rate | 100% | ✓ Perfect |
| Response Rate | 100% | ✓ Complete |
| Tools Registered | 23 | - |
| Tools Used | 6 (26.09%) | ⚠️ Low adoption |
| Most Used Tool | Bash (17 calls) | - |
Expand Down