Skip to content

feat(implement): plan work units and state rollback boundaries (#84) - #103

Merged
datacas merged 2 commits into
mainfrom
issue-84-work-units-rollback
Sep 28, 2026
Merged

datacas merged 2 commits into
mainfrom
issue-84-work-units-rollback

Conversation

@datacas

@datacas datacas commented Sep 26, 2026

Copy link
Copy Markdown
Owner

What changes in the skill's behaviour

cc-implement-issue now plans work units after diagnosis, verifies each unit,
uses one commit per unit when the repository permits it, and records each
unit's rollback boundary in the pull request and structured result. The result
contract validator checks the token-only work_units shape and the closed
rollback vocabulary. cc-pr-review treats an irreversible operation missing
an irreversible declaration as a finding.

Diagnosis

Work units

Unit Behaviour Files Tests Verification Rollback
WU-1 Plan functional units and state their rollback boundaries; flag undeclared irreversible steps skills/cc-implement-issue/SKILL.md
skills/cc-pr-review/SKILL.md
scripts/validate-package.py
tests/test_validate_package.py
docs/skills.md
docs/workflows.md
tests/test_validate_package.py (34 tests, including rollback enum, SHA, and token-shape cases) python3 scripts/validate-package.py — passed
python3 -m unittest discover -s tests -v — 780 passed
independent: reverting commit 6fdfc060a5d1a75659668acb8fb5c927491ba729 restores the previous instructions and validation behaviour; no external effects

Verification

  • python3 scripts/validate-package.py — passed: 14 skills, shared sections,
    and manifests validated.
  • python3 -m unittest discover -s tests -v — passed: 780 tests.
  • git diff --check — passed.

Closes #84 — #84

@datacas

datacas commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

Initial review — PR #103

[CCR-20260926-001] · manual · anthropic/?→? · ? · schema:1

Verdict: CHANGES_REQUESTED — reviewed HEAD 6fdfc060a5d1a75659668acb8fb5c927491ba729.

Summary and scope

Accumulated diff origin/main...6fdfc06 (1 commit, 6 files, +179/−25): skills/cc-implement-issue/SKILL.md, skills/cc-pr-review/SKILL.md, scripts/validate-package.py, tests/test_validate_package.py, docs/skills.md, docs/workflows.md. The change adds work-unit planning with rollback boundaries to the implementer, a token-only work_units result field with validator coverage, and an undeclared-irreversible-step check to the reviewer. The direction matches #84 and the validator is sound; one contract gap in the result definition blocks approval.

Conventions: CONTRIBUTING.md and .code-cycle.yml were read; no AGENTS.md/CLAUDE.md present, skill defaults applied where the repo is silent.

Findings

[REV-001] · medium · open · - · blocks:yes — work_units declared always non-empty, contradicting BLOCKED and local-only results

skills/cc-implement-issue/SKILL.md:381 (also docs/skills.md:68)

The Structured result section states unconditionally that "work_units is a non-empty list", but the same section says the four stopping diagnosis decisions and bootstrap failures return BLOCKED before any branch exists, and the local-only mode stops before committing. None of those paths has planned units, so an implementer following the contract must either invent a unit or emit a result that violates it. Unlike diagnosis (which explicitly says when to omit it), no rule says when work_units is absent or empty. Similarly, commit_sha: null is defined only as "the repository requires a single commit"; the local-only case (units exist, no commit) is uncovered, so a consumer cannot tell those two meanings apart.

Suggested fix: state that work_units is present only for IMPLEMENTED (or whenever units were planned) and omitted when the stage stopped before planning, and define commit_sha for the local-only path. Evidence: code inspection; the validator only checks the success example, so it cannot catch this.

[REV-002] · low · open · - · blocks:no — Renumbered steps 10–11 keep 3-space continuation indent

skills/cc-implement-issue/SKILL.md:137

After renumbering to two-digit items, the continuation lines of steps 10 (#<issue_number> onward) and 11 still use 3-space indentation while the new lines use 4. It renders through lazy continuation, but the list is now inconsistently indented; realign to 4 spaces.

[REV-003] · low · open · - · blocks:no — Stray blank line inside DiagnosisShapeTests

tests/test_validate_package.py:340

The diff adds an extra blank line before test_an_integer_is_not_a_boolean, giving two blank lines between methods (PEP 8 E303) and an unrelated hunk in this PR. Remove it.

Security triage

Not a sensitive change: the security audit was skipped after triage. .code-cycle.yml declares no security_review.always_when rule; the defaults did not match (no auth, input handling, dependencies, CI workflow, or configuration paths; no labels). The diff only touches skill instructions, docs, and an offline validator.

Executed verification

Preflight: local Python toolchain only; no services required.

  • python3 scripts/validate-package.py — VALID: 14 skills (6 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned.
  • python3 -m unittest discover -s tests — OK.
  • git diff --check origin/main...HEAD — clean.

Unverified

  • REV-001 is established by reading the contract, not by running an implementer end to end on a BLOCKED path; no runtime harness for skill executions exists in this repo.

CI

gh pr checks 103 on HEAD 6fdfc06: Validate package / Skills, manifests, and Bash installer — pass; Validate package / PowerShell installer — pass (each run twice, both successful). No other checks are defined; none pending, skipped, or failed.

Residual risk

Orchestrators that start requiring work_units would reject valid BLOCKED results until REV-001 is clarified. The irreversible review check depends on the reviewer spotting the irreversible step; it is not machine-checked.

Verdict: CHANGES_REQUESTED — blocking: REV-001.

@datacas

datacas commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner Author

Resolution summary — PR #103

[CCT-20260926-001] · manual · ?/?→? · ? · triaged:6fdfc060a5d1a75659668acb8fb5c927491ba729 · schema:1

[CCR-20260926-001] · manual · anthropic/?→? · ? · schema:1

Status: RESOLVED — all three findings were valid and are resolved in commit bf3718dddef5968fa08e150dd09ef33818eb6015, now pushed to the PR branch. Dispositions remain frozen from the triage at 6fdfc060a5d1a75659668acb8fb5c927491ba729.

Findings

[REV-001] · medium · resolved · valid · blocks:yes — work_units declared always non-empty, contradicting BLOCKED and local-only results

The implementer contract now includes work_units whenever planning occurred and omits it when execution stopped before planning. It defines commit_sha: null when no per-unit commit exists, including local-only work and a required combined commit; pr_number: null distinguishes local-only from a combined-commit PR. Updated skills/cc-implement-issue/SKILL.md and docs/skills.md.

Verification: package validator, focused validator tests (34 passed), full unit suite (780 passed), and git diff --check all passed. No runtime producer or harness exists to execute the pre-planning BLOCKED path end to end; this fix clarifies the documented contract.

[REV-002] · low · resolved · valid · blocks:no — Renumbered steps 10–11 keep 3-space continuation indent

Aligned the continuation lines under steps 10–11 to four spaces in skills/cc-implement-issue/SKILL.md. The package validator, focused tests (34 passed), full unit suite (780 passed), and git diff --check passed.

[REV-003] · low · resolved · valid · blocks:no — Stray blank line inside DiagnosisShapeTests

Removed the extra blank line in tests/test_validate_package.py. The focused tests (34 passed), full unit suite (780 passed), and git diff --check passed.

Review and security triage

The delegated cc-code-review pass found no actionable P0–P3 findings. The repository has no security_review.always_when rule and the PR has no labels; the changed scope does not touch a sensitive security surface. Not a sensitive change: the security audit was skipped after triage.

Verification and CI

  • python3 scripts/validate-package.py — passed: 14 skills validated and shared sections/manifests aligned.
  • python3 -m unittest discover -s tests -p test_validate_package.py -v — 34 passed.
  • python3 -m unittest discover -s tests -v — 780 passed.
  • git diff --check origin/main — passed.
  • CI on bf3718dddef5968fa08e150dd09ef33818eb6015 — all four defined checks passed (Bash installer: 2; PowerShell installer: 2); none pending, failed, cancelled, skipped, or missing.

No inline review threads were present. PR #103 remains open and has not been merged. Applied CONTRIBUTING.md; the repository has no AGENTS.md or CLAUDE.md.

@datacas

datacas commented Sep 26, 2026

Copy link
Copy Markdown
Owner Author

Rereview — PR #103

[CCR-20260926-002] · manual · anthropic/?→? · ? · schema:1

[CCT-20260926-001] · manual · ?/?→? · ? · triaged:6fdfc060a5d1a75659668acb8fb5c927491ba729 · schema:1

[CCR-20260926-001] · manual · anthropic/?→? · ? · schema:1

Verdict: APPROVED — reviewed HEAD bf3718dddef5968fa08e150dd09ef33818eb6015 (previous review: 6fdfc060a5d1a75659668acb8fb5c927491ba729).

What changed since the previous review

One commit, bf3718d fix(implement): clarify work-unit result edge cases: clarifies when work_units is present and what commit_sha: null means (skills/cc-implement-issue/SKILL.md, docs/skills.md), realigns list continuation indentation, and removes a stray blank line in tests/test_validate_package.py. The full accumulated diff origin/main...bf3718d (6 files, +188/−29) was re-read; no other hunks changed.

Previous findings

[REV-001] · medium · resolved · valid · blocks:yes — work_units declared always non-empty, contradicting BLOCKED and local-only results

Resolved. The Structured result section now includes work_units whenever at least one unit was planned (including a later BLOCKED) and omits it when the stage stops before planning (bootstrap failure, stopping diagnosis decision). commit_sha: null now covers both a required combined commit and local-only work, with pr_number: null distinguishing the two. docs/skills.md matches. Verified by reading the contract and by the validator still accepting the success example; there is no runtime harness for a pre-planning BLOCKED path.

[REV-002] · low · resolved · valid · blocks:no — Renumbered steps 10–11 keep 3-space continuation indent

Resolved: all continuation lines under steps 10–12 now use four spaces.

[REV-003] · low · resolved · valid · blocks:no — Stray blank line inside DiagnosisShapeTests

Resolved: the extra blank line is gone; the accumulated diff no longer touches that area.

New findings

None.

Security triage

Not a sensitive change: the security audit was skipped after triage. No security_review.always_when rule is configured, the PR has no labels, and the diff touches only skill instructions, docs, and the offline validator with its tests.

Verification

  • python3 scripts/validate-package.py — VALID: 14 skills (6 cycle, 8 supporting), shared sections in sync, cross-agent manifests aligned.
  • python3 -m unittest discover -s tests — Ran 780 tests, OK.
  • git diff --check origin/main...bf3718d — clean.

Unverified: REV-001 is a documentation contract; it was checked by reading, not by running an implementer end to end on a BLOCKED path.

CI

gh pr checks 103 on bf3718d: 4 passed, 0 failed — Validate package / Skills, manifests, and Bash installer and Validate package / PowerShell installer (two runs each). None pending, skipped, or missing.

Residual risk

The work_units omission rules are enforced by prose only; the validator checks the success example, not the BLOCKED shapes. The irreversible review check relies on the reviewer spotting the irreversible step.

Verdict: APPROVED — no open blocking findings.

@datacas
datacas merged commit 808d31b into main Sep 28, 2026
4 checks passed
@datacas
datacas deleted the issue-84-work-units-rollback branch October 6, 2026 07:53
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.

cc-implement-issue: organise the change into work units with a stated rollback boundary

1 participant