DIA Setup
This skill is the activation and configuration entry point for the
Digital Innovation Agents plugin in a user project. It manages a
single configuration file (.dia/config.toml) and a set of anchor
blocks in agent-facing files. It does not run any phase skill, does
not read or modify the backlog, and does not invoke flow.py. The
only external command it may run is a read-only gh project view
reachability check when the user configures a GitHub Project number.
The skill is split into two paths driven by a single check at the
start: does .dia/config.toml already exist? If no, run the
activation flow. If yes, run the reconfigure flow.
Modes
The plugin supports three modes, written into .dia/config.toml as
the field mode:
off: plugin is neutral. Anchor blocks are removed from
agent-facing files, the SessionStart hook does not inject the
bootstrap skill, and phase-skills that probe the mode skip their
GitHub-side calls.
git-only: anchor blocks are present, the SessionStart hook
injects the bootstrap, the local git hooks (pre-commit,
pre-merge-commit) and scripts/merge-to-dev.sh are recommended.
No GitHub issue or PR synchronization.
github-sync: as git-only, plus flow.py is invoked from
phase-skills to mirror backlog state to GitHub issues and project
cards, run promote-to-epic after requirements engineering, and
keep status in sync.
Activation flow (no .dia/config.toml yet)
Mode question. Use AskUserQuestion with three options:
git-only (recommended for most projects with a single
developer), github-sync (recommended for teams that already
work with GitHub Issues / Projects), off (recommended when the
user wants to install the plugin without active behavior). Each
option must list a + Pro: line and a - Con: line in its
description per the project User Interaction Protocol.
Anchor file detection. Scan the repo root for the known agent
files. Show the user which files were detected and ask
(single AskUserQuestion, multiSelect) which ones should carry
the anchor block. Pre-select all detected files. Known list:
CLAUDE.md
AGENTS.md
GEMINI.md
.cursorrules
.github/copilot-instructions.md
.windsurfrules
Source branch question (only if mode != off). Default
develop. Ask the user via AskUserQuestion whether to keep
develop or use a different branch (main, dev, custom).
This value goes into .dia/config.toml as source_branch.
GitHub Project question (only if mode = github-sync). Ask
the user via AskUserQuestion whether they want backlog Status
mirrored to a GitHub Project Status field. If yes, ask for the
ProjectV2 number (the integer at the end of the project URL,
for example 7 for github.com/users/X/projects/7). Optionally
ask for the project owner login (when empty, flow.py resolves
it from the repository) and the status field name (default
Status). These values go into .dia/config.toml under
[github]. If the user skips, leave project_number = 0; the
issue itself still syncs, only the project Status field stays
untouched.
Pre-flight (only when a project number was given). Before
writing the config, verify the project is reachable:
gh project view <N> --owner <owner-or-resolved-repo-owner> --format json
- Success: continue, mention the project title back to the user.
- Failure mentioning a missing scope (
gh says the token lacks
the project scope): tell the user to run
gh auth refresh -s project, then offer to retry or to write
the config anyway (the number is stored regardless; the sync
just stays a no-op until the scope is granted).
- Other failure (wrong number, no access, project under a
different owner): surface the
gh error verbatim, ask whether
to correct the number / owner now or store it as-is.
Do not block on this check; its only job is to catch the
gh auth refresh -s project stumbling block at setup time
instead of at the first sync.
Write configuration. Create .dia/ directory if missing and
write .dia/config.toml from the template
skills/dia-setup/templates/dia-config.toml.tmpl, substituting
{{mode}}, the chosen anchor_files, source_branch, and the
[github] block.
Write anchor blocks (only if mode != off). Run
python3 tools/dia-setup/anchor.py write --mode <mode> --files <selected list>. The script is idempotent; it creates or
replaces blocks in the selected files.
Confirmation. Print a short confirmation to the user:
- mode now active
- which files received an anchor block
- that
/dia-setup can be re-run any time to change the mode
- a hint that
/dia-guide is the natural next step for actual
work
- when
mode = github-sync AND _devprocess/context/BACKLOG.md
already has rows (a brownfield project just migrated or
reverse-engineered): point at
python3 tools/github-integration/flow.py preflight (read-only
checks) and ... flow.py initial-sync (bulk onboarding) rather
than syncing items one by one.
Reconfigure flow (.dia/config.toml exists)
Read current state. Parse .dia/config.toml, extract mode
and anchor_files. Print the current state to the user.
Action question. Use AskUserQuestion with these options:
- Change mode (Recommended if user invoked the skill to
toggle behavior).
- Refresh anchor blocks (rewrites blocks against the current
mode, useful after a template update).
- Add or remove anchor files (multi-step, see below).
- Deactivate (set mode to off and remove all anchor blocks).
- Cancel.
Each option requires a + Pro: and - Con: line.
Apply the chosen action.
- Change mode: ask new mode (Pro/Con per option), update
.dia/config.toml, run
python3 tools/dia-setup/anchor.py write --mode <new>. When the
new mode is github-sync and a project number is configured (or
the user supplies one now), run the same gh project view
pre-flight as activation step 4 and surface the result.
- Refresh anchor blocks: run anchor.py write with the
existing mode and existing anchor_files list.
- Add or remove anchor files: ask multiSelect with all known
targets, mark currently anchored files as pre-selected, write
the diff (anchor.py write for new entries, anchor.py remove
for unselected entries), update
.dia/config.toml.
- Deactivate: write
mode = "off" to .dia/config.toml,
run python3 tools/dia-setup/anchor.py remove --all. Anchor
files list in the config remains, so a later reactivation
restores the same surface.
- Cancel: do nothing.
Confirmation. Print which files changed and what the new
state is.
Verification (built-in self-check)
After every write or reconfigure flow, the skill calls
python3 tools/dia-setup/anchor.py verify and reports the result.
A non-zero exit code signals drift between .dia/config.toml and
the actual anchor blocks; if it occurs, surface the missing files
to the user and offer a refresh.
Idempotency
The skill must be safe to invoke multiple times. The anchor script
detects existing blocks via a stable marker pair and replaces them
in place. Running /dia-setup twice with the same answers must
produce no diff in the working tree.
Hand-off
/dia-setup does not invoke any phase skill, does not write to
BACKLOG.md, and does not start any handoff ritual. After a
successful run, the user typically continues with /dia-guide
for orientation or with a phase skill of their choice.
Files written or removed
.dia/config.toml (created or updated)
- one or more of:
CLAUDE.md, AGENTS.md, GEMINI.md,
.cursorrules, .github/copilot-instructions.md,
.windsurfrules (anchor block written, replaced, or removed)
The skill never touches files outside this list.
Settings file format
mode = "git-only"
anchor_files = [
"CLAUDE.md",
"AGENTS.md",
"GEMINI.md",
".cursorrules",
]
source_branch = "develop"
[github]
project_number = 7
status_field = "Status"
project_owner = ""
mode is the only mandatory field. anchor_files defaults to the
list of files that carry a managed anchor block. source_branch
controls the base for new feature branches /dia-guide creates.
The [github] section is honored only when mode = "github-sync":
project_number is the GitHub ProjectV2 number (the integer at
the end of the project URL, e.g. 7 for
github.com/users/X/projects/7). Leave 0 to skip
project-status mirroring; the issue itself still syncs, only
the project Status field stays untouched.
status_field is the single-select field name on the project
that represents item status. Default Status.
project_owner is optional. When empty, flow.py resolves the
owner from the repository. Set explicitly when the project lives
under a different owner than the repo (org-level projects, etc.).
Reference
Full anchor format and idempotency rules:
skills/dia-setup/references/anchor-format.md.
Source: pssah4/digital-innovation-agents — distributed by TomeVault.
1---2name: dia-setup3description: Activates, reconfigures, or deactivates the Digital Innovation Agents workflow in a project. Writes the .dia/config.toml settings file and manages anchor blocks in agent-facing files (CLAUDE.md, AGENTS.md, GEMINI.md, .cursorrules, .github/copilot-instructions.md, .windsurfrules). Use this skill when the user mentions "DIA aktivieren", "DIA installieren", "DIA initialisieren", "DIA setup", "DIA settings", "Workflow-Modus", "Modus wechseln", "DIA off", "DIA deaktivieren", "Plugin aktivieren". Single skill that covers both first-time activation and later reconfiguration; the skill detects which path applies from the presence of .dia/config.toml. Use when this capability is needed.4---56# DIA Setup78This skill is the activation and configuration entry point for the9Digital Innovation Agents plugin in a user project. It manages a10single configuration file (`.dia/config.toml`) and a set of anchor11blocks in agent-facing files. It does not run any phase skill, does12not read or modify the backlog, and does not invoke flow.py. The13only external command it may run is a read-only `gh project view`14reachability check when the user configures a GitHub Project number.1516The skill is split into two paths driven by a single check at the17start: does `.dia/config.toml` already exist? If no, run the18**activation flow**. If yes, run the **reconfigure flow**.1920## Modes2122The plugin supports three modes, written into `.dia/config.toml` as23the field `mode`:2425- **`off`**: plugin is neutral. Anchor blocks are removed from26 agent-facing files, the SessionStart hook does not inject the27 bootstrap skill, and phase-skills that probe the mode skip their28 GitHub-side calls.29- **`git-only`**: anchor blocks are present, the SessionStart hook30 injects the bootstrap, the local git hooks (pre-commit,31 pre-merge-commit) and `scripts/merge-to-dev.sh` are recommended.32 No GitHub issue or PR synchronization.33- **`github-sync`**: as `git-only`, plus `flow.py` is invoked from34 phase-skills to mirror backlog state to GitHub issues and project35 cards, run `promote-to-epic` after requirements engineering, and36 keep status in sync.3738## Activation flow (no `.dia/config.toml` yet)39401. **Mode question.** Use `AskUserQuestion` with three options:41 `git-only` (recommended for most projects with a single42 developer), `github-sync` (recommended for teams that already43 work with GitHub Issues / Projects), `off` (recommended when the44 user wants to install the plugin without active behavior). Each45 option must list a `+ Pro:` line and a `- Con:` line in its46 description per the project User Interaction Protocol.47482. **Anchor file detection.** Scan the repo root for the known agent49 files. Show the user which files were detected and ask50 (single `AskUserQuestion`, multiSelect) which ones should carry51 the anchor block. Pre-select all detected files. Known list:52 - `CLAUDE.md`53 - `AGENTS.md`54 - `GEMINI.md`55 - `.cursorrules`56 - `.github/copilot-instructions.md`57 - `.windsurfrules`58593. **Source branch question (only if mode != off).** Default60 `develop`. Ask the user via `AskUserQuestion` whether to keep61 `develop` or use a different branch (`main`, `dev`, custom).62 This value goes into `.dia/config.toml` as `source_branch`.63644. **GitHub Project question (only if mode = github-sync).** Ask65 the user via `AskUserQuestion` whether they want backlog Status66 mirrored to a GitHub Project Status field. If yes, ask for the67 ProjectV2 number (the integer at the end of the project URL,68 for example 7 for `github.com/users/X/projects/7`). Optionally69 ask for the project owner login (when empty, flow.py resolves70 it from the repository) and the status field name (default71 `Status`). These values go into `.dia/config.toml` under72 `[github]`. If the user skips, leave `project_number = 0`; the73 issue itself still syncs, only the project Status field stays74 untouched.7576 **Pre-flight (only when a project number was given).** Before77 writing the config, verify the project is reachable:7879 ```80 gh project view <N> --owner <owner-or-resolved-repo-owner> --format json81 ```8283 - Success: continue, mention the project title back to the user.84 - Failure mentioning a missing scope (`gh` says the token lacks85 the `project` scope): tell the user to run86 `gh auth refresh -s project`, then offer to retry or to write87 the config anyway (the number is stored regardless; the sync88 just stays a no-op until the scope is granted).89 - Other failure (wrong number, no access, project under a90 different owner): surface the `gh` error verbatim, ask whether91 to correct the number / owner now or store it as-is.9293 Do not block on this check; its only job is to catch the94 `gh auth refresh -s project` stumbling block at setup time95 instead of at the first sync.96975. **Write configuration.** Create `.dia/` directory if missing and98 write `.dia/config.toml` from the template99 `skills/dia-setup/templates/dia-config.toml.tmpl`, substituting100 `{{mode}}`, the chosen `anchor_files`, `source_branch`, and the101 `[github]` block.1021036. **Write anchor blocks (only if mode != off).** Run104 `python3 tools/dia-setup/anchor.py write --mode <mode> --files105 <selected list>`. The script is idempotent; it creates or106 replaces blocks in the selected files.1071087. **Confirmation.** Print a short confirmation to the user:109 - mode now active110 - which files received an anchor block111 - that `/dia-setup` can be re-run any time to change the mode112 - a hint that `/dia-guide` is the natural next step for actual113 work114 - when `mode = github-sync` AND `_devprocess/context/BACKLOG.md`115 already has rows (a brownfield project just migrated or116 reverse-engineered): point at117 `python3 tools/github-integration/flow.py preflight` (read-only118 checks) and `... flow.py initial-sync` (bulk onboarding) rather119 than syncing items one by one.120121## Reconfigure flow (`.dia/config.toml` exists)1221231. **Read current state.** Parse `.dia/config.toml`, extract `mode`124 and `anchor_files`. Print the current state to the user.1251262. **Action question.** Use `AskUserQuestion` with these options:127 - **Change mode** (Recommended if user invoked the skill to128 toggle behavior).129 - **Refresh anchor blocks** (rewrites blocks against the current130 mode, useful after a template update).131 - **Add or remove anchor files** (multi-step, see below).132 - **Deactivate (set mode to off and remove all anchor blocks)**.133 - **Cancel**.134135 Each option requires a `+ Pro:` and `- Con:` line.1361373. **Apply the chosen action.**138139 - **Change mode**: ask new mode (Pro/Con per option), update140 `.dia/config.toml`, run141 `python3 tools/dia-setup/anchor.py write --mode <new>`. When the142 new mode is `github-sync` and a project number is configured (or143 the user supplies one now), run the same `gh project view`144 pre-flight as activation step 4 and surface the result.145 - **Refresh anchor blocks**: run anchor.py write with the146 existing mode and existing anchor_files list.147 - **Add or remove anchor files**: ask multiSelect with all known148 targets, mark currently anchored files as pre-selected, write149 the diff (anchor.py write for new entries, anchor.py remove150 for unselected entries), update `.dia/config.toml`.151 - **Deactivate**: write `mode = "off"` to `.dia/config.toml`,152 run `python3 tools/dia-setup/anchor.py remove --all`. Anchor153 files list in the config remains, so a later reactivation154 restores the same surface.155 - **Cancel**: do nothing.1561574. **Confirmation.** Print which files changed and what the new158 state is.159160## Verification (built-in self-check)161162After every write or reconfigure flow, the skill calls163`python3 tools/dia-setup/anchor.py verify` and reports the result.164A non-zero exit code signals drift between `.dia/config.toml` and165the actual anchor blocks; if it occurs, surface the missing files166to the user and offer a refresh.167168## Idempotency169170The skill must be safe to invoke multiple times. The anchor script171detects existing blocks via a stable marker pair and replaces them172in place. Running `/dia-setup` twice with the same answers must173produce no diff in the working tree.174175## Hand-off176177`/dia-setup` does not invoke any phase skill, does not write to178`BACKLOG.md`, and does not start any handoff ritual. After a179successful run, the user typically continues with `/dia-guide`180for orientation or with a phase skill of their choice.181182## Files written or removed183184- `.dia/config.toml` (created or updated)185- one or more of: `CLAUDE.md`, `AGENTS.md`, `GEMINI.md`,186 `.cursorrules`, `.github/copilot-instructions.md`,187 `.windsurfrules` (anchor block written, replaced, or removed)188189The skill never touches files outside this list.190191## Settings file format192193```toml194mode = "git-only"195196anchor_files = [197 "CLAUDE.md",198 "AGENTS.md",199 "GEMINI.md",200 ".cursorrules",201]202203source_branch = "develop"204205[github]206project_number = 7207status_field = "Status"208project_owner = ""209```210211`mode` is the only mandatory field. `anchor_files` defaults to the212list of files that carry a managed anchor block. `source_branch`213controls the base for new feature branches `/dia-guide` creates.214215The `[github]` section is honored only when `mode = "github-sync"`:216217- `project_number` is the GitHub ProjectV2 number (the integer at218 the end of the project URL, e.g. 7 for219 `github.com/users/X/projects/7`). Leave 0 to skip220 project-status mirroring; the issue itself still syncs, only221 the project Status field stays untouched.222- `status_field` is the single-select field name on the project223 that represents item status. Default `Status`.224- `project_owner` is optional. When empty, flow.py resolves the225 owner from the repository. Set explicitly when the project lives226 under a different owner than the repo (org-level projects, etc.).227228## Reference229230Full anchor format and idempotency rules:231`skills/dia-setup/references/anchor-format.md`.232233---234> Source: [pssah4/digital-innovation-agents](https://github.com/pssah4/digital-innovation-agents) — distributed by [TomeVault](https://tomevault.io).235<!-- tomevault:4.0:skill_md:2026-05-23 -->