Skip to content

feat: implement issue #682 — initiative-planner: Bob materializes a plan even when he has unresolved open questions — should gate, not guess - #707

Merged
don-petry merged 6 commits into
mainfrom
dev-lead/issue-682-20260614-1148
Jun 14, 2026
Merged

don-petry merged 6 commits into
mainfrom
dev-lead/issue-682-20260614-1148

Conversation

@don-petry

@don-petry don-petry commented Jun 14, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #682

Implemented by dev-lead agent. Please review.

Summary by CodeRabbit

  • New Features

    • Initiative Planner now supports blocking open questions. When marked as blocking, questions prevent issue creation and are posted back to discussions instead until resolved.
  • Documentation

    • Updated Initiative Planner documentation and prompt instructions to clarify blocking versus advisory questions.
  • Tests

    • Added comprehensive test coverage for blocking questions functionality.

…lan even when he has unresolved open questions — should gate, not guess
@don-petry
don-petry requested a review from a team as a code owner June 14, 2026 11:54
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 3ef692ee-0c74-4474-a3b7-7418a95ee964

📥 Commits

Reviewing files that changed from the base of the PR and between 3b800fd and 7a45f36.

📒 Files selected for processing (7)
  • .gitleaks.toml
  • AGENTS.md
  • prompts/bmad/scrum-master.md
  • scripts/initiative-planner/README.md
  • scripts/initiative-planner/apply-plan.sh
  • scripts/initiative-planner/plan.schema.json
  • tests/test_initiative_planner.bats

📝 Walkthrough

Walkthrough

Adds a blocking open-questions gate to apply-plan.sh: when any open_questions entry is a structured object with blocking: true, the script creates no issues, posts the questions back to the source discussion, and exits cleanly. plan.schema.json is extended to allow string-or-object open_questions items. Docs, the scrum-master prompt, and bats tests are updated accordingly. An unrelated gitleaks allowlist suppression is also added.

Changes

Blocking Open-Questions Gate

Layer / File(s) Summary
open_questions schema: string or blocking object
scripts/initiative-planner/plan.schema.json
open_questions.items changes from type: string to a oneOf union supporting advisory strings or objects with a required question field and an optional blocking boolean (default false).
Gate logic and documentation
scripts/initiative-planner/apply-plan.sh, AGENTS.md, scripts/initiative-planner/README.md, prompts/bmad/scrum-master.md
apply-plan.sh gains an early blocking_count check: when any blocking question exists, all issue creation is skipped, a "not yet planned" comment is posted to the discussion, a step-summary warning is emitted, and the script exits 0. The open_questions rendering for the normal-path summary is updated to normalize both string and object entries via .question. AGENTS.md, README.md, and the scrum-master prompt document the gate invariant and blocking vs. advisory distinction.
bats tests: validate-plan and apply-plan gate coverage
tests/test_initiative_planner.bats
Adds a validate-plan test confirming blocking: true entries pass schema validation; adds three DRY_RUN apply-plan tests covering: gate halts all issue/edge creation when blocking: true; gate posts question text back via comment_on_discussion; blocking: false proceeds with normal issue creation count.

Gitleaks Allowlist Update

Layer / File(s) Summary
Gitleaks allowlist for EXPIRED_JWT test fixture
.gitleaks.toml
Adds a new [[allowlists]] entry scoped to tests/test_gitleaks_config.bats and a specific historical commit, suppressing the jwt rule finding for the EXPIRED_JWT token using regexTarget = "line".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

  • #682 — initiative-planner: Bob materializes a plan even when he has unresolved open questions — should gate, not guess: This PR directly implements all acceptance criteria from that issue: blocking questions create zero issues, questions are posted back to the discussion with "not yet planned" framing, non-blocking questions do not gate materialization, the gate is covered in tests/test_initiative_planner.bats, and AGENTS.md/README.md document the new behavior.

Possibly related PRs

  • petry-projects/.github-private#567: Both PRs modify scripts/initiative-planner/apply-plan.sh and the conditions under which the script materializes GitHub epic/story issues.
  • petry-projects/.github-private#521: Both PRs touch .gitleaks.toml and the tests/test_gitleaks_config.bats test fixture path that the new allowlist entry references.

Suggested labels

enhancement, initiative

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main feature: implementing a gate in the Initiative Planner to prevent plan materialization when unresolved blocking open questions exist.
Linked Issues check ✅ Passed The PR comprehensively implements all acceptance criteria from issue #682: blocking gate [#682], question posting [#682], backward compatibility [#682], test coverage [#682], and documentation updates [#682].
Out of Scope Changes check ✅ Passed All changes are scoped to implementing the blocking open-questions gate and supporting documentation, with no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-682-20260614-1148

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a blocking open-questions gate to the initiative planner. If a plan contains any open questions marked as blocking, the script will halt issue creation, post the questions back to the source discussion, and exit cleanly. This change is documented across the agent guidelines, README, and JSON schema, and is supported by new BATS tests. The review feedback suggests minor optimizations in apply-plan.sh, specifically simplifying a jq filter expression and using the Bash-builtin printf -v to avoid spawning a subshell.

