@arvorco/relentless 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/.claude/commands/relentless.analyze.md +20 -0
  2. package/.claude/commands/relentless.checklist.md +15 -0
  3. package/.claude/commands/relentless.clarify.md +19 -0
  4. package/.claude/commands/relentless.constitution.md +78 -0
  5. package/.claude/commands/relentless.implement.md +15 -0
  6. package/.claude/commands/relentless.plan.md +22 -0
  7. package/.claude/commands/relentless.plan.old.md +89 -0
  8. package/.claude/commands/relentless.specify.md +254 -0
  9. package/.claude/commands/relentless.tasks.md +25 -0
  10. package/.claude/commands/relentless.taskstoissues.md +15 -0
  11. package/.claude/settings.local.json +23 -0
  12. package/.claude/skills/analyze/SKILL.md +149 -0
  13. package/.claude/skills/checklist/SKILL.md +173 -0
  14. package/.claude/skills/checklist/templates/checklist-template.md +40 -0
  15. package/.claude/skills/clarify/SKILL.md +174 -0
  16. package/.claude/skills/constitution/SKILL.md +150 -0
  17. package/.claude/skills/constitution/templates/constitution-template.md +228 -0
  18. package/.claude/skills/implement/SKILL.md +141 -0
  19. package/.claude/skills/plan/SKILL.md +179 -0
  20. package/.claude/skills/plan/templates/plan-template.md +104 -0
  21. package/.claude/skills/prd/SKILL.md +242 -0
  22. package/.claude/skills/relentless/SKILL.md +265 -0
  23. package/.claude/skills/specify/SKILL.md +220 -0
  24. package/.claude/skills/specify/scripts/bash/check-prerequisites.sh +166 -0
  25. package/.claude/skills/specify/scripts/bash/common.sh +156 -0
  26. package/.claude/skills/specify/scripts/bash/create-new-feature.sh +305 -0
  27. package/.claude/skills/specify/scripts/bash/setup-plan.sh +61 -0
  28. package/.claude/skills/specify/scripts/bash/update-agent-context.sh +799 -0
  29. package/.claude/skills/specify/templates/spec-template.md +115 -0
  30. package/.claude/skills/tasks/SKILL.md +202 -0
  31. package/.claude/skills/tasks/templates/tasks-template.md +251 -0
  32. package/.claude/skills/taskstoissues/SKILL.md +97 -0
  33. package/.specify/memory/constitution.md +50 -0
  34. package/.specify/scripts/bash/check-prerequisites.sh +166 -0
  35. package/.specify/scripts/bash/common.sh +156 -0
  36. package/.specify/scripts/bash/create-new-feature.sh +297 -0
  37. package/.specify/scripts/bash/setup-plan.sh +61 -0
  38. package/.specify/scripts/bash/update-agent-context.sh +799 -0
  39. package/.specify/templates/agent-file-template.md +28 -0
  40. package/.specify/templates/checklist-template.md +40 -0
  41. package/.specify/templates/plan-template.md +104 -0
  42. package/.specify/templates/spec-template.md +115 -0
  43. package/.specify/templates/tasks-template.md +251 -0
  44. package/CHANGES_SUMMARY.md +255 -0
  45. package/CLAUDE.md +92 -0
  46. package/GEMINI_SETUP.md +256 -0
  47. package/LICENSE +21 -0
  48. package/README.md +1171 -0
  49. package/REFACTOR_SUMMARY.md +267 -0
  50. package/bin/relentless.ts +536 -0
  51. package/bun.lock +352 -0
  52. package/eslint.config.js +37 -0
  53. package/package.json +61 -0
  54. package/prd.json.example +64 -0
  55. package/prompt.md +108 -0
  56. package/ralph.sh +80 -0
  57. package/relentless/config.json +38 -0
  58. package/relentless/features/.gitkeep +0 -0
  59. package/relentless/features/ghsk-ideas/prd.json +229 -0
  60. package/relentless/features/ghsk-ideas/prd.md +191 -0
  61. package/relentless/features/ghsk-ideas/progress.txt +408 -0
  62. package/relentless/prompt.md +79 -0
  63. package/skills/checklist/SKILL.md +349 -0
  64. package/skills/clarify/SKILL.md +476 -0
  65. package/skills/prd/SKILL.md +242 -0
  66. package/skills/relentless/SKILL.md +268 -0
  67. package/skills/tasks/SKILL.md +577 -0
  68. package/src/agents/amp.ts +115 -0
  69. package/src/agents/claude.ts +185 -0
  70. package/src/agents/codex.ts +89 -0
  71. package/src/agents/droid.ts +90 -0
  72. package/src/agents/gemini.ts +109 -0
  73. package/src/agents/index.ts +16 -0
  74. package/src/agents/opencode.ts +88 -0
  75. package/src/agents/registry.ts +95 -0
  76. package/src/agents/types.ts +101 -0
  77. package/src/config/index.ts +8 -0
  78. package/src/config/loader.ts +237 -0
  79. package/src/config/schema.ts +115 -0
  80. package/src/execution/index.ts +8 -0
  81. package/src/execution/router.ts +49 -0
  82. package/src/execution/runner.ts +512 -0
  83. package/src/index.ts +11 -0
  84. package/src/init/index.ts +7 -0
  85. package/src/init/scaffolder.ts +377 -0
  86. package/src/prd/analyzer.ts +512 -0
  87. package/src/prd/index.ts +11 -0
  88. package/src/prd/issues.ts +249 -0
  89. package/src/prd/parser.ts +281 -0
  90. package/src/prd/progress.ts +198 -0
  91. package/src/prd/types.ts +170 -0
  92. package/src/tui/App.tsx +85 -0
  93. package/src/tui/TUIRunner.tsx +400 -0
  94. package/src/tui/components/AgentOutput.tsx +45 -0
  95. package/src/tui/components/AgentStatus.tsx +64 -0
  96. package/src/tui/components/CurrentStory.tsx +66 -0
  97. package/src/tui/components/Header.tsx +49 -0
  98. package/src/tui/components/ProgressBar.tsx +39 -0
  99. package/src/tui/components/StoryGrid.tsx +86 -0
  100. package/src/tui/hooks/useTUI.ts +147 -0
  101. package/src/tui/hooks/useTimer.ts +51 -0
  102. package/src/tui/index.tsx +17 -0
  103. package/src/tui/theme.ts +41 -0
  104. package/src/tui/types.ts +77 -0
  105. package/templates/constitution.md +228 -0
  106. package/templates/plan.md +273 -0
  107. package/tsconfig.json +27 -0
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Analyze consistency across spec, plan, tasks, and checklist.
3
+ handoffs:
4
+ - label: Start Implementation
5
+ agent: relentless.implement
6
+ prompt: Begin implementation workflow
7
+ send: true
8
+ ---
9
+
10
+ Load the analyze skill and validate cross-artifact consistency.
11
+
12
+ **Context:** $ARGUMENTS
13
+
14
+ The analyze skill will:
15
+ 1. Read all feature artifacts (spec, plan, tasks, checklist, constitution)
16
+ 2. Check for consistency issues and missing coverage
17
+ 3. Validate against constitution MUST rules
18
+ 4. Report CRITICAL, WARNING, and INFO issues
19
+
20
+ Run this before starting implementation to catch issues early.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Generate quality validation checklist from feature artifacts.
3
+ ---
4
+
5
+ Load the checklist skill and generate quality validation checklist.
6
+
7
+ **Context:** $ARGUMENTS
8
+
9
+ The checklist skill will:
10
+ 1. Read spec.md, plan.md, tasks.md, and constitution.md
11
+ 2. Generate domain-specific validation items
12
+ 3. Reference user stories and identify gaps
13
+ 4. Save to `relentless/features/NNN-feature/checklist.md`
14
+
15
+ **Important:** Checklist items will be merged into prd.json acceptance criteria!
@@ -0,0 +1,19 @@
1
+ ---
2
+ description: Identify and resolve ambiguities in feature specifications.
3
+ handoffs:
4
+ - label: Build Technical Plan
5
+ agent: relentless.plan
6
+ prompt: Create technical plan with clarifications
7
+ ---
8
+
9
+ Load the clarify skill and resolve specification ambiguities.
10
+
11
+ **Context:** $ARGUMENTS
12
+
13
+ The clarify skill will:
14
+ 1. Scan spec.md for 9 types of ambiguities
15
+ 2. Present clarification questions (max 5)
16
+ 3. Update spec with answers
17
+ 4. Save clarification log
18
+
19
+ Use this after creating spec if requirements are unclear.
@@ -0,0 +1,78 @@
1
+ ---
2
+ description: Create or update the project constitution - personalized governance and coding principles.
3
+ handoffs:
4
+ - label: Build Specification
5
+ agent: relentless.specify
6
+ prompt: Create a feature specification. I want to build...
7
+ ---
8
+
9
+ Load the constitution skill and create or update the project constitution at `relentless/constitution.md`.
10
+
11
+ **Context:** $ARGUMENTS
12
+
13
+ The constitution skill will:
14
+ 1. Ask about your project's coding philosophy and standards
15
+ 2. Generate a personalized constitution based on your answers
16
+ 3. Save to `relentless/constitution.md`
17
+ 4. Ensure consistency with project standards
18
+
19
+ 1. Load the existing constitution template at `.specify/memory/constitution.md`.
20
+ - Identify every placeholder token of the form `[ALL_CAPS_IDENTIFIER]`.
21
+ **IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
22
+
23
+ 2. Collect/derive values for placeholders:
24
+ - If user input (conversation) supplies a value, use it.
25
+ - Otherwise infer from existing repo context (README, docs, prior constitution versions if embedded).
26
+ - For governance dates: `RATIFICATION_DATE` is the original adoption date (if unknown ask or mark TODO), `LAST_AMENDED_DATE` is today if changes are made, otherwise keep previous.
27
+ - `CONSTITUTION_VERSION` must increment according to semantic versioning rules:
28
+ - MAJOR: Backward incompatible governance/principle removals or redefinitions.
29
+ - MINOR: New principle/section added or materially expanded guidance.
30
+ - PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
31
+ - If version bump type ambiguous, propose reasoning before finalizing.
32
+
33
+ 3. Draft the updated constitution content:
34
+ - Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
35
+ - Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
36
+ - Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
37
+ - Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
38
+
39
+ 4. Consistency propagation checklist (convert prior checklist into active validations):
40
+ - Read `.specify/templates/plan-template.md` and ensure any "Constitution Check" or rules align with updated principles.
41
+ - Read `.specify/templates/spec-template.md` for scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints.
42
+ - Read `.specify/templates/tasks-template.md` and ensure task categorization reflects new or removed principle-driven task types (e.g., observability, versioning, testing discipline).
43
+ - Read each command file in `.specify/templates/commands/*.md` (including this one) to verify no outdated references (agent-specific names like CLAUDE only) remain when generic guidance is required.
44
+ - Read any runtime guidance docs (e.g., `README.md`, `docs/quickstart.md`, or agent-specific guidance files if present). Update references to principles changed.
45
+
46
+ 5. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
47
+ - Version change: old → new
48
+ - List of modified principles (old title → new title if renamed)
49
+ - Added sections
50
+ - Removed sections
51
+ - Templates requiring updates (✅ updated / ⚠ pending) with file paths
52
+ - Follow-up TODOs if any placeholders intentionally deferred.
53
+
54
+ 6. Validation before final output:
55
+ - No remaining unexplained bracket tokens.
56
+ - Version line matches report.
57
+ - Dates ISO format YYYY-MM-DD.
58
+ - Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).
59
+
60
+ 7. Write the completed constitution back to `.specify/memory/constitution.md` (overwrite).
61
+
62
+ 8. Output a final summary to the user with:
63
+ - New version and bump rationale.
64
+ - Any files flagged for manual follow-up.
65
+ - Suggested commit message (e.g., `docs: amend constitution to vX.Y.Z (principle additions + governance update)`).
66
+
67
+ Formatting & Style Requirements:
68
+
69
+ - Use Markdown headings exactly as in the template (do not demote/promote levels).
70
+ - Wrap long rationale lines to keep readability (<100 chars ideally) but do not hard enforce with awkward breaks.
71
+ - Keep a single blank line between sections.
72
+ - Avoid trailing whitespace.
73
+
74
+ If the user supplies partial updates (e.g., only one principle revision), still perform validation and version decision steps.
75
+
76
+ If critical info missing (e.g., ratification date truly unknown), insert `TODO(<FIELD_NAME>): explanation` and include in the Sync Impact Report under deferred items.
77
+
78
+ Do not create a new template; always operate on the existing `.specify/memory/constitution.md` file.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Execute implementation workflow phase by phase.
3
+ ---
4
+
5
+ Load the implement skill and begin systematic implementation.
6
+
7
+ **Context:** $ARGUMENTS
8
+
9
+ The implement skill will:
10
+ 1. Guide you through implementing tasks in dependency order
11
+ 2. Track progress per user story
12
+ 3. Ensure quality gates are met
13
+ 4. Update progress.txt with learnings
14
+
15
+ Prerequisites: /relentless.analyze must pass (no CRITICAL issues)
@@ -0,0 +1,22 @@
1
+ ---
2
+ description: Generate technical implementation plan from feature specification.
3
+ handoffs:
4
+ - label: Generate Task Breakdown
5
+ agent: relentless.tasks
6
+ prompt: Generate tasks from plan
7
+ send: true
8
+ - label: Generate Quality Checklist
9
+ agent: relentless.checklist
10
+ prompt: Generate quality checklist
11
+ send: true
12
+ ---
13
+
14
+ Load the plan skill and create technical implementation plan.
15
+
16
+ **Context:** $ARGUMENTS
17
+
18
+ The plan skill will:
19
+ 1. Read feature specification and constitution
20
+ 2. Generate technical architecture and design
21
+ 3. Define data models, APIs, and implementation strategy
22
+ 4. Save to `relentless/features/NNN-feature/plan.md`
@@ -0,0 +1,89 @@
1
+ ---
2
+ description: Execute the implementation planning workflow using the plan template to generate design artifacts.
3
+ handoffs:
4
+ - label: Create Tasks
5
+ agent: relentless.tasks
6
+ prompt: Break the plan into tasks
7
+ send: true
8
+ - label: Create Checklist
9
+ agent: relentless.checklist
10
+ prompt: Create a checklist for the following domain...
11
+ ---
12
+
13
+ ## User Input
14
+
15
+ ```text
16
+ $ARGUMENTS
17
+ ```
18
+
19
+ You **MUST** consider the user input before proceeding (if not empty).
20
+
21
+ ## Outline
22
+
23
+ 1. **Setup**: Run `.specify/scripts/bash/setup-plan.sh --json` from repo root and parse JSON for FEATURE_SPEC, IMPL_PLAN, SPECS_DIR, BRANCH. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
24
+
25
+ 2. **Load context**: Read FEATURE_SPEC and `.specify/memory/constitution.md`. Load IMPL_PLAN template (already copied).
26
+
27
+ 3. **Execute plan workflow**: Follow the structure in IMPL_PLAN template to:
28
+ - Fill Technical Context (mark unknowns as "NEEDS CLARIFICATION")
29
+ - Fill Constitution Check section from constitution
30
+ - Evaluate gates (ERROR if violations unjustified)
31
+ - Phase 0: Generate research.md (resolve all NEEDS CLARIFICATION)
32
+ - Phase 1: Generate data-model.md, contracts/, quickstart.md
33
+ - Phase 1: Update agent context by running the agent script
34
+ - Re-evaluate Constitution Check post-design
35
+
36
+ 4. **Stop and report**: Command ends after Phase 2 planning. Report branch, IMPL_PLAN path, and generated artifacts.
37
+
38
+ ## Phases
39
+
40
+ ### Phase 0: Outline & Research
41
+
42
+ 1. **Extract unknowns from Technical Context** above:
43
+ - For each NEEDS CLARIFICATION → research task
44
+ - For each dependency → best practices task
45
+ - For each integration → patterns task
46
+
47
+ 2. **Generate and dispatch research agents**:
48
+
49
+ ```text
50
+ For each unknown in Technical Context:
51
+ Task: "Research {unknown} for {feature context}"
52
+ For each technology choice:
53
+ Task: "Find best practices for {tech} in {domain}"
54
+ ```
55
+
56
+ 3. **Consolidate findings** in `research.md` using format:
57
+ - Decision: [what was chosen]
58
+ - Rationale: [why chosen]
59
+ - Alternatives considered: [what else evaluated]
60
+
61
+ **Output**: research.md with all NEEDS CLARIFICATION resolved
62
+
63
+ ### Phase 1: Design & Contracts
64
+
65
+ **Prerequisites:** `research.md` complete
66
+
67
+ 1. **Extract entities from feature spec** → `data-model.md`:
68
+ - Entity name, fields, relationships
69
+ - Validation rules from requirements
70
+ - State transitions if applicable
71
+
72
+ 2. **Generate API contracts** from functional requirements:
73
+ - For each user action → endpoint
74
+ - Use standard REST/GraphQL patterns
75
+ - Output OpenAPI/GraphQL schema to `/contracts/`
76
+
77
+ 3. **Agent context update**:
78
+ - Run `.specify/scripts/bash/update-agent-context.sh claude`
79
+ - These scripts detect which AI agent is in use
80
+ - Update the appropriate agent-specific context file
81
+ - Add only new technology from current plan
82
+ - Preserve manual additions between markers
83
+
84
+ **Output**: data-model.md, /contracts/*, quickstart.md, agent-specific file
85
+
86
+ ## Key rules
87
+
88
+ - Use absolute paths
89
+ - ERROR on gate failures or unresolved clarifications
@@ -0,0 +1,254 @@
1
+ ---
2
+ description: Create feature specification from natural language description.
3
+ handoffs:
4
+ - label: Build Technical Plan
5
+ agent: relentless.plan
6
+ prompt: Create a plan for the spec. I am building with...
7
+ - label: Clarify Requirements
8
+ agent: relentless.clarify
9
+ prompt: Clarify specification requirements
10
+ send: true
11
+ ---
12
+
13
+ Load the specify skill and create a feature specification in `relentless/features/NNN-feature-name/`.
14
+
15
+ **Feature Description:** $ARGUMENTS
16
+
17
+ The specify skill will:
18
+ 1. Create numbered feature directory and branch
19
+ 2. Generate structured specification from your description
20
+ 3. Validate specification quality
21
+ 4. Save to `spec.md`
22
+
23
+ 1. **Generate a concise short name** (2-4 words) for the branch:
24
+ - Analyze the feature description and extract the most meaningful keywords
25
+ - Create a 2-4 word short name that captures the essence of the feature
26
+ - Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
27
+ - Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
28
+ - Keep it concise but descriptive enough to understand the feature at a glance
29
+ - Examples:
30
+ - "I want to add user authentication" → "user-auth"
31
+ - "Implement OAuth2 integration for the API" → "oauth2-api-integration"
32
+ - "Create a dashboard for analytics" → "analytics-dashboard"
33
+ - "Fix payment processing timeout bug" → "fix-payment-timeout"
34
+
35
+ 2. **Check for existing branches before creating new one**:
36
+
37
+ a. First, fetch all remote branches to ensure we have the latest information:
38
+
39
+ ```bash
40
+ git fetch --all --prune
41
+ ```
42
+
43
+ b. Find the highest feature number across all sources for the short-name:
44
+ - Remote branches: `git ls-remote --heads origin | grep -E 'refs/heads/[0-9]+-<short-name>$'`
45
+ - Local branches: `git branch | grep -E '^[* ]*[0-9]+-<short-name>$'`
46
+ - Specs directories: Check for directories matching `specs/[0-9]+-<short-name>`
47
+
48
+ c. Determine the next available number:
49
+ - Extract all numbers from all three sources
50
+ - Find the highest number N
51
+ - Use N+1 for the new branch number
52
+
53
+ d. Run the script `.specify/scripts/bash/create-new-feature.sh --json "$ARGUMENTS"` with the calculated number and short-name:
54
+ - Pass `--number N+1` and `--short-name "your-short-name"` along with the feature description
55
+ - Bash example: `.specify/scripts/bash/create-new-feature.sh --json "$ARGUMENTS" --json --number 5 --short-name "user-auth" "Add user authentication"`
56
+ - PowerShell example: `.specify/scripts/bash/create-new-feature.sh --json "$ARGUMENTS" -Json -Number 5 -ShortName "user-auth" "Add user authentication"`
57
+
58
+ **IMPORTANT**:
59
+ - Check all three sources (remote branches, local branches, specs directories) to find the highest number
60
+ - Only match branches/directories with the exact short-name pattern
61
+ - If no existing branches/directories found with this short-name, start with number 1
62
+ - You must only ever run this script once per feature
63
+ - The JSON is provided in the terminal as output - always refer to it to get the actual content you're looking for
64
+ - The JSON output will contain BRANCH_NAME and SPEC_FILE paths
65
+ - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot")
66
+
67
+ 3. Load `.specify/templates/spec-template.md` to understand required sections.
68
+
69
+ 4. Follow this execution flow:
70
+
71
+ 1. Parse user description from Input
72
+ If empty: ERROR "No feature description provided"
73
+ 2. Extract key concepts from description
74
+ Identify: actors, actions, data, constraints
75
+ 3. For unclear aspects:
76
+ - Make informed guesses based on context and industry standards
77
+ - Only mark with [NEEDS CLARIFICATION: specific question] if:
78
+ - The choice significantly impacts feature scope or user experience
79
+ - Multiple reasonable interpretations exist with different implications
80
+ - No reasonable default exists
81
+ - **LIMIT: Maximum 3 [NEEDS CLARIFICATION] markers total**
82
+ - Prioritize clarifications by impact: scope > security/privacy > user experience > technical details
83
+ 4. Fill User Scenarios & Testing section
84
+ If no clear user flow: ERROR "Cannot determine user scenarios"
85
+ 5. Generate Functional Requirements
86
+ Each requirement must be testable
87
+ Use reasonable defaults for unspecified details (document assumptions in Assumptions section)
88
+ 6. Define Success Criteria
89
+ Create measurable, technology-agnostic outcomes
90
+ Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)
91
+ Each criterion must be verifiable without implementation details
92
+ 7. Identify Key Entities (if data involved)
93
+ 8. Return: SUCCESS (spec ready for planning)
94
+
95
+ 5. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
96
+
97
+ 6. **Specification Quality Validation**: After writing the initial spec, validate it against quality criteria:
98
+
99
+ a. **Create Spec Quality Checklist**: Generate a checklist file at `FEATURE_DIR/checklists/requirements.md` using the checklist template structure with these validation items:
100
+
101
+ ```markdown
102
+ # Specification Quality Checklist: [FEATURE NAME]
103
+
104
+ **Purpose**: Validate specification completeness and quality before proceeding to planning
105
+ **Created**: [DATE]
106
+ **Feature**: [Link to spec.md]
107
+
108
+ ## Content Quality
109
+
110
+ - [ ] No implementation details (languages, frameworks, APIs)
111
+ - [ ] Focused on user value and business needs
112
+ - [ ] Written for non-technical stakeholders
113
+ - [ ] All mandatory sections completed
114
+
115
+ ## Requirement Completeness
116
+
117
+ - [ ] No [NEEDS CLARIFICATION] markers remain
118
+ - [ ] Requirements are testable and unambiguous
119
+ - [ ] Success criteria are measurable
120
+ - [ ] Success criteria are technology-agnostic (no implementation details)
121
+ - [ ] All acceptance scenarios are defined
122
+ - [ ] Edge cases are identified
123
+ - [ ] Scope is clearly bounded
124
+ - [ ] Dependencies and assumptions identified
125
+
126
+ ## Feature Readiness
127
+
128
+ - [ ] All functional requirements have clear acceptance criteria
129
+ - [ ] User scenarios cover primary flows
130
+ - [ ] Feature meets measurable outcomes defined in Success Criteria
131
+ - [ ] No implementation details leak into specification
132
+
133
+ ## Notes
134
+
135
+ - Items marked incomplete require spec updates before `/relentless.clarify` or `/relentless.plan`
136
+ ```
137
+
138
+ b. **Run Validation Check**: Review the spec against each checklist item:
139
+ - For each item, determine if it passes or fails
140
+ - Document specific issues found (quote relevant spec sections)
141
+
142
+ c. **Handle Validation Results**:
143
+
144
+ - **If all items pass**: Mark checklist complete and proceed to step 6
145
+
146
+ - **If items fail (excluding [NEEDS CLARIFICATION])**:
147
+ 1. List the failing items and specific issues
148
+ 2. Update the spec to address each issue
149
+ 3. Re-run validation until all items pass (max 3 iterations)
150
+ 4. If still failing after 3 iterations, document remaining issues in checklist notes and warn user
151
+
152
+ - **If [NEEDS CLARIFICATION] markers remain**:
153
+ 1. Extract all [NEEDS CLARIFICATION: ...] markers from the spec
154
+ 2. **LIMIT CHECK**: If more than 3 markers exist, keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest
155
+ 3. For each clarification needed (max 3), present options to user in this format:
156
+
157
+ ```markdown
158
+ ## Question [N]: [Topic]
159
+
160
+ **Context**: [Quote relevant spec section]
161
+
162
+ **What we need to know**: [Specific question from NEEDS CLARIFICATION marker]
163
+
164
+ **Suggested Answers**:
165
+
166
+ | Option | Answer | Implications |
167
+ |--------|--------|--------------|
168
+ | A | [First suggested answer] | [What this means for the feature] |
169
+ | B | [Second suggested answer] | [What this means for the feature] |
170
+ | C | [Third suggested answer] | [What this means for the feature] |
171
+ | Custom | Provide your own answer | [Explain how to provide custom input] |
172
+
173
+ **Your choice**: _[Wait for user response]_
174
+ ```
175
+
176
+ 4. **CRITICAL - Table Formatting**: Ensure markdown tables are properly formatted:
177
+ - Use consistent spacing with pipes aligned
178
+ - Each cell should have spaces around content: `| Content |` not `|Content|`
179
+ - Header separator must have at least 3 dashes: `|--------|`
180
+ - Test that the table renders correctly in markdown preview
181
+ 5. Number questions sequentially (Q1, Q2, Q3 - max 3 total)
182
+ 6. Present all questions together before waiting for responses
183
+ 7. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
184
+ 8. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
185
+ 9. Re-run validation after all clarifications are resolved
186
+
187
+ d. **Update Checklist**: After each validation iteration, update the checklist file with current pass/fail status
188
+
189
+ 7. Report completion with branch name, spec file path, checklist results, and readiness for the next phase (`/relentless.clarify` or `/relentless.plan`).
190
+
191
+ **NOTE:** The script creates and checks out the new branch and initializes the spec file before writing.
192
+
193
+ ## General Guidelines
194
+
195
+ ## Quick Guidelines
196
+
197
+ - Focus on **WHAT** users need and **WHY**.
198
+ - Avoid HOW to implement (no tech stack, APIs, code structure).
199
+ - Written for business stakeholders, not developers.
200
+ - DO NOT create any checklists that are embedded in the spec. That will be a separate command.
201
+
202
+ ### Section Requirements
203
+
204
+ - **Mandatory sections**: Must be completed for every feature
205
+ - **Optional sections**: Include only when relevant to the feature
206
+ - When a section doesn't apply, remove it entirely (don't leave as "N/A")
207
+
208
+ ### For AI Generation
209
+
210
+ When creating this spec from a user prompt:
211
+
212
+ 1. **Make informed guesses**: Use context, industry standards, and common patterns to fill gaps
213
+ 2. **Document assumptions**: Record reasonable defaults in the Assumptions section
214
+ 3. **Limit clarifications**: Maximum 3 [NEEDS CLARIFICATION] markers - use only for critical decisions that:
215
+ - Significantly impact feature scope or user experience
216
+ - Have multiple reasonable interpretations with different implications
217
+ - Lack any reasonable default
218
+ 4. **Prioritize clarifications**: scope > security/privacy > user experience > technical details
219
+ 5. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
220
+ 6. **Common areas needing clarification** (only if no reasonable default exists):
221
+ - Feature scope and boundaries (include/exclude specific use cases)
222
+ - User types and permissions (if multiple conflicting interpretations possible)
223
+ - Security/compliance requirements (when legally/financially significant)
224
+
225
+ **Examples of reasonable defaults** (don't ask about these):
226
+
227
+ - Data retention: Industry-standard practices for the domain
228
+ - Performance targets: Standard web/mobile app expectations unless specified
229
+ - Error handling: User-friendly messages with appropriate fallbacks
230
+ - Authentication method: Standard session-based or OAuth2 for web apps
231
+ - Integration patterns: RESTful APIs unless specified otherwise
232
+
233
+ ### Success Criteria Guidelines
234
+
235
+ Success criteria must be:
236
+
237
+ 1. **Measurable**: Include specific metrics (time, percentage, count, rate)
238
+ 2. **Technology-agnostic**: No mention of frameworks, languages, databases, or tools
239
+ 3. **User-focused**: Describe outcomes from user/business perspective, not system internals
240
+ 4. **Verifiable**: Can be tested/validated without knowing implementation details
241
+
242
+ **Good examples**:
243
+
244
+ - "Users can complete checkout in under 3 minutes"
245
+ - "System supports 10,000 concurrent users"
246
+ - "95% of searches return results in under 1 second"
247
+ - "Task completion rate improves by 40%"
248
+
249
+ **Bad examples** (implementation-focused):
250
+
251
+ - "API response time is under 200ms" (too technical, use "Users see results instantly")
252
+ - "Database can handle 1000 TPS" (implementation detail, use user-facing metric)
253
+ - "React components render efficiently" (framework-specific)
254
+ - "Redis cache hit rate above 80%" (technology-specific)
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Generate dependency-ordered user stories and tasks from plan.
3
+ handoffs:
4
+ - label: Analyze Consistency
5
+ agent: relentless.analyze
6
+ prompt: Analyze cross-artifact consistency
7
+ send: true
8
+ - label: Start Implementation
9
+ agent: relentless.implement
10
+ prompt: Begin implementation
11
+ send: true
12
+ ---
13
+
14
+ Load the tasks skill and generate user stories and implementation tasks.
15
+
16
+ **Context:** $ARGUMENTS
17
+
18
+ The tasks skill will:
19
+ 1. Read spec.md and plan.md
20
+ 2. Extract user stories from requirements
21
+ 3. Break down into actionable tasks with acceptance criteria
22
+ 4. Order by dependencies
23
+ 5. Save to `relentless/features/NNN-feature/tasks.md`
24
+
25
+ **Important:** tasks.md contains the user stories that will be converted to prd.json!
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Convert user stories to GitHub issues.
3
+ ---
4
+
5
+ Load the taskstoissues skill and create GitHub issues from user stories.
6
+
7
+ **Context:** $ARGUMENTS
8
+
9
+ The taskstoissues skill will:
10
+ 1. Read tasks.md
11
+ 2. Parse user stories
12
+ 3. Generate GitHub issues with `gh` CLI
13
+ 4. Link dependencies
14
+
15
+ Note: The actual implementation uses the CLI command `relentless issues --feature <name>`
@@ -0,0 +1,23 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "WebSearch",
5
+ "Bash(amp --help:*)",
6
+ "Bash(opencode --help:*)",
7
+ "Bash(codex:*)",
8
+ "Bash(droid:*)",
9
+ "Bash(gemini:*)",
10
+ "Bash(node --version:*)",
11
+ "Bash(bun --version)",
12
+ "Bash(opencode agent:*)",
13
+ "Bash(tree:*)",
14
+ "Bash(jq:*)",
15
+ "Bash(bun run lint:*)",
16
+ "Bash(bun run typecheck:*)",
17
+ "Bash(bun build:*)",
18
+ "Bash(bun run:*)",
19
+ "Bash(git diff:*)",
20
+ "Bash(git add:*)"
21
+ ]
22
+ }
23
+ }