@brainervirus/workit-core 0.11.0 → 1.0.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 (150) hide show
  1. package/README.md +5 -3
  2. package/package.json +8 -3
  3. package/scripts/analyze-release-scope.ts +4 -1
  4. package/scripts/doctor-check.ts +3 -1
  5. package/scripts/install-codex-plugin.sh +28 -0
  6. package/scripts/install-cursor-plugin.sh +1 -0
  7. package/scripts/install-opencode-plugin.sh +1 -0
  8. package/scripts/install-pi-package.sh +56 -0
  9. package/scripts/rewrite-workspace-deps.ts +22 -5
  10. package/scripts/sync-release-manifests.ts +8 -5
  11. package/scripts/sync-runtime.sh +7 -3
  12. package/scripts/validate-cursor-marketplace.ts +16 -62
  13. package/skills/workit-babysit/SKILL.md +33 -0
  14. package/skills/workit-behavioral-tdd/SKILL.md +53 -0
  15. package/skills/workit-blast-radius/SKILL.md +31 -0
  16. package/skills/workit-challenge/SKILL.md +62 -0
  17. package/skills/workit-debug/SKILL.md +61 -0
  18. package/skills/workit-deslop/SKILL.md +36 -0
  19. package/skills/workit-diagram/SKILL.md +32 -0
  20. package/skills/workit-green-run/SKILL.md +29 -0
  21. package/skills/workit-handoff/SKILL.md +43 -0
  22. package/skills/workit-implement/SKILL.md +46 -0
  23. package/skills/workit-mockup/SKILL.md +28 -0
  24. package/skills/workit-plan/SKILL.md +66 -0
  25. package/skills/workit-review/SKILL.md +60 -0
  26. package/skills/workit-steer/SKILL.md +32 -0
  27. package/src/core/authority.ts +918 -0
  28. package/src/core/boundary.ts +29 -0
  29. package/src/core/branch.ts +26 -255
  30. package/src/core/changelog.ts +95 -18
  31. package/src/core/commit-flavors.ts +65 -0
  32. package/src/core/config-conversion.ts +183 -0
  33. package/src/core/config.ts +42 -0
  34. package/src/core/cutover.ts +721 -0
  35. package/src/core/detect-hosts.ts +107 -0
  36. package/src/core/doctor.ts +428 -18
  37. package/src/core/external-action-effects.ts +1171 -0
  38. package/src/core/external-action.ts +541 -0
  39. package/src/core/init.ts +83 -32
  40. package/src/core/methods.ts +125 -0
  41. package/src/core/policy-resolver.ts +523 -0
  42. package/src/core/pr-create.ts +7 -1
  43. package/src/core/registration.ts +69 -4
  44. package/src/core/repo-context.ts +59 -1
  45. package/src/core/setup.ts +28 -0
  46. package/src/core/skill-manifests.ts +40 -42
  47. package/src/core/support-matrix.ts +8 -3
  48. package/src/core/sync-runtime.ts +15 -3
  49. package/src/core/task-context.ts +179 -0
  50. package/src/core/task-contract.ts +1136 -0
  51. package/src/core/task-engine.ts +2562 -0
  52. package/src/core/task-evaluation.ts +679 -0
  53. package/src/core/task-store.ts +1071 -0
  54. package/src/core/tracker-issues.ts +237 -0
  55. package/src/core/uninstall.ts +67 -3
  56. package/src/core/vcs-config.ts +53 -22
  57. package/src/core/workers.ts +166 -0
  58. package/src/core/workspaces.ts +3 -1
  59. package/src/core/youtrack-tools.ts +2 -0
  60. package/src/core/youtrack.ts +145 -10
  61. package/src/core.ts +126 -0
  62. package/templates/execution-contract.md +17 -50
  63. package/templates/plan-template.md +3 -3
  64. package/templates/spec-template.md +15 -3
  65. package/templates/workit-contract.md +12 -0
  66. package/commands/wk-changelog.md +0 -2
  67. package/commands/wk-commit.md +0 -2
  68. package/commands/wk-docs-refresh.md +0 -2
  69. package/commands/wk-handoff.md +0 -2
  70. package/commands/wk-implement.md +0 -2
  71. package/commands/wk-init.md +0 -2
  72. package/commands/wk-issue-update.md +0 -2
  73. package/commands/wk-meetings.md +0 -2
  74. package/commands/wk-pr.md +0 -2
  75. package/commands/wk-release-notes.md +0 -2
  76. package/commands/wk-status.md +0 -2
  77. package/commands/wk-verify.md +0 -2
  78. package/scripts/update-superpowers.sh +0 -82
  79. package/scripts/vendor-assets.ts +0 -37
  80. package/skills/wk-changelog/SKILL.md +0 -15
  81. package/skills/wk-commit/SKILL.md +0 -16
  82. package/skills/wk-docs-refresh/SKILL.md +0 -15
  83. package/skills/wk-handoff/SKILL.md +0 -20
  84. package/skills/wk-implement/SKILL.md +0 -47
  85. package/skills/wk-init/SKILL.md +0 -31
  86. package/skills/wk-issue-update/SKILL.md +0 -27
  87. package/skills/wk-issue-update/references/youtrack-update-style.md +0 -81
  88. package/skills/wk-meetings/SKILL.md +0 -17
  89. package/skills/wk-pr/SKILL.md +0 -27
  90. package/skills/wk-release-notes/SKILL.md +0 -15
  91. package/skills/wk-status/SKILL.md +0 -16
  92. package/skills/wk-verify/SKILL.md +0 -16
  93. package/src/core/detector.ts +0 -239
  94. package/src/core/flow-state.ts +0 -3308
  95. package/src/core/handoff-context.ts +0 -136
  96. package/src/core/handoff-tools.ts +0 -133
  97. package/src/core/menu.ts +0 -70
  98. package/src/core/plan-tasks.ts +0 -43
  99. package/src/core/reminder.ts +0 -124
  100. package/src/core/sdd.ts +0 -353
  101. package/src/state.ts +0 -22
  102. package/templates/superpowers-doc-contract.md +0 -75
  103. package/vendor/superpowers/skills/brainstorming/SKILL.md +0 -159
  104. package/vendor/superpowers/skills/brainstorming/scripts/frame-template.html +0 -213
  105. package/vendor/superpowers/skills/brainstorming/scripts/helper.js +0 -167
  106. package/vendor/superpowers/skills/brainstorming/scripts/server.cjs +0 -723
  107. package/vendor/superpowers/skills/brainstorming/scripts/start-server.sh +0 -209
  108. package/vendor/superpowers/skills/brainstorming/scripts/stop-server.sh +0 -120
  109. package/vendor/superpowers/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
  110. package/vendor/superpowers/skills/brainstorming/visual-companion.md +0 -291
  111. package/vendor/superpowers/skills/dispatching-parallel-agents/SKILL.md +0 -185
  112. package/vendor/superpowers/skills/executing-plans/SKILL.md +0 -70
  113. package/vendor/superpowers/skills/finishing-a-development-branch/SKILL.md +0 -241
  114. package/vendor/superpowers/skills/receiving-code-review/SKILL.md +0 -213
  115. package/vendor/superpowers/skills/requesting-code-review/SKILL.md +0 -103
  116. package/vendor/superpowers/skills/requesting-code-review/code-reviewer.md +0 -172
  117. package/vendor/superpowers/skills/subagent-driven-development/SKILL.md +0 -428
  118. package/vendor/superpowers/skills/subagent-driven-development/implementer-prompt.md +0 -139
  119. package/vendor/superpowers/skills/subagent-driven-development/scripts/review-package +0 -44
  120. package/vendor/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +0 -22
  121. package/vendor/superpowers/skills/subagent-driven-development/scripts/task-brief +0 -40
  122. package/vendor/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +0 -188
  123. package/vendor/superpowers/skills/systematic-debugging/CREATION-LOG.md +0 -119
  124. package/vendor/superpowers/skills/systematic-debugging/SKILL.md +0 -296
  125. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting-example.ts +0 -158
  126. package/vendor/superpowers/skills/systematic-debugging/condition-based-waiting.md +0 -115
  127. package/vendor/superpowers/skills/systematic-debugging/defense-in-depth.md +0 -122
  128. package/vendor/superpowers/skills/systematic-debugging/find-polluter.sh +0 -63
  129. package/vendor/superpowers/skills/systematic-debugging/root-cause-tracing.md +0 -169
  130. package/vendor/superpowers/skills/systematic-debugging/test-academic.md +0 -14
  131. package/vendor/superpowers/skills/systematic-debugging/test-pressure-1.md +0 -58
  132. package/vendor/superpowers/skills/systematic-debugging/test-pressure-2.md +0 -68
  133. package/vendor/superpowers/skills/systematic-debugging/test-pressure-3.md +0 -69
  134. package/vendor/superpowers/skills/test-driven-development/SKILL.md +0 -371
  135. package/vendor/superpowers/skills/test-driven-development/testing-anti-patterns.md +0 -299
  136. package/vendor/superpowers/skills/using-git-worktrees/SKILL.md +0 -202
  137. package/vendor/superpowers/skills/using-superpowers/SKILL.md +0 -62
  138. package/vendor/superpowers/skills/using-superpowers/references/antigravity-tools.md +0 -23
  139. package/vendor/superpowers/skills/using-superpowers/references/codex-tools.md +0 -39
  140. package/vendor/superpowers/skills/using-superpowers/references/pi-tools.md +0 -16
  141. package/vendor/superpowers/skills/verification-before-completion/SKILL.md +0 -139
  142. package/vendor/superpowers/skills/writing-plans/SKILL.md +0 -174
  143. package/vendor/superpowers/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
  144. package/vendor/superpowers/skills/writing-skills/SKILL.md +0 -689
  145. package/vendor/superpowers/skills/writing-skills/anthropic-best-practices.md +0 -1150
  146. package/vendor/superpowers/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +0 -189
  147. package/vendor/superpowers/skills/writing-skills/graphviz-conventions.dot +0 -172
  148. package/vendor/superpowers/skills/writing-skills/persuasion-principles.md +0 -187
  149. package/vendor/superpowers/skills/writing-skills/render-graphs.js +0 -168
  150. package/vendor/superpowers/skills/writing-skills/testing-skills-with-subagents.md +0 -384
@@ -1,82 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Re-sync vendored Superpowers skills from upstream. Never pushes or commits.
3
- set -euo pipefail
4
-
5
- REPO="https://github.com/obra/superpowers.git"
6
- VENDOR="vendor/superpowers"
7
- PIN=""
8
- for arg in "$@"; do
9
- case "$arg" in
10
- --https) REPO="https://github.com/obra/superpowers.git" ;;
11
- --ssh) REPO="git@github.com:obra/superpowers.git" ;;
12
- --pin=*) PIN="${arg#--pin=}" ;;
13
- *) if [ -z "$PIN" ]; then PIN="$arg"; fi ;;
14
- esac
15
- done
16
-
17
- ROOT="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
18
- STAGE="$(mktemp -d)"
19
- trap 'rm -rf "$STAGE"' EXIT
20
-
21
- echo "Cloning upstream..."
22
- git clone --quiet --depth 1 "$REPO" "$STAGE/sp"
23
- cd "$STAGE/sp"
24
- if [ -n "$PIN" ]; then
25
- git fetch --quiet --depth 1 origin "refs/tags/$PIN" 2>/dev/null || {
26
- echo "ERROR: pin $PIN not found upstream" >&2
27
- exit 1
28
- }
29
- git checkout --quiet "$PIN"
30
- fi
31
- VERSION="$(grep -m1 '"version"' package.json | sed -E 's/.*"version": "([^"]+)".*/\1/')"
32
-
33
- cd "$ROOT"
34
- rm -rf "$VENDOR/skills"
35
- mkdir -p "$VENDOR"
36
- cp -R "$STAGE/sp/skills" "$VENDOR/skills"
37
-
38
- # Patch vendored skills to the toolkit's docs layout and contract rules.
39
- # The upstream skills teach docs/superpowers/... and the forbidden
40
- # "Two execution options" menu — both overridden by our contract.
41
- find "$VENDOR/skills" -type f \( -name '*.md' -o -name '*.ts' \) -print0 | while IFS= read -r -d '' f; do
42
- sed -i \
43
- -e 's|docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md|docs/<slug>/plan.md|g' \
44
- -e 's|docs/superpowers/plans/<filename>.md|docs/<slug>/plan.md|g' \
45
- -e 's|docs/superpowers/plans/feature-plan.md|docs/<slug>/plan.md|g' \
46
- -e 's|docs/superpowers/plans/deployment-plan.md|docs/deployment-plan/plan.md|g' \
47
- -e 's|docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md|docs/<slug>/spec.md|g' \
48
- -e 's|docs/superpowers/specs/|docs/<slug>/|g' \
49
- -e 's|docs/superpowers/plans/|docs/<slug>/|g' \
50
- -e 's|"Plan complete and saved to `docs/<slug>/plan.md`. Two execution options:\*\*|"Plan complete and saved to `docs/<slug>/plan.md`.**|g' \
51
- "$f"
52
- done
53
-
54
- # Re-apply the per-task commit-range rule (CA-02) to the vendored
55
- # subagent-driven-development skill after every re-sync: upstream does not
56
- # carry it, and the hand-edit is current truth. Idempotent — when the rule is
57
- # already present the block is a no-op, so re-running leaves one copy. The awk
58
- # temp file lives in $STAGE (already trap-cleaned), so a failed awk leaves no
59
- # .tmp behind in the vendor dir, and if the marker headings were renamed or
60
- # reordered upstream the rule is appended at end-of-file instead of silently
61
- # no-oping.
62
- SDD_SKILL="$VENDOR/skills/subagent-driven-development/SKILL.md"
63
- RULE="- Each task produces exactly one contiguous non-empty commit range: fix rounds append commits to it, never amend or rewrite an active review range, and the ledger progress line records the task's real base..head shas."
64
- if [ -f "$SDD_SKILL" ] && ! grep -qF "one contiguous non-empty commit range" "$SDD_SKILL"; then
65
- TMP="$STAGE/sdd-skill.tmp"
66
- awk -v rule="$RULE" '
67
- /^## Durable Progress$/ { in_section=1 }
68
- in_section && !inserted && /^## Prompt Templates$/ {
69
- print rule;
70
- inserted=1;
71
- }
72
- { print }
73
- ' "$SDD_SKILL" > "$TMP"
74
- if ! grep -qF "one contiguous non-empty commit range" "$TMP"; then
75
- printf '%s\n' "$RULE" >> "$TMP"
76
- fi
77
- mv "$TMP" "$SDD_SKILL"
78
- fi
79
-
80
- printf '%s\n' "$VERSION" > "$VENDOR/VERSION"
81
- echo "Vendored superpowers $VERSION -> $VENDOR (patched to docs/<slug>/ layout)"
82
- echo "Review with: git status && git diff --stat"
@@ -1,37 +0,0 @@
1
- import { cpSync, existsSync, readFileSync, statSync, writeFileSync } from "node:fs";
2
- import path from "node:path";
3
-
4
- const vendorFilter = (source: string): boolean => {
5
- if (source.endsWith(".sh")) return false;
6
- const stat = statSync(source);
7
- return (
8
- stat.isDirectory() ||
9
- ((stat.mode & 0o111) === 0 && readFileSync(source).subarray(0, 2).toString("latin1") !== "#!")
10
- );
11
- };
12
-
13
- export const copySanitizedVendor = (source: string, dest: string): void => {
14
- cpSync(source, dest, { recursive: true, filter: vendorFilter });
15
-
16
- const companion = path.join(dest, "brainstorming/visual-companion.md");
17
- if (!existsSync(companion)) return;
18
- let md = readFileSync(companion, "utf8");
19
- const fromStart = md.indexOf("## Starting a Session");
20
- const toLoop = md.indexOf("## The Loop", fromStart);
21
- const fromCleanup = md.indexOf("## Cleaning Up");
22
- const toReference = md.indexOf("## Reference", fromCleanup);
23
- if (fromStart !== -1 && toLoop !== -1 && fromCleanup !== -1 && toReference !== -1) {
24
- md =
25
- md.slice(0, fromStart) +
26
- "The packaged browser-companion runtime is not shipped with this package; its\n" +
27
- "launcher scripts are excluded as vendored shell. Consult the upstream skill\n" +
28
- "source for launch instructions.\n\n" +
29
- md.slice(toLoop, fromCleanup) +
30
- md.slice(toReference);
31
- }
32
- md = md.replace(
33
- /If it has shut down, restart it with `start-server\.sh` using the \*\*same `--project-dir`\*\*[\s\S]*?you don't need to send a new URL\. /,
34
- "",
35
- );
36
- writeFileSync(companion, md);
37
- };
@@ -1,15 +0,0 @@
1
- ---
2
- name: wk-changelog
3
- description: Preview and apply a Keep a Changelog update.
4
- ---
5
-
6
- # Changelog
7
-
8
- 1. Load this skill explicitly through OpenCode's `skill` tool.
9
- 2. Call the read-only `workit_changelog_context` context tool; its result is ground truth.
10
- 3. Draft the exact insertion preview, including target heading, categories, and bullets.
11
- 4. Use native `question` with concise choices and allow a custom answer before changing the file.
12
- 5. Call `workit_changelog_apply` only after approval with `confirmed: true`.
13
- 6. Report the structured success, failure stage, or partial result; never infer success.
14
-
15
- Target `## [Unreleased]` unless the user requests a release. Use only Added, Changed, Deprecated, Removed, Fixed, or Security; group user-visible behavior and skip internal-only work. The apply tool must merge into existing category headings, preserve all unrelated lines, and skip duplicate bullets. If normalization is needed, include it in the same preview and approval. Do not hand-edit the changelog, version packages, tag, or commit. `todowrite` and `task` are unnecessary here.
@@ -1,16 +0,0 @@
1
- ---
2
- name: wk-commit
3
- description: Preview and create a structured local commit without staging.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Commit
8
-
9
- 1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the read-only `workit_git_context` context tool with any selected paths; its result is ground truth.
11
- 3. Draft the exact Conventional Commit message and the already-staged file set.
12
- 4. Use native `question` with concise choices and allow a custom answer before committing.
13
- 5. Call `workit_commit` only after approval with `confirmed: true` and the reviewed `message`.
14
- 6. Report the structured success, failure stage, or partial result; never infer success.
15
-
16
- Never stage files automatically: `workit_commit` commits the current index only. Stop for an empty index, partial staging ambiguity, unrelated staged files, secrets, protected branches, or failed hooks. Never push, bypass hooks, use `--no-verify`, or claim files were committed unless the result proves it. Keep related code, tests, and docs in one coherent commit; do not invent extra commit groups. `todowrite` and `task` are unnecessary here.
@@ -1,15 +0,0 @@
1
- ---
2
- name: wk-docs-refresh
3
- description: Refresh stale repository documentation from structured change context.
4
- ---
5
-
6
- # Docs refresh
7
-
8
- 1. Load this skill explicitly through OpenCode's `skill` tool.
9
- 2. Call the read-only `workit_docs_context` context tool; its result is ground truth.
10
- 3. Draft the smallest factual documentation edit from structured facts.
11
- 4. Use native `question` with concise choices and allow a custom answer only if the requested edit scope is ambiguous.
12
- 5. Apply approved edits with normal OpenCode file tools, then call `workit_verify`.
13
- 6. Report the structured success, failure stage, or partial result; never infer success.
14
-
15
- Prefer README changes when stale, then directly related tracked documentation. Preserve tone and structure; do not invent features, commands, environment variables, screenshots, or install steps. Do not make stylistic rewrites, commit, or modify product code. Report verification exactly. Use `todowrite` only when multiple requested documents need tracking; `task` is unnecessary.
@@ -1,20 +0,0 @@
1
- ---
2
- name: wk-handoff
3
- description: Create and optionally select a seeded OpenCode continuation session.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Handoff
8
-
9
- 1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the automatic `workit_handoff_session` tool with the full user message as `message`; its result is ground truth.
11
- 3. The tool resolves the tracked spec, plan, and SDD context and seeds the continuation session.
12
- 4. This workflow needs no `question`: the explicit invocation is approval.
13
- 5. Pass only `message`; the tool itself recognizes an exact `--stay` flag and otherwise selects the new session.
14
- 6. Report the structured success, failure stage, or partial result; never infer success.
15
- 7. After any `workit_handoff_session` result—success, partial, or failure—end the originating turn immediately after one status message. Never create todos, execute the plan inline, modify files, retry handoff, or call another tool.
16
- 8. A destination run that executes the plan must still end with `workit_plan_complete` (or the CLI `workit flow complete`) once the SDD ledger is complete and repository verification passes, and never finish the run while the plan is still `active`.
17
-
18
- Handoff titles continuation sessions `Workit: <slug>` (never `Continue <slug>`). OpenCode's native `Continue opencode -s <session-id>` epilogue is the valid manual recovery command when host selection is unavailable (`stage: "select"`): `selected: false` with a `sessionID` is a partial success — use `opencode -s <session-id>` to resume, not a Workit bug.
19
-
20
- Never emit a continuation prompt, use the clipboard, or ask the user to copy text. If selected, report the session ID only if the current session remains visible. If staying, report the seeded session ID. On failure, report `stage` and `error`; preserve any returned session for the session picker and never recreate it automatically. `todowrite` and `task` are unnecessary here.
@@ -1,47 +0,0 @@
1
- ---
2
- name: wk-implement
3
- description: Coordinate a tracked Superpowers plan with delegated implementation and reviews.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Implement
8
-
9
- The parent agent is coordinator-only. It must not edit product code or perform delegated exploration.
10
-
11
- ## Native setup
12
-
13
- 1. Load this skill explicitly through OpenCode's `skill` tool.
14
- 2. Call read-only `workit_plan_tasks` and `workit_sdd_context`; their structured results are ground truth.
15
- 3. Call `workit_flow_status` with the plan path and hard-stop unless `spec.status === "approved"`, `plan.status === "approved"`, and `menu.presented === true`. If any gate is missing, run the required approval flow (`workit_spec_approve`/`workit_plan_approve` after the user's native-question approval, `workit_plan_menu` after the post-plan menu) and re-check — never start tasks on a draft or unapproved plan.
16
- 4. Initialize native `todowrite` from returned tasks and mark ledger-completed task IDs completed.
17
- 5. Call `workit_resolve_branch`, then show the current branch, target branch, and stash behavior before any branch checkout/setup mutation.
18
- 6. Always use native `question` before that mutation. For a clean tree, ask whether to proceed or cancel. For a dirty tree, add the stash choice and state what will be stashed; allow a custom answer.
19
- 7. Call `workit_branch_setup` with `confirmed: true` only after approval; never use worktrees. Flow-tool confirmations are never agent-typed booleans and never caller-supplied evidence: the plugin records your native-`question` answer as a host-observed one-use receipt (`attested: true`, `callID`, `selectedLabel`, `recordedAt`) consumed by the approval/menu tools — no evidence argument exists. Delegated worker status comes from host session parentage (`parentID`), never a caller `role` field.
20
- 8. Report any setup failure stage or partial result; never infer success.
21
- 9. Fill specs/plans from the quality templates: `templates/spec-template.md` for specs, `templates/plan-template.md` for plans. After `workit_docs_validate`, surface the returned `quality` findings: hard findings (missing required section, missing CA-XX) block task start unless the user explicitly waives them; warnings are advisory.
22
-
23
- Working state lives only in gitignored `docs/<slug>/sdd/` — never `.superpowers/sdd`, never an extra nested slug level. Load the package-neutral execution contract by name, not an installation-specific path.
24
-
25
- ## Per-task loop
26
-
27
- For every plan task whose ID is absent from `completed_task_ids`:
28
-
29
- 1. Mark it `in_progress` with `todowrite`.
30
- 2. Create its brief with `workit_sdd_task_brief` using `confirmed: true` and the parsed `section_text`.
31
- 3. Use `task` with the built-in `explore` agent for read-only discovery when needed, then a fresh built-in `general` agent to implement from the brief. The parent remains coordinator-only.
32
- 4. Require product changes to follow TDD: failing check first, minimal implementation, passing focused check.
33
- 5. Create the review package with `workit_sdd_review_package` using `confirmed: true`.
34
- 6. Dispatch separate `general` agents for spec-compliance review and code-quality review. **Blocking findings** (Critical, Important, or spec-compliance) may trigger at most **two** fix+re-review rounds per task. **Advisory** findings (Minor, style, YAGNI, taste) never pause the loop — append them with `workit_sdd_append_advisory` (`--task <id> --text <text>`) using `confirmed: true`.
35
- 7. Append the validated ledger line with `workit_sdd_append_progress` using `confirmed: true`, then mark the task completed with `todowrite`.
36
-
37
- Each task lands exactly one contiguous non-empty commit range (`base..head`): fix rounds append commits to that range and never rewrite/amend an active review range; each progress line records the task's real base..head shas.
38
-
39
- Never redispatch completed task IDs. Pass task briefs and review diffs to agents; do not make them reparse the plan. Keep commits on the in-place feature/bugfix branch.
40
-
41
- Delegated authority is direct-child-only: a worker is the session whose host `parentID` exactly equals the activating coordinator's recorded `coordinator_session_id`; missing, mismatched, or multi-owner lineage fails closed with `delegation_lineage_denied`, and nested `opencode` launches are denied during active delegated work. An authorized child receives only the compact worker contract — execute the supplied brief, follow TDD, land one contiguous non-empty commit range, report results — never coordinator guidance, `wk-implement`, or ledger management. Coordinator bookkeeping (briefs, review packages, progress, advisories via `workit_sdd_*`) stays with the coordinator session.
42
-
43
- ## Final gate
44
-
45
- After all remaining tasks, dispatch a final full-branch code review, run `workit_verify`, and report exact per-check results. Present the full `<SDD_DIR>/advisories.md` roll-up once, then use native `question` so the user can choose which advisory items to fix, discuss, or discard. Only then may advisory fixes run. Use `workit_git_context` for the final commit preview and the `wk-commit` skill for any approved commit. If a tracked stash reference exists, preview reapplication with `question`, then call `workit_branch_setup` with `confirmed: true` only after approval.
46
-
47
- **Mandatory:** end the run by calling `workit_plan_complete` (OpenCode/Cursor) or the CLI `workit flow complete` (CLI host) after the final task once the SDD ledger is complete (all task IDs appended) and `workit_verify` passes — a complete ledger and green verification are the tool's gates. Never finish the run while the plan is still `active`.
@@ -1,31 +0,0 @@
1
- ---
2
- name: wk-init
3
- description: Preview and apply one-time workit configuration.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Init
8
-
9
- 1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the read-only `workit_init_status` context tool; its result is ground truth.
11
- 3. Draft an exact preview of each missing scaffold and the active VCS provider.
12
- 4. For each guarded mutation, use native `question` with concise choices and allow a custom answer.
13
- 5. Call `workit_init_apply` only after approval with `confirmed: true` and the chosen action.
14
- 6. Report the structured success, failure stage, or partial result; never infer success.
15
-
16
- Never ask for or accept tokens in chat. For missing YouTrack configuration, preview `youtrack_scaffold`; for missing VCS configuration, ask GitLab or GitHub, preview `vcs_scaffold`, and pass `vcs_provider`. Both provider token placeholders may be created, but identify which one is active. Show the returned token-create URL and local edit path after apply. Verification remains a separate `wk-status` run. `todowrite` and `task` are unnecessary here.
17
-
18
- ## Guided config (action: "config")
19
-
20
- When the user wants to personalize the toolkit (locale, timezone, branch policy), ask native questions one at a time:
21
-
22
- 1. **Locale** — present a combobox of `localeOptions` (en, es-CL, es-MX, es-AR, pt-BR) + custom answer; validate the answer against BCP-47 (`^[a-z]{2,3}(-(?:[A-Z]{2}|[0-9]{3}))?$`, so `es-419` is valid) before passing it.
23
- 2. **Timezone** — e.g. `America/Santiago`, custom allowed.
24
- 3. **Branch policy preset** — gitflow / github-flow / trunk-based / custom.
25
- 4. **Custom branch lists** (only when preset = custom): allowed patterns (`feature/*`, `codex/*`, …) and protected names (`main`, …).
26
-
27
- Then call `workit_init_apply` with `action: "config"`, `confirmed: true`, and the answered values. Report the written `config.json` path and its contents.
28
-
29
- After config, call `workit_init_apply` with `action: "gitignore"` and `confirmed: true` to ensure the project `.gitignore` covers `docs/*/sdd/` and common OS/editor entries (creates it if missing, preserves existing entries).
30
-
31
- After gitignore, call `workit_init_apply` with `action: "hygiene"`, `confirmed: true`, and `include_open_source: true` for open-source repos — creates CHANGELOG.md (Keep a Changelog), README.md, .editorconfig, .gitattributes, and optionally LICENSE + CONTRIBUTING.md. Never overwrites existing files.
@@ -1,27 +0,0 @@
1
- ---
2
- name: wk-issue-update
3
- description: Draft and post a reviewed es-CL YouTrack task update with time.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Issue update
8
-
9
- Read [references/youtrack-update-style.md](references/youtrack-update-style.md) before drafting. Chat follows the user's language; the comment body is manager-friendly Spanish (`es-CL`).
10
-
11
- 1. Load this skill explicitly through OpenCode's `skill` tool.
12
- 2. Ask in plain prose for the user-provided issue URL or ID, call `workit_youtrack_parse_issue`, then read-only `workit_youtrack_context`; structured results are ground truth.
13
- 3. Gather the user's notes, call `workit_youtrack_parse_duration`, polish only supported facts, and call `workit_youtrack_draft` for the exact comment preview.
14
- 4. Use native `question` with concise choices and allow a custom answer to approve the reviewed comment and time entry.
15
- 5. Call `workit_youtrack_post` only after approval with `confirmed: true`, `issueId`, `markdown`, and `minutes`.
16
- 6. Report the structured success, failure stage, or partial result; never infer success.
17
-
18
- Never guess the issue, compute minutes, pass a date, expose tokens, or post Git/file details as the update. Never present a clickable `question` option whose label is an instruction to type free text (e.g. "Type the issue URL/ID"): clicking an option returns the label literal, not the typed value, so ask for free text in prose instead, with the custom answer field enabled. Preserve the user's paragraph voice, explain technical terms plainly, and avoid robotic status bullets. `todowrite` and `task` are unnecessary here.
19
-
20
- Consume the standard Result envelope:
21
-
22
- - If `result.ok` is true, report only effects proven by `result.data`.
23
- - If false, use `result.data.postedComment` and `result.data.loggedMinutes` to distinguish completed effects.
24
- - If `result.data.retry === "workit_youtrack_post"`, use native `question` to ask whether to retry the unchanged reviewed `issueId`, `markdown`, and `minutes`. On approval, call `workit_youtrack_post` with `confirmed: true` at most once; never loop.
25
- - If `result.data.retry === "workit_youtrack_log_time"`, use native `question` to ask whether to retry the same `issueId` and `minutes`. On approval, call `workit_youtrack_log_time` with `confirmed: true`, `issueId`, `minutes` at most once; never repost a known posted comment.
26
- - If the second attempt fails, stop and report its structured result. Never switch retry tools or infer that either effect succeeded.
27
- - If outcome is `unknown` or `result.data.retry` is absent, show `result.data.instructions` when present, reconcile manually, and do not retry either mutation.
@@ -1,81 +0,0 @@
1
- # YouTrack update style (Cristhofer / es-CL)
2
-
3
- Use when writing or polishing the comment body before `workit_youtrack_draft`. **Preserve the author's voice** — like the ChatGPT revision thread: grammar, flow, and light structure, not a changelog.
4
-
5
- ## Audience
6
-
7
- **@Alejandra.Flores is the primary reader — she is not a developer.** Write for a technical project manager:
8
-
9
- - Lead with **what you worked on and why it mattered**, not implementation mechanics.
10
- - If you mention something technical (OpenAPI, flags, component names, GUAS, MFE), add **one short plain-language clause** so the reader understands impact without knowing the stack.
11
- - Prefer product/feature language: *data sources*, *integración con el backend*, *selector de color*, *vista del segundo factor*.
12
-
13
- ### Technical detail — clarify, don't drop
14
-
15
- | Too dev (avoid alone) | Better for manager |
16
- |-----------------------|-------------------|
17
- | overlays fuera del shadow DOM en el host | el selector de color no se veía bien cuando el reporte está embebido en la web principal |
18
- | `replaceUrl: true` en el interceptor | para que al volver atrás no se repitiera el mismo error en bucle |
19
- | Migré a `daisy-overlay-tokens` | ajusté los estilos del overlay para que respeten el tema de la web |
20
-
21
- Only include dev terms the user actually brought up — then **translate or contextualize** in the same breath.
22
-
23
- ## Shape
24
-
25
- 1. `# Actualización` (single H1)
26
- 2. Blank line
27
- 3. `@Alejandra.Flores` + greeting (`Hola, buenos días.` / `Hola, buenas tardes.`) — same line or next paragraph OK
28
- 4. **Body: paragraphs**, not bullet dumps
29
-
30
- Optional second H1 when the user has a long tangent block:
31
-
32
- - `## Off-topic` — only when the user's material is clearly a side topic (tooling, proceso, ideas). Keep the main work under `# Actualización`.
33
-
34
- ## Openers (only if the user's material implies it)
35
-
36
- - `Hoy estuve trabajando en…` / `Hoy por la tarde he estado full con…`
37
- - `Hoy estuve full con <proyecto>.`
38
- - `Dado lo que conversamos,…`
39
-
40
- Do **not** force an opener.
41
-
42
- ## Voice
43
-
44
- - First person, Chilean Spanish: *harto*, *darle una vuelta*, *al día*, *trasteando*, *ojalá*.
45
- - Honest: *al parecer*, *creo que*, *imagino que*, *no alcancé a*, *entiendo que*.
46
- - Explain **why** and **what's next**, not file trees.
47
- - Close with forward look when relevant: *Mañana…*, *me falta…*, *de momento va bien*.
48
-
49
- ## Tangents
50
-
51
- Natural bridges: `Por otro lado,…`, `Como comentario adicional,…`, `Como punto aparte,…`, `Quiero comentar algo que puede ser interesante.`
52
-
53
- Long tooling/process tangents → `## Off-topic` (exemplar 4).
54
-
55
- ## Allowed formatting
56
-
57
- - Backticks for product/component names the user mentioned: `` `color-picker` ``, `` `button` ``
58
- - Links and screenshots the user attached
59
- - Short inline lists **only** when comparing options the manager needs to understand (exemplar 4: OpenAPI vs backend vs frontend) — as **prose or one flowing sentence**, not a task checklist
60
-
61
- ## Forbidden (unless user wrote them verbatim)
62
-
63
- - Branch names, SHAs, `src/...` paths
64
- - Nested `###` subsections for work items
65
- - Bullet lists of completed tasks (PR style)
66
- - Stacked changelog verbs: *Implementé*, *Migré*, *Alineé*
67
- - Invented work or metrics
68
- - Pasting `git log`, agent session, or `facts.*` into the comment
69
- - Jargon without a plain-language gloss
70
-
71
- ## Polish level (ChatGPT-thread)
72
-
73
- 1. Grammar and spelling.
74
- 2. Smooth sentences; similar length to input.
75
- 3. Split wall-of-text into paragraphs; add bridges only when needed.
76
- 4. **Do not** add facts the user did not supply.
77
- 5. **Do** add a brief gloss when the user used opaque tech terms.
78
-
79
- ## Length
80
-
81
- Match the user. Never pad.
@@ -1,17 +0,0 @@
1
- ---
2
- name: wk-meetings
3
- description: Log meeting time only to the configured YouTrack meeting issue.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Meetings
8
-
9
- 1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call read-only `workit_youtrack_context` with `mode: "meetings"`; its sole configured target is ground truth.
11
- 3. Ask for duration text, call `workit_youtrack_parse_duration`, and draft the exact IRPT-12 time entry only.
12
- 4. Use native `question` with concise choices and allow a custom answer to approve the shown issue, minutes, and work-item text.
13
- 5. Call `workit_youtrack_log_time` only after approval with `confirmed: true`, `issueId`, `minutes`, `text`.
14
- 6. If `result.data.outcome` is `unknown`, tell the user to reconcile manually and do not retry. Retry `workit_youtrack_log_time` at most once only when `result.data.outcome` is `not_applied` and `result.data.retry` names that tool; follow `result.data.instructions` and correct invalid input before retrying.
15
- 7. Report the structured success or failure stage; never infer success.
16
-
17
- Use the configured meeting issue even if its default label is IRPT-12. Never compute minutes, pass a date, ask for a meeting type, post a comment, or call `workit_youtrack_post`. `todowrite` and `task` are unnecessary here.
@@ -1,27 +0,0 @@
1
- ---
2
- name: wk-pr
3
- description: Preview and create a pull or merge request from branch-exclusive facts.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Pull request
8
-
9
- 1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the read-only `workit_pr_context` context tool for branch-exclusive commits and changes; its result is ground truth.
11
- 3. Call `workit_verify`, then draft the exact title, body, base, head, and draft state from structured facts.
12
- 4. **Show** the exact title and body in chat before any create question.
13
- 5. Use native `question` with concise choices and allow a custom answer before creation.
14
- 6. Call `workit_pr_create` only after approval with `confirmed: true` and the reviewed fields.
15
- 7. Report the structured success, failure stage, or partial result; never infer success.
16
-
17
- ## GitHub issue linking
18
-
19
- When the resolved workspace is github with `link_on_pr` — the `workit_pr_context` tool's `vcs_config` returns `issues_provider: "github"` and `link_on_pr: true` — and no issue is derivable (no `WORKFLOW_GH_ISSUE` env, no numeric branch id like `feature/42-title`, which auto-links without asking), ask with native `question` before creation, exactly three options:
20
-
21
- 1. **Use an existing issue** — the user provides the number (extract it from a URL if pasted); verify it exists with `gh issue view <n>` before proceeding.
22
- 2. **Create a new issue** — via `gh issue create --title "<title>" --body "<body>"`; on success pass the returned number. Reuse the missing-CLI guard: if `gh` is not installed, surface the structured error with the install link and ask the user to confirm once installed.
23
- 3. **Skip linking** — no issue line in the PR body.
24
-
25
- Pass the chosen issue to pr-create via env: `WORKFLOW_GH_ISSUE=<n>` and, when the PR does NOT resolve the issue, `WORKFLOW_GH_ISSUE_RELATION=related` (default `closes`). The youtrack linking flow (`youtrack.link_issues`) for work workspaces is unchanged.
26
-
27
- Only feature or bugfix branches may target the configured base; never create from a protected branch. The body must describe only branch-exclusive changes, follow the repository template when present, and disclose failed or skipped verification. Never expose tokens, edit product files, or fall back to provider CLIs. `todowrite` and `task` are unnecessary here.
@@ -1,15 +0,0 @@
1
- ---
2
- name: wk-release-notes
3
- description: Draft user-facing release notes for an explicit range.
4
- ---
5
-
6
- # Release notes
7
-
8
- 1. Load this skill explicitly through OpenCode's `skill` tool.
9
- 2. Require an exact version, tag, or commit range, then call the read-only `workit_release_notes_context`; its result is ground truth.
10
- 3. Draft notes from structured facts and include both requested and resolved range metadata.
11
- 4. Use native `question` only when the exact range must be supplied or corrected; allow a custom answer.
12
- 5. This workflow has no mutation tool.
13
- 6. Report the structured success, failure stage, or partial result; never infer success.
14
-
15
- Write for users: supported highlights, fixes, upgrade notes, and known issues only. Omit empty sections except Highlights, and say directly when the resolved range contains no user-facing changes. Do not edit files, publish a release, or infer a range. `todowrite` and `task` are unnecessary here.
@@ -1,16 +0,0 @@
1
- ---
2
- name: wk-status
3
- description: Report workit, YouTrack, and VCS health.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Status
8
-
9
- 1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the read-only `workit_status` context tool once; its result is ground truth.
11
- 3. Draft the health report from structured facts.
12
- 4. This workflow has no guarded mutation and does not need `question`.
13
- 5. Do not call any mutation tool.
14
- 6. Report the structured success, failure stage, or partial result; never infer success.
15
-
16
- Show every `items[]` result, the resolved YouTrack settings and verification, the VCS provider and verification, and the exact `ready` verdict. For placeholders, point to the returned token creation and edit paths; never request tokens in chat. Use only `workit_status` and report its structured state. Do not run shell, Git, direct HTTP, isolated token verification, or any mutation. `todowrite` and `task` are unnecessary for this read-only workflow.
@@ -1,16 +0,0 @@
1
- ---
2
- name: wk-verify
3
- description: Discover and run project validation with workit_verify.
4
- disable-model-invocation: true
5
- ---
6
-
7
- # Verify
8
-
9
- 1. Load this skill explicitly through OpenCode's `skill` tool.
10
- 2. Call the read-only `workit_verify` context tool with `dry_run: true`; its result is ground truth.
11
- 3. Draft the discovered checks and the proposed selected run from structured facts.
12
- 4. When the user must choose checks, use native `question` with concise choices and allow a custom answer.
13
- 5. Call `workit_verify` with `dry_run: false` only for the approved run.
14
- 6. Report the structured success, failure stage, or partial result; never infer success.
15
-
16
- Do not edit files or fix failures. Report every check exactly as pass, fail, or skipped, including its command, exit code, and skip reason. Success requires every executed check to exit 0. If the user's message says `--dry-run`, stop after discovery.