$npx -y skills add pssah4/digital-innovation-agents --skill dia-setupActivates, 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).
| 1 | # DIA Setup |
| 2 | |
| 3 | This skill is the activation and configuration entry point for the |
| 4 | Digital Innovation Agents plugin in a user project. It manages a |
| 5 | single configuration file (`.dia/config.toml`) and a set of anchor |
| 6 | blocks in agent-facing files. It does not run any phase skill, does |
| 7 | not read or modify the backlog, and does not invoke flow.py. The |
| 8 | only external command it may run is a read-only `gh project view` |
| 9 | reachability check when the user configures a GitHub Project number. |
| 10 | |
| 11 | The skill is split into two paths driven by a single check at the |
| 12 | start: does `.dia/config.toml` already exist? If no, run the |
| 13 | **activation flow**. If yes, run the **reconfigure flow**. |
| 14 | |
| 15 | ## Modes |
| 16 | |
| 17 | The plugin supports three modes, written into `.dia/config.toml` as |
| 18 | the field `mode`: |
| 19 | |
| 20 | - **`off`**: plugin is neutral. Anchor blocks are removed from |
| 21 | agent-facing files, the SessionStart hook does not inject the |
| 22 | bootstrap skill, and phase-skills that probe the mode skip their |
| 23 | GitHub-side calls. |
| 24 | - **`git-only`**: anchor blocks are present, the SessionStart hook |
| 25 | injects the bootstrap, the local git hooks (pre-commit, |
| 26 | pre-merge-commit) and `scripts/merge-to-dev.sh` are recommended. |
| 27 | No GitHub issue or PR synchronization. |
| 28 | - **`github-sync`**: as `git-only`, plus `flow.py` is invoked from |
| 29 | phase-skills to mirror backlog state to GitHub issues and project |
| 30 | cards, run `promote-to-epic` after requirements engineering, and |
| 31 | keep status in sync. |
| 32 | |
| 33 | ## Activation flow (no `.dia/config.toml` yet) |
| 34 | |
| 35 | 1. **Mode question.** Use `AskUserQuestion` with three options: |
| 36 | `git-only` (recommended for most projects with a single |
| 37 | developer), `github-sync` (recommended for teams that already |
| 38 | work with GitHub Issues / Projects), `off` (recommended when the |
| 39 | user wants to install the plugin without active behavior). Each |
| 40 | option must list a `+ Pro:` line and a `- Con:` line in its |
| 41 | description per the project User Interaction Protocol. |
| 42 | |
| 43 | 2. **Anchor file detection.** Scan the repo root for the known agent |
| 44 | files. Show the user which files were detected and ask |
| 45 | (single `AskUserQuestion`, multiSelect) which ones should carry |
| 46 | the anchor block. Pre-select all detected files. Known list: |
| 47 | - `CLAUDE.md` |
| 48 | - `AGENTS.md` |
| 49 | - `GEMINI.md` |
| 50 | - `.cursorrules` |
| 51 | - `.github/copilot-instructions.md` |
| 52 | - `.windsurfrules` |
| 53 | |
| 54 | 3. **Source branch question (only if mode != off).** Default |
| 55 | `develop`. Ask the user via `AskUserQuestion` whether to keep |
| 56 | `develop` or use a different branch (`main`, `dev`, custom). |
| 57 | This value goes into `.dia/config.toml` as `source_branch`. |
| 58 | |
| 59 | 4. **GitHub Project question (only if mode = github-sync).** Ask |
| 60 | the user via `AskUserQuestion` whether they want backlog Status |
| 61 | mirrored to a GitHub Project Status field. If yes, ask for the |
| 62 | ProjectV2 number (the integer at the end of the project URL, |
| 63 | for example 7 for `github.com/users/X/projects/7`). Optionally |
| 64 | ask for the project owner login (when empty, flow.py resolves |
| 65 | it from the repository) and the status field name (default |
| 66 | `Status`). These values go into `.dia/config.toml` under |
| 67 | `[github]`. If the user skips, leave `project_number = 0`; the |
| 68 | issue itself still syncs, only the project Status field stays |
| 69 | untouched. |
| 70 | |
| 71 | **Pre-flight (only when a project number was given).** Before |
| 72 | writing the config, verify the project is reachable: |
| 73 | |
| 74 | ``` |
| 75 | gh project view <N> --owner <owner-or-resolved-repo-owner> --format json |
| 76 | ``` |
| 77 | |
| 78 | - Success: continue, mention the project title back to the user. |
| 79 | - Failure mentioning a missing scope (`gh` says the token lacks |
| 80 | the `project` scope): tell the user to run |
| 81 | `gh auth refresh -s project`, then offer to retry or to write |
| 82 | the config anyway (the number is stored regardless; the sync |
| 83 | just stays a no-op until the scope is granted). |
| 84 | - Other failure (wrong number, no access, project under a |
| 85 | different owner): surface the `gh` error verbatim, ask whether |
| 86 | to correct the number / owner now or store it as-is. |
| 87 | |
| 88 | Do not block on this check; its only job is to catch the |
| 89 | `gh auth refresh -s project` stumbling block at setup time |
| 90 | instead of at the first sync. |
| 91 | |
| 92 | 5. **Write configuration.** Create `.dia/` directory if missing and |
| 93 | write `.dia/config.toml` from the template |
| 94 | `skills/dia-setup/templates/di |