[SKILL] Build a Hermes skill for artisan-style structured code generation #21

Open
opened 2026-04-04 16:03:47 +00:00 by bezalel · 0 comments
Owner

Summary

Create a reusable 'Hermes' skill module that Bezalel can invoke to generate well-structured code following artisan principles: clear intent, proper error handling, documentation, and tests included by default.

Motivation

Code generation is a core wizard capability, but without a structured approach, output quality varies. A Hermes skill codifies best practices into a repeatable, improvable process. Named after the messenger god - it translates intent into artifact.

Acceptance Criteria

  • Skill definition at scripts/skills/hermes_codegen.py (or .sh)
  • Accepts these inputs:
    • --language: target language (python, bash, javascript)
    • --intent: plain-English description of what the code should do
    • --style: coding style (minimal, production, prototype)
    • --output: output file path
  • Generated code always includes:
    • File header with purpose, author (bezalel), date, and intent
    • Input validation and error handling
    • At least one usage example in comments
    • Type hints (for Python) or equivalent
  • When --style production is used, also generates:
    • Companion test file (*_test.py or *.test.js)
    • Docstrings/JSDoc for all public functions
    • Logging setup
  • Uses local Ollama/Gemma when available, falls back to Claude API
  • Logs each generation to forge-log with the intent and output path
  • At least 3 example outputs in entries/hermes-examples/ showing the skill in action

Implementation Notes

  • Start simple: a prompt template + API call + post-processing
  • The skill should be invocable both as CLI and as importable Python module
  • Consider a skills/ directory in forge-log for all reusable skill definitions

Definition of Done

python scripts/skills/hermes_codegen.py --language python --intent 'Parse CSV and output JSON' --style production produces a working, well-documented Python script with tests.

## Summary Create a reusable 'Hermes' skill module that Bezalel can invoke to generate well-structured code following artisan principles: clear intent, proper error handling, documentation, and tests included by default. ## Motivation Code generation is a core wizard capability, but without a structured approach, output quality varies. A Hermes skill codifies best practices into a repeatable, improvable process. Named after the messenger god - it translates intent into artifact. ## Acceptance Criteria - [ ] Skill definition at `scripts/skills/hermes_codegen.py` (or .sh) - [ ] Accepts these inputs: - `--language`: target language (python, bash, javascript) - `--intent`: plain-English description of what the code should do - `--style`: coding style (minimal, production, prototype) - `--output`: output file path - [ ] Generated code always includes: - File header with purpose, author (bezalel), date, and intent - Input validation and error handling - At least one usage example in comments - Type hints (for Python) or equivalent - [ ] When `--style production` is used, also generates: - Companion test file (`*_test.py` or `*.test.js`) - Docstrings/JSDoc for all public functions - Logging setup - [ ] Uses local Ollama/Gemma when available, falls back to Claude API - [ ] Logs each generation to forge-log with the intent and output path - [ ] At least 3 example outputs in `entries/hermes-examples/` showing the skill in action ## Implementation Notes - Start simple: a prompt template + API call + post-processing - The skill should be invocable both as CLI and as importable Python module - Consider a `skills/` directory in forge-log for all reusable skill definitions ## Definition of Done `python scripts/skills/hermes_codegen.py --language python --intent 'Parse CSV and output JSON' --style production` produces a working, well-documented Python script with tests.
bezalel self-assigned this 2026-04-04 16:03:47 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bezalel/forge-log#21