Skip to content

Commit 98ca9cd

Browse files
committed
docs: expand prompt template section in README
1 parent d09012f commit 98ca9cd

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,34 @@ Each repo gets at most one concurrent worker to prevent conflicts. Failed issues
9494

9595
## Prompt Template
9696

97-
On first run, issuebot writes a default prompt template to `~/.issuebot/prompt.tmpl`. Edit it to customise how issues are presented to your command. Available template fields:
97+
The prompt template controls what your command receives as input. On first run, issuebot writes a default template to `~/.issuebot/prompt.tmpl`. Use `--prompt-file` to specify a different path.
98+
99+
The template uses Go's [text/template](https://pkg.go.dev/text/template) syntax. The rendered output is passed to your `--command` via stdin (or substituted into `{prompt}`).
100+
101+
**Default template:**
102+
103+
```
104+
You are working through a GitHub issue queue autonomously.
105+
The repo is: {{.Repo}}
106+
107+
GitHub Issue #{{.Number}}: {{.Title}}
108+
109+
{{.Body}}
110+
111+
Steps:
112+
1. Read the issue carefully. Implement the changes needed to resolve it.
113+
2. Run tests (check package.json / Makefile / go.mod for how).
114+
3. Commit with a descriptive message referencing the issue number.
115+
4. Push to origin.
116+
5. Close the issue: gh issue close {{.Number}} --repo {{.Repo}} --comment "Resolved in $(git rev-parse --short HEAD)"
117+
6. Output exactly: ISSUE_RESOLVED #{{.Number}}
118+
119+
If you cannot resolve the issue, output exactly: ISSUE_FAILED #{{.Number}} with a brief explanation.
120+
```
121+
122+
The `ISSUE_FAILED` marker is important — if the command output contains it, issuebot marks the issue as failed and retries later.
123+
124+
**Available fields:**
98125

99126
| Field | Description |
100127
|-------|-------------|

0 commit comments

Comments
 (0)