Skip to content

fix(ai): make the committed AI usage prompt a function of the code - #110

Merged
f3rdy merged 5 commits into
masterfrom
fix/issue-105-ai-prompt-defaults
Aug 13, 2026
Merged

f3rdy merged 5 commits into
masterfrom
fix/issue-105-ai-prompt-defaults

Conversation

@f3rdy

@f3rdy f3rdy commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Fixes #105.

Stacked on #108, which is stacked on #107; GitHub retargets this to master as the
lower PRs merge.

The defect

ai usage-prompt renders ~/.config/budjira/ai-prompt-template.toml when that file
exists, and load_ai_prompt_template() writes that file on first use. The documented
regeneration command therefore produces different output per machine, and
scripts/check_ai_prompt.py built its baseline with the same command - so on a
machine with a stale local template it compared one stale rendering against another
and reported the committed file as up to date while it was missing documented
features.

The change

  • ai usage-prompt --defaults renders the built-in template and never touches the
    local overlay, so a file checked into a repository is a function of the installed
    version. The overlay stays the default for interactive use.
  • the freshness hook generates its baseline with --defaults, and its reminder text
    is derived from the command it actually runs, so the two cannot drift apart again.
  • CLAUDE.md documents the flag as mandatory for regeneration, with the reason.
  • the built-in template gains the --description-dialect option on create issue
    and issue update, so the committed prompt is reproducible from code rather than
    hand-maintained.

Verification

On a machine carrying a stale local template:

local template vs built-in defaults : 97 diff lines
built-in defaults vs committed file : 0 diff lines

997 tests pass, all pre-commit hooks green. New tests: --defaults does not render
the local template (and the flagless call still does), the built-in template documents
the options the CLI offers, and the hook's baseline command carries --defaults and
matches its own reminder text.

f3rdy added 5 commits August 13, 2026 16:40
_serialize_connection() never wrote board_id, so a board configured for
sprint operations was dropped on every save. It now round-trips like the
other optional fields: written when set, omitted when unset.

Refs #108
"connect add" rebuilt the connection from the four values it prompts for, so
updating a URL, email or project key silently reset Tempo, custom fields, the
board, the AI prompt and the cache settings to their defaults. The stored
connection is now carried forward and only the given values are changed.

Fixes #108
"ai usage-prompt" renders ~/.config/budjira/ai-prompt-template.toml when that
file exists, which makes the output machine-dependent. --defaults renders the
built-in template instead, so a copy checked into a repository is a function of
the installed version. The user template overlay stays the default for
interactive use.

Refs #105
The freshness hook built its baseline with the same command it recommends, so
on a machine with a stale local template it compared one stale rendering
against another and reported the file as up to date while it was missing
documented features. Both sides now use --defaults, and the reminder text is
derived from the command that is actually run.

Fixes #105
The option lists for "create issue" and "issue update" were carrying the flag
only in the generated file. Putting it in the template makes the generated
copy reproducible from the code.

Refs #106
@f3rdy
f3rdy changed the base branch from fix/issue-108-connection-write-path to master August 13, 2026 15:50
@f3rdy
f3rdy merged commit bd1a24d into master Aug 13, 2026
@f3rdy
f3rdy deleted the fix/issue-105-ai-prompt-defaults branch August 13, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ai usage-prompt renders the local template, so the checked-in AI docs are machine-dependent

1 participant