mirror of
https://github.com/fscotto/infra.git
synced 2026-11-26 21:59:50 +00:00
Compare commits
3 Commits
94eb555ff3
...
3f3781437b
| Author | SHA1 | Date | |
|---|---|---|---|
| 3f3781437b | |||
| 52c3615d26 | |||
| 4df3067c38 |
11
AGENTS.md
11
AGENTS.md
@@ -7,7 +7,7 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, Fedora
|
|||||||
- Inventory and layering inputs: `ansible/inventory/hosts.yml`, `ansible/inventory/group_vars/*.yml`, `ansible/inventory/host_vars/*.yml`
|
- Inventory and layering inputs: `ansible/inventory/hosts.yml`, `ansible/inventory/group_vars/*.yml`, `ansible/inventory/host_vars/*.yml`
|
||||||
- Dotfiles live under `dotfiles/`
|
- Dotfiles live under `dotfiles/`
|
||||||
- AI agent instructions (bootstrap, dispatcher, knowledge, rules, patterns) are centralized in `dotfiles/common/.config/ai/` and shared between OpenCode, Codex, Gemini CLI, and Cline.
|
- AI agent instructions (bootstrap, dispatcher, knowledge, rules, patterns) are centralized in `dotfiles/common/.config/ai/` and shared between OpenCode, Codex, Gemini CLI, and Cline.
|
||||||
- OpenCode loads its entrypoint configuration from `dotfiles/common/.config/opencode/opencode.json`; Codex global instructions deploy from `dotfiles/common/.codex/AGENTS.md`; Cline global instructions deploy from the cross-tool `dotfiles/common/.agents/AGENTS.md` (to `~/.agents/AGENTS.md`).
|
- OpenCode loads its entrypoint configuration from `dotfiles/common/.config/opencode/opencode.json`; Codex global instructions deploy from `dotfiles/common/.codex/AGENTS.md`; Cline deploys both the cross-tool `dotfiles/common/.agents/AGENTS.md` pointer (to `~/.agents/AGENTS.md`) and the always-on global rule `dotfiles/common/.cline/rules/ai-context.md` (to `~/.cline/rules/`), which auto-binds the deployed `bootstrap.md`, dispatcher, safety directives, and distilled ChatGPT knowledge.
|
||||||
- Codex config is rendered from `dotfiles/common/.codex/config.toml.j2` so `model_instructions_file` points to the deployed `~/.config/ai/bootstrap.md`.
|
- Codex config is rendered from `dotfiles/common/.codex/config.toml.j2` so `model_instructions_file` points to the deployed `~/.config/ai/bootstrap.md`.
|
||||||
- ChatGPT conversation memory is stored in `dotfiles/common/.config/ai/memory/chatgpt/` and regenerated incrementally by `scripts/chatgpt_export_to_memory.py` from an official ChatGPT data export.
|
- ChatGPT conversation memory is stored in `dotfiles/common/.config/ai/memory/chatgpt/` and regenerated incrementally by `scripts/chatgpt_export_to_memory.py` from an official ChatGPT data export.
|
||||||
|
|
||||||
@@ -29,9 +29,10 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, Fedora
|
|||||||
- Keep completed one-time cleanup operations out of the playbook. Execute them directly
|
- Keep completed one-time cleanup operations out of the playbook. Execute them directly
|
||||||
with explicit authorization; retain only the ongoing desired-state configuration and
|
with explicit authorization; retain only the ongoing desired-state configuration and
|
||||||
historical documentation, not permanent cleanup flags or tasks.
|
historical documentation, not permanent cleanup flags or tasks.
|
||||||
- Use Git Flow branch prefixes: `feature/` for new functionality, `bugfix/` for non-urgent fixes,
|
- Use trunk-based development: `main` is the single long-lived branch. Land small,
|
||||||
`hotfix/` for urgent production fixes, `release/` for release preparation, and `support/` for
|
validated changes quickly, either as direct commits or via short-lived branches merged
|
||||||
maintained release lines. Do not use abbreviated prefixes such as `feat/`.
|
as soon as validation passes. Do not maintain `release/`, `support/`, or other
|
||||||
|
long-lived branch lines: tag releases from the trunk and fix production issues on it.
|
||||||
- Desktop and WSL hosts use `ansible_connection: local`; remote infrastructure hosts use SSH.
|
- Desktop and WSL hosts use `ansible_connection: local`; remote infrastructure hosts use SSH.
|
||||||
- Treat `secrets/` as sensitive. Never print secret values.
|
- Treat `secrets/` as sensitive. Never print secret values.
|
||||||
- Tmux plugins are bootstrapped by TPM on the host; the repo only keeps tmux config and custom helper scripts.
|
- Tmux plugins are bootstrapped by TPM on the host; the repo only keeps tmux config and custom helper scripts.
|
||||||
@@ -104,6 +105,8 @@ Ansible-driven personal infrastructure repo for Fedora and Void desktops, Fedora
|
|||||||
- Prefer declarative modules over `command`/`shell`; when `shell` is required, make idempotency and failure behavior explicit.
|
- Prefer declarative modules over `command`/`shell`; when `shell` is required, make idempotency and failure behavior explicit.
|
||||||
- Start YAML files with `---`, use 2-space indentation, and keep file modes quoted like `"0644"`.
|
- Start YAML files with `---`, use 2-space indentation, and keep file modes quoted like `"0644"`.
|
||||||
- Keep booleans as booleans and structured vars as YAML lists/maps.
|
- Keep booleans as booleans and structured vars as YAML lists/maps.
|
||||||
|
- Group similar tasks into list variables (typically in `group_vars`) and apply them
|
||||||
|
with a single task looping over the list, rather than one near-identical task per item.
|
||||||
- Put host-specific overrides in `host_vars`, not shared `group_vars`.
|
- Put host-specific overrides in `host_vars`, not shared `group_vars`.
|
||||||
- Use `no_log: true` for secret-bearing task inputs or outputs.
|
- Use `no_log: true` for secret-bearing task inputs or outputs.
|
||||||
|
|
||||||
|
|||||||
@@ -609,8 +609,12 @@ context), `AGENTS.md` (task-specific file dispatcher), plus `knowledge/`,
|
|||||||
`instructions` array in `opencode.json`, Codex through `model_instructions_file`
|
`instructions` array in `opencode.json`, Codex through `model_instructions_file`
|
||||||
plus the global `~/.codex/AGENTS.md`, Gemini CLI through its settings context
|
plus the global `~/.codex/AGENTS.md`, Gemini CLI through its settings context
|
||||||
files, Claude Code through the `@` imports in `~/.claude/CLAUDE.md`, and Cline
|
files, Claude Code through the `@` imports in `~/.claude/CLAUDE.md`, and Cline
|
||||||
through the cross-tool `~/.agents/AGENTS.md` pointer (deployed with
|
through both the cross-tool `~/.agents/AGENTS.md` pointer and the always-on
|
||||||
`cline_deploy_enabled: true`).
|
global rule `~/.cline/rules/ai-context.md`, which binds `bootstrap.md`, the
|
||||||
|
dispatcher, the safety directives, and the distilled ChatGPT knowledge under
|
||||||
|
`memory/chatgpt/` (both deployed with `cline_deploy_enabled: true`). Cline
|
||||||
|
shows the rule in its Rules panel as `global:ai-context`, where it can be
|
||||||
|
toggled per project.
|
||||||
|
|
||||||
ChatGPT conversation memory lives in
|
ChatGPT conversation memory lives in
|
||||||
`dotfiles/common/.config/ai/memory/chatgpt/`: one Markdown transcript per
|
`dotfiles/common/.config/ai/memory/chatgpt/`: one Markdown transcript per
|
||||||
|
|||||||
@@ -170,6 +170,7 @@ ai_agents_dotfiles:
|
|||||||
- opencode
|
- opencode
|
||||||
- codex
|
- codex
|
||||||
- gemini_cli
|
- gemini_cli
|
||||||
|
- cline
|
||||||
- name: Gemini CLI config
|
- name: Gemini CLI config
|
||||||
src: .gemini/
|
src: .gemini/
|
||||||
dest: .gemini/
|
dest: .gemini/
|
||||||
@@ -200,6 +201,12 @@ ai_agents_dotfiles:
|
|||||||
mode: "0644"
|
mode: "0644"
|
||||||
agents:
|
agents:
|
||||||
- cline
|
- cline
|
||||||
|
- name: Cline global rules
|
||||||
|
src: .cline/rules/
|
||||||
|
dest: .cline/rules/
|
||||||
|
mode: preserve
|
||||||
|
agents:
|
||||||
|
- cline
|
||||||
|
|
||||||
ai_agents_templates:
|
ai_agents_templates:
|
||||||
- name: Codex config
|
- name: Codex config
|
||||||
|
|||||||
23
dotfiles/common/.cline/rules/ai-context.md
Normal file
23
dotfiles/common/.cline/rules/ai-context.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# Deployed global AI context
|
||||||
|
|
||||||
|
The standing AI context for this user is deployed by the Ansible-managed
|
||||||
|
dotfiles under `~/.config/ai/` and is maintained in the infrastructure
|
||||||
|
repository. Cline binds to it automatically in every project through this
|
||||||
|
global rule.
|
||||||
|
|
||||||
|
- Operating context: read `~/.config/ai/bootstrap.md` first. It carries the
|
||||||
|
persistent mental model: core principles, system and infrastructure models,
|
||||||
|
and agent behavior.
|
||||||
|
- Safety directives: apply `~/.config/ai/rules/safety.md`.
|
||||||
|
- Task-specific loading: follow the dispatcher `~/.config/ai/AGENTS.md` and
|
||||||
|
read only the files relevant to the current task from `knowledge/`, `rules/`,
|
||||||
|
and `patterns/`. Do not preemptively load all task-specific files.
|
||||||
|
- Distilled knowledge: for prior decisions, history, and stable preferences,
|
||||||
|
start from `~/.config/ai/memory/chatgpt/INDEX.md` and read the matching
|
||||||
|
topic file under `~/.config/ai/memory/chatgpt/knowledge/`. When that is not
|
||||||
|
enough, search the full transcripts with
|
||||||
|
`rg -i "<keyword>" ~/.config/ai/memory/chatgpt/transcripts/`.
|
||||||
|
|
||||||
|
These deployed files are managed state: never record session-specific notes in
|
||||||
|
them. Update them in the source infrastructure repository instead, so the next
|
||||||
|
playbook run converges the change everywhere.
|
||||||
@@ -4,3 +4,4 @@
|
|||||||
- Keep tasks idempotent
|
- Keep tasks idempotent
|
||||||
- Use group_vars and host_vars properly
|
- Use group_vars and host_vars properly
|
||||||
- Avoid duplication
|
- Avoid duplication
|
||||||
|
- Group similar tasks into list variables and apply them with a single looping task
|
||||||
|
|||||||
Reference in New Issue
Block a user