You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rules/holistic-workflow.rules.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# Holistic Workflow: A Guide to Your Thought Process
2
-
Authored by matscode
2
+
<!--Authored by @matscode-->
3
3
4
4
## 1. Purpose of This Guide
5
5
This document is your "mental map." You may read the various `.rules.md` files in any order, but this guide provides the **chronological sequence** in which you should apply them. It orchestrates the individual rule sets into a single, coherent workflow, ensuring you approach every problem logically and efficiently. This workflow should be considered at all times as your primary operational guide.
6
6
7
7
This is not just a set of rules; it is a framework for your thinking.
8
8
9
9
## 2. The Recommended Workflow
10
-
Authored by matscode
10
+
<!--Authored by @matscode-->
11
11
12
12
### Step 1: First, Understand Who You're Working With
13
13
***Objective:** Know your user's background and communication preferences.
-**Vague? -> Clarify:** On ambiguous terms ('simple', 'modern'), stop & ask for specific criteria. Present options with trade-offs.
6
-
-**Verify -> Then Act:** Always get explicit approval. Ask `"Should I proceed?"` before coding and `"Does this meet your expectations?"` after.
7
-
-**Validate -> Scope:** Implement ONLY what is explicitly requested. Never add, modify, or remove features/code without direct permission.
3
+
## 1. Core Principles (Mandatory)
4
+
-**Clarify Vague Requirements:** On ambiguous terms ('simple', 'modern'), you MUST stop and ask for specific criteria. Present options with trade-offs. Failure to ask is a critical violation.
5
+
-**Verify Before Acting:** You MUST get explicit approval before any implementation. Ask `"Should I proceed?"` before coding and `"Does this meet your expectations?"` after. Proceeding without approval is a critical violation.
6
+
-**Validate Scope:** You MUST implement ONLY what is explicitly requested. Never add, modify, or remove features or code without direct permission. Scope creep is a critical violation.
7
+
-**Decide Implementation Approach:** You MUST ask about the implementation approach (e.g., custom vs. library) before coding. If a library is chosen, present options. You MUST confirm the decision before proceeding. Failure to do so is a critical violation.
8
+
-**Confirm Session Closure:** You MUST always ask if the user is finished or wants additional changes before ending the session. Exiting without confirmation is a critical violation.
8
9
9
10
## 2. When to Stop & Ask (Mandatory)
10
-
Authored by matscode
11
+
Agent **MUST STOP** and ask questions when encountering:
-**Multiple Valid Approaches:** Design patterns (hooks vs classes), libraries (Redux vs Zustand), or tool choices.
13
+
-**Multiple Valid Approaches:** Design patterns (hooks vs classes), libraries (e.g., state-lib-1 vs state-lib-2), or tool choices.
14
+
-**Implementation Strategy Choices:** Custom implementation vs external library/tool.
15
+
-**Architecture Decisions:** Built-in solutions vs third-party dependencies.
16
+
-**Solution Approach:** When multiple implementation paths exist (custom/library/hybrid).
13
17
-**Feature Additions:** ANY feature not explicitly requested by the user.
14
18
-**Significant Code Changes:** New dependencies, core architecture modifications.
15
19
-**Assumptions About User Intent:** Inferring unstated requirements.
16
20
-**Post-Implementation:** After completing ANY feature or implementation.
17
21
-**Project Direction:** When multiple valid next steps exist.
18
-
-**Project Rules:** Before codifying new coding standards.
22
+
**Actions**: Ask for specifics, present ALL available options with trade-offs, explain impact of each choice, confirm assumptions, and get explicit approval before proceeding
19
23
20
-
### Scope & Preservation Violations
24
+
<!-- Authored by @matscode -->
25
+
26
+
**🚨 SCOPE & PRESERVATION VIOLATIONS**
21
27
-**NEVER** implement buttons, UI elements, or functionality not explicitly requested.
22
28
-**NEVER** assume user wants "complete" implementations with extra features.
23
29
-**NEVER** remove/modify existing working components without explicit request.
24
30
-**NEVER** assume existing code is redundant or should be removed.
25
31
-**CORRECT APPROACH**: Ask "Should I add features like accept/decline buttons?" or "Should I preserve existing [component] or modify it?"
26
32
27
33
## 3. Interactive Command Protocol (Critical)
28
-
Authored by matscode
29
-
-**Tool:** Use `run_command` ONLY. `blocking: true`, `requires_approval: false` for questions.
30
-
-**Format:** Use `echo -e` for interactive input.
31
-
-**Readability:** Every interactive command **MUST** begin with two newlines (`\n\n`).
32
-
-**OS Syntax:** Use OS-appropriate syntax.
34
+
**MUST** use `run_command` ONLY.
35
+
<!-- Authored by @matscode -->
36
+
### Question Formatting
37
+
-**Recommended Method:** Use `echo -e` for interactive input. It provides reliable and consistent behavior across different shells.
38
+
-**Mandatory Newlines:** All interactive questions **MUST** begin with two newlines (`\n\n`) to ensure clear visual separation in the terminal.
39
+
-**Emoji Usage:** Emojis are encouraged to improve readability and user experience. Use them where appropriate to add visual cues, but use them sparingly to avoid distraction. The examples below are not exhaustive; feel free to use other emojis as you see fit.
40
+
-**Examples:**
41
+
-**Single-line:**`echo -e "\n\nWhat is your favorite color? "; read answer`
-**Emojis:**`echo -e "\n\n🚀 Ready to proceed? (y/n) "; read answer`
44
+
-**Detailed Emoji Example:**`echo -e "\n\nI see you want to add a new feature. I\'ve got a few ideas on how to approach it...\n\n1. 🤠 Go in guns blazing with a custom implementation.\n2. 😒 Use a well-established library (safe, but boring).\n3. 🧪 Try a new, experimental library (might be amazing, might explode).\n\nWhat\'s your poison? "; read answer`
-**JSON Escaping:** Note the use of `\\n\\n` for newlines within the JSON string.
44
57
45
-
### OS-Specific Commands
46
-
47
-
### Complex & Multi-line Questions
48
-
For complex questions that require more context, you can format the question over multiple lines using `\n` for newlines within the `echo -e` command. This improves readability.
58
+
### OS-Specific Commands Example
49
59
50
-
**Unix/Linux/macOS Example:**
51
-
```bash
52
-
echo -e '\n\nI need to update the user authentication flow. Which approach should I take?\n1. JWT-based authentication with refresh tokens\n2. Session-based authentication with server-side storage\n3. OAuth 2.0 with a third-party provider (e.g., Google, GitHub)\nPlease enter the number of your choice: ';read answer;echo"You selected: $answer"
-**Follow-up:** Drill deeper when answers leave ambiguity.
78
73
79
74
## 6. Mandatory Practices
80
-
Authored by matscode
75
+
<!--Authored by @matscode-->
81
76
-**Early Clarification** - Ask questions at task start, resolve ambiguities before coding
82
77
-**Feature Scope Verification** - MUST confirm before adding ANY feature not explicitly requested
83
78
-**Display Text Acknowledgment** - ALL display-only text MUST require user acknowledgment before proceeding
@@ -142,7 +137,7 @@ Authored by matscode
142
137
-**Forbidden:** Displaying interactive commands as text is strictly forbidden.
143
138
144
139
## 9. Information Freshness (Critical)
145
-
-**Core Rule:** You MUST always use the most up-to-date file content. Before you ask a question or implement a change, re-read any relevant files to ensure you have not missed a manual update from the user.
140
+
-**Core Rule:** You MUST always use the most up-to-date file content. Before you ask a question or implement a change, re-read any relevant files to ensure you have not missed a manual update from the user before acting on said file.
146
141
-**Stale Content = Critical Failure:** Basing actions on outdated information is a critical violation.
147
142
148
143
-- Authored by [matscode](https://www.linkedin.com/in/matscode)
Copy file name to clipboardExpand all lines: rules/spec-decision-examples.rules.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,14 @@
1
1
# Specification Decision Examples
2
-
Authored by [matscode](https://www.tiktok.com/@matscode)
3
2
4
3
This document provides a comprehensive, non-exhaustive list of examples for when a specification is required. It is intended as a reference to be used for validation when there is doubt.
4
+
<!-- Authored by @matscode -->
5
5
6
6
---
7
7
8
8
## Detailed Triggers for Specification Creation
9
9
10
10
A specification is required for **ALL** of the following:
11
+
<!-- Authored by @matscode -->
11
12
12
13
### General Code Changes
13
14
-**New Features:** Any new functionality, components, functions, endpoints, or capabilities.
@@ -27,7 +28,8 @@ A specification is required for **ALL** of the following:
27
28
-**Infrastructure Changes:** Deployment, CI/CD, or environment configuration modifications.
Copy file name to clipboardExpand all lines: rules/spec-management.rules.md
+57-28Lines changed: 57 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,45 @@
1
1
# Spec Management & Referencing Rules (MANDATORY)
2
2
3
-
Authored by [matscode](https://www.tiktok.com/@matscode)
3
+
<!--Authored by @matscode-->
4
4
5
5
This document outlines the mandatory workflow for creating, managing, and referencing specifications. Adherence is critical for maintainability and traceability.
6
6
7
7
---
8
8
9
-
## 1. When to Create a Spec
9
+
## 1. Specification Types
10
+
11
+
This section clarifies the differences between Project and Feature specifications.
12
+
13
+
-**Project Spec:** A high-level document that outlines the core, project-wide decisions. It is the single source of truth for the project's overall direction and branding.
14
+
-**Feature Spec:** A detailed document that describes the requirements, implementation, and affected files for a specific feature or non-trivial code change.
15
+
16
+
---
17
+
18
+
## 2. Project Spec Workflow
19
+
20
+
<!-- Authored by @matscode -->
21
+
22
+
**MANDATORY**
23
+
24
+
1.**Read the Project Spec:** Always read the `specs/project.spec.md` file first to understand the high-level project context.
25
+
2.**Project-Level Decisions:** All project-level decisions, such as project name, description, tagline, and branding, **MUST** be documented in the `specs/project.spec.md` file.
26
+
3.**Spec List Integrity:** Only specification files located within the `specs/` directory are permitted to be included in the `Extra Spec List`.
27
+
28
+
---
29
+
30
+
## 3. Feature Spec Workflow
31
+
32
+
### Updating the Project Spec
33
+
34
+
If a feature introduces any new project-wide element—such as a **dependency, color, font, or other branding element**—the feature spec's implementation plan **MUST** include a step to update the corresponding section of `specs/project.spec.md`.
35
+
36
+
---
37
+
38
+
## 2. When to Create a Spec
39
+
40
+
<!-- Authored by @matscode -->
41
+
42
+
10
43
11
44
A spec is **MANDATORY** for any non-trivial code change (i.e., any change that is not a minor typographical fix).
12
45
@@ -47,35 +80,34 @@ A spec is also required when coding agents need context for:
47
80
48
81
---
49
82
50
-
## 2. Agent Response Protocol
51
-
52
-
Authored by matscode
83
+
## 3. Agent Response Protocol
53
84
54
85
Before creating any specification file, agents MUST ask these questions to ensure optimal documentation:
55
86
56
87
**DECISION CLARITY:**
57
88
- "What is your final decision? (If not explicitly stated)"
58
89
- "Can you confirm this is the approach you want to proceed with?"
59
90
60
-
**RATIONALE GATHERING:**
61
-
- "What led you to choose this option over alternatives?"
62
-
- "What factors were most important in your decision?"
91
+
**SPEC DESTINATION:**
92
+
- "Should this decision be documented in the project spec or a feature spec? (project/feature)"
63
93
64
94
**SOURCE DOCUMENTATION:**
65
95
- "Are there any specific articles, documentation, or resources that influenced your decision?"
66
96
67
-
### 2.1 Interactive Input Compliance
97
+
### 3.1 Interactive Input Compliance
68
98
All questions in this protocol MUST comply with the rules for asking questions and handling user input as defined in `rules/interactive-input.rules.md`.
69
99
70
100
---
71
101
72
-
## 3. Specification Workflow
102
+
## 4. Specification Workflow
103
+
104
+
<!-- Authored by @matscode -->
73
105
74
106
### Step 1: Specification Selection and Reuse Protocol
75
107
76
108
**MANDATORY: BEFORE CREATING A NEW SPEC, YOU MUST FOLLOW THIS PROTOCOL:**
77
109
78
-
1.**Search the Spec Index:** Perform a comprehensive keyword search against the `title` and `keywords` fields in `project-specs/index.json` to find all potentially relevant specs.
110
+
1.**Search the Spec Index:** Perform a comprehensive keyword search against the `title` and `keywords` fields in `feature-specs/index.json` to find all potentially relevant specs.
79
111
80
112
2.**Select Candidate Specifications:** From the search results, identify the 2-3 specs that most closely match the current requirement.
81
113
@@ -90,38 +122,37 @@ All questions in this protocol MUST comply with the rules for asking questions a
90
122
5.**Resolve Conflicts:** If you are uncertain which strategy to choose or which spec to update, present the options to the user and ask for guidance using an interactive command as defined in `rules/interactive-input.rules.md`. Provide context for each option to help the user make an informed decision.
-**Template:** Use `rules/templates/spec.template.md` exactly.
128
+
-**Implementation Steps:** The `Key Implementation Steps` section **MUST** be detailed and transparent, outlining each step of the implementation.
96
129
97
130
### Step 3: Get Approval
98
131
-**Present:** Share the spec with the user for review.
99
132
-**Ask:** Use an interactive command as defined in `rules/interactive-input.rules.md` to ask for approval. The question should be: `"I have created/updated the spec for [decision]. Please review and approve."`
100
133
-**Wait:** Do not proceed without explicit approval.
101
134
102
135
### Step 4: Update Index
103
-
-**After Approval:** Once a new spec is approved, you **MUST** add a new entry to the `project-specs/index.json` file.
136
+
-**After Approval:** Once a new spec is approved, you **MUST** add a new entry to the `feature-specs/index.json` file.
104
137
-**Format:** The entry must be a JSON object with `title`, `path`, and `keywords` keys.
// - [feature-specs/ui-components.spec.md] - Section: Form Validation
135
166
```
136
167
137
168
### From Spec to Code (Mandatory)
138
169
Every spec **MUST** list the code files that implement it.
139
170
140
-
-**Location:** In the spec file, under the `### 4. Affected Files` heading.
171
+
-**Location:** In the spec file, under the `### 3. Affected Files` heading.
141
172
-**Format:**
142
173
```markdown
143
-
### 4. Affected Files
144
-
*A list of files created or modified.*
174
+
### 3. Affected Files
145
175
- `path/to/file-one.js`
146
176
```
147
177
148
178
---
149
179
150
-
## 5. Legacy Code Workflow
151
-
152
-
Authored by matscode
180
+
## 6. Legacy Code Workflow
153
181
154
182
For existing code that lacks a spec reference, you **MUST** follow this protocol **BEFORE** making any changes:
155
183
156
184
1.**STOP & Analyze:** Do not modify the code. Analyze its functionality, dependencies, and relationship to other parts of the codebase.
157
-
2.**Search for Existing Spec:** Conduct a thorough search in `project-specs/index.json` to determine if a relevant spec already exists but is not referenced.
185
+
2.**Search for Existing Spec:** Conduct a thorough search in `feature-specs/index.json` to determine if a relevant spec already exists but is not referenced.
158
186
3.**Create Retroactive Spec:** If no spec exists, create a new one that accurately documents the behavior of the legacy code. The spec should describe the code as it currently exists.
159
187
4.**Get Approval:** Present the newly created spec to the user for approval.
160
188
5.**Add Spec Reference:** Once approved, add the spec reference to the legacy code.
@@ -163,9 +191,10 @@ For existing code that lacks a spec reference, you **MUST** follow this protocol
163
191
164
192
---
165
193
166
-
## 6. Maintenance & Enforcement
194
+
## 7. Maintenance & Enforcement
167
195
168
196
-**Specs are Living Documents:** They **MUST** be updated when decisions change or the implementation deviates.
197
+
-**Concurrent Updates:** The spec file **MUST** be updated in real-time as the implementation progresses. The "Key Implementation Steps" should be checked off as they are completed.
169
198
-**All Changes Documented:** Any change to a specification, no matter how small, **MUST** be followed by an update to the spec file and a request for user approval.
170
199
-**Your Responsibility:** Proactively identify when a new decision alters an existing spec. Update the spec and get approval before proceeding.
171
200
-**Violations:** Failure to create, reference, get approval for, or **maintain** a spec is a critical violation. Stop all work until the process is followed correctly.
0 commit comments