Comment thread scripts/initiative-planner/apply-plan.sh Outdated
Comment thread scripts/initiative-planner/apply-plan.sh Outdated
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 11:59
@don-petry
don-petry disabled auto-merge June 14, 2026 11:59
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 12:02
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 14, 2026
@don-petry
don-petry disabled auto-merge June 14, 2026 12:03
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 12:07
@don-petry
don-petry disabled auto-merge June 14, 2026 12:08
@don-petry

Copy link
Copy Markdown
Collaborator Author

Note

@don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically.
Next attempt after: 2026-06-14T12:39:07Z

coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 14, 2026
@don-petry
don-petry disabled auto-merge June 14, 2026 12:18
don-petry added a commit that referenced this pull request Jun 14, 2026
…bats (#710)

PR #705 (issue #697) embeds the example expired JWT literally in
tests/test_gitleaks_config.bats to test the allowlist, but .gitleaks.toml
only allowlisted that token under .claude/skills/**/api-testing-patterns.md.
Because the secret scan walks full history, the unallowlisted occurrence
fails Secret scan (gitleaks) on affected PRs (e.g. #707).

Add a path-scoped (condition=AND) allowlist for the self-test file so the
fixture is suppressed while a real secret committed there would still be
reported.

https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
@don-petry

Copy link
Copy Markdown
Collaborator Author

Auto-rebase failed — merge conflict — this branch has conflicts with main that must be resolved.

dev-lead will attempt to resolve this automatically. If it cannot, a follow-up comment will explain what needs manual attention.

To resolve manually instead:

git fetch origin
git merge origin/main
# resolve conflicts, then:
git add .
git commit
git push

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: review-changes)

PR: #707
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-14T12:51:10Z

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 12:21
Resolves the .gitleaks.toml conflict by keeping the canonical allowlist
entry merged via #710; drops #707's now-redundant duplicate. Brings the
secret-scan fix into this PR so its history-wide gitleaks scan passes.

https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry disabled auto-merge June 14, 2026 12:29
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
   - CodeRabbit: dismissed
   - gemini-code-assist: informational suggestions (not CHANGES_REQUESTED)
   - don-petry: commented (no blocking content)
4. **PR Changes**: ✅ **All quality gates pass**
   - The PR implements a blocking open-questions gate for the initiative planner
   - Documentation updated (AGENTS.md, README.md, prompts)
   - Code changes in apply-plan.sh with proper jq handling
   - New tests added and passing
   - Schema updated appropriately
**Conclusion:** No code changes needed. The PR is clean and ready. The SonarCloud Quality Gate passed with zero issues, all tests pass, and the cancelled dev-lead checks are intentional based on commit metadata.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 12:30
@don-petry
don-petry merged commit 37e3157 into main Jun 14, 2026
26 of 28 checks passed
@don-petry
don-petry deleted the dev-lead/issue-682-20260614-1148 branch June 14, 2026 13:20
don-petry added a commit that referenced this pull request Jun 14, 2026
…bats (#710)

PR #705 (issue #697) embeds the example expired JWT literally in
tests/test_gitleaks_config.bats to test the allowlist, but .gitleaks.toml
only allowlisted that token under .claude/skills/**/api-testing-patterns.md.
Because the secret scan walks full history, the unallowlisted occurrence
fails Secret scan (gitleaks) on affected PRs (e.g. #707).

Add a path-scoped (condition=AND) allowlist for the self-test file so the
fixture is suppressed while a real secret committed there would still be
reported.

https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
don-petry added a commit that referenced this pull request Jun 14, 2026
…ns gate (#707)

* feat: implement issue #682 — initiative-planner: Bob materializes a plan even when he has unresolved open questions — should gate, not guess

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

* fix(reviews): address review comments [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 18, 2026
…bats (#710)

PR #705 (issue #697) embeds the example expired JWT literally in
tests/test_gitleaks_config.bats to test the allowlist, but .gitleaks.toml
only allowlisted that token under .claude/skills/**/api-testing-patterns.md.
Because the secret scan walks full history, the unallowlisted occurrence
fails Secret scan (gitleaks) on affected PRs (e.g. #707).

Add a path-scoped (condition=AND) allowlist for the self-test file so the
fixture is suppressed while a real secret committed there would still be
reported.

https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
don-petry added a commit that referenced this pull request Jun 18, 2026
…ns gate (#707)

* feat: implement issue #682 — initiative-planner: Bob materializes a plan even when he has unresolved open questions — should gate, not guess

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

* fix(reviews): address review comments [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
…ns gate (#707)

* feat: implement issue #682 — initiative-planner: Bob materializes a plan even when he has unresolved open questions — should gate, not guess

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

* fix(reviews): address review comments [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
don-petry added a commit that referenced this pull request Jun 25, 2026
…ns gate (#707)

* feat: implement issue #682 — initiative-planner: Bob materializes a plan even when he has unresolved open questions — should gate, not guess

* chore: apply manual instructions [skip ci-relay]

* chore: apply manual instructions [skip ci-relay]

* fix(reviews): address review comments [skip ci-relay]

---------

Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
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.

initiative-planner: Bob materializes a plan even when he has unresolved open questions — should gate, not guess

2 participants