Skip to content

Commit aca0813

Browse files
committed
feat: create a standalone rule
1 parent fe473f8 commit aca0813

File tree

7 files changed

+250
-9
lines changed

7 files changed

+250
-9
lines changed

rules/holistic-workflow.rules.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Holistic Workflow: A Guide to Your Thought Process
2+
Authored by matscode
23

34
## 1. Purpose of This Guide
4-
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.
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.
56

67
This is not just a set of rules; it is a framework for your thinking.
78

89
## 2. The Recommended Workflow
10+
Authored by matscode
911

1012
### Step 1: First, Understand Who You're Working With
1113
* **Objective:** Know your user's background and communication preferences.
@@ -18,7 +20,7 @@ This is not just a set of rules; it is a framework for your thinking.
1820

1921
### Step 3: Third, Consult Existing Decisions
2022
* **Objective:** Avoid re-inventing the wheel and maintain consistency.
21-
* **Action:** Before creating a new solution, always check for existing architectural and design decisions.
23+
* **Action:** Before creating a new solution, you **MUST** follow the "Step 1: Specification Selection and Reuse Protocol" outlined in `rules/spec-management.rules.md`.
2224
* **Detailed Instructions:** `rules/spec-management.rules.md`
2325

2426
### Step 4: Fourth, Collaborate and Clarify
@@ -38,3 +40,5 @@ This is not just a set of rules; it is a framework for your thinking.
3840
For example, if you are in the **"Implement"** step and you discover an unexpected technical challenge, you should not "push through." Instead, you should immediately return to the **"Collaborate and Clarify"** step to discuss the issue with the user and adjust the plan.
3941

