@ferronhooi/aihub 0.0.1 → 0.1.0-next.3

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 (57) hide show
  1. package/dist/cli.js +10 -9
  2. package/dist/commands/comments.js +32 -0
  3. package/dist/commands/doctor.js +21 -0
  4. package/dist/commands/init.js +18 -0
  5. package/dist/commands/pr.js +75 -0
  6. package/dist/commands/skills.js +44 -0
  7. package/dist/lib/ado.js +158 -0
  8. package/dist/lib/auth.js +68 -0
  9. package/dist/lib/clients.js +26 -0
  10. package/dist/lib/comments.js +119 -0
  11. package/dist/lib/context.js +9 -0
  12. package/dist/lib/doctor.js +118 -0
  13. package/dist/lib/errors.js +7 -0
  14. package/dist/lib/git.js +79 -0
  15. package/dist/lib/init.js +157 -0
  16. package/dist/lib/install.js +141 -0
  17. package/dist/lib/pack.js +48 -0
  18. package/dist/lib/pr.js +131 -0
  19. package/dist/lib/schema.js +56 -0
  20. package/dist/lib/team.js +24 -0
  21. package/dist/lib/templates.js +184 -0
  22. package/dist/router.js +48 -0
  23. package/dist/tools/lintSkills.js +166 -0
  24. package/dist/tools/lintSkills.test.js +70 -0
  25. package/pack/commands/copilot/cherry-pick.prompt.md +6 -0
  26. package/pack/commands/copilot/pr-update.prompt.md +6 -0
  27. package/pack/commands/copilot/pr.prompt.md +6 -0
  28. package/pack/commands/copilot/refine.prompt.md +6 -0
  29. package/pack/commands/copilot/review.prompt.md +6 -0
  30. package/pack/commands/copilot/story.prompt.md +6 -0
  31. package/pack/commands/copilot/watch.prompt.md +6 -0
  32. package/pack/commands/opencode/cherry-pick.md +5 -0
  33. package/pack/commands/opencode/pr-update.md +5 -0
  34. package/pack/commands/opencode/pr.md +5 -0
  35. package/pack/commands/opencode/refine.md +5 -0
  36. package/pack/commands/opencode/review.md +5 -0
  37. package/pack/commands/opencode/story.md +5 -0
  38. package/pack/commands/opencode/watch.md +5 -0
  39. package/pack/skills/_shared/assets/commit-template.nl.txt +5 -0
  40. package/pack/skills/_shared/assets/commit-template.txt +5 -0
  41. package/pack/skills/_shared/assets/pull_request_template.md +16 -0
  42. package/pack/skills/_shared/assets/pull_request_template.nl.md +16 -0
  43. package/pack/skills/_shared/assets/story-template.md +12 -0
  44. package/pack/skills/_shared/assets/story-template.nl.md +12 -0
  45. package/pack/skills/_shared/references/team.schema.yaml +41 -0
  46. package/pack/skills/branch-sync/SKILL.md +31 -0
  47. package/pack/skills/implement/SKILL.md +25 -0
  48. package/pack/skills/pipeline-fix/SKILL.md +29 -0
  49. package/pack/skills/pr-create/SKILL.md +29 -0
  50. package/pack/skills/pr-update/SKILL.md +28 -0
  51. package/pack/skills/pr-watch/SKILL.md +30 -0
  52. package/pack/skills/release/SKILL.md +35 -0
  53. package/pack/skills/review-process/SKILL.md +35 -0
  54. package/pack/skills/start-here/SKILL.md +36 -0
  55. package/pack/skills/story-create/SKILL.md +28 -0
  56. package/pack/skills/story-refine/SKILL.md +28 -0
  57. package/package.json +13 -3
