with one click
ln-500-story-quality-gate
// Story-level quality gate with 4-level verdict (PASS/CONCERNS/FAIL/WAIVED) and Quality Score. Use when Story is ready for quality assessment.
// Story-level quality gate with 4-level verdict (PASS/CONCERNS/FAIL/WAIVED) and Quality Score. Use when Story is ready for quality assessment.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | ln-500-story-quality-gate |
| description | Story-level quality gate with 4-level verdict (PASS/CONCERNS/FAIL/WAIVED) and Quality Score. Use when Story is ready for quality assessment. |
| license | MIT |
Paths: File paths (
references/,../ln-*) are relative to this skill directory.
Type: L2 Coordinator Category: 5XX Quality
Runtime-backed gate coordinator. Owns fast-track routing, quality/test summaries, final Story verdict, and branch finalization.
| Input | Required | Source | Description |
|---|---|---|---|
storyId | Yes | args, git branch, kanban, user | Story to process |
Resolution: Story Resolution Chain.
Status filter: To Review
ln-510-quality-coordinatorln-520-test-planner when neededPASS | CONCERNS | FAIL | WAIVEDDone only on passing outcomes.hex-skills/story-gate/runtime/MANDATORY READ: Load references/environment_state_contract.md, references/storage_mode_detection.md, references/input_resolution_pattern.md
MANDATORY READ: Load references/coordinator_runtime_contract.md, references/story_gate_runtime_contract.md, references/coordinator_summary_contract.md, references/loop_health_contract.md
MANDATORY READ: Load references/git_worktree_fallback.md
MANDATORY READ: Load references/minimum_quality_checks.md
Runtime CLI:
node references/scripts/story-gate-runtime/cli.mjs start --story {storyId} --manifest-file .hex-skills/story-gate/manifest.json
node references/scripts/story-gate-runtime/cli.mjs status
node references/scripts/story-gate-runtime/cli.mjs record-quality --payload '{...}'
node references/scripts/story-gate-runtime/cli.mjs record-test-status --payload '{...}'
node references/scripts/story-gate-runtime/cli.mjs record-stage-summary --story {storyId} --payload '{...}'
node references/scripts/story-gate-runtime/cli.mjs checkpoint --phase PHASE_6_VERDICT --payload '{...}'
node references/scripts/story-gate-runtime/cli.mjs advance --to PHASE_7_FINALIZATION
| Verdict | Meaning | Action |
|---|---|---|
PASS | All checks passed | Story -> Done |
CONCERNS | Minor issues, accepted risk | Story -> Done with comment |
FAIL | Blocking issues found | Create follow-up tasks; Story does not go to Done |
WAIVED | User-approved exception | Story -> Done with waiver evidence |
storyId and task_provider..hex-skills/runtime-artifacts/runs/*/story-quality/{storyId}.json:
verdict=FAIL, load payload.metadata.rework_hint as previous_cycle context.cycle_number (1-based, incremented from prior artifact count).story_idtask_providerproject_rootworktree_dirbranchfast_track_policynfr_policytest_task_policyprevious_cycle (null or loaded rework_hint)cycle_numberPHASE_0_CONFIG.PHASE_1_DISCOVERY.fast_track=true only when readiness explicitly allows it.PHASE_2_FAST_TRACK with:
fast_trackchildRunId = {parent_run_id}--ln-510--{storyId}childSummaryArtifactPath = .hex-skills/runtime-artifacts/runs/{parent_run_id}/story-quality/{storyId}.jsonnode references/scripts/quality-runtime/cli.mjs start --story {storyId} --manifest-file .hex-skills/story-gate/ln-510--{storyId}_manifest.json --run-id {childRunId}PHASE_3_QUALITY_CHECKS with:
child_run.worker=ln-510child_run.run_id={childRunId}child_run.summary_artifact_path={childSummaryArtifactPath}child_run.phase_context=quality_checksln-510-quality-coordinator with managed transport inputs:
Skill(skill: "ln-510-quality-coordinator", args: "{storyId} --run-id {childRunId} --summary-artifact-path {childSummaryArtifactPath}")Skill(skill: "ln-510-quality-coordinator", args: "{storyId} --fast-track --run-id {childRunId} --summary-artifact-path {childSummaryArtifactPath}")--previous-cycle-focus "{blocking_categories}" when previous_cycle is not nullstory-quality artifact only, then record-quality.PHASE_3_QUALITY_CHECKS with the recorded quality summary.PHASE_6_VERDICT.ln-520ln-520Done | SKIPPED | VERIFIED) -> checkpoint as reusedln-520, compute:
childRunId = {parent_run_id}--ln-520--{storyId}childSummaryArtifactPath = .hex-skills/runtime-artifacts/runs/{parent_run_id}/story-tests/{storyId}.jsonnode references/scripts/test-planning-runtime/cli.mjs start --story {storyId} --manifest-file .hex-skills/story-gate/ln-520--{storyId}_manifest.json --run-id {childRunId}PHASE_4_TEST_PLANNING with:
child_run.worker=ln-520child_run.run_id={childRunId}child_run.summary_artifact_path={childSummaryArtifactPath}child_run.phase_context=test_planningln-520-test-planner with managed transport inputs:
Skill(skill: "ln-520-test-planner", args: "{storyId} --run-id {childRunId} --summary-artifact-path {childSummaryArtifactPath}")Skill(skill: "ln-520-test-planner", args: "{storyId} --simplified --run-id {childRunId} --summary-artifact-path {childSummaryArtifactPath}")story-tests artifact only, then record-test-status.PHASE_4_TEST_PLANNING.Done, pause runtime:
phase = PAUSEDresume_action = wait for test task completionDone, SKIPPED, or VERIFIEDPHASE_5_TEST_VERIFICATION with:
test_task_statusquality_score.AC- prefixed issue. Common failures: infrastructure exists but nothing exposes it (missing segment 2), mechanism exists but the actor's system can't find it (missing segment 3), mechanism is discoverable but the actor's system doesn't know when or how to use it (missing segment 4). If any AC- issue is found: verdict MUST be FAIL; create fix tasks for the missing segments.FAIL:
DonePHASE_6_VERDICT with:
final_resultquality_scorenfr_validationfix_tasks_createdFor PASS | CONCERNS | WAIVED:
Done.For FAIL:
PHASE_7_FINALIZATION with status=requires_rework.After finalization, write a Stage 3 coordinator artifact with:
summary_kind=pipeline-stagestage=3story_idstatus=completedfinal_resultstory_statusverdictquality_scorewarningsmetadata.rework_hint — when verdict is FAIL, include:
rework_tasks: list of created follow-up task IDsblocking_categories: list of issue categories that caused FAIL (e.g. ac_gap, security, regression)suggested_focus: concise one-line description of what the rework cycle should prioritizeBuild final checklist from runtime state:
ln-510Checkpoint PHASE_8_SELF_CHECK with pass=true|false.
Complete runtime only after pass=true.
Host Skill Invocation: Skill(skill: "...", args: "...") is mandatory delegation.
SKILL.md, treat args as $ARGUMENTS, execute that skill workflow, then return here with its result/artifact.| Phase | Worker | Purpose |
|---|---|---|
| 3 | ln-510-quality-coordinator | Code quality, agent review, regression, log analysis |
| 4 | ln-520-test-planner | Research/manual/auto test planning |
childRunId = "{parent_run_id}--ln-510--{storyId}"
childSummaryArtifactPath = ".hex-skills/runtime-artifacts/runs/{parent_run_id}/story-quality/{storyId}.json"
node references/scripts/quality-runtime/cli.mjs start --story {storyId} --manifest-file .hex-skills/story-gate/ln-510--{storyId}_manifest.json --run-id {childRunId}
node references/scripts/story-gate-runtime/cli.mjs checkpoint --phase PHASE_3_QUALITY_CHECKS --payload '{"child_run":{"worker":"ln-510","run_id":"{childRunId}","summary_artifact_path":"{childSummaryArtifactPath}","phase_context":"quality_checks"}}'
Skill(skill: "ln-510-quality-coordinator", args: "{storyId} --run-id {childRunId} --summary-artifact-path {childSummaryArtifactPath}")
childRunId = "{parent_run_id}--ln-520--{storyId}"
childSummaryArtifactPath = ".hex-skills/runtime-artifacts/runs/{parent_run_id}/story-tests/{storyId}.json"
node references/scripts/test-planning-runtime/cli.mjs start --story {storyId} --manifest-file .hex-skills/story-gate/ln-520--{storyId}_manifest.json --run-id {childRunId}
node references/scripts/story-gate-runtime/cli.mjs checkpoint --phase PHASE_4_TEST_PLANNING --payload '{"child_run":{"worker":"ln-520","run_id":"{childRunId}","summary_artifact_path":"{childSummaryArtifactPath}","phase_context":"test_planning"}}'
Skill(skill: "ln-520-test-planner", args: "{storyId} --run-id {childRunId} --summary-artifact-path {childSummaryArtifactPath}")
- Start ln-500 runtime (pending)
- Load Story/test-task metadata (pending)
- Decide fast-track mode (pending)
- Start ln-510 child runtime, checkpoint child_run, and record quality summary (pending)
- Start or reuse ln-520 child runtime, checkpoint child_run, and record test-planning summary (pending)
- Verify test task readiness (pending)
- Calculate final verdict (pending)
- Finalize Story/branch state and Stage 3 artifact (pending)
- Run runtime self-check and complete (pending)
ln-510 and ln-520 are consumed only through summary JSON artifacts.FAIL is a valid terminal gate result if follow-up actions are recorded correctly.ln-1000 consumes the Stage 3 coordinator artifact, not free-text stage output.Done only on PASS, CONCERNS, or WAIVED.ln-510 summary recorded in runtimeln-520 summary recorded or reused deterministicallyDone only for passing outcomes, or follow-up tasks created for FAILOptional reference: load references/meta_analysis_protocol.md only when the user asks for post-run meta-analysis or protocol-formatted run reflection.
Skill type: execution-orchestrator. When requested, run after phases complete. Output to chat using the execution-orchestrator format.
references/coordinator_runtime_contract.mdreferences/story_gate_runtime_contract.mdreferences/coordinator_summary_contract.mdreferences/minimum_quality_checks.md../ln-510-quality-coordinator/SKILL.md../ln-520-test-planner/SKILL.mdVersion: 7.0.0 Last Updated: 2026-02-09