Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "claude-constructor",
"source": "./plugins/claude-constructor",
"description": "A workflow automation system that helps Claude Code implement features systematically with built-in planning, validation, and review steps",
"version": "1.2.0"
"version": "1.3.0"
}
]
}
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "claude-constructor",
"version": "1.2.0",
"version": "1.3.0",
"description": "A workflow automation plugin for Claude Code",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/claude-constructor/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "claude-constructor",
"description": "A workflow automation system that helps Claude Code implement features systematically with built-in planning, validation, and review steps",
"version": "1.2.0",
"version": "1.3.0",
"author": {
"name": "Jonas Martinsson & Anders Hassis",
"url": "https://github.com/Hurblat/claude-constructor/graphs/contributors"
Expand Down
35 changes: 35 additions & 0 deletions plugins/claude-constructor/agents/requirements-definer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Your role is to create a Requirements Definition that will later be used to crea
When defining requirements, you will:

1. **Parse Input**:
- Check if prompt contains "Resolved questions:"
- If yes → **QUESTION_RESOLUTION MODE** (skip to step 11)
- Check if prompt contains "User feedback to address:"
- If yes → Extract the state management file path and user feedback separately
- If no → prompt contains only the state management file path
Expand Down Expand Up @@ -142,6 +144,39 @@ When defining requirements, you will:
- Update the state management file with the path to the created specification file, in a section called `## Specification File`
- Ensure the specification file path is accessible for subsequent workflow steps

11. **Handle Question Resolution Mode** (only if "Resolved questions:" detected in step 1):

When prompt contains resolved questions in this format:

```text
State management file: [path]
Resolved questions:
- [Question title]: [Selected option with description]
- [Question title]: [Selected option with description]
```

Execute these steps:

a. **Read state management file** from the path provided
b. **Locate and read specification file** from state management
c. **Parse resolved questions** from the prompt (each line after "Resolved questions:")
d. **Update specification file**:
- Find the `### Open Questions` section in Requirements Definition
- For each resolved question:
- Locate the question by its title (ignoring `[STRUCTURED]` tag)
- Remove the entire question block from Open Questions
- Create or append to `### Resolved Questions` section
- For each resolved question, add:

```markdown
#### [Question title]

**Answer:** [Selected option with description]
```

- If Open Questions section becomes empty, remove it entirely
e. **Exit** - do not proceed to other steps

## Output Format

Create a well-structured markdown document with clear headers and subsections. Use bullet points and numbered lists for clarity. Focus on completeness and clarity while avoiding implementation details.
Expand Down
35 changes: 35 additions & 0 deletions plugins/claude-constructor/agents/specification-writer.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Your role is to take these requirements and create a detailed implementation pla
When writing a specification, you will:

1. **Parse Input**:
- Check if prompt contains "Resolved questions:"
- If yes → **QUESTION_RESOLUTION MODE** (skip to step 11)
- Check if prompt contains "User feedback to address:"
- If yes → Extract the state management file path and user feedback separately
- If no → prompt contains only the state management file path
Expand Down Expand Up @@ -140,6 +142,39 @@ When writing a specification, you will:
- Is the scope clearly bounded to prevent scope creep?
- If in revision mode, have you addressed all user feedback?

11. **Handle Question Resolution Mode** (only if "Resolved questions:" detected in step 1):

When prompt contains resolved questions in this format:

```text
State management file: [path]
Resolved questions:
- [Question title]: [Selected option with description]
- [Question title]: [Selected option with description]
```

Execute these steps:

a. **Read state management file** from the path provided
b. **Locate and read specification file** from state management
c. **Parse resolved questions** from the prompt (each line after "Resolved questions:")
d. **Update specification file**:
- Find the `### Technical Questions` section in Implementation Plan
- For each resolved question:
- Locate the question by its title (ignoring `[STRUCTURED]` tag)
- Remove the entire question block from Technical Questions
- Create or append to `### Resolved Technical Questions` section
- For each resolved question, add:

```markdown
#### [Question title]

**Answer:** [Selected option with description]
```

- If Technical Questions section becomes empty, remove it entirely
e. **Exit** - do not proceed to other steps

### Output Format

You will append to an existing specification file that already contains a `## Requirements Definition` section. Add a new `## Implementation Plan` section with:
Expand Down
29 changes: 21 additions & 8 deletions plugins/claude-constructor/commands/requirements-sign-off.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ You MUST follow all workflow steps below, not skipping any step and doing all st
- options: Array with label and description for each option
3. Await and collect user responses for all questions in batch
4. Continue to next batch
c. After all batches complete, update specification file:
- Move all answered questions to `### Resolved Questions` section (create if needed)
- Format: Question title + "**Answer:** [selected option with description]"
- Remove the `[STRUCTURED]` tag from resolved questions
c. After all batches complete, use requirements-definer subagent to update specification:

```text
State management file: $1
Resolved questions:
- [Question title]: [Selected option with description]
- [Question title]: [Selected option with description]
```

The subagent will move answered questions to `### Resolved Questions` section

4. **Handle Open-Ended Questions**:
- If only OPEN-ENDED questions remain:
Expand All @@ -73,9 +79,17 @@ You MUST follow all workflow steps below, not skipping any step and doing all st
- Present the Requirements Definition section to the user for review
- Tell the user where to find the full specification: "You can review the full specification at: `{specification-file-path}`"

6. **Get User Feedback**:
- Ask the user to read and provide feedback on the Requirements Definition
- If user has feedback:
6. **Get User Approval**:
- Use AskUserQuestion tool with:
- question: "Do you approve these requirements?"
- header: "Requirements"
- options:
- label: "Approve"
description: "Requirements are complete and accurate, proceed to implementation planning"
- label: "Request changes"
description: "I have feedback to provide"
- If user selects "Approve": proceed to step 7
- If user selects "Request changes" or provides feedback via "Other":
a. Use the requirements-definer subagent to revise requirements:

```text
Comment on lines 93 to 95

Choose a reason for hiding this comment

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

P2 Badge Capture feedback text before invoking revision subagent

The new approval flow jumps directly from a binary AskUserQuestion response to invoking the requirements-definer with User feedback to address, but there is no step to actually collect the feedback text. If AskUserQuestion only returns the selected option, the subagent will be called without actionable input, so it cannot make the requested revisions. Consider adding a follow-up prompt for the feedback body when “Request changes” is selected (or explicitly documenting that AskUserQuestion returns freeform feedback).

Useful? React with 👍 / 👎.

Expand All @@ -85,7 +99,6 @@ You MUST follow all workflow steps below, not skipping any step and doing all st

b. The subagent will detect the feedback and revise accordingly
c. Return to step 1 for re-review
- If user provides explicit sign-off, proceed to step 7

7. **Update Workflow Progress**:
- Read the state management file ($1)
Expand Down
29 changes: 21 additions & 8 deletions plugins/claude-constructor/commands/specification-sign-off.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ You MUST follow all workflow steps below, not skipping any step and doing all st
- options: Array with label and description for each option
3. Await and collect user responses for all questions in batch
4. Continue to next batch
c. After all batches complete, update specification file:
- Move all answered questions to `### Resolved Technical Questions` section (create if needed)
- Format: Question title + "**Answer:** [selected option with description]"
- Remove the `[STRUCTURED]` tag from resolved questions
c. After all batches complete, use specification-writer subagent to update specification:

```text
State management file: $1
Resolved questions:
- [Question title]: [Selected option with description]
- [Question title]: [Selected option with description]
```

The subagent will move answered questions to `### Resolved Technical Questions` section

4. **Handle Open-Ended Questions**:
- If only OPEN-ENDED questions remain:
Expand All @@ -73,9 +79,17 @@ You MUST follow all workflow steps below, not skipping any step and doing all st
- Present the Implementation Plan section to the user for review
- Tell the user where to find the full specification: "You can review the full specification at: `{specification-file-path}`"

6. **Get User Feedback**:
- Ask the user to read and provide feedback on the Implementation Plan
- If user has feedback:
6. **Get User Approval**:
- Use AskUserQuestion tool with:
- question: "Do you approve this implementation plan?"
- header: "Specification"
- options:
- label: "Approve"
description: "Implementation plan is complete and accurate, proceed to implementation"
- label: "Request changes"
description: "I have feedback to provide"
- If user selects "Approve": proceed to step 7
- If user selects "Request changes" or provides feedback via "Other":
a. Use the specification-writer subagent to revise specification:

```text
Comment on lines 93 to 95

Choose a reason for hiding this comment

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

P2 Badge Capture feedback text before invoking revision subagent

Here too, the flow routes a “Request changes” selection straight into a subagent call that expects User feedback to address, but there is no instruction to gather the actual feedback content. If AskUserQuestion only returns the selected option, the revision step will run without the user’s change request. Adding a follow-up prompt for feedback (or clarifying that AskUserQuestion returns freeform text) would prevent silent no-op revisions.

Useful? React with 👍 / 👎.

Expand All @@ -85,7 +99,6 @@ You MUST follow all workflow steps below, not skipping any step and doing all st

b. The subagent will detect the feedback and revise accordingly
c. Return to step 1 for re-review
- If user provides explicit sign-off, proceed to step 7

7. **Update Workflow Progress**:
- Read the state management file ($1)
Expand Down