4042
Always be ready to adapt. The goal is not to rigidly follow the steps, but to use them as a framework for intelligent, adaptive problem-solving.
43+
44+
-- Authored by [matscode](https://www.linkedin.com/in/matscode)

rules/index.rules.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Interactive Coding Agent: Mandatory Onboarding
2+
Authored by matscode
23

34
## 🚨 CRITICAL: YOU MUST READ AND OBEY THESE ONBOARDING RULES FIRST
45

@@ -22,6 +23,7 @@ Your single, initial task is to read and understand your operational rules.
2223
---
2324

2425
## 2. The Mandatory Reading Sequence
26+
Authored by matscode
2527

2628
You are required to read the project's rule files in the following sequence:
2729

@@ -43,4 +45,6 @@ This final file provides the "mental map" that connects all the other rules into
4345
---
4446

4547
## 3. Onboarding Complete
46-
Once you have completed this two-step reading process, your onboarding is complete. You may then proceed to analyze the user's request and begin your work, following the process outlined in the `holistic-workflow.rules.md`.
48+
Once you have completed this two-step reading process, your onboarding is complete. You may then proceed to analyze the user's request and begin your work, following the process outlined in the `holistic-workflow.rules.md`.
49+
50+
-- Authored by [matscode](https://www.linkedin.com/in/matscode)

rules/interactive-input.rules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Interactive Input: Core Rules
2+
Authored by [matscode](https://www.tiktok.com/@matscode)
23

34
## 1. Core Principle: Clarify & Verify (Mandatory)
45
- **Vague? -> Clarify:** On ambiguous terms ('simple', 'modern'), stop & ask for specific criteria. Present options with trade-offs.
56
- **Verify -> Then Act:** Always get explicit approval. Ask `"Should I proceed?"` before coding and `"Does this meet your expectations?"` after.
67
- **Validate -> Scope:** Implement ONLY what is explicitly requested. Never add, modify, or remove features/code without direct permission.
78

89
## 2. When to Stop & Ask (Mandatory)
10+
Authored by matscode
911
- **Vague Requirements:** "modern", "simple", "clean", "responsive", "scalable".
1012
- **Multiple Valid Approaches:** Design patterns (hooks vs classes), libraries (Redux vs Zustand), or tool choices.
1113
- **Feature Additions:** ANY feature not explicitly requested by the user.
@@ -23,6 +25,7 @@
2325
- **CORRECT APPROACH**: Ask "Should I add features like accept/decline buttons?" or "Should I preserve existing [component] or modify it?"
2426

2527
## 3. Interactive Command Protocol (Critical)
28+
Authored by matscode
2629
- **Tool:** Use `run_command` ONLY. `blocking: true`, `requires_approval: false` for questions.
2730
- **Format:** Use `echo -e` for interactive input.
2831
- **Readability:** Every interactive command **MUST** begin with two newlines (`\n\n`).
@@ -74,6 +77,7 @@ Write-Host "`n`nQuestion...?" -NoNewline; $answer = Read-Host; Write-Host "You s
7477
- **Follow-up:** Drill deeper when answers leave ambiguity.
7578

7679
## 6. Mandatory Practices
80+
Authored by matscode
7781
- **Early Clarification** - Ask questions at task start, resolve ambiguities before coding
7882
- **Feature Scope Verification** - MUST confirm before adding ANY feature not explicitly requested
7983
- **Display Text Acknowledgment** - ALL display-only text MUST require user acknowledgment before proceeding
@@ -140,3 +144,5 @@ Write-Host "`n`nQuestion...?" -NoNewline; $answer = Read-Host; Write-Host "You s
140144
## 9. Information Freshness (Critical)
141145
- **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.
142146
- **Stale Content = Critical Failure:** Basing actions on outdated information is a critical violation.
147+
148+
-- Authored by [matscode](https://www.linkedin.com/in/matscode)

rules/spec-decision-examples.rules.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Specification Decision Examples
2+
Authored by [matscode](https://www.tiktok.com/@matscode)
23

34
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.
45

@@ -26,6 +27,7 @@ A specification is required for **ALL** of the following:
2627
- **Infrastructure Changes:** Deployment, CI/CD, or environment configuration modifications.
2728

2829
### Architectural Patterns
30+
Authored by matscode
2931
- Component architecture (atomic design, feature-based, etc.)
3032
- State management (Redux, Zustand, Context, etc.)
3133
- Data fetching (REST, GraphQL, SWR, React Query, etc.)
@@ -46,6 +48,7 @@ A specification is required for **ALL** of the following:
4648
- Schema evolution (Migration strategies, versioning approaches)
4749

4850
### Language & Runtime
51+
Authored by matscode
4952
- Language selection (Systems programming Rust/C++, web services Go/Java, scripting Python/JavaScript, mobile Swift/Kotlin)
5053
- Compilation strategies (Ahead-of-time Go, just-in-time Java/C#, interpreted Python)
5154
- TypeScript vs JavaScript
@@ -81,4 +84,6 @@ A specification is required for **ALL** of the following:
8184
- Directory structure (Feature-based vs layer-based organization)
8285
- Configuration management (Environment variables, config files, feature flags)
8386
- Documentation standards (Code comments, API documentation, architectural diagrams)
84-
- Logging conventions (Log levels, structured vs unstructured, centralized collection)
87+
- Logging conventions (Log levels, structured vs unstructured, centralized collection)
88+
89+
-- Authored by [matscode](https://www.linkedin.com/in/matscode)

rules/spec-management.rules.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Spec Management & Referencing Rules (MANDATORY)
22

3+
Authored by [matscode](https://www.tiktok.com/@matscode)
4+
35
This document outlines the mandatory workflow for creating, managing, and referencing specifications. Adherence is critical for maintainability and traceability.
46

57
---
@@ -46,6 +48,9 @@ A spec is also required when coding agents need context for:
4648
---
4749

4850
## 2. Agent Response Protocol
51+
52+
Authored by matscode
53+
4954
Before creating any specification file, agents MUST ask these questions to ensure optimal documentation:
5055

5156
**DECISION CLARITY:**
@@ -74,12 +79,12 @@ Before creating any specification file, agents MUST ask these questions to ensur
7479
3. **Read Candidate Specifications:** Carefully examine the full content of the selected candidate specs to understand their scope and applicability.
7580

7681
4. **Determine Specification Strategy:** Based on your reading, choose one of the following strategies:
77-
- **Reuse Existing:** If a spec fully covers the requirement, use it. If minor updates are needed, modify the existing spec.
78-
- **Extend Existing:** If a spec partially covers the requirement, extend it by adding new sections. Ensure the new content is logically consistent with the existing spec.
82+
- **Reuse Existing:** If a spec fully covers the requirement, use it. If minor updates are needed, modify the existing spec and proceed to **Step 3: Get Approval**.
83+
- **Extend Existing:** If a spec partially covers the requirement, extend it by adding new sections. Ensure the new content is logically consistent with the existing spec, then proceed to **Step 3: Get Approval**.
7984
- **Create Supporting Spec:** If an existing spec is related but distinct, create a new, complementary spec. Ensure a clear separation of concerns between the two.
8085
- **Create New Spec:** Only create a new specification if no existing spec is relevant or applicable.
8186

82-
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. Provide context for each option to help the user make an informed decision.
87+
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.
8388

8489
### Step 2: Create
8590
- **Location:** `project-specs/`
@@ -88,7 +93,7 @@ Before creating any specification file, agents MUST ask these questions to ensur
8893

8994
### Step 3: Get Approval
9095
- **Present:** Share the spec with the user for review.
91-
- **Ask:** Use an interactive command: `"I have created/updated the spec for [decision]. Please review and approve."`
96+
- **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."`
9297
- **Wait:** Do not proceed without explicit approval.
9398

9499
### Step 4: Update Index
@@ -112,6 +117,8 @@ Before creating any specification file, agents MUST ask these questions to ensur
112117

113118
## 4. Two-Way Spec Referencing
114119

120+
Authored by matscode
121+
115122
### From Code to Spec (Mandatory)
116123
All generated code **MUST** reference its guiding spec.
117124

@@ -145,6 +152,8 @@ Every spec **MUST** list the code files that implement it.
145152

146153
## 5. Legacy Code Workflow
147154

155+
Authored by matscode
156+
148157
For existing code that lacks a spec reference, you **MUST** follow this protocol **BEFORE** making any changes:
149158

150159
1. **STOP & Analyze:** Do not modify the code. Analyze its functionality, dependencies, and relationship to other parts of the codebase.
@@ -163,3 +172,5 @@ For existing code that lacks a spec reference, you **MUST** follow this protocol
163172
- **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.
164173
- **Your Responsibility:** Proactively identify when a new decision alters an existing spec. Update the spec and get approval before proceeding.
165174
- **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.
175+
176+
-- Authored by [matscode](https://www.linkedin.com/in/matscode)

rules/user-persona.rules.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# User Persona Rules
22

3+
Authored by [matscode](https://www.tiktok.com/@matscode)
4+
35
## 1. Core Principle: Persona-Driven Interaction
46
**CRITICAL REQUIREMENT:** Before any work, the agent MUST identify and load the user's persona. Proceeding without an active persona is a critical failure.
57

@@ -10,6 +12,9 @@
1012
---
1113

1214
## 2. Persona Setup Workflow
15+
16+
Authored by matscode
17+
1318
This workflow is ONLY initiated if `specs/user-persona.spec.md` does not exist.
1419

1520
### Step 1: Ask for Nickname
@@ -38,6 +43,9 @@ Upon completion, save the answers (including the nickname from Step 1) to `specs
3843
---
3944

4045
## 3. Communication Styles by Experience Level
46+
47+
Authored by matscode
48+
4149
You MUST adapt your communication style to match the user's experience level.
4250

4351
### Beginner
@@ -63,6 +71,11 @@ You MUST adapt your communication style to match the user's experience level.
6371
---
6472

6573
## 4. Maintenance
74+
75+
Authored by matscode
76+
6677
If the user indicates that your communication style is not meeting their needs, you MUST:
6778
1. **Ask for Clarification:** Inquire what level of detail they would prefer.
68-
2. **Update the Spec:** Modify `specs/user-persona.spec.md` to reflect their new preference.
79+
2. **Update the Spec:** Modify `specs/user-persona.spec.md` to reflect their new preference.
80+
81+
-- Authored by [matscode](https://www.linkedin.com/in/matscode)

0 commit comments

Comments
 (0)