@@ -0,0 +1,70 @@
1
+ import fs from "node:fs";
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+ import { describe, expect, it } from "vitest";
5
+ import { COMMANDS, commandFileName, expectedCommand, lintSkills, parseFrontMatter } from "./lintSkills.js";
6
+ const repoSkills = path.resolve(import.meta.dirname, "../../../skills");
7
+ function body(extra = "") {
8
+ const para = "Run the command and report the printed link. Never ask about template sections. ".repeat(12);
9
+ return `# T\n\n## When\n${para}\n## Steps\nx\n## What the CLI fills\ny\n## If it fails\nz\n${extra}`;
10
+ }
11
+ function pack(skill, text) {
12
+ const root = fs.mkdtempSync(path.join(os.tmpdir(), "lint-"));
13
+ fs.mkdirSync(path.join(root, "skills", skill), { recursive: true });
14
+ fs.mkdirSync(path.join(root, "commands"), { recursive: true });
15
+ fs.writeFileSync(path.join(root, "skills", skill, "SKILL.md"), text);
16
+ return path.join(root, "skills");
17
+ }
18
+ const good = (extra = "") => `---\nname: demo\ndescription: "Use when testing"\n---\n${body(extra)}`;
19
+ const lint = (dir) => lintSkills(dir).filter((e) => !e.includes("commands") && !e.includes("skill \"") && !e.includes(".md: missing"));
20
+ describe("lintSkills", () => {
21
+ it("accepts a valid skill", () => {
22
+ expect(lint(pack("demo", good()))).toEqual([]);
23
+ });
24
+ it("requires Use when", () => {
25
+ const t = good().replace("Use when testing", "Does things");
26
+ expect(lint(pack("demo", t)).join()).toMatch(/Use when/);
27
+ });
28
+ it("requires name equal to folder", () => {
29
+ expect(lint(pack("other", good())).join()).toMatch(/must equal folder/);
30
+ });
31
+ it("checks the token budget", () => {
32
+ expect(lint(pack("demo", good("x".repeat(4000)))).join()).toMatch(/max 500/);
33
+ });
34
+ it("flags broken links, absolute paths and forbidden names", () => {
35
+ const e = lint(pack("demo", good("[a](nope.md) C:\\Users\\x IQBS"))).join("\n");
36
+ expect(e).toMatch(/link does not resolve/);
37
+ expect(e).toMatch(/absolute path/);
38
+ expect(e).toMatch(/forbidden name "iqbs"/);
39
+ });
40
+ it("accepts a configurable forbidden list", () => {
41
+ const dir = pack("demo", good("Acme"));
42
+ expect(lintSkills(dir, { forbidden: ["acme"] }).join()).toMatch(/forbidden name "acme"/);
43
+ });
44
+ it("does not treat https links as absolute paths", () => {
45
+ expect(lint(pack("demo", good("[x](https://example.com/a)")))).toEqual([]);
46
+ });
47
+ it("parses front matter", () => {
48
+ expect(parseFrontMatter(good())?.data.name).toBe("demo");
49
+ });
50
+ it("detects commands that drift from the generated text", () => {
51
+ const dir = pack("demo", good());
52
+ const cmds = path.join(dir, "..", "commands", "opencode");
53
+ fs.mkdirSync(cmds, { recursive: true });
54
+ fs.writeFileSync(path.join(cmds, "pr.md"), "edited");
55
+ expect(lintSkills(dir).join("\n")).toMatch(/pr.md: does not match|skill "pr-create" does not exist/);
56
+ });
57
+ });
58
+ describe("the real pack", () => {
59
+ it("lints clean", () => {
60
+ expect(lintSkills(repoSkills)).toEqual([]);
61
+ });
62
+ it("has command files equal to the generated text", () => {
63
+ for (const kind of ["opencode", "copilot"]) {
64
+ for (const c of COMMANDS) {
65
+ const f = path.join(repoSkills, "..", "commands", kind, commandFileName(kind, c));
66
+ expect(fs.readFileSync(f, "utf8").replace(/\r\n/g, "\n")).toBe(expectedCommand(kind, c));
67
+ }
68
+ }
69
+ });
70
+ });
@@ -0,0 +1,6 @@
1
+ ---
2
+ mode: agent
3
+ description: Cherry-pick a PR to other branches
4
+ ---
5
+ Load the `branch-sync` skill and follow it exactly.
6
+ Input: ${input:args:PR id and target branches}
@@ -0,0 +1,6 @@
1
+ ---
2
+ mode: agent
3
+ description: Update the open pull request
4
+ ---
5
+ Load the `pr-update` skill and follow it exactly.
6
+ Input: ${input:args:optional remarks}
@@ -0,0 +1,6 @@
1
+ ---
2
+ mode: agent
3
+ description: Create a pull request
4
+ ---
5
+ Load the `pr-create` skill and follow it exactly.
6
+ Input: ${input:args:optional story id or remarks}
@@ -0,0 +1,6 @@
1
+ ---
2
+ mode: agent
3
+ description: Refine a story
4
+ ---
5
+ Load the `story-refine` skill and follow it exactly.
6
+ Input: ${input:args:story id}
@@ -0,0 +1,6 @@
1
+ ---
2
+ mode: agent
3
+ description: Process review comments
4
+ ---
5
+ Load the `review-process` skill and follow it exactly.
6
+ Input: ${input:args:optional PR id}
@@ -0,0 +1,6 @@
1
+ ---
2
+ mode: agent
3
+ description: Create a story
4
+ ---
5
+ Load the `story-create` skill and follow it exactly.
6
+ Input: ${input:args:what the story is about}
@@ -0,0 +1,6 @@
1
+ ---
2
+ mode: agent
3
+ description: Follow a PR and its pipeline
4
+ ---
5
+ Load the `pr-watch` skill and follow it exactly.
6
+ Input: ${input:args:optional PR id or link}
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Cherry-pick a PR to other branches
3
+ ---
4
+ Load the `branch-sync` skill and follow it exactly.
5
+ Arguments: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Update the open pull request
3
+ ---
4
+ Load the `pr-update` skill and follow it exactly.
5
+ Arguments: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Create a pull request
3
+ ---
4
+ Load the `pr-create` skill and follow it exactly.
5
+ Arguments: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Refine a story
3
+ ---
4
+ Load the `story-refine` skill and follow it exactly.
5
+ Arguments: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Process review comments
3
+ ---
4
+ Load the `review-process` skill and follow it exactly.
5
+ Arguments: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Create a story
3
+ ---
4
+ Load the `story-create` skill and follow it exactly.
5
+ Arguments: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ ---
2
+ description: Follow a PR and its pipeline
3
+ ---
4
+ Load the `pr-watch` skill and follow it exactly.
5
+ Arguments: $ARGUMENTS
@@ -0,0 +1,5 @@
1
+ <type>: <korte samenvatting in de gebiedende wijs, maximaal 72 tekens> (#<story-id>)
2
+
3
+ <optionele toelichting: waarom de wijziging nodig was, een alinea>
4
+
5
+ # type: feat | fix | refactor | test | docs | chore
@@ -0,0 +1,5 @@
1
+ <type>: <short summary in the imperative, max 72 characters> (#<story id>)
2
+
3
+ <optional body: why the change was needed, one paragraph>
4
+
5
+ # type: feat | fix | refactor | test | docs | chore
@@ -0,0 +1,16 @@
1
+ ## Summary
2
+ <what changed and why, in two or three sentences>
3
+
4
+ ## Changes
5
+ - <change 1>
6
+ - <change 2>
7
+
8
+ ## Tests
9
+ | Test | Result |
10
+ |---|---|
11
+ | <test that was really run> | <pass or fail> |
12
+
13
+ Not run: <what was not tested and why>
14
+
15
+ ## Related
16
+ Story: <work item link>
@@ -0,0 +1,16 @@
1
+ ## Samenvatting
2
+ <wat is er veranderd en waarom, in twee of drie zinnen>
3
+
4
+ ## Wijzigingen
5
+ - <wijziging 1>
6
+ - <wijziging 2>
7
+
8
+ ## Tests
9
+ | Test | Resultaat |
10
+ |---|---|
11
+ | <test die echt is uitgevoerd> | <geslaagd of mislukt> |
12
+
13
+ Niet uitgevoerd: <wat niet is getest en waarom>
14
+
15
+ ## Gerelateerd
16
+ Story: <link naar het werkitem>
@@ -0,0 +1,12 @@
1
+ ## Description
2
+ As a <role>, I want <goal>, so that <benefit>.
3
+
4
+ ## Acceptance criteria
5
+ - [ ] <observable result 1>
6
+ - [ ] <observable result 2>
7
+
8
+ ## Technical notes
9
+ <constraints, affected components, open questions>
10
+
11
+ ## Out of scope
12
+ <what this story deliberately does not do>
@@ -0,0 +1,12 @@
1
+ ## Beschrijving
2
+ Als <rol> wil ik <doel>, zodat <voordeel>.
3
+
4
+ ## Acceptatiecriteria
5
+ - [ ] <waarneembaar resultaat 1>
6
+ - [ ] <waarneembaar resultaat 2>
7
+
8
+ ## Technische notities
9
+ <randvoorwaarden, geraakte onderdelen, open vragen>
10
+
11
+ ## Buiten scope
12
+ <wat deze story bewust niet doet>
@@ -0,0 +1,41 @@
1
+ # Schema of the team file. Teams keep their copy in the team repository at
2
+ # .agents/skills/_shared/references/team.yaml (created by `aihub init`).
3
+ # Every key below is documented as "key: <type> # meaning (required|optional)".
4
+ # The values shown are the generic defaults, not team knowledge.
5
+
6
+ version: 1 # integer, schema version (required)
7
+ language: en # content language of stories, PRs, comments, e.g. en or nl (required)
8
+
9
+ azureDevOps:
10
+ organization: <organization> # Azure DevOps organization name (required)
11
+ project: <project> # project name (required)
12
+
13
+ repositories: # list (required, at least one)
14
+ - name: <repository> # exact repository name in Azure DevOps (required)
15
+ aliases: [] # list of short names users may say, e.g. ["tp"] (optional)
16
+ defaultTarget: main # branch a new PR targets (required)
17
+ releaseBranches: [] # release branch patterns or names, e.g. ["release/*"] (optional)
18
+
19
+ pullRequest:
20
+ template: .azuredevops/pull_request_template.md # path in the repo to the PR template (required)
21
+ title: "{storyId}: {storyTitle}" # title pattern; placeholders {storyId} {storyTitle} {branch} (optional)
22
+ emptySection: "-" # text the CLI writes into a template section left empty (optional)
23
+
24
+ workItems:
25
+ storyType: User Story # work item type used for stories (required)
26
+ storyTemplate: .agents/skills/_shared/assets/story-template.md # story template path (required)
27
+
28
+ branches:
29
+ feature: "feature/{storyId}-{slug}" # pattern for feature branches (required)
30
+ protected: # branches the CLI never pushes to or force-updates (optional)
31
+ - main
32
+ - release/*
33
+
34
+ cherryPick:
35
+ groups: # named sets of target branches, usable as --to <group> (optional)
36
+ supported: ["release/1.2", "release/1.3"]
37
+
38
+ pipelines: # pipelines to follow per repository (optional)
39
+ - repository: <repository> # repository name this pipeline belongs to
40
+ name: <pipeline> # pipeline name or id
41
+ required: true # true when a red run blocks the PR
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: branch-sync
3
+ description: "Use when a change must move between branches: 'cherry-pick to release', 'cherry-pick naar', 'update my branch', 'werk de branch bij met main', '/cherry-pick'."
4
+ ---
5
+ # Cherry-pick and branch update
6
+
7
+ ## When
8
+ A merged change must go to other branches, or the own branch is behind its target.
9
+
10
+ ## Steps
11
+ Cherry-pick a PR or commits to one or more branches (groups from `team.yaml` `cherryPick.groups` work too):
12
+
13
+ ```sh
14
+ aihub cherry-pick --from 42 --to release/1.2 --to release/1.3
15
+ ```
16
+
17
+ Bring the own branch up to date with its target:
18
+
19
+ ```sh
20
+ aihub branch update
21
+ ```
22
+
23
+ Example: "cherry-pick PR 42 naar release/1.2" gives the first command; then show the new PR links.
24
+
25
+ ## What the CLI fills
26
+ Merge commits, ordering, one new PR per target and protected-branch checks (`branches.protected`). Do not ask the user about targets that `team.yaml` defines.
27
+
28
+ ## If it fails
29
+ Conflict: resolve it with your own git tools, commit, push, rerun. Never invent branch names or links.
30
+
31
+ Rules: direct command, 0 questions. Local git status, diff, commit and push use your own tools.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: implement
3
+ description: "Use when the user wants a story built: 'implement story 123', 'implementeer deze story', 'werk story 123 uit', 'start met de story'."
4
+ ---
5
+ # Implement a story
6
+
7
+ ## When
8
+ A story id is known and code must change.
9
+
10
+ ## Steps
11
+ 1. Read the story: `aihub story show 123`. Follow its acceptance criteria.
12
+ 2. Create or switch to a feature branch with your own git tools, named per `team.yaml` (`branches.feature`).
13
+ 3. Code and test with your own tools. Keep the change minimal.
14
+ 4. Commit per the commit template ([default](../_shared/assets/commit-template.txt), or the team copy), one logical change per commit, story id in the message.
15
+ 5. Push the own branch with git. Then follow pr-create.
16
+
17
+ Example: `aihub story show 123`, then `git switch -c feature/123-csv-export`, code, `git commit -m "feat: CSV export (#123)"`.
18
+
19
+ ## What the CLI fills
20
+ The story text, links and the branch pattern. Do not ask the user for the story content or the commit format.
21
+
22
+ ## If it fails
23
+ Unknown id: run `aihub doctor` and report. Requirement unclear: decide, and note the assumption in the PR instead of asking.
24
+
25
+ Rules: no ceremony. Local git status, diff, commit and push of the own branch use your own tools, never `aihub`. Commit language follows the team template. Never invent ids or links.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: pipeline-fix
3
+ description: "Use when a build or pipeline failed: 'pipeline is rood', 'fix the build', 'de build faalt', 'tests falen in CI', a failed check on a pull request."
4
+ ---
5
+ # Fix a failing pipeline
6
+
7
+ ## When
8
+ `aihub pipeline follow` or the PR reports a failed run.
9
+
10
+ ## Steps
11
+ 1. Get the failing stage and log excerpt: `aihub pipeline follow`.
12
+ 2. Reproduce locally with your own tools if cheap (same test or lint command).
13
+ 3. Fix the cause, not the check. Never weaken a test.
14
+ 4. Commit per the commit template, push the own branch with git.
15
+ 5. Follow again until green:
16
+
17
+ ```sh
18
+ aihub pipeline follow
19
+ ```
20
+
21
+ Example: a red unit test gives a code fix, `git commit`, `git push`, `aihub pipeline follow`.
22
+
23
+ ## What the CLI fills
24
+ Run id, failing step, trimmed log. Do not ask the user for run ids.
25
+
26
+ ## If it fails
27
+ Log truncated or not signed in: `aihub doctor`. Infrastructure error (agent offline, quota): report it as such, do not change code. Never invent links.
28
+
29
+ Rules: direct task, 0 questions. Local git uses your own tools. Commit messages follow the team language.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: pr-create
3
+ description: "Use when the user wants a pull request: 'maak een PR', 'create a PR', 'open a pull request', '/pr'."
4
+ ---
5
+ # Create a pull request
6
+
7
+ ## When
8
+ Commits are pushed (or ready) on the own branch.
9
+
10
+ ## Steps
11
+ 1. Check with git (own tools): `git status`, `git diff main...HEAD`. Push the branch if needed.
12
+ 2. Write the description to a file following the team PR template ([default](../_shared/assets/pull_request_template.md)). State only what was really done and tested; write "not run" for the rest.
13
+ 3. Run one command:
14
+
15
+ ```sh
16
+ aihub pr create --body-file pr.md
17
+ ```
18
+
19
+ 4. Show the PR link the CLI prints.
20
+
21
+ Example: `aihub pr create --body-file pr.md` creates the PR to the right target, linked to the story.
22
+
23
+ ## What the CLI fills
24
+ Title, target branch and merge base, story link, reviewers, empty sections (`pullRequest.emptySection`) and the repository. Never ask the user about these.
25
+
26
+ ## If it fails
27
+ Read the error text. Missing push: push, retry. Wrong target: run `aihub doctor`. Never invent links or ids.
28
+
29
+ Rules: a direct command is done at once with 0 questions. Content language follows the template. Local git uses your own tools.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: pr-update
3
+ description: "Use when an open pull request needs new content: 'update de PR', 'update the PR description', 'werk de PR bij', '/pr-update', new commits were pushed."
4
+ ---
5
+ # Update a pull request
6
+
7
+ ## When
8
+ The own branch has new commits or the description is out of date.
9
+
10
+ ## Steps
11
+ 1. With git (own tools): `git status`, push new commits.
12
+ 2. See what changed on the PR: `aihub pr changes`.
13
+ 3. Rewrite the description file from the template so it matches the current diff, keeping tested facts honest.
14
+ 4. Run:
15
+
16
+ ```sh
17
+ aihub pr update --body-file pr.md
18
+ ```
19
+
20
+ Example: after a fix commit, `git push`, then `aihub pr update --body-file pr.md`.
21
+
22
+ ## What the CLI fills
23
+ PR id from the current branch, title, template sections, links to the story. Do not ask the user for the PR id.
24
+
25
+ ## If it fails
26
+ No PR for this branch: follow pr-create. Error unclear: run `aihub doctor`. Never invent ids or links.
27
+
28
+ Rules: direct command, 0 questions. Language follows the team template. Local git uses your own tools.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: pr-watch
3
+ description: "Use when a PR or build must be followed: 'watch the PR', 'volg de build', 'is de pipeline groen', '/watch', a dev.azure.com pullrequest link."
4
+ ---
5
+ # Watch a PR or pipeline
6
+
7
+ ## When
8
+ After creating or updating a PR, or when the user gives a PR link or id.
9
+
10
+ ## Steps
11
+ 1. Follow the checks until they finish:
12
+
13
+ ```sh
14
+ aihub pipeline follow
15
+ ```
16
+
17
+ 2. Show state, failed stage and open review threads: `aihub pr changes`.
18
+ 3. Green and no open threads: say so. Red: follow pipeline-fix. New comments: follow review-process.
19
+
20
+ While waiting, do not poll by hand and do not start other work on the same branch; `pipeline follow` returns when the run is finished. Report the final state in one short line per check.
21
+
22
+ Example: the link `.../pullrequest/42` gives `aihub pipeline follow --pr 42`.
23
+
24
+ ## What the CLI fills
25
+ Branch, PR id, build id, log excerpt of the failing step. Do not ask the user for them.
26
+
27
+ ## If it fails
28
+ Not signed in or no PR found: run `aihub doctor`. Report what the CLI printed; never guess a status.
29
+
30
+ Rules: direct command, 0 questions. Local git uses your own tools. Never invent ids or links.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: release
3
+ description: "Use when several repositories or branches must be released together: 'maak een release', 'create a release', 'release alle repos', 'batch cherry-pick'."
4
+ ---
5
+ # Release with batch
6
+
7
+ ## When
8
+ A release touches more than one repository or target branch.
9
+
10
+ ## Steps
11
+ 1. Describe the batch in a file: repositories (names or aliases from `team.yaml`), source PRs, target release branches.
12
+
13
+ ```yaml
14
+ - repo: test-project
15
+ from: [42, 43]
16
+ to: [release/1.2]
17
+ ```
18
+
19
+ 2. Run it in one call:
20
+
21
+ ```sh
22
+ aihub batch --file release.yaml
23
+ ```
24
+
25
+ 3. Show the resulting PR links per repository.
26
+
27
+ Example: two PRs to one release branch is one `release.yaml` and one command.
28
+
29
+ ## What the CLI fills
30
+ Repository resolution, branch checks, ordering, one PR per target, summary table. Do not ask the user per repository.
31
+
32
+ ## If it fails
33
+ One repo fails: the CLI reports it per repo; fix that one (see branch-sync) and rerun only it. Never invent ids or links.
34
+
35
+ Rules: direct command, 0 questions. Local git uses your own tools. Content language follows the team template.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: review-process
3
+ description: "Use when review comments must be handled: 'verwerk de comments', 'process the review', 'reageer op de review', '/review', open threads on a pull request."
4
+ ---
5
+ # Process review comments
6
+
7
+ ## When
8
+ A PR has open reviewer threads.
9
+
10
+ ## Steps
11
+ 1. Read them: `aihub comments get`.
12
+ 2. Fix each valid point in code with your own tools. Commit per the commit template and push the own branch with git.
13
+ 3. Write one reply per thread into a file, in the team language, short and factual (what changed, or why not):
14
+
15
+ ```yaml
16
+ - thread: 7
17
+ text: "Aangepast: null-check toegevoegd."
18
+ resolve: true
19
+ ```
20
+
21
+ 4. Send them in one call:
22
+
23
+ ```sh
24
+ aihub comments reply --replies-file replies.yaml
25
+ ```
26
+
27
+ Example: three threads give one `replies.yaml` with three entries and one command.
28
+
29
+ ## What the CLI fills
30
+ PR id, thread lookup, author tags and status. Do not post replies one by one.
31
+
32
+ ## If it fails
33
+ Unknown thread id: rerun `aihub comments get`. Disagree with a comment: say so in the reply, do not resolve. Never invent ids.
34
+
35
+ Rules: no questions for the direct command. Local git uses your own tools.
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: start-here
3
+ description: "Use when the user starts an Azure DevOps team task and it is unclear which workflow applies, or sends a dev.azure.com link, a slash command, or says 'where do I start', 'waar begin ik', 'wat kan aihub', 'help met mijn story/PR'."
4
+ ---
5
+ # Start here
6
+
7
+ ## When
8
+ Any Azure DevOps team request. Route it at once; do not explain the pack.
9
+
10
+ ## Steps
11
+ Map the intent to a skill, then follow that skill:
12
+
13
+ | Intent or input | Skill |
14
+ |---|---|
15
+ | new story, "maak een story" | story-create |
16
+ | refine, "verfijn", story id without code | story-refine |
17
+ | build a story, "implementeer", "werk uit" | implement |
18
+ | "maak een PR", "create PR" | pr-create |
19
+ | "update de PR", new commits on open PR | pr-update |
20
+ | PR link `.../pullrequest/<id>`, "watch", "volg de build" | pr-watch |
21
+ | review comments, "verwerk de comments" | review-process |
22
+ | cherry-pick, "update branch", merge target | branch-sync |
23
+ | failing pipeline, "build is rood" | pipeline-fix |
24
+ | release, "maak een release", several repos | release |
25
+
26
+ Slash commands `/pr /pr-update /cherry-pick /story /refine /review /watch` map to the same skills.
27
+
28
+ Example: the user sends a pullrequest link, so follow pr-watch with that id.
29
+
30
+ ## What the CLI fills
31
+ Templates, target branch, story links and repository come from `team.yaml` (see the [team schema](../_shared/references/team.schema.yaml)). Never ask the user for them.
32
+
33
+ ## If it fails
34
+ Run `aihub doctor` and show its output. If `team.yaml` is missing, tell the user to run `aihub init` in the team repo.
35
+
36
+ Rules: a direct command ("maak een PR") is executed at once with 0 questions. Local git (status, diff, commit, push of the own branch) uses your own tools. Write content in the language of the team template. Never invent work item ids or links.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: story-create
3
+ description: "Use when the user wants a new user story or work item created: 'create a story', 'maak een story', 'nieuwe story', 'schrijf een story voor ...', '/story'."
4
+ ---
5
+ # Create a story
6
+
7
+ ## When
8
+ The user describes new work and wants it in Azure DevOps.
9
+
10
+ ## Steps
11
+ 1. Write the story text into a file following the team story template ([default](../_shared/assets/story-template.md), or the team's own copy). Fill only what the user said; leave unknown sections empty.
12
+ 2. Run one command:
13
+
14
+ ```sh
15
+ aihub story create --title "Export report as CSV" --body-file story.md
16
+ ```
17
+
18
+ 3. Report the id and link the CLI prints. Do not guess them.
19
+
20
+ Example: "maak een story voor CSV-export" gives `aihub story create --title "CSV-export van het rapport" --body-file story.md` and then the printed id.
21
+
22
+ ## What the CLI fills
23
+ Work item type, area and iteration, parent link, tags and the template skeleton come from `team.yaml` (`workItems`). Do not ask the user about template sections.
24
+
25
+ ## If it fails
26
+ Missing field or template error: run `aihub doctor`, fix the file, retry once. Never invent a work item id or link.
27
+
28
+ Rules: a direct command is done at once with 0 questions. Write in the template language (for example Dutch). Local git uses your own tools.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: story-refine
3
+ description: "Use when an existing story must be refined or completed: 'refine story 123', 'verfijn deze story', 'vul de acceptatiecriteria aan', a dev.azure.com _workitems link, '/refine'."
4
+ ---
5
+ # Refine a story
6
+
7
+ ## When
8
+ A story exists but sections are vague, empty or missing.
9
+
10
+ ## Steps
11
+ 1. Read it: `aihub story show 123`.
12
+ 2. Draft a proposal per template section in a file, using only facts from the story, the repo and what the user said. Mark guesses as open points.
13
+ 3. Show the proposal per section to the user and wait for a yes. This is the one step where you ask.
14
+ 4. After yes, apply it:
15
+
16
+ ```sh
17
+ aihub story refine 123 --body-file refined.md
18
+ ```
19
+
20
+ Example: the user says "verfijn 123". Run `aihub story show 123`, show the proposal, and after "ja" run `aihub story refine 123 --body-file refined.md`.
21
+
22
+ ## What the CLI fills
23
+ Template headings, field mapping, history comment and links. Do not ask the user which sections exist.
24
+
25
+ ## If it fails
26
+ Unknown id or no access: run `aihub doctor`, report the error text. Never invent ids or links.
27
+
28
+ Rules: write in the template language. Do not change code in this skill. Local git uses your own tools.