Uh oh!
There was an error while loading. Please reload this page.
Feature: Add gen-plan command to transform drafts into structured plans (v1.3.0) - #17
Conversation
…ns (v1.2.4) Add a new slash command /humanize:gen-plan that transforms user draft documents into well-structured implementation plans with acceptance criteria (AC-X format). New files: - commands/gen-plan.md: Slash command entry point - skills/gen-plan/SKILL.md: Main skill implementation with opus model - scripts/validate-gen-plan-io.sh: IO path validation script - agents/draft-relevance-checker.md: Haiku-based relevance checker Workflow: 1. Validates input/output paths with clear error messages 2. Uses haiku sub-agent to check draft relevance to repository 3. Analyzes draft for clarity, consistency, completeness, functionality 4. Engages user via AskUserQuestion to resolve issues 5. Generates plan.md with goals, ACs, path boundaries, and suggestions Additional changes: - Unified model names to use short aliases (opus, sonnet, haiku) across all skills - Updated test validation to accept short model aliases Updated version to 1.2.4 in plugin.json, marketplace.json, and README.md.
Fixes based on Round 0 Codex review: HIGH - Haiku sub-agent invocation (AC-2.3): - Changed from generic "general-purpose" subagent to explicit "draft-relevance-checker" agent reference - Added clear Task tool parameters documentation - Referenced the custom agent in agents/draft-relevance-checker.md HIGH - Missing positive/negative test descriptions (AC-6): - Added TDD-style test format to Acceptance Criteria template - Each AC now includes Positive Tests (expected to PASS) and Negative Tests (expected to FAIL) sections - Added Generation Rule #8 enforcing TDD-style tests MEDIUM - Path boundary phrasing (AC-6.3): - Changed from negative phrasing ("What should NOT be done") to affirmative descriptions ("Maximum Acceptable Scope") - Added examples showing affirmative descriptions - Added Generation Rule #9 for affirmative path boundaries MEDIUM - Narrow path rule for deterministic drafts (AC-6.3): - Added "Note on Deterministic Designs" explaining when upper and lower bounds should converge - Added Generation Rule #10 for respecting fixed approaches
Code simplification after Codex review approval: commands/gen-plan.md: - Simplified trailing description to single sentence - Consistent with other command files in the project scripts/validate-gen-plan-io.sh: - Removed unnecessary empty echo statements - Consolidated error messages for conciseness - 11 lines removed, functionality unchanged skills/gen-plan/SKILL.md: - Simplified Phase 6 from numbered list to concise paragraph - 4 lines removed, same information preserved All 49 tests pass. Validation script tested and works correctly.
Version bump from 1.2.4 to 1.3.0 for the new gen-plan command feature.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:9d618e94af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| --input) | ||
| INPUT_FILE="$2" | ||
| shift 2 | ||
| ;; |
There was a problem hiding this comment.
Guard missing values before shifting args
If the user passes --input or --output without a value (e.g., trailing flag), shift 2 triggers set -e and exits immediately before the required-argument checks. That exit status is 1, which the skill maps to “input not found,” not “invalid arguments,” so the user gets the wrong error handling and exit code. Consider checking [[ $# -lt 2 ]] or validating $2 before shift 2 to ensure exit code 6 is used for invalid args as documented.
Useful? React with 👍 / 👎.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. CLAUDE.md compliance verified:
Bug scan completed:
|
Bug fix:
- When --input or --output is passed without a value, shift 2 would fail
under set -e and exit with code 1 (mapped to "input not found") instead
of exit code 6 ("invalid arguments")
- Added checks for missing argument values before shift 2
- Also catches flags followed by another flag (e.g., --input --output)
Test enhancement:
- Added 10 comprehensive tests for validate-gen-plan-io.sh exit codes
- Tests cover: missing values, unknown options, all validation exit codes
- Total tests now: 59 (was 49)SihaoLiu
commented
Jan 17, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:9c52699b23
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| validate_model_name() { | ||
| local model="$1" | ||
| [[ "$model" =~ ^(claude-|gpt-|o[0-9]|gemini-) ]] | ||
| [[ "$model" =~ ^(opus|sonnet|haiku|claude-|gpt-|o[0-9]|gemini-) ]] |
There was a problem hiding this comment.
Tighten alias matching in model validator
The updated validate_model_name regex treats opus, sonnet, and haiku as prefixes rather than exact matches, so values like opus-v2 or haiku123 will now be accepted as “valid.” This weakens the test’s ability to catch misconfigured skills and can let invalid model names slip into the repo, which would fail at runtime when the model name is actually used. Consider requiring exact matches for the aliases (e.g., ^(opus|sonnet|haiku)$) while keeping prefix matching for full IDs like claude-*.
Useful? React with 👍 / 👎.
The regex was treating opus/sonnet/haiku as prefixes, accepting invalid values like opus-v2, haiku123, or sonnet-fast. Fix: - Short aliases (opus, sonnet, haiku) now require exact match via ^...$ - Full model IDs (claude-*, gpt-*, etc.) still use prefix matching Added tests: - NT-6d: Rejects opus-v2 (partial match) - NT-6e: Rejects haiku123 (partial match) - NT-6f: Rejects sonnet-fast (partial match) Total tests: 62
SihaoLiu
commented
Jan 17, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:9eb353b9f4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Check 4: Output file does not already exist | ||
| if [[ -f "$OUTPUT_FILE" ]]; then | ||
| echo "VALIDATION_ERROR: OUTPUT_EXISTS" |
There was a problem hiding this comment.
Reject output path that is an existing directory
The IO validation only checks -f for existing outputs, so if the user passes --output pointing at an existing directory (e.g., omitting the filename), this check is bypassed and validation succeeds. The subsequent Write to the output path will fail because it targets a directory, even though the script said validation passed. Consider rejecting -d (or any existing path) here so the gen-plan flow can surface a clear error before generation.
Useful? React with 👍 / 👎.
Bug fix: - If --output pointed to an existing directory (e.g., /tmp/ instead of /tmp/plan.md), validation passed but Write would fail at runtime - Now rejects any existing path at output location (file, directory, symlink) - Added specific error message when output is a directory with suggestion Changes: - Check 4 now uses -d to detect directories with clear error message - Check 4 uses -e to catch any existing path (not just regular files) Added test: - validate-gen-plan-io: output is directory exits 4 Total tests: 63
SihaoLiu
commented
Jan 17, 2026
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Uh oh!
There was an error while loading. Please reload this page.
Summary
/humanize:gen-planslash command that transforms user draft documents into well-structured implementation plansTest plan
Generated with Claude Code