logoalt Hacker News

JohnKemenyyesterday at 2:51 PM2 repliesview on HN

I have developed my personal agentic file format `.ag` for this purpose.

Here is the template I start with:

    #!/usr/bin/env gpt-agent
     
    input: <target/context (e.g., cwd)>
     
    task: |
      <one clear objective>
     
    output: |
      <deliverables + required format>
     
    require:
      - <must be true before start; otherwise stop + report>
     
    invariant:
      - <must stay true while working (scope + safety)>
     
    ensure:
      - <must be true at the end (definition of done)>
     
    rescue: |
      <what to do if any requirement/invariant/ensure cannot be met>

Replies

jedwhiteyesterday at 4:36 PM

Thanks for this. I find templates helpful too, and that's a neat structure. I use templates heavily with Obsidian for non-code tasks also. If you want to try it out, you can use this with the claude-run tooling with flags etc with files using your `.ag` extension with the modified shebang.

`#!/usr/bin/env claude-run --permission-mode bypassPermissions`

Or use the .ag files you have unmodified:

`claude-run --opus --vercel task.ag`

nullpoint420yesterday at 4:35 PM

Great idea, this reminds me of a Makefile! However, I do dread the cmake version of this that will nevertheless emerge in the next 10 years.