feat: add prompt file
2026-10-06_generate-task-template-help-rows-from-library-md.md
This commit is contained in:
1 file changed
+74
@@ -0,0 +1,74 @@
|
||||
---
|
||||
commit_ref: 6d35689c156d2b37a7707939729c26155ba30c09
|
||||
title: "Generate task.template help rows from library.md"
|
||||
author: "Janik von Rotz <login@janikvonrotz.ch>"
|
||||
state: completed
|
||||
date_completed: 2026-10-06
|
||||
model: moonshotai/Kimi-K2.6
|
||||
input_tokens: 1101172
|
||||
output_tokens: 19965
|
||||
---
|
||||
|
||||
# Generate task.template help rows from library.md
|
||||
|
||||
Note: @Clanker refers to the "ai agent" (you) who is working on this prompt file.
|
||||
|
||||
@Clanker when working on this prompt file, make sure to:
|
||||
|
||||
- Read context and task section first
|
||||
- Prepare a list of todos
|
||||
- Update the todo list while working on task
|
||||
|
||||
## Context
|
||||
|
||||
@Clanker Read the `AGENTS.md` and `README.md` to get an understanding of the project.
|
||||
|
||||
## Task
|
||||
|
||||
Create a new command `task update-task-template-help`. This command reads the `docs/library.md` and parses it using the markers.
|
||||
|
||||
````markdown
|
||||
<!-- ===Task=== -->
|
||||
|
||||
### clone-taskfile
|
||||
|
||||
```bash
|
||||
rows+=("clone-taskfile||Clone the taskfile.build repo.")
|
||||
```
|
||||
|
||||
...
|
||||
|
||||
<!-- ===Task=== -->
|
||||
````
|
||||
|
||||
The first `===` marker signals the start of a section. Append the help rows. The second `===` marker signals the end.
|
||||
|
||||
It then replaces all `rows+=` instructions in `task.template`:
|
||||
|
||||
```bash
|
||||
rows+=("===Task===| | ")
|
||||
rows+=("clone-taskfile||Clone the taskfile.build repo.")
|
||||
...
|
||||
rows+=("===Files===| | ")
|
||||
...
|
||||
```
|
||||
|
||||
Ensure that all commands in `bin` have help row. And vice-versa ensure that there no help rows without script.
|
||||
|
||||
## Worklog
|
||||
|
||||
Implemented `update-task-template-help` command in the `task` script. The command:
|
||||
|
||||
1. Reads `docs/library.md` and parses `rows+=` lines between section markers (`<!-- ===Section=== -->`).
|
||||
2. Generates section headers in the format `rows+=("===Section===| | ")`.
|
||||
3. Replaces the existing rows block in `task.template` between the header row and the `for row in` loop.
|
||||
4. Performs a consistency check comparing all executable scripts in `bin/` against the parsed help rows.
|
||||
5. Reports any missing help rows (bin scripts without documentation) or orphaned rows (help rows without a matching bin script).
|
||||
|
||||
Also fixed documentation inconsistencies in `docs/library.md`:
|
||||
- Added missing commands: `init-dotenv-dir`, `copy-to-clipboard`, `pull-all-repos`, `status-all-repos`, `unshallow-git-folder`.
|
||||
- Fixed renamed script reference: `backup-dotenv-files` → `backup-env-files`.
|
||||
- Fixed typo in Environment section marker: `Enviroment` → `Environment`.
|
||||
- Fixed typo in `copy-dotenv` description.
|
||||
|
||||
After the fixes, running `./task update-task-template-help` completes with no warnings, confirming full consistency between `bin/` scripts and `docs/library.md` help rows. Both `task` and `task.template` pass `shellcheck`.
|
||||
Reference in new issue
Block a user