Skip to content

docs(ai): add ai-prompts-runbook for operator prompts lifecycle (v1.13.0)#307

Merged
alexandervazquez98 merged 3 commits into
mainfrom
docs/ai-prompts-runbook
Jun 21, 2026
Merged

docs(ai): add ai-prompts-runbook for operator prompts lifecycle (v1.13.0)#307
alexandervazquez98 merged 3 commits into
mainfrom
docs/ai-prompts-runbook

Conversation

@alexandervazquez98

Copy link
Copy Markdown
Owner

Summary

Adds docs/ai-prompts-runbook.md documenting the three-layer model for AI prompt files introduced in v1.13.0:

  1. Bundled defaultsbackend/ai/ (tracked code, read-only seed source)
  2. Operator folder.docker/ai/ or .ai/ (gitignored, editable data)
  3. Container view/data/ai/ inside nexgen_backend (live bind-mount)

Why

The pattern is documented in code (backend/ai/README.md) but the two
AI_PROMPTS_DIR vs AI_PROMPTS_DIR_HOST variables, the deploy/git-pull
guarantees, and the root:root permissions gotcha were easy to get wrong.
This runbook makes the operator workflow auditable in one place.

What's in the runbook

  • Mermaid flowchart of the three layers
  • Mermaid sequence diagram of the edit → reload cycle
  • AI_PROMPTS_DIR vs AI_PROMPTS_DIR_HOST table (with the common mistake)
  • Local dev vs Docker workflows with example .env
  • Deploy / git-pull behavior table (what survives what)
  • Permissions gotcha verified on the .22 server + two fix options
  • Audit trail (pre-1.13.0 backups left by safe-rebuild.sh)
  • Troubleshooting (5 common scenarios)
  • Quick-reference sha256sum one-liners

Out of scope

  • No code changes.
  • No SDD apply — this is documentation only.
  • Does not change any operator behavior.

Refs: openspec/changes/ai-chat-markdown-policies/

…3.0)

Documents the three-layer model (bundled / operator / container) and the
AI_PROMPTS_DIR / AI_PROMPTS_DIR_HOST contract introduced in v1.13.0.
Includes Mermaid diagrams for the layer flow and edit sequence, deploy/
git-pull guarantees, the root:root permissions gotcha verified on the
.22 server, and a quick-reference sha256sum command set.

No code changes. Does not affect any SDD change apply state.

Refs: openspec/changes/ai-chat-markdown-policies/
Alex and others added 2 commits June 21, 2026 15:06
Re-run CI after the cd.yml shellcheck fix landed on main to confirm
actionlint and lint-verify (PR1 gate) turn green for this branch.
@alexandervazquez98 alexandervazquez98 added the type:docs Documentation only label Jun 21, 2026
@alexandervazquez98 alexandervazquez98 merged commit e334e95 into main Jun 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:docs Documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant