@bastani/atomic 0.5.25-0 → 0.5.26-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/.agents/skills/ado-commit/SKILL.md +92 -0
  2. package/.agents/skills/ado-create-pr/SKILL.md +209 -0
  3. package/.claude/settings.json +1 -0
  4. package/.mcp.json +5 -0
  5. package/.opencode/opencode.json +7 -1
  6. package/README.md +150 -116
  7. package/assets/settings.schema.json +2 -2
  8. package/dist/sdk/runtime/executor.d.ts.map +1 -1
  9. package/dist/sdk/workflows/builtin/open-claude-design/claude/index.d.ts +46 -0
  10. package/dist/sdk/workflows/builtin/open-claude-design/claude/index.d.ts.map +1 -0
  11. package/dist/sdk/workflows/builtin/open-claude-design/copilot/index.d.ts +34 -0
  12. package/dist/sdk/workflows/builtin/open-claude-design/copilot/index.d.ts.map +1 -0
  13. package/dist/sdk/workflows/builtin/open-claude-design/helpers/constants.d.ts +72 -0
  14. package/dist/sdk/workflows/builtin/open-claude-design/helpers/constants.d.ts.map +1 -0
  15. package/dist/sdk/workflows/builtin/open-claude-design/helpers/design-system.d.ts +46 -0
  16. package/dist/sdk/workflows/builtin/open-claude-design/helpers/design-system.d.ts.map +1 -0
  17. package/dist/sdk/workflows/builtin/open-claude-design/helpers/export.d.ts +32 -0
  18. package/dist/sdk/workflows/builtin/open-claude-design/helpers/export.d.ts.map +1 -0
  19. package/dist/sdk/workflows/builtin/open-claude-design/helpers/import.d.ts +33 -0
  20. package/dist/sdk/workflows/builtin/open-claude-design/helpers/import.d.ts.map +1 -0
  21. package/dist/sdk/workflows/builtin/open-claude-design/helpers/prompts.d.ts +106 -0
  22. package/dist/sdk/workflows/builtin/open-claude-design/helpers/prompts.d.ts.map +1 -0
  23. package/dist/sdk/workflows/builtin/open-claude-design/helpers/scan.d.ts +50 -0
  24. package/dist/sdk/workflows/builtin/open-claude-design/helpers/scan.d.ts.map +1 -0
  25. package/dist/sdk/workflows/builtin/open-claude-design/helpers/validation.d.ts +12 -0
  26. package/dist/sdk/workflows/builtin/open-claude-design/helpers/validation.d.ts.map +1 -0
  27. package/dist/sdk/workflows/builtin/open-claude-design/opencode/index.d.ts +36 -0
  28. package/dist/sdk/workflows/builtin/open-claude-design/opencode/index.d.ts.map +1 -0
  29. package/dist/services/config/atomic-config.d.ts +6 -0
  30. package/dist/services/config/atomic-config.d.ts.map +1 -1
  31. package/dist/services/config/scm-sync.d.ts +37 -0
  32. package/dist/services/config/scm-sync.d.ts.map +1 -0
  33. package/package.json +7 -7
  34. package/src/cli.ts +2 -2
  35. package/src/commands/cli/chat/index.ts +8 -1
  36. package/src/commands/cli/config.ts +34 -10
  37. package/src/commands/cli/init/index.ts +9 -0
  38. package/src/sdk/runtime/executor.ts +13 -0
  39. package/src/sdk/workflows/builtin/open-claude-design/claude/index.ts +499 -0
  40. package/src/sdk/workflows/builtin/open-claude-design/copilot/index.ts +507 -0
  41. package/src/sdk/workflows/builtin/open-claude-design/helpers/constants.ts +159 -0
  42. package/src/sdk/workflows/builtin/open-claude-design/helpers/design-system.ts +88 -0
  43. package/src/sdk/workflows/builtin/open-claude-design/helpers/export.ts +193 -0
  44. package/src/sdk/workflows/builtin/open-claude-design/helpers/import.ts +52 -0
  45. package/src/sdk/workflows/builtin/open-claude-design/helpers/prompts.ts +1110 -0
  46. package/src/sdk/workflows/builtin/open-claude-design/helpers/scan.ts +117 -0
  47. package/src/sdk/workflows/builtin/open-claude-design/helpers/validation.ts +38 -0
  48. package/src/sdk/workflows/builtin/open-claude-design/opencode/index.ts +570 -0
  49. package/src/services/config/atomic-config.ts +12 -0
  50. package/src/services/config/scm-sync.ts +174 -0
  51. package/src/services/config/settings.ts +19 -0
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: ado-commit
3
+ description: Create well-formatted conventional commits in a repository hosted on Azure DevOps (ADO / Azure Repos). Use this whenever the user asks to commit changes and the project is on Azure DevOps — dev.azure.com, visualstudio.com, or explicit mentions of ADO, Azure Repos, or work item IDs like `AB#1234`. Automatically appends `AB#<id>` work-item trailers when the branch name or staged changes reference one, and attributes AI-assisted authorship.
4
+ ---
5
+
6
+ # ADO Commit
7
+
8
+ Create a conventional commit on an Azure DevOps-hosted repository: $ARGUMENTS
9
+
10
+ ## Current state
11
+
12
+ - Git status: !`git status --porcelain`
13
+ - Current branch: !`git branch --show-current`
14
+ - Staged diff (stat): !`git diff --cached --stat`
15
+ - Unstaged diff (stat): !`git diff --stat`
16
+ - Recent commits: !`git log --oneline -5`
17
+
18
+ ## Workflow
19
+
20
+ The only ADO-specific bits are (a) work-item trailers and (b) the conventions this repo has adopted for talking to reviewers who open PRs in Azure DevOps.
21
+
22
+ 1. **Stage.** If nothing is staged, stage all modified and new files with `git add -A`. If specific files are already staged, commit only those.
23
+ 2. **Diff.** Run `git diff --cached` to understand the actual change. Read the diff — don't just trust the path names — because the message needs to describe *what changed and why*, not *which files changed*.
24
+ 3. **Split if needed.** If the staged diff contains multiple unrelated logical changes, propose splitting into separate commits. One commit = one reason to change.
25
+ 4. **Write the message** in Conventional Commits format (see below), then commit via `git commit --message "<subject>" [--trailer ...]`. Pass trailers with `--trailer` so git formats them correctly; don't cat-heredoc them into the body.
26
+ 5. **Don't skip pre-commit hooks.** If `.pre-commit-config.yaml` exists, hooks run automatically and their failures are signal, not noise. Never pass `--no-verify`.
27
+
28
+ ## Conventional Commits — quick reference
29
+
30
+ ```
31
+ <type>(optional scope): <description>
32
+
33
+ <optional body>
34
+
35
+ <optional trailers>
36
+ ```
37
+
38
+ Common types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`. Append `!` after type/scope for breaking changes (e.g. `feat(api)!: change response format`). Keep the subject under 72 characters, imperative mood, no trailing period.
39
+
40
+ **Examples:**
41
+
42
+ ```
43
+ feat(auth): add JWT refresh endpoint
44
+ fix(ui): resolve layout shift on mobile nav
45
+ refactor(db): migrate from raw SQL to query builder
46
+ chore(deps): bump TypeScript to 5.5
47
+ feat(api)!: change pagination response shape
48
+ ```
49
+
50
+ ## Work-item trailers (ADO-specific)
51
+
52
+ Azure DevOps auto-links commits to work items when the message contains `AB#<id>`. Include one whenever you can identify the target work item, because it keeps the board in sync without anyone clicking around.
53
+
54
+ **Where to find the ID:**
55
+
56
+ - **Branch name** — patterns like `feature/1234-...`, `bug/AB1234-...`, `user/name/1234-...` usually encode the work item ID.
57
+ - **User input** — if the user mentions "work item 1234" or "this closes 1234", use that.
58
+ - **Prior commits on the branch** — run `git log --oneline origin/main..HEAD` and check if earlier commits reference an ID.
59
+ - **ADO MCP** — if the project has the `azure-devops` MCP server configured and you're still unsure, call `wit_my_work_items` (or `search_workitem` with a keyword from the change) to surface likely candidates. Ask the user to confirm rather than guessing.
60
+
61
+ **How to add it** — as a trailer, not in the subject:
62
+
63
+ ```bash
64
+ git commit \
65
+ --message "feat(auth): add JWT refresh endpoint" \
66
+ --trailer "AB#1234" \
67
+ --trailer "Assistant-model: Claude Code"
68
+ ```
69
+
70
+ If you genuinely can't find a work-item ID, skip the trailer rather than inventing one. A missing trailer is recoverable; a wrong one pollutes the board.
71
+
72
+ ## AI authorship trailer
73
+
74
+ ADO code reviews often surface in audit contexts, so mark AI-assisted commits honestly. Use an `Assistant-model` trailer rather than `Co-authored-by` — most git tooling validates the latter as an email, and we want to distinguish *assistance* from *authorship*:
75
+
76
+ ```
77
+ Assistant-model: Claude Code
78
+ ```
79
+
80
+ Add it every time you commit on the user's behalf.
81
+
82
+ ## Putting it together
83
+
84
+ ```bash
85
+ git add -A
86
+ git diff --cached --stat # sanity check
87
+ git commit \
88
+ --message "fix(parser): handle nested escape sequences" \
89
+ --trailer "AB#5678" \
90
+ --trailer "Assistant-model: Claude Code"
91
+ git log -1 # show the user the result
92
+ ```
@@ -0,0 +1,209 @@
1
+ ---
2
+ name: ado-create-pr
3
+ description: Commit, push, and open a pull request in Azure DevOps. Use whenever the user wants to open, update, or draft a PR and the project is hosted on Azure DevOps (`dev.azure.com`, `visualstudio.com`, or explicit mentions of ADO, Azure Repos, or work item IDs like `AB#1234`). Links work items to the PR, sets reviewers, and supports draft-by-default.
4
+ ---
5
+
6
+ # ADO Create Pull Request
7
+
8
+ Commit changes, push the branch, and open or update an Azure DevOps pull request with a conventional-commit-style title and a complete description: $ARGUMENTS
9
+
10
+ ## Current state
11
+
12
+ - Git status: !`git status --porcelain`
13
+ - Current branch: !`git branch --show-current`
14
+ - Default branch: !`git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | sed 's|origin/||' || echo main`
15
+ - Staged diff (stat): !`git diff --cached --stat`
16
+ - Unstaged diff (stat): !`git diff --stat`
17
+ - Recent commits on this branch: !`git log --oneline -10`
18
+ - Commits ahead of default: !`git log --oneline origin/$(git rev-parse --abbrev-ref origin/HEAD 2>/dev/null | sed 's|origin/||' || echo main)..HEAD 2>/dev/null | head -20`
19
+ - Remote URL (to confirm ADO host): !`git remote get-url origin 2>/dev/null || echo "no-remote"`
20
+
21
+ ## Use the Azure DevOps MCP tools
22
+
23
+ All ADO operations in this workflow go through the Azure DevOps MCP tools — never `az` / `az devops`. When you see tool names like `repo_create_pull_request` or `wit_link_work_item_to_pull_request` below, call the matching Azure DevOps tool from your tool list. If no Azure DevOps MCP tools are loaded in this session, stop and ask the user if they want to fallback to the `az` CLI.
24
+
25
+ ## Workflow
26
+
27
+ ### 1. Stage and commit
28
+
29
+ Follow the **ado-commit** skill for the commit step — same conventional-commit format, same AI-authorship trailer, same `AB#<id>` work-item trailer rules. Split into multiple commits if the staged diff covers unrelated concerns.
30
+
31
+ If the user is currently on the default branch (`main` / `master`), switch to a feature branch *before* committing. A reasonable default name is `user/<short-topic>` or `feature/<topic>`; if a work-item ID is known, prefix it: `feature/1234-<topic>`.
32
+
33
+ ### 2. Push
34
+
35
+ ```bash
36
+ git push -u origin "$(git branch --show-current)"
37
+ ```
38
+
39
+ `-u` sets upstream tracking so subsequent pushes don't need arguments.
40
+
41
+ ### 3. Gather context for the PR
42
+
43
+ Read the *full* diff against the base branch, not just the last commit — a PR title needs to summarize the whole branch, not one step of it.
44
+
45
+ ```bash
46
+ git diff origin/<default-branch>...HEAD
47
+ ```
48
+
49
+ Open the files that changed significantly so you can describe the *why* accurately. If there's an existing PR for this branch, fetch it first (see step 5) and edit rather than replace — a human may already have curated the title or description.
50
+
51
+ ### 4. Identify the repo, project, and work items
52
+
53
+ The MCP tools need identifiers:
54
+
55
+ - **Project and repository name** — parse from the `origin` remote URL. ADO URLs follow `https://dev.azure.com/<org>/<project>/_git/<repo>` or `https://<org>.visualstudio.com/<project>/_git/<repo>`.
56
+ - **Repository ID** — call `repo_get_repo_by_name_or_id` with `{ project, repositoryNameOrId: <repo-name> }`. Use the returned `id` for subsequent calls.
57
+ - **Work item IDs** — scan the branch name and every commit subject/body on the branch (`git log origin/<default>..HEAD`) for `AB#<id>`, `#<id>`, or numeric prefixes like `feature/1234-...`. If the user mentioned a work item in the prompt, trust that.
58
+
59
+ If projects or repos aren't obvious, `core_list_projects` and `repo_list_repos_by_project` let you browse.
60
+
61
+ ### 5. Check for an existing PR
62
+
63
+ ```
64
+ repo_list_pull_requests_by_repo_or_project {
65
+ repositoryId: <id>,
66
+ status: "active",
67
+ sourceRefName: "refs/heads/<current-branch>"
68
+ }
69
+ ```
70
+
71
+ If a result comes back, you're in *update* mode — keep the existing PR's ID and edit in place in step 7. Otherwise you're in *create* mode.
72
+
73
+ ### 6. Generate title and description
74
+
75
+ **Title** — Conventional Commits, under 72 chars. For a single-commit PR the commit subject works; for a multi-commit PR synthesize a higher-level subject that captures the whole branch.
76
+
77
+ ```
78
+ feat(auth): add JWT token refresh endpoint
79
+ fix(ui): resolve layout shift on mobile nav
80
+ refactor(db): migrate from raw SQL to query builder
81
+ feat(api)!: change pagination response shape
82
+ ```
83
+
84
+ **Description** — use this template, omitting sections that don't apply:
85
+
86
+ ```markdown
87
+ ## Summary
88
+
89
+ [1–2 sentences on what this PR does and why]
90
+
91
+ ## Changes
92
+
93
+ - [Key change 1]
94
+ - [Key change 2]
95
+
96
+ ## Breaking Changes
97
+
98
+ [What breaks and the migration step — delete this section if none]
99
+
100
+ ## Test Plan
101
+
102
+ - [How this was verified — commands, manual checks, screenshots]
103
+
104
+ ## Work Items
105
+
106
+ AB#1234
107
+ ```
108
+
109
+ Keep the `AB#<id>` references in the description — ADO parses them and shows the linked work items alongside the PR. You'll *also* link them via MCP in step 8 so the links are first-class, not just string-matched.
110
+
111
+ ### 7. Create or update the PR
112
+
113
+ **Create (default to draft):**
114
+
115
+ ```
116
+ repo_create_pull_request {
117
+ repositoryId: <id>,
118
+ sourceRefName: "refs/heads/<current-branch>",
119
+ targetRefName: "refs/heads/<default-branch>",
120
+ title: "<conventional-commit title>",
121
+ description: "<markdown from template>",
122
+ isDraft: true
123
+ }
124
+ ```
125
+
126
+ `sourceRefName` and `targetRefName` need the full `refs/heads/` prefix — a common mistake is passing the bare branch name and getting a cryptic 400.
127
+
128
+ **Update (existing PR):**
129
+
130
+ ```
131
+ repo_update_pull_request {
132
+ repositoryId: <id>,
133
+ pullRequestId: <id-from-step-5>,
134
+ title: "<updated title>",
135
+ description: "<updated description>"
136
+ }
137
+ ```
138
+
139
+ Respect the existing title/description if they're already meaningful — enhance rather than overwrite. If the existing title already follows conventional commits and is accurate, leave it alone.
140
+
141
+ ### 8. Link work items
142
+
143
+ Even if the description contains `AB#<id>`, explicitly link each work item so it shows up as a structured PR-WorkItem relationship:
144
+
145
+ ```
146
+ wit_link_work_item_to_pull_request {
147
+ projectId: <project-id>,
148
+ repositoryId: <repo-id>,
149
+ pullRequestId: <pr-id>,
150
+ workItemId: <work-item-id>
151
+ }
152
+ ```
153
+
154
+ Call once per work item ID.
155
+
156
+ ### 9. Reviewers (optional)
157
+
158
+ If the user named reviewers, resolve them to identity IDs and attach:
159
+
160
+ ```
161
+ core_get_identity_ids { searchFilter: "<name or email>" }
162
+ repo_update_pull_request_reviewers {
163
+ repositoryId: <id>,
164
+ pullRequestId: <id>,
165
+ reviewerIds: [<ids>],
166
+ action: "add"
167
+ }
168
+ ```
169
+
170
+ Don't auto-assign reviewers the user didn't mention — ADO default reviewer policies usually handle that, and guessing people's IDs is a good way to ping the wrong person.
171
+
172
+ ### 10. Report back
173
+
174
+ Print the PR's web URL (returned in the create/update response as `url` or `_links.web.href`) so the user can click through. Summarize: branch → target, draft status, work items linked, reviewers added.
175
+
176
+ ## Guidelines
177
+
178
+ - **Draft by default.** Pass `isDraft: true` unless the user says otherwise. It's easier to mark ready than to walk back a premature review request.
179
+ - **Never skip pre-commit hooks.** They run locally during commits created in step 1. A hook failure is the hook earning its keep.
180
+ - **Always attribute AI assistance** via the `Assistant-model` trailer on every commit (see the ado-commit skill).
181
+ - **Respect existing content.** If updating an existing PR, keep what's already curated; only replace sections that are stale or wrong.
182
+ - **Holistic title.** The PR title is one line describing the whole branch. Don't concatenate commit subjects.
183
+
184
+ ## Related Azure DevOps tools
185
+
186
+ The 10-step workflow above names the tools you need on the happy path. Reach for the ones below when the situation calls for it — don't run them by default. Grouped by the sub-task they unlock.
187
+
188
+ | Sub-task | Tool | When to reach for it |
189
+ | ---------------------- | --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
190
+ | **Locate the repo** | `core_list_projects` | Project name isn't obvious from the remote URL |
191
+ | | `repo_list_repos_by_project` | Multiple repos in the project and you need to pick |
192
+ | **Inspect branches** | `repo_list_branches_by_repo` | Confirm the default / target branch exists before creating the PR |
193
+ | | `repo_get_branch_by_name` | Pull the latest commit or branch policies on the source branch |
194
+ | | `repo_create_branch` | Branch off server-side when the user isn't working locally |
195
+ | **Pick a work item** | `wit_my_work_items` | User didn't name one — surface their active items so they can confirm |
196
+ | | `search_workitem` | Keyword search when the work item ID is uncertain |
197
+ | | `wit_get_work_item` / `wit_get_work_items_batch_by_ids` | Fetch title/state to enrich the PR description (e.g. "Closes AB#1234 — add JWT refresh") |
198
+ | **Inspect the change** | `repo_get_pull_request_changes` | Programmatic diff on an existing PR when local `git diff` isn't enough |
199
+ | | `repo_search_commits` | Verify specific commits landed on the source branch |
200
+ | | `repo_get_file_content` | Re-read a file at a specific commit to describe it accurately |
201
+ | **Fetch the PR** | `repo_get_pull_request_by_id` | Reload the PR after create/update (web URL, status, policy state) |
202
+ | **Extra linking** | `wit_add_artifact_link` | Link a commit or build to a work item (non-PR relationship) |
203
+ | | `wit_add_work_item_comment` | Post "PR #N opened" on the work item so watchers see it async |
204
+ | **Comments & votes** | `repo_list_pull_request_threads` / `repo_list_pull_request_thread_comments` | Read existing review threads before editing the PR |
205
+ | | `repo_create_pull_request_thread` | Seed a context comment on the new PR (e.g. testing notes) |
206
+ | | `repo_reply_to_comment` | Respond to a reviewer inline |
207
+ | | `repo_vote_pull_request` | Approve / wait-for-author / reject on the user's behalf — only when explicitly asked |
208
+ | **CI signal** | `pipelines_get_build_status` | Check whether the branch's CI is green before un-drafting |
209
+ | | `pipelines_get_build_log` | Pull logs when CI is red and you're helping diagnose |
@@ -9,6 +9,7 @@
9
9
  "permissions": {
10
10
  "defaultMode": "bypassPermissions"
11
11
  },
12
+ "disabledMcpjsonServers": ["github", "azure-devops"],
12
13
  "enabledPlugins": {
13
14
  "pyright-lsp@claude-plugins-official": true,
14
15
  "typescript-lsp@claude-plugins-official": true,
package/.mcp.json CHANGED
@@ -6,6 +6,11 @@
6
6
  "headers": {
7
7
  "Authorization": "Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}"
8
8
  }
9
+ },
10
+ "azure-devops": {
11
+ "type": "stdio",
12
+ "command": "bunx",
13
+ "args": ["-y", "@azure-devops/mcp", "<your-org>"]
9
14
  }
10
15
  }
11
16
  }
@@ -7,7 +7,13 @@
7
7
  "url": "https://api.githubcopilot.com/mcp",
8
8
  "headers": {
9
9
  "Authorization": "Bearer ${env:GITHUB_PERSONAL_ACCESS_TOKEN}"
10
- }
10
+ },
11
+ "enabled": false
12
+ },
13
+ "azure-devops": {
14
+ "type": "local",
15
+ "command": ["bunx", "-y", "@azure-devops/mcp", "<your-org>"],
16
+ "enabled": false
11
17
  }
12
18
  }
13
19
  }