@amsterdamdatalabs/enact-extensions 0.1.3 → 0.1.8

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 (105) hide show
  1. package/README.md +2 -2
  2. package/dist/index.d.ts +2 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/install.d.ts.map +1 -1
  7. package/dist/install.js +15 -1
  8. package/dist/install.js.map +1 -1
  9. package/dist/internal/agents.d.ts +29 -0
  10. package/dist/internal/agents.d.ts.map +1 -0
  11. package/dist/internal/agents.js +83 -0
  12. package/dist/internal/agents.js.map +1 -0
  13. package/extensions/enact-context/hooks/hooks.json +17 -7
  14. package/extensions/enact-core/.agents/plugin.json +39 -0
  15. package/extensions/enact-core/hooks/hooks.json +14 -0
  16. package/extensions/enact-factory/.agents/plugin.json +9 -3
  17. package/extensions/enact-factory/agents/architect.toml +30 -0
  18. package/extensions/enact-factory/agents/code-reviewer.toml +29 -0
  19. package/extensions/enact-factory/agents/critic.toml +35 -0
  20. package/extensions/enact-factory/agents/executor.toml +23 -0
  21. package/extensions/enact-factory/agents/explore.toml +22 -0
  22. package/extensions/enact-factory/agents/planner.toml +23 -0
  23. package/extensions/enact-factory/agents/verifier.toml +29 -0
  24. package/extensions/enact-factory/skills/ai-slop-cleaner/SKILL.md +52 -0
  25. package/extensions/enact-factory/skills/azdo-ci-strategy/SKILL.md +262 -0
  26. package/extensions/enact-factory/skills/azdo-ci-strategy/references/build-failures.md +60 -0
  27. package/extensions/enact-factory/skills/azdo-ci-strategy/references/cli-reference.md +87 -0
  28. package/extensions/enact-factory/skills/azdo-ci-strategy/references/policies-and-pipelines.md +132 -0
  29. package/extensions/enact-factory/skills/azdo-ci-strategy/references/troubleshooting.md +53 -0
  30. package/extensions/enact-factory/skills/deep-interview/SKILL.md +72 -0
  31. package/extensions/enact-factory/skills/drive-loop/SKILL.md +259 -0
  32. package/extensions/enact-factory/skills/drive-loop/references/contract-schema.md +107 -0
  33. package/extensions/enact-factory/skills/hyperplan/SKILL.md +51 -0
  34. package/extensions/enact-factory/skills/looplan/SKILL.md +103 -0
  35. package/extensions/enact-factory/skills/plan/SKILL.md +71 -0
  36. package/extensions/enact-factory/skills/remove-deadcode/SKILL.md +41 -0
  37. package/extensions/enact-factory/skills/research/SKILL.md +73 -0
  38. package/extensions/enact-factory/skills/review/SKILL.md +48 -0
  39. package/extensions/enact-factory/skills/security-research/SKILL.md +54 -0
  40. package/extensions/enact-factory/skills/tdd/SKILL.md +56 -0
  41. package/extensions/enact-factory/skills/trace/SKILL.md +37 -0
  42. package/extensions/enact-factory/skills/ultraqa/SKILL.md +79 -0
  43. package/extensions/enact-factory/skills/work-with-workitem/SKILL.md +51 -0
  44. package/extensions/enact-factory/skills/workitem-triage/SKILL.md +15 -0
  45. package/extensions/enact-loop/.agents/plugin.json +46 -0
  46. package/extensions/enact-loop/.mcp.json +1 -0
  47. package/extensions/enact-loop/hooks/hooks.json +27 -0
  48. package/extensions/enact-loop/skills/enact-loop/SKILL.md +327 -0
  49. package/extensions/enact-operator/.agents/plugin.json +0 -1
  50. package/extensions/enact-operator/hooks/hooks.json +0 -55
  51. package/extensions/enact-wiki/skills/wiki/SKILL.md +42 -0
  52. package/extensions/plugin-dev/.agents/plugin.json +4 -6
  53. package/extensions/plugin-dev/agents/plugin-validator.md +1 -1
  54. package/extensions/plugin-dev/skills/agent-development/SKILL.md +7 -7
  55. package/extensions/plugin-dev/{commands/create-plugin.md → skills/create-plugin/SKILL.md} +44 -37
  56. package/extensions/plugin-dev/skills/plugin-dev-guide/SKILL.md +13 -14
  57. package/extensions/plugin-dev/skills/skill-development/SKILL.md +0 -2
  58. package/extensions/plugin-dev/{commands/start.md → skills/start/SKILL.md} +7 -6
  59. package/package.json +11 -6
  60. package/scripts/check-hooks.mjs +174 -0
  61. package/scripts/check-principles.mjs +101 -0
  62. package/scripts/enact-extensions.mjs +87 -3
  63. package/scripts/lib/run-validate.mjs +36 -2
  64. package/scripts/lib/ups-router.mjs +432 -0
  65. package/spec/enact.json +4 -0
  66. package/spec/enact.md +5 -2
  67. package/extensions/cmux/.agents/plugin.json +0 -37
  68. package/extensions/cmux/skills/cmux/SKILL.md +0 -82
  69. package/extensions/cmux/skills/cmux/agents/openai.yaml +0 -4
  70. package/extensions/cmux/skills/cmux/references/handles-and-identify.md +0 -35
  71. package/extensions/cmux/skills/cmux/references/panes-surfaces.md +0 -37
  72. package/extensions/cmux/skills/cmux/references/trigger-flash-and-health.md +0 -23
  73. package/extensions/cmux/skills/cmux/references/windows-workspaces.md +0 -31
  74. package/extensions/cmux/skills/cmux-vm-monitor/SKILL.md +0 -122
  75. package/extensions/cmux/skills/cmux-vm-monitor/agents/openai.yaml +0 -4
  76. package/extensions/cmux/skills/cmux-vm-monitor/references/cmux-commands.md +0 -66
  77. package/extensions/cmux/skills/cmux-vm-monitor/scripts/codex_vm_monitor.sh +0 -45
  78. package/extensions/cmux/skills/cmux-workspace/SKILL.md +0 -93
  79. package/extensions/devops/.agents/plugin.json +0 -36
  80. package/extensions/devops/skills/azure-devops-cli/SKILL.md +0 -431
  81. package/extensions/devops/skills/azure-devops-cli/agents/openai.yaml +0 -4
  82. package/extensions/devops/skills/ci-pipeline-strategy/SKILL.md +0 -217
  83. package/extensions/devops/skills/ci-pipeline-strategy/agents/openai.yaml +0 -4
  84. package/extensions/enact-factory/hooks/user-prompt-submit.mjs +0 -67
  85. package/extensions/enact-operator/commands/doctor.md +0 -39
  86. package/extensions/enact-operator/commands/setup.md +0 -51
  87. package/extensions/plugin-dev/.mcp.json +0 -3
  88. package/extensions/plugin-dev/commands/_archive/create-marketplace.md +0 -427
  89. package/extensions/plugin-dev/commands/_archive/plugin-dev-guide.md +0 -12
  90. package/extensions/plugin-dev/hooks/hooks.json +0 -3
  91. package/extensions/plugin-dev/skills/command-development/SKILL.md +0 -763
  92. package/extensions/plugin-dev/skills/command-development/examples/plugin-commands.md +0 -612
  93. package/extensions/plugin-dev/skills/command-development/examples/simple-commands.md +0 -527
  94. package/extensions/plugin-dev/skills/command-development/references/advanced-workflows.md +0 -762
  95. package/extensions/plugin-dev/skills/command-development/references/documentation-patterns.md +0 -769
  96. package/extensions/plugin-dev/skills/command-development/references/frontmatter-reference.md +0 -508
  97. package/extensions/plugin-dev/skills/command-development/references/interactive-commands.md +0 -966
  98. package/extensions/plugin-dev/skills/command-development/references/marketplace-considerations.md +0 -943
  99. package/extensions/plugin-dev/skills/command-development/references/plugin-features-reference.md +0 -637
  100. package/extensions/plugin-dev/skills/command-development/references/plugin-integration.md +0 -191
  101. package/extensions/plugin-dev/skills/command-development/references/skill-tool.md +0 -447
  102. package/extensions/plugin-dev/skills/command-development/references/testing-strategies.md +0 -723
  103. package/extensions/plugin-dev/skills/command-development/scripts/check-frontmatter.sh +0 -234
  104. package/extensions/plugin-dev/skills/command-development/scripts/validate-command.sh +0 -160
  105. /package/extensions/enact-operator/{skills/_variants.md → docs/skill-variants.md} +0 -0
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: plan
3
+ description: "Execution-plan mode that turns intent into small, verifiable slices backed by durable .enact/loop artifacts."
4
+ ---
5
+
6
+ # Plan
7
+
8
+ ## Purpose
9
+
10
+ Use `$plan` to create execution-ready slices. The output is not a strategy memo. It is the
11
+ prompt-quality plan that downstream execution can follow without improvising core behavior.
12
+
13
+ ## Use When
14
+
15
+ - the work is bigger than a one-shot edit
16
+ - the request is clear enough to plan but not yet safe to execute
17
+ - verification, dependencies, or sequencing need to be locked in
18
+
19
+ ## Do Not Use When
20
+
21
+ - the task is still ambiguous enough for `$deep-interview`
22
+ - the change is a trivial single-file fix
23
+ - the user explicitly wants direct execution and the risk is low
24
+
25
+ ## Execution Policy
26
+
27
+ - gather repo facts before asking about internals
28
+ - plans are prompts for execution, not prose for humans only
29
+ - every slice must fit in one focused context window
30
+ - every slice must have explicit verification
31
+ - prefer a small number of high-quality slices over a long TODO dump
32
+
33
+ ## Plan Anatomy
34
+
35
+ Each slice should answer:
36
+
37
+ - what files are likely to change
38
+ - what the slice must do
39
+ - how to verify it
40
+ - what counts as done
41
+ - what it depends on
42
+
43
+ ## Workflow
44
+
45
+ 1. Read current intent artifacts:
46
+ - `.enact/loop/plans/*-requirements.md`
47
+ - `.enact/loop/plans/brownfield-map.md`
48
+ 2. Derive the must-haves from the goal backward:
49
+ - what must be true when this is done?
50
+ - what artifacts and connections are required for those truths?
51
+ 3. Split the work into waves and slices:
52
+ - interface or contracts first
53
+ - implementation second
54
+ - verification and wiring last
55
+ 4. Write or refine:
56
+ - active phase plan
57
+ - verification map
58
+ - loop contract stages (mechanical vs. judgment per slice)
59
+
60
+ ## Quality Bar
61
+
62
+ - no vague acceptance criteria
63
+ - no "make it work" tasks
64
+ - no giant slice that hides three subsystems
65
+ - no verify step that depends on hope
66
+
67
+ ## Deliverables
68
+
69
+ - `.enact/loop/plans/<phase>.md`
70
+ - `.enact/loop/plans/<phase>-verification.md`
71
+ - updated brownfield map or research summary when needed
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: remove-deadcode
3
+ description: "LSP-verified symbol deletion with entry-point guards and candidate-parallel execution."
4
+ ---
5
+
6
+ # Remove Deadcode
7
+
8
+ ## Purpose
9
+
10
+ Use `$remove-deadcode` to remove provably unused code symbols without damaging runtime entry points.
11
+
12
+ ## Preconditions
13
+
14
+ - collect candidate symbols before any deletion
15
+ - load optional entry-point guard list from `.enact/loop/remove-deadcode/entry-points.txt`
16
+
17
+ ## Required Safety Contract
18
+
19
+ For each candidate symbol, the deletion gate is strict:
20
+
21
+ 1. If symbol is listed in the entry-point guard file, skip deletion unconditionally.
22
+ 2. Otherwise call `lsp_find_references` (via enact-context).
23
+ 3. If references are non-empty, abort deletion for that symbol and emit an explanatory message.
24
+ 4. Only delete when references are exactly zero and the symbol is not guarded.
25
+
26
+ ## Execution Model
27
+
28
+ - batching is explicit: enumerate all candidates first
29
+ - then dispatch parallel `executor` subagents, one candidate per subagent
30
+ - each subagent must apply the same guard-list and `lsp_find_references` checks
31
+
32
+ ## Behavioral Constraints
33
+
34
+ - no heuristic-only deletion
35
+ - no bypass of entry-point guard list
36
+ - no GitHub-specific assumptions or workflows in deletion decisions
37
+
38
+ ## Verification Expectations
39
+
40
+ - unit test: non-empty `lsp_find_references` result must refuse deletion
41
+ - unit test: guard-listed symbol must be skipped even when reference count is zero
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: research
3
+ description: "Evidence-first research mode for current patterns, implementation risks, and decision support."
4
+ ---
5
+
6
+ # Research
7
+
8
+ ## Purpose
9
+
10
+ Use `$research` when the correct implementation depends on facts you do not yet have, either from the repo or from current external sources.
11
+
12
+ ## Execution Policy
13
+
14
+ - start with brownfield evidence from the repo
15
+ - use primary sources for technical questions
16
+ - end with a decision-ready recommendation, not a wall of notes
17
+ - persist findings so the next pass does not repeat the work
18
+
19
+ ## Workflow
20
+
21
+ 1. Identify the actual unknowns.
22
+ 2. Separate:
23
+ - repo truth
24
+ - external truth
25
+ - assumptions
26
+ 3. Gather only the evidence needed to decide.
27
+ 4. Write the result into `.enact/loop/research/summary.md`.
28
+ 5. Update any linked loop contract or task state if the research is part of an active execution lane.
29
+
30
+ ## Parallel Sweep
31
+
32
+ Run concurrent research agents for independent evidence lanes. The floor is 2 concurrent agents whenever there are both repo-truth and external-truth unknowns.
33
+
34
+ - minimum concurrent-agent floor: 2
35
+ - recommended split: one agent for internal repo evidence and one agent for external primary sources
36
+ - increase concurrency only when unknowns are independent and synthesis cost remains manageable
37
+
38
+ Anti-stop rule: do not stop at the first result. Continue each lane until at least one corroborating source is collected per lane, or until an explicit blocker is documented.
39
+
40
+ ## Runtime Clarification
41
+
42
+ - `$research` is an evidence pass, not a closure-owning runtime lane.
43
+ - If research output is being used to support closure on a live loop, rely
44
+ on the real loop proof surfaces rather than treating research notes as
45
+ equivalent to stage evidence:
46
+ - `loop_grade` (for mechanical stages with command evidence)
47
+ - `loop_grader_dispatch` + `loop_grader_verdict` (for judgment stages)
48
+ - `loop_contract_parity` (for contract-parity checks)
49
+
50
+ ## Deliverables
51
+
52
+ - current pattern or contract summary
53
+ - risk list
54
+ - recommendation with concrete tradeoffs
55
+ - open questions that still block planning or execution
56
+
57
+ ### Internal Evidence
58
+
59
+ - repo paths inspected
60
+ - commands or tools used
61
+ - concrete findings tied to files, code, or runtime state
62
+ - unresolved internal gaps
63
+
64
+ ### External Evidence
65
+
66
+ - primary sources consulted
67
+ - dated facts and version-sensitive constraints
68
+ - corroboration across at least one additional source
69
+ - unresolved external gaps
70
+
71
+ ## Activation
72
+
73
+ Invoke with `$research` or `$enact-loop:research`. This skill is a stateless evidence pass — no durable workflow state is started automatically. If enact-loop MCP tools are available, prefer them for any stage recording that flows from the research output.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: review
3
+ description: "Findings-first pre-landing review against code, plan completion, verification evidence, and loop state."
4
+ ---
5
+
6
+ # Review
7
+
8
+ ## Purpose
9
+
10
+ Use `$review` to answer one question: is this actually ready to land? Review is not a summary pass.
11
+ It is a bug, regression, coverage, and state-integrity pass.
12
+
13
+ ## Execution Policy
14
+
15
+ - findings first, summary second
16
+ - prefer evidence over author claims
17
+ - check the code, the tests, the plan, and the loop artifacts
18
+ - if the current context authored the change, prefer a separate reviewer role for approval
19
+
20
+ ## Review Order
21
+
22
+ 1. Read the changed code.
23
+ 2. Read the active plan and verification map.
24
+ 3. Check what was supposed to happen vs what actually landed.
25
+ 4. Verify:
26
+ - tests and typechecks
27
+ - docs drift
28
+ - `.enact/loop/` state drift
29
+ - judgment stages have valid independent grader verdicts
30
+ 5. Produce a verdict:
31
+ - approved
32
+ - changes requested
33
+ - blocked
34
+
35
+ ## Mandatory Checks
36
+
37
+ - missing or fake verification
38
+ - uncovered changed paths
39
+ - stale docs or setup instructions
40
+ - task marked done but still pending review evidence
41
+ - judgment stages with self-reported verdicts (flag as grader-independence-missing)
42
+
43
+ ## Output Standard
44
+
45
+ - findings ordered by severity
46
+ - file references and why they matter
47
+ - residual risk
48
+ - final verdict and next action
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: security-research
3
+ description: "Multi-agent security research with hunter/PoC split and optional critical bug auto-creation in Azure DevOps."
4
+ ---
5
+
6
+ # Security Research
7
+
8
+ ## Purpose
9
+
10
+ Use `$security-research` to run a focused vulnerability hunt, produce ranked findings, and optionally create Azure DevOps Bug work items for critical issues.
11
+
12
+ ## Parameters
13
+
14
+ - `autoCreateBugs: boolean` (default `true`)
15
+ - when `false`, no `factory_workitem_sync_once` call is allowed regardless of severity
16
+
17
+ ## Team Topology
18
+
19
+ - 3 hunter agents:
20
+ - hunter 1: CWE classification
21
+ - hunter 2: CVSS v4 scoring
22
+ - hunter 3: OWASP category mapping
23
+ - 2 PoC engineer agents:
24
+ - PoC 1 and PoC 2: exploitability proof and reproduction quality
25
+
26
+ ## Required Workflow
27
+
28
+ 1. Launch hunters to identify and classify potential vulnerabilities.
29
+ 2. Launch PoC engineers on top-ranked findings to validate exploitability.
30
+ 3. Merge outputs into a single findings report.
31
+ 4. Write report to `.enact/factory/security/<sessionId>/findings.md`.
32
+ 5. Rank findings in the report by CVSS v4 severity.
33
+ 6. For each finding with CVSS v4 `>= 9.0`, if `autoCreateBugs=true`, call `factory_workitem_sync_once` to create a `Bug` work item.
34
+ 7. If `autoCreateBugs=false`, skip all bug auto-creation calls.
35
+
36
+ ## Azure DevOps-Only Contract
37
+
38
+ - use factory MCP work-item surfaces for bug creation
39
+ - no GitHub Security Advisories, GitHub issue creation, or GitHub-specific security automation assumptions
40
+
41
+ ## Behavioral Constraints
42
+
43
+ - CVSS scoring must be v4, not v3 fallback
44
+ - critical auto-bug creation threshold is fixed at `>= 9.0`
45
+ - findings must include at least one of: CWE, CVSS v4 vector/score, OWASP mapping
46
+
47
+ ## Verification Expectations
48
+
49
+ - integration test: findings report includes at least one CWE classification entry
50
+ - integration test: with `autoCreateBugs=false`, verify no `factory_workitem_sync_once` call is made
51
+
52
+ ## Activation
53
+
54
+ Invoke with `$security-research` or `$enact-factory:security-research`. This skill uses enact-factory MCP tools for work-item creation. No durable workflow state is started automatically — the skill produces findings within a single session.
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: tdd
3
+ description: "Red-green-refactor mode for behavior with clear inputs, outputs, and regression value."
4
+ ---
5
+
6
+ # TDD
7
+
8
+ ## Purpose
9
+
10
+ Use `$tdd` when behavior can be specified before implementation. TDD is for design pressure and
11
+ regression safety, not for ritual.
12
+
13
+ ## Good TDD Candidates
14
+
15
+ - business rules
16
+ - API contracts
17
+ - parsing, formatting, or validation
18
+ - state transitions
19
+ - algorithms and utility behavior
20
+
21
+ ## Skip TDD For
22
+
23
+ - pure layout and styling work
24
+ - config-only changes
25
+ - trivial glue code
26
+ - exploratory prototypes where behavior is not yet known
27
+
28
+ ## Iron Law
29
+
30
+ No production code without a failing test first.
31
+
32
+ ## Cycle
33
+
34
+ 1. Red
35
+ - write the smallest failing test for the next behavior
36
+ - run it and prove it fails for the right reason
37
+ 2. Green
38
+ - write the minimum code to make it pass
39
+ - rerun the test and the relevant suite
40
+ 3. Refactor
41
+ - clean up only after green
42
+ - keep the suite green after every change
43
+
44
+ ## Rules
45
+
46
+ - one behavior per cycle
47
+ - do not batch multiple features into one red-green pass
48
+ - prefer regression tests for changed behavior
49
+ - record the verify command in the plan or task notes
50
+
51
+ ## Output Standard
52
+
53
+ - what behavior the test locked in
54
+ - the failing signal
55
+ - the minimal implementation
56
+ - the final verification command
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: trace
3
+ description: "Execution-path mapping for entry points, data flow, side effects, and blast radius before risky work."
4
+ ---
5
+
6
+ # Trace
7
+
8
+ ## Purpose
9
+
10
+ Use `$trace` before a risky edit or review when you need to know what code path actually runs, what
11
+ it touches, and what could break downstream.
12
+
13
+ ## Workflow
14
+
15
+ 1. Find the entry points.
16
+ 2. Follow data flow through the changed or targeted path.
17
+ 3. Map side effects:
18
+ - storage writes
19
+ - network calls
20
+ - UI state changes
21
+ - background work
22
+ 4. Identify risky branches and missing guards.
23
+ 5. Name the concrete files the next pass should touch.
24
+
25
+ ## Suggested Tools
26
+
27
+ - `ctx_search` for symbol and path discovery
28
+ - `ctx_read` for call-path confirmation
29
+ - `ctx_semantic_search` or `ctx_graph` when lexical search is not enough
30
+
31
+ ## Output Standard
32
+
33
+ - entry points
34
+ - downstream side effects
35
+ - risky branches
36
+ - likely blast radius
37
+ - recommended edit boundary
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: ultraqa
3
+ description: "QA cycling workflow with hard-stop verification gates: tests, lint, smoke execution, and loop-contract persistence."
4
+ lane: true
5
+ ---
6
+
7
+ # UltraQA
8
+
9
+ ## Purpose
10
+ Combines `$loop` (durable contract-runner with closure gates) with an explicit set of QA gates. Each gate must pass before the loop advances. The cycle is: implement a fix, run all gates, advance only when green, repeat until every gate is clean in a single run.
11
+
12
+ ## Use When
13
+ - Verification has failed and a structured fix-verify cycle is needed
14
+ - A feature must be proven working end-to-end before merging
15
+ - A hard record of each verification pass and failure is required
16
+
17
+ ## Execution Policy
18
+
19
+ - start from the repo and `.enact/loop/` truth, not chat memory
20
+ - drive the QA loop through loop MCP tools; CLI commands are the fallback
21
+ - keep loop state current as you go
22
+ - do not stop until all gates pass in a single clean run
23
+
24
+ ## Workflow
25
+ 1. Start a loop contract scoped to the QA goal:
26
+ - MCP: `loop_start` with `goal` and QA gate stages as the contract
27
+ - CLI: `enact-loop loop start --goal "<what must be verified>"`
28
+ 2. Check current loop status before each iteration:
29
+ - MCP: `loop_status`
30
+ - CLI: `enact-loop loop status`
31
+ 3. Run each QA gate in sequence. All must pass before advancing:
32
+ - Unit and integration tests (run the project's test command)
33
+ - Lint and type checks (run the project's lint command)
34
+ - Doctor / readiness check (run the project's doctor command if present)
35
+ - Real-execution smoke test (invoke the primary feature with real inputs, not mocks)
36
+ 4. Record each gate result:
37
+ - MCP: `loop_grade` with `stageId`, `status=passed|failed`, and `evidence="<command + output>"`
38
+ - All gate results must include command evidence, not just a pass/fail assertion.
39
+ 5. After all mechanical gates pass, advance to verifying:
40
+ - MCP: `loop_advance` with `toPhase=verifying`
41
+ 6. If a judgment review is required before completing, dispatch a grader:
42
+ - MCP: `loop_grader_dispatch` with `stageId`; await `loop_grader_verdict`
43
+ 7. When all required stages are passed, complete the loop:
44
+ - MCP: `loop_complete` with `summary`
45
+ - CLI: `enact-loop loop complete`
46
+
47
+ ## Proof Path
48
+
49
+ - Use `loop_contract_parity` for contract-parity checks when QA is part of closure.
50
+ - Judgment stages require an independent grader (different vendor/model) via `loop_grader_dispatch`.
51
+ - Do not substitute inferred status for command-backed evidence.
52
+
53
+ ## State Contract
54
+ - Reads: `.enact/loop/state/loop.json` (loop state), test and lint output
55
+ - Writes: loop state via MCP tools (`loop_grade`, `loop_advance`, `loop_complete`)
56
+
57
+ ## MCP Tools
58
+
59
+ - `loop_start` — start a loop contract scoped to the QA goal
60
+ - `loop_status` — read current loop state
61
+ - `loop_advance` — transition to the next phase
62
+ - `loop_grade` — record a mechanical gate result with command evidence
63
+ - `loop_grader_dispatch` — dispatch an independent grader for a judgment gate
64
+ - `loop_grader_verdict` — record an independent grader's GO/NO-GO
65
+ - `loop_block` — mark blocked with a reason
66
+ - `loop_complete` — close the loop after all gates pass
67
+ - `loop_abort` — abort the loop with a reason
68
+ - `loop_contract_parity` — run contract-parity check
69
+
70
+ ## Activation
71
+
72
+ Invoke with `$ultraqa` or `$enact-loop:ultraqa`. The SessionStart hook auto-resumes any active loop from `.enact/loop/state/loop.json`. The Stop boulder blocks exit until all required stages are passed and the loop phase is terminal.
73
+
74
+ ## Final Check
75
+ - Every gate (tests, lint, doctor, smoke) passed in a single iteration with command evidence
76
+ - `loop_grade` recorded as `passed` for all mechanical stages before `loop_complete`
77
+ - Judgment stages have valid independent grader verdicts from `loop_grader_verdict`
78
+ - No gate was skipped or bypassed
79
+ - `loop_complete` was called; no loop left in `running` or `verifying` state
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: work-with-workitem
3
+ description: "Lightweight Azure DevOps work-item delivery lane: implement and hand off; factory owns tracking and closure."
4
+ ---
5
+
6
+ # Work With Workitem
7
+
8
+ ## Purpose
9
+
10
+ Use `$work-with-workitem` for agent-driven delivery tied to a single Azure DevOps work item.
11
+
12
+ ## Domain Boundary
13
+
14
+ - agent scope is intentionally lightweight: load, isolate, implement, PR, handoff, cleanup
15
+ - enact-factory owns CI heartbeat tracking, branch policy waits, auto-merge, and lifecycle advance to `Closed`
16
+ - this skill must not add CI polling loops or unbounded branch-policy waiting
17
+
18
+ ## Azure DevOps-Only Contract
19
+
20
+ - use `factory_workitem_get` and `factory_assignment_record` for work-item reads and closing notes
21
+ - use `az repos pr create --work-items <id>` to link the PR to the work item
22
+ - do not assume or reference GitHub APIs, GitHub Actions, GitHub checks, or GitHub branch protection primitives
23
+
24
+ ## Required Sequence
25
+
26
+ 1. `factory_workitem_get` loads the target work item and confirms readiness.
27
+ 2. `EnterWorktree` isolates the implementation workspace.
28
+ 3. Execute implementation (use a loop contract or inline execution for simple tasks).
29
+ 4. Create atomic commits with clear work-item-linked intent.
30
+ 5. Run `az repos pr create --work-items <id>` and capture the PR URL.
31
+ 6. Call `factory_assignment_record` with a closing note that includes PR URL and commit SHA.
32
+ 7. `ExitWorktree` cleans up the isolated workspace.
33
+
34
+ ## Behavioral Constraints
35
+
36
+ - no CI poll loop in this skill; CI heartbeat belongs to `factory_watchdog_status`
37
+ - no merge waiting or policy-wait ownership in this skill
38
+ - no lifecycle mutation to `Closed` from this skill
39
+ - if PR creation fails, record failure context and exit through normal cleanup
40
+
41
+ ## Verification Expectations
42
+
43
+ - integration target is a work item tagged `test-fixture`
44
+ - verify PR link uses `--work-items <id>`
45
+ - verify `factory_assignment_record` includes PR URL and commit SHA
46
+ - verify `ExitWorktree` cleanup is executed
47
+ - do not verify CI completion or merge here
48
+
49
+ ## Activation
50
+
51
+ Invoke with `$work-with-workitem` or `$enact-factory:work-with-workitem`. The skill uses enact-factory MCP tools (`factory_workitem_get`, `factory_assignment_record`) for all work-item interactions. No durable workflow state is started automatically — the skill runs to completion within a single session.
@@ -1,3 +1,13 @@
1
+ ---
2
+ name: workitem-triage
3
+ description: >-
4
+ Read-only triage of Enact Factory WorkItems — assess queue state and
5
+ individual WorkItem details without scheduling, mutation, or execution. Use
6
+ when reviewing the board, checking a WorkItem's status/blockers, or triaging
7
+ the queue. Triggers on "triage", "workitem status", "queue state",
8
+ "$workitem-triage".
9
+ ---
10
+
1
11
  # workitem-triage
2
12
 
3
13
  ## Purpose
@@ -20,3 +30,8 @@ Provide a read-only triage surface for Factory WorkItems. This skill is for asse
20
30
  - Include WorkItem ids, statuses, and blockers when present.
21
31
  - If required data is missing, explicitly state unknowns instead of inferring.
22
32
  - Keep recommendations non-mutating unless the operator explicitly switches out of triage mode.
33
+
34
+ ## Related
35
+ - For the Azure DevOps branch/PR/release strategy and the `az` CLI/REST recipes
36
+ (branch policies, PR creation/promotion, build-failure diagnosis), see the
37
+ sibling `azdo-ci-strategy` skill.
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "enact-loop",
3
+ "version": "0.1.0",
4
+ "description": "Generic contract-runner state machine. Drives declared stages (mechanical and judgment) to closure; judgment gates are graded by independent agents on a different vendor/model.",
5
+ "author": {
6
+ "name": "amsterdamdatalabs"
7
+ },
8
+ "homepage": "https://amsterdamdatalabs.com",
9
+ "repository": "https://dev.azure.com/amsterdamdatalabs/Enact/_git/enact-loop",
10
+ "license": "UNLICENSED",
11
+ "keywords": [
12
+ "enact",
13
+ "loop",
14
+ "contract-runner",
15
+ "verification",
16
+ "independent-grading"
17
+ ],
18
+ "targets": [
19
+ "claude",
20
+ "codex",
21
+ "cursor"
22
+ ],
23
+ "skills": "./skills/",
24
+ "hooks": "./hooks/hooks.json",
25
+ "validate": "enact-loop doctor",
26
+ "mcpServers": "./.mcp.json",
27
+ "interface": {
28
+ "displayName": "Enact Loop",
29
+ "shortDescription": "Contract-runner loop with independent judgment grading.",
30
+ "longDescription": "Runs any declared contract (ordered stages: mechanical and judgment) to closure. The Stop boulder refuses to exit until every required stage passes. Judgment stages are graded by independent agents running on a different vendor/model — no self-grading. Mechanical stages self-report via command evidence. Designed as the slim successor to enact-operator.",
31
+ "developerName": "enact-loop",
32
+ "category": "Developer Tools",
33
+ "capabilities": [
34
+ "contract-runner state machine",
35
+ "independent judgment grading",
36
+ "stop boulder enforcement",
37
+ "session auto-resume",
38
+ "mechanical stage self-report",
39
+ "loop lifecycle MCP tools"
40
+ ]
41
+ },
42
+ "factory": {
43
+ "firstParty": true,
44
+ "operatorScope": "global"
45
+ }
46
+ }
@@ -0,0 +1 @@
1
+ {"mcpServers":{"enact-loop":{"command":"enact-loop","args":["mcp","."]}}}
@@ -0,0 +1,27 @@
1
+ {
2
+ "hooks": {
3
+ "SessionStart": [
4
+ {
5
+ "matcher": "startup|resume|clear",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": "enact-loop hook session-start",
10
+ "statusMessage": "Resuming active loop"
11
+ }
12
+ ]
13
+ }
14
+ ],
15
+ "Stop": [
16
+ {
17
+ "hooks": [
18
+ {
19
+ "type": "command",
20
+ "command": "enact-loop hook stop",
21
+ "timeout": 30
22
+ }
23
+ ]
24
+ }
25
+ ]
26
+ }
27
+ }