From backend-springboot-plugin
Implement a feature using TDD. Gathers context, writes scenarios, runs TDD cycle.
How this skill is triggered — by the user, by Claude, or both
Slash command
/backend-springboot-plugin:be-codeThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Implement a feature using strict Test-Driven Development. This skill orchestrates the full TDD workflow: context gathering, scenario writing, and RED-GREEN cycle execution.
Implement a feature using strict Test-Driven Development. This skill orchestrates the full TDD workflow: context gathering, scenario writing, and RED-GREEN cycle execution.
.claude/backend-springboot-plugin.json/backend-springboot-plugin:be-init first and stopThe argument can be:
/ or .md), treat it as a work document path. Extract feature-name from the filename by removing the .md extension and directory prefix (e.g., work/features/employee.md → employee). This feature-name is used for lock files and progress file lookups.If the argument is a feature name (not a file path):
docs/specs/{feature}/.implementation/backend/plan.json exists
planAvailable = true, read plan.jsonplanAvailable = falseplanAvailable:
plan.json.entities[]{workDocDir}/{kebab-case-entity}.md existsentitiesWithWorkDoc and entitiesWithoutWorkDocplanAvailable and multiple entities exist:
"Plan contains {count} entities: {entity names}" "Options:" "1. Process all entities sequentially (dependency order)" "2. Select a specific entity to implement"
targetEntity = {chosen entity}targetEntity = null (process all in entityDependencyOrder)- [ ] scenariosplanAvailable:
targetEntity is set: process only that entitytargetEntity is null: process all entities in plan.json.entityDependencyOrder{workDocDir}/{kebab-case-entity}.md exists- [ ] scenariosplanAvailable:
{workDocDir}/{feature-name}.md exists
- [ ] scenarios, and skip to Step 3.5 (same as file path mode){sourceDir}/{basePackage}/ for related entities, controllers, commands, queries{workDocDir}/ for patternsplanAvailable and work document does not existAuto-generate an enriched work document from plan.json for each entity that lacks one:
templates/work-document-template.md for the document format{workDocDir}/{kebab-case-entity}.md with:
plan.json.entities[].fields[] with types, constraints, and source referencesplan.json.commands[] for this entity, including validation steps from BR-nnnplan.json.queries[] with filter/sort/pagination detailsplan.json.endpoints[] with HTTP methods, paths, status codesplan.json.validationRules[] with regex patterns and source referencesplan.json.exceptions[] with E-nnn codes, HTTP status, and conditionsplan.json.testScenarios[] as - [ ] items with source references in comments
### POST /{domain}/{entities}
- [ ] valid request returns 201 Created <!-- TS-001, AC-001 -->
- [ ] invalid email format returns 400 Bad Request <!-- TS-002, BR-001 -->
- [ ] duplicate email returns 409 Conflict <!-- TS-003, BR-002 -->
"Work document generated from plan.json for {EntityName}:" "{scenario count} test scenarios from spec (TS-nnn references preserved)" "Review and confirm to proceed with TDD implementation."
planAvailable and no work documentFollow the original manual flow:
templates/test-scenario-template.md for the scenario format- [ ] checkbox format?:
- [ ] valid request returns 201 Created
- [ ] duplicate email returns 409 Conflict
- [ ] ? empty display name returns 400 Bad Request
"Here are the test scenarios for {feature}:" {scenario list} "Please review. I'll remove scenarios marked with
?unless you confirm them."
{workDocDir}/{feature-name}.mdSingle-entity mode (file path or single entity): If {workDocDir}/.progress/{feature-name}.json exists:
pipeline.status"verified", "reviewed", or "done":
"This feature is currently '{status}'. Re-running TDD implementation will reset the pipeline status to 'implementing', discarding verification/review progress." "Continue?" If the user declines, stop here.
"fixing":
"This feature is currently 'fixing' (be-fix in progress). Re-running implementation will overwrite fix changes." "Continue?" If the user declines, stop here.
"escalated":
"This feature was escalated (manual intervention required). Running TDD implementation may build on unresolved issues." "Continue?" If the user declines, stop here.
Multi-entity mode: Skip this step here. Demotion check is performed per-entity at the start of Step 4 (before launching the implement agent for each entity).
{workDocDir}/.progress/.lock existslockedAt is less than 30 minutes ago: warn the user that another operation ({operation}) is in progress and stoplockedAt is older than 30 minutes: remove the stale lock{ "lockedAt": "{ISO 8601}", "operation": "be-code", "feature": "{feature-name}" }Multi-entity mode: The lock is acquired once here and held for the entire multi-entity operation. It is released once in Step 7 after all entities are processed.
For each entity being processed, create or update {workDocDir}/.progress/{kebab-case-entity}.json:
{workDocDir}/.progress/ directory if it does not exist{
"feature": "{kebab-case-entity}",
"workDocument": "{workDocDir}/{kebab-case-entity}.md",
"createdAt": "{ISO 8601}",
"updatedAt": "{ISO 8601}",
"pipeline": {
"status": "implementing",
"scenarios": { "total": {count}, "completed": 0 }
}
}
pipeline.status to "implementing" and refresh scenario counts. Preserve all existing fields including specSource, pipeline.verification, pipeline.review, etc.Per-entity execution: When processing multiple entities (plan-driven mode), Steps 4-7 execute once per entity. The current entity's work document is passed to the implement agent.
Per-entity demotion check (multi-entity mode only): Before launching the implement agent for each entity, check {workDocDir}/.progress/{kebab-case-entity}.json:
pipeline.status"verified", "reviewed", "done", "fixing", or "escalated": warn the user (same messages as Step 3.5) and ask for confirmation per entitySubagent Isolation: Pass only the specified parameters below. Do not include conversation history or user feedback from prior steps.
Launch the implement agent once per entity with:
workDocument: path to the current entity's work document ({workDocDir}/{kebab-case-entity}.md)config: the parsed plugin configprojectRoot: current project rootThe implement agent processes all scenarios internally:
- [ ] scenario- [x]After all scenarios are complete, run a full build:
{config.buildCommand}
Set Bash tool timeout to 600000ms.
Display implementation summary in the working language:
Feature Implementation Complete: {feature-name}
=======================================
Scenarios: {completed}/{total}
{list each scenario with status}
Files created:
{list of new files}
Files modified:
{list of modified files}
Build: {PASS / FAIL}
If the build failed, suggest running /backend-springboot-plugin:be-build for auto-diagnosis.
Update {workDocDir}/.progress/{kebab-case-entity}.json for the current entity:
Read progress file
Update pipeline.scenarios.completed with final count of - [x] items
Update pipeline.status:
"implemented""implemented" (build issue is separate)"implementing"Update updatedAt timestamp
Write back (read-modify-write — preserve all existing fields including specSource)
Release lock: delete {workDocDir}/.progress/.lock only in single-entity mode or after the last entity in multi-entity mode. Do not release the lock between entities.
Multi-entity mode: After completing one entity, display a brief per-entity status and proceed to the next entity (return to Step 4 for the next entity in entityDependencyOrder — scenario writing and lock acquisition do not re-run per entity). After the last entity's Step 7 completes, release the lock. Then display a combined summary report (using the Step 6 format but covering all entities).
Suggest next step:
/backend-springboot-plugin:be-verify {entity} for each entity/backend-springboot-plugin:be-build/backend-springboot-plugin:be-code {workDoc}- [x]). The user can re-run be-code with the same work document to resume.npx claudepluginhub ohmyhotelco/hare-cc-plugins --plugin backend-springboot-pluginImplements task specs via TDD (RED-GREEN-REFACTOR cycle), one test at a time from PLAN-*.md files. Collaborative mode pauses per step; auto mode runs autonomously.
Orchestrates RED/GREEN/REFACTOR TDD cycles using context-isolated Task sub-agents. Use for test-first feature implementation with structured BDD outer loop support.
Enforces test-driven development for features, bug fixes, and refactoring. Requires failing tests before any production code, with guidance on test types and spec-to-test mapping.