Skip to content

feat: add test-driven assessment workflow for policy generation#124

Open
jpower432 wants to merge 3 commits into
complytime:mainfrom
jpower432:feat/test-driven-assessment
Open

feat: add test-driven assessment workflow for policy generation#124
jpower432 wants to merge 3 commits into
complytime:mainfrom
jpower432:feat/test-driven-assessment

Conversation

@jpower432

@jpower432 jpower432 commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Introduce comply:build-assessment as the single user-facing entry point for Rego policy generation, replacing direct invocation of pack-assessment:

  • New comply:build-assessment skill with two modes: single (default, one requirement at a time with interactive pause points) and batch (all at once)
  • Uses AskUserQuestion at every pause point for structured option selection
  • Helpers question asked once before the loop, not per-requirement
  • test-driven-assessment and pack-assessment marked invocable: false (internal-only)
  • Router (using-complypack) and post-setup guidance (mcp-setup) updated to point users to build-assessment
  • ADR 018 documents the test-driven generation rationale

Single Mode Flow

  1. Ask about reusable helpers (once)
  2. Per requirement: present requirement → suggest checks → approve test → review policy
  3. Each step uses AskUserQuestion for structured input

Batch Mode Flow

  1. Ask about reusable helpers (once)
  2. Generate all tests, bulk approve
  3. Generate all policies, bulk review

@jpower432 jpower432 force-pushed the feat/test-driven-assessment branch from f05222d to de5f077 Compare July 11, 2026 21:49
Add ADR 018, test-driven-assessment process skill, and
using-complypack router skill to enforce test-first policy
generation from MCP data.

Assisted-by: Claude (Anthropic, Claude Opus 4.6)
Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
Single mode (default) walks through each requirement one at a time
with interactive pause points using AskUserQuestion. Batch mode
processes all requirements at once in two phases.

Assisted-by: Claude (Anthropic, Claude Opus 4.6)
Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
@jpower432 jpower432 force-pushed the feat/test-driven-assessment branch from de5f077 to 6df7fec Compare July 11, 2026 21:55
- Add invocable: false to test-driven-assessment and pack-assessment
- Update router, mcp-setup, and OpenCode symlinks/commands to
  reference comply:build-assessment as the entry point
- Add volume mount guidance for file:// sources in mcp-setup

Assisted-by: Claude (Anthropic, Claude Opus 4.6)
Signed-off-by: Jennifer Power <barnabei.jennifer@gmail.com>
@jpower432 jpower432 force-pushed the feat/test-driven-assessment branch from 6df7fec to 5d9d387 Compare July 11, 2026 21:59
@jpower432 jpower432 marked this pull request as ready for review July 11, 2026 22:07
@jpower432 jpower432 requested a review from a team as a code owner July 11, 2026 22:07
@jpower432 jpower432 requested review from em-redhat and gxmiranda and removed request for a team July 11, 2026 22:07

@gxmiranda gxmiranda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: #124 — feat: add test-driven assessment workflow for policy generation

The test-driven workflow design is sound — test-first generation catches semantic errors that structural validation misses, and the ADR provides clear rationale. However, two missing symlinks leave the skill discovery and delegation chain incomplete.

1 HIGH, 1 MEDIUM finding. See inline comments.

This review was generated by /review-pr (AI-assisted).

@@ -0,0 +1 @@
../../skills/build-assessment No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] Missing symlinks for using-complypack and test-driven-assessment

This PR adds skills/using-complypack/SKILL.md and skills/test-driven-assessment/SKILL.md but does not create corresponding symlinks under .opencode/skills/. The build-assessment skill gets a symlink here, but these two do not.

OpenCode discovers skills through .opencode/skills/ symlinks. Without them:

  • test-driven-assessment cannot be loaded when build-assessment delegates to it
  • using-complypack cannot function as a router skill

Please add:

ln -sf ../../skills/test-driven-assessment .opencode/skills/test-driven-assessment
ln -sf ../../skills/using-complypack .opencode/skills/using-complypack

@@ -2,5 +2,5 @@
description: Generate Rego policies from the child policy

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] Command description is stale

The frontmatter description: Generate Rego policies from the child policy no longer reflects the new test-driven workflow. Now that this command loads build-assessment, the description should mention the test-first approach or single/batch modes to set correct user expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants