docs: reorganize configuration guides
CI / Capabilities and shell quality (push) Successful in 21s
CI / Python tests and compilation (push) Failing after 35s
CI / Build and inspect generated packages (push) Skipped
CI / Bash integration and installation guards (push) Skipped
CI / Installed client configuration smoke tests (push) Skipped
CI / Qwen retrieval integration (push) Skipped
CI / PowerShell tests on Ubuntu (push) Failing after 14s
CI / CI configuration security checks (push) Successful in 4s

This commit is contained in:
fraujulian committed 2026-09-18 11:38:30 +02:00
1 parent 145169dea8
commit 023d1610ba
5 files changed
+145 -135

No files matched your search

+3 -3
View File
@@ -36,8 +36,8 @@ Write all repository content, generated instructions, scripts, prompts, document
## Workflow
- Choose the smallest sufficient verification based on the change's behavior, affected consumers, risk, and remaining uncertainty. Inspection may suffice for low-risk changes; full builds, test suites, and independent reviews are not automatic.
- Run `scripts/build.ps1 -Summary` to regenerate packages when shared definitions, adapters, or generation logic change. This generates configuration packages; it does not require building applications that use them.
- Run `scripts/doctor.ps1 -Summary` when installation, client configuration, hooks, or environment changes need its checks. Changes to instruction wording alone do not require it.
- Run `scripts/commands/build.ps1 -Summary` to regenerate packages when shared definitions, adapters, or generation logic change. This generates configuration packages; it does not require building applications that use them.
- Run `scripts/commands/doctor.ps1 -Summary` when installation, client configuration, hooks, or environment changes need its checks. Changes to instruction wording alone do not require it.
- Run focused script tests when script behavior changes. Broaden or repeat checks only when failures, affected dependencies, or unresolved risks justify it.
- Preserve backward compatibility where practical.
- Keep changes focused on the requested configuration behavior.
@@ -52,7 +52,7 @@ Write all repository content, generated instructions, scripts, prompts, document
## Installation and security
- Do not install global configuration automatically.
- Perform global installation only after explicit user instruction, using `scripts/install.ps1` so replaced managed files are backed up.
- Perform global installation only after explicit user instruction, using `scripts/commands/install.ps1` so replaced managed files are backed up.
- Do not add project-specific rules, secrets, credentials, authentication state, or generated runtime state.
## Version control
+60 -131
View File
@@ -18,27 +18,27 @@ Check the selected shell's minimum version and required Python and `jq` tools be
PowerShell:
```powershell
.\scripts\check-capabilities.ps1
.\scripts\commands\check-capabilities.ps1
```
Bash:
```bash
./scripts/check-capabilities.sh
./scripts/commands/check-capabilities.sh
```
## Quickstart
With the [requirements](#requirements) installed, clone the repository, build it, then install it.
Stop if any command fails. Installation asks for the shell, client, CLI update, Flashbang, and extension choices.
Stop if any command fails. Installation asks for the shell, client, CLI update, Flashbang, Qwen retrieval, and extension choices.
PowerShell:
```powershell
git clone https://git.lechner-systems.at/fraujulian/MyAiConfiguration.git
cd MyAiConfiguration
.\scripts\build.ps1 -Summary
.\scripts\install.ps1 -Summary
.\scripts\commands\build.ps1 -Summary
.\scripts\commands\install.ps1 -Summary
```
Bash:
@@ -46,55 +46,40 @@ Bash:
```bash
git clone https://git.lechner-systems.at/fraujulian/MyAiConfiguration.git
cd MyAiConfiguration
./scripts/build.sh --summary
./scripts/install.sh --summary
./scripts/commands/build.sh --summary
./scripts/commands/install.sh --summary
```
For an already-installed configuration, use Quickupdate instead.
## Quickupdate
Run these commands from the repository root. Quick reuses the shell, client, CLI update, Flashbang, and extension choices from the last
Run these commands from the repository root. Quick reuses the shell, client, CLI update, Flashbang, retrieval, and extension choices from the last
successful installation or update without opening selection menus. Stop if any command fails.
PowerShell:
```powershell
git pull --ff-only
.\scripts\build.ps1 -Summary
.\scripts\update.ps1 -Quick -Summary
.\scripts\commands\build.ps1 -Summary
.\scripts\commands\update.ps1 -Quick -Summary
```
Bash:
```bash
git pull --ff-only
./scripts/build.sh --summary
./scripts/update.sh --quick --summary
./scripts/commands/build.sh --summary
./scripts/commands/update.sh --quick --summary
```
If no selection has been saved yet, or it predates the CLI update and Flashbang options, Quick stops with a hint. Run `scripts/update.ps1` or `./scripts/update.sh` once
If no selection has been saved yet, or it predates a required option, Quick stops with a hint. Run `scripts/commands/update.ps1` or `./scripts/commands/update.sh` once
without Quick to save your choices. They are stored in `~/.my-ai-configuration/selection.json`; dry runs and failed
runs do not overwrite them. To change the selection later, run a normal update again. Quick does not automatically
select newly added plugins.
Install and update also rebuild internally; the explicit build above lets you check the packages before installation.
## Documentation
| Document | Contents |
| --- | --- |
| [Architecture](docs/architecture.md) | Shared sources, adapters, generated packages, and installation. |
| [Configuration](docs/configuration.md) | Client settings, permission defaults, status displays, and verification. |
| [Plugins](docs/plugins.md) | Plugin sources, selection, installation, updates, and removal. |
| [Hooks](docs/hooks.md) | Registered events, session-state helpers, notifications, and optional utilities. |
| [Agents](docs/agents.md) | Agent roles and when delegation is useful. |
| [Skills](docs/skills.md) | Skill categories and conditional rule loading. |
| [Codex adapter](adapters/codex/README.md) | Codex-specific configuration files. |
| [Claude Code adapter](adapters/claude/README.md) | Claude-specific configuration files. |
| [Hook package](shared/hooks/README.md) | Overview shipped with the hook scripts. |
| [Repository instructions](AI-Instructions.md) | Rules for maintaining this repository. |
## Features
- One shared source of truth for Codex and Claude Code.
@@ -113,10 +98,22 @@ Install and update also rebuild internally; the explicit build above lets you ch
never installed.
- User-level plugin installation for Ponytail, i-have-adhd, Superpowers, Context7, Caveman, QMD, Humanizer, Impeccable, and
Anthropic Frontend Design, with an interactive extension toggle during both install and update. Only extensions
integrations installed and recorded by this setup can be removed through deselection.
installed and recorded by this setup can be removed through deselection.
- Optional local semantic retrieval for both clients using Qwen3-Embedding-0.6B embeddings and Qwen3-Reranker-0.6B
reranking, disabled by default and removable through the install/update choice.
## Requirements
- PowerShell 5.1 or newer; PowerShell 7 is supported as well.
- Bash 4.3 or newer, with standard utilities such as `awk`, `sed`, and `sha256sum`.
- Python 3.11 or newer for configuration validation and task-state hooks/helpers (`python` for PowerShell scripts, `python3` for Bash scripts).
- `jq` for Claude's Bash status line; without it, that status line produces no output.
- Python `venv` and `pip` when the optional semantic retrieval layer is enabled.
- Node.js 22 or newer and `npm` when QMD or MCPorter is selected.
The Bash scripts do not require PowerShell. The PowerShell scripts remain compatible with PowerShell 5.1;
PowerShell 7 can also run them.
## Architecture
```text
@@ -128,7 +125,7 @@ shared definitions -> client adapters -> generated packages -> user installation
| `shared/` | Client-independent rules, agents, skills, hooks, status lines, and global instructions. |
| `adapters/` | Codex and Claude Code formats, settings, templates, and the plugin manifest. |
| `generated/` | Reproducible PowerShell and Bash packages. This directory is ignored by Git. |
| `scripts/` | Build, installation, update, diagnosis, and shell validation entry points. |
| [`scripts/`](docs/scripts.md) | Build, installation, update, diagnosis, and validation scripts. |
| `docs/` | Focused documentation about the configuration design. |
The build creates:
@@ -141,37 +138,42 @@ generated/
`-- claude-bash/
```
## Requirements
## Documentation
- PowerShell 5.1 or newer; PowerShell 7 is supported as well.
- Bash 4.3 or newer, with standard utilities such as `awk`, `sed`, and `sha256sum`.
- Python 3.11 or newer for configuration validation and task-state hooks/helpers (`python` for PowerShell scripts, `python3` for Bash scripts).
- `jq` for Claude's Bash status line; without it, that status line produces no output.
- Python `venv` and `pip` when the optional semantic retrieval layer is enabled.
- Node.js 22 or newer and `npm` when QMD is selected.
| Document | Contents |
| --- | --- |
| [Architecture](docs/architecture.md) | Shared sources, adapters, generated packages, and installation. |
| [Scripts](docs/scripts.md) | Commands, checks, tests, and internal script layout. |
| [Configuration](docs/configuration.md) | Client settings, permission defaults, status displays, and verification. |
| [Extending the configuration](docs/extending-configuration.md) | Add shared rules, skills, and agents. |
| [Plugins](docs/plugins.md) | Plugin sources, selection, installation, updates, and removal. |
| [Hooks](docs/hooks.md) | Registered events, session-state helpers, notifications, and optional utilities. |
| [Agents](docs/agents.md) | Agent roles and when delegation is useful. |
| [Skills](docs/skills.md) | Skill categories and conditional rule loading. |
| [Codex adapter](adapters/codex/README.md) | Codex-specific configuration files. |
| [Claude Code adapter](adapters/claude/README.md) | Claude-specific configuration files. |
| [Hook package](shared/hooks/README.md) | Overview shipped with the hook scripts. |
| [Repository instructions](AI-Instructions.md) | Rules for maintaining this repository. |
The Bash scripts do not require PowerShell. The PowerShell scripts remain compatible with PowerShell 5.1;
PowerShell 7 can also run them.
## Build
## Build Script
Run the matching command from the repository root:
PowerShell:
```powershell
.\scripts\build.ps1
.\scripts\commands\build.ps1
```
Bash:
```bash
./scripts/build.sh
./scripts/commands/build.sh
```
Rebuild when shared definitions, adapters, or generation logic change. Choose other verification according to the
change's risk; documentation-only edits do not require a build. Building writes reproducible packages below
`generated/` and may use temporary validation files; it does not install global user configuration.
## Installation
## Installation Script
The installer asks for the target shell and client, unless they are passed as parameters, then refuses to continue
if any selected destination is already installed (`Already installed, use the update script.`). Selecting PowerShell or
@@ -182,24 +184,24 @@ Preview an installation without changing user files, backups, or plugins:
PowerShell:
```powershell
.\scripts\install.ps1 -DryRun
.\scripts\commands\install.ps1 -DryRun
```
Bash:
```bash
./scripts/install.sh --dry-run
./scripts/commands/install.sh --dry-run
```
Install the selected configuration interactively:
PowerShell:
```powershell
.\scripts\install.ps1
.\scripts\commands\install.ps1
```
Bash:
```bash
./scripts/install.sh
./scripts/commands/install.sh
```
Omitting either target parameter opens its selection prompt. There is no automatic shell default.
@@ -230,7 +232,7 @@ not (for example, installed through a native installer or another package manage
in place with a warning, and only a fresh `npm install -g` is run alongside it. Codex is skipped with a warning while
`codex.exe` is running. A dry run never asks this question and never previews it, since the choice is not persisted.
## Update
## Update Script
Once a destination is installed, use the update script (not the installer) to refresh its files and plugins. It refuses
to continue if any selected destination is not installed yet (`Not installed, use the install script.`), also skipped
@@ -238,20 +240,20 @@ for a dry run.
PowerShell:
```powershell
.\scripts\update.ps1
.\scripts\commands\update.ps1
```
Bash:
```bash
./scripts/update.sh
./scripts/commands/update.sh
```
It accepts the same `-DryRun`/`--dry-run`, `-Client`/`--client`, and `-Shell`/`--shell` parameters as the
installer, re-syncs every managed file, and lets you revise the CLI update, Flashbang, and extension choices.
installer, re-syncs every managed file, and lets you revise the CLI update, Flashbang, retrieval, and extension choices.
Selected extensions are installed or updated. Deselection removes only extensions recorded as installed by this
setup; pre-existing or manually installed extensions are retained. Quickupdate reuses the saved choices.
## Uninstall
## Uninstall Script
Remove everything this setup previously installed for the selected client(s): managed files tracked in each
destination's manifest, extensions and skills recorded in the extension ledger, an enabled semantic retrieval setup,
@@ -259,12 +261,12 @@ and the saved Quickupdate selection (once no destination remains installed for a
PowerShell:
```powershell
.\scripts\uninstall.ps1
.\scripts\commands\uninstall.ps1
```
Bash:
```bash
./scripts/uninstall.sh
./scripts/commands/uninstall.sh
```
Omitting `-Client`/`--client` opens the same selection prompt as install and update. Uninstall refuses to continue
@@ -287,84 +289,11 @@ is only removed once uninstalling leaves no client installed at all, so uninstal
Uninstall does not remove the CLI tools themselves (`codex`, `claude`), any plugin marketplace registrations they
keep outside this setup's ledger, or files this setup never installed.
## Doctor
## Configuration overview
Check client availability, generated packages, source directories, hooks, and installed managed files:
Codex and Claude Code receive the same shared rules, skills, agents, hooks, and status data. Codex loads applicable rules from generated files, while Claude Code exposes technology- and situation-specific rules as generated skills.
PowerShell:
```powershell
.\scripts\doctor.ps1
```
Bash:
```bash
./scripts/doctor.sh
```
Use `-Summary` (PowerShell) or `--summary` (Bash) with build, doctor, install, update, and test scripts for compact output.
Omit the flag for detailed output. Summary mode retains warnings and failure status, but can suppress captured
plugin-command output on failure. Set `AI_CONFIG_VERBOSE=1` when full plugin failure output is needed.
## Configuration
Codex receives global instructions, rules, skills, agent TOML files, hooks, and `config.toml`. Its defaults keep writes
workspace-scoped and use automatic review for eligible escalation requests. Every rule ships as a plain file under
`rules/`, and `AGENTS.md` tells Codex to load the matching one by path.
Claude Code receives the equivalent global instructions, agents, hooks, and `settings.json`. General rules are embedded
once in `CLAUDE.md` (and in Codex's `AGENTS.md`); every technology- or
situation-specific rule (`adapters/rule-skills.tsv`) is generated as a skill under `skills/rules/` instead, so
only its name and description are permanently visible and the full rule text loads only when Claude invokes it. Its
generated settings use the supported automatic permission mode where available.
Both clients receive the same logical agent roles:
- Architect
- Implementer
- Researcher
- Reviewer
- Verifier
Agent use is proportional to the task. Small changes can stay with the implementer, while additional roles are available
when research, design, independent review, or focused verification adds value.
Verification is also proportional: the agent selects checks based on changed behavior, affected callers, risk,
and uncertainty. A small change may need only focused inspection; builds, tests, and separate reviews are not
automatic. Explicit user and project requirements still apply.
Both status displays include model, effort, repository, branch, context-window size, context used, and tokens used.
Codex shows its review mode. Claude also shows its review mode in two colored lines, with context usage
turning yellow at 60% and red at 85%. See
[Configuration](docs/configuration.md) for details and limitations.
## Extending the Configuration
### Add a rule
Create a focused Markdown file in `shared/rules/`. For a rule that applies only to a language, framework, tool, or
change area, add one row to `adapters/rule-skills.tsv`. The build uses that manifest to generate both Claude's
rule skill and Codex's rule-loading condition. Put always-applicable guidance in `general.md`, which the build embeds
for both clients; a new rule file is not automatically embedded.
### Add a skill
Create `shared/skills/<category>/<skill>/SKILL.md` with valid YAML frontmatter and a concise workflow. Reference shared
rules instead of repeating persistent standards.
### Add an agent
Create `shared/agents/<agent>/agent.yml` and `instructions.md`. Keep semantic behavior in these shared files; the build
renders the Codex and Claude Code formats.
Rebuild after every semantic change.
## Security
- Never store API keys, OAuth tokens, credentials, authentication state, or sensitive logs in this repository.
- Review generated output and use the installer's dry-run before installation.
- Global installation happens only through an explicit installer invocation.
- Plugins execute with permissions granted by their client; review their upstream sources and trust prompts.
- Codex keeps workspace sandboxing enabled and requires escalation outside expected development boundaries.
The default configuration keeps writes workspace-scoped and enables automatic review for eligible escalation requests. Both clients include the same logical agent roles and compact status displays. See [Configuration](docs/configuration.md) for settings, permissions, and limitations.
## Support
+1 -1
View File
@@ -22,7 +22,7 @@ The shared [orchestration rule](../shared/rules/orchestration.md) defines the `R
For long-running work, the main agent maintains one compact state containing `goal`, `decisions`, `changed`, `verified`, `open`, and `risks`. An existing task-state facility is preferred; the file fallback is `.ai-session/state.json` in the current workspace. Subagents may read it when needed, but send updates to the parent. Keep unrelated concurrent tasks in separate checkouts, and keep runtime state out of commits.
The optional `scripts/session-state.ps1` and `scripts/session-state.sh` helpers update this workspace file. Omitted fields are preserved. Their `-Workspace`/`--workspace` option selects the workspace explicitly; the default is the current working directory. Both accept goal, decisions, changed files, completed verification, open items, and risks. `-Pointer`/`--pointer` only prints the existing file's location.
The optional `scripts/commands/session-state.ps1` and `scripts/commands/session-state.sh` helpers update this workspace file. Omitted fields are preserved. Their `-Workspace`/`--workspace` option selects the workspace explicitly; the default is the current working directory. Both accept goal, decisions, changed files, completed verification, open items, and risks. `-Pointer`/`--pointer` only prints the existing file's location.
Starting a different goal requires `-Reset -Goal ...` or `--reset --goal ...`, which clears the previous task's decisions and verification. Updates are atomic; legacy field names are migrated when reading existing state.
+15
View File
@@ -0,0 +1,15 @@
# Extending the configuration
Shared definitions are the source of truth. Rebuild after every semantic change.
## Add a rule
Create a focused Markdown file in `shared/rules/`. For a rule that applies only to a language, framework, tool, or change area, add one row to `adapters/rule-skills.tsv`. The build uses that manifest to generate both Claude's rule skill and Codex's rule-loading condition. Put always-applicable guidance in `general.md`, which the build embeds for both clients; a new rule file is not automatically embedded.
## Add a skill
Create `shared/skills/<category>/<skill>/SKILL.md` with valid YAML frontmatter and a concise workflow. Reference shared rules instead of repeating persistent standards.
## Add an agent
Create `shared/agents/<agent>/agent.yml` and `instructions.md`. Keep semantic behavior in these shared files; the build renders the Codex and Claude Code formats.
+66
View File
@@ -0,0 +1,66 @@
# Scripts
Run scripts from the repository root. PowerShell and Bash commands have equivalent behavior unless noted otherwise.
## Layout
| Directory | Purpose |
| --- | --- |
| `scripts/commands/` | User-facing build, installation, maintenance, and local utility commands. |
| `scripts/checks/` | Standalone configuration validation. |
| `scripts/tests/` | Repository verification scripts. |
| `scripts/lib/` | Internal helpers used by commands; do not invoke them directly. |
## Commands
| Script | Purpose |
| --- | --- |
| `commands/build.ps1`, `commands/build.sh` | Generate the four client packages in `generated/`. |
| `commands/check-capabilities.ps1`, `commands/check-capabilities.sh` | Check required tools and versions. |
| `commands/install.ps1`, `commands/install.sh` | Install a selected client configuration. |
| `commands/update.ps1`, `commands/update.sh` | Update an existing installation; Quick reuses saved choices. |
| `commands/uninstall.ps1`, `commands/uninstall.sh` | Remove setup-owned configuration and extensions. |
| `commands/doctor.ps1`, `commands/doctor.sh` | Check generated output and installed configuration. |
| `commands/prompt-budget.ps1`, `commands/prompt-budget.sh` | Check generated instruction sizes against their budget. |
| `commands/repository-context.ps1`, `commands/repository-context.sh` | Refresh the local repository-context cache. |
| `commands/session-state.ps1`, `commands/session-state.sh` | Read or update the local agent session state. |
| `commands/telemetry.ps1`, `commands/telemetry.sh` | Append a local telemetry event. |
Qwen retrieval uses `shared/retrieval/benchmark.py`; run it through `scripts/lib/semantic-retrieval.py benchmark --root . --home <home-directory>`.
## Checks and tests
| Script | Purpose |
| --- | --- |
| `checks/validate-config.py` | Validate generated Codex TOML and Claude JSON. |
| `tests/test-build-validation.ps1`, `tests/test-build-validation.sh` | Validate build failures and generated output. |
| `tests/test-install-guards.ps1`, `tests/test-install-guards.sh` | Validate install and update guard conditions. |
| `tests/test-install-options.py` | Validate interactive option handling and generated manifest changes. |
| `tests/test-managed-extensions.py` | Validate plugin, skill, and CLI ownership handling. |
| `tests/test-managed-install.ps1`, `tests/test-managed-install.sh` | Validate managed-file synchronization and backups. |
| `tests/test-plugin-selection.ps1`, `tests/test-plugin-selection.sh` | Validate plugin selection. |
| `tests/test-prompt-inventory.py` | Validate prompt inventory collection. |
| `tests/test-quick-update.py` | Validate saved Quickupdate choices. |
| `tests/test-quick-update.ps1`, `tests/test-quick-update.sh` | Run the Quickupdate test through the relevant shell. |
| `tests/test-retrieval-server.py` | Validate retrieval indexing, ranking, and optional real-model execution. |
| `tests/test-semantic-retrieval.py` | Validate retrieval installation and removal. |
| `tests/test-session-state.py` | Validate session-state helpers. |
| `tests/test-shell-packages.ps1`, `tests/test-shell-packages.sh` | Validate generated packages and shell entry points. |
| `tests/test-telemetry.py` | Validate telemetry output. |
## Internal helpers
| Script | Purpose |
| --- | --- |
| `lib/install-options.ps1`, `lib/install-options.sh` | Read installation options and calculate client-specific choices. |
| `lib/install-options.py` | Filter configuration templates according to installation options. |
| `lib/install-targets.ps1`, `lib/install-targets.sh` | Resolve configuration targets for the selected client and shell. |
| `lib/manifest.ps1`, `lib/manifest.sh` | Synchronize managed files and their ownership manifest. |
| `lib/plugins.ps1`, `lib/plugins.sh` | Select and install configured plugins. |
| `lib/managed-extensions.py` | Reconcile CLI extensions and MCPorter-managed plugins. |
| `lib/prompt-inventory.py` | Collect prompt files for the build. |
| `lib/selection-state.ps1`, `lib/selection-state.sh` | Persist choices used by Quickupdate. |
| `lib/selection-state.py` | Read and write Quickupdate state. |
| `lib/semantic-retrieval.ps1`, `lib/semantic-retrieval.sh` | Invoke semantic retrieval from the installation flow. |
| `lib/semantic-retrieval.py` | Install, index, benchmark, and remove the local retrieval service. |
| `shared/retrieval/benchmark.py` | Measure Qwen embedding and reranking speed for the Auto recommendation. |