ideal-agentic-workflow 1.0.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.
- package/.claude-plugin/plugin.json +16 -0
- package/AGENTS.md +113 -0
- package/agents/_persona-creator.md +75 -0
- package/agents/fullstack/architecture-auditor.md +12 -0
- package/agents/fullstack/implementation-reviewer.md +4 -0
- package/agents/fullstack/performance-seo-auditor.md +12 -0
- package/agents/fullstack/plan-critic.md +4 -0
- package/agents/fullstack/security-auditor.md +12 -0
- package/agents/fullstack/security-code-reviewer.md +4 -0
- package/agents/fullstack/test-quality-auditor.md +12 -0
- package/agents/fullstack/uiux-cro-auditor.md +12 -0
- package/agents/minecraft/architecture-auditor.md +12 -0
- package/agents/minecraft/game-performance-auditor.md +12 -0
- package/agents/minecraft/implementation-reviewer.md +4 -0
- package/agents/minecraft/mapping-compliance-auditor.md +14 -0
- package/agents/minecraft/mod-compatibility-auditor.md +12 -0
- package/agents/minecraft/plan-critic.md +4 -0
- package/agents/minecraft/test-quality-auditor.md +13 -0
- package/package.json +12 -0
- package/resources/audit-template.md +27 -0
- package/resources/gemini-template.md +74 -0
- package/resources/plan-template.md +40 -0
- package/resources/review-template.md +23 -0
- package/resources/stacks/_stack-pack-creator.md +34 -0
- package/resources/stacks/database-mongo-redis.md +56 -0
- package/resources/stacks/database-postgres-prisma.md +55 -0
- package/resources/stacks/mc-fabric.md +60 -0
- package/resources/stacks/mc-neoforge.md +64 -0
- package/resources/stacks/web-backend-java-spring.md +58 -0
- package/resources/stacks/web-backend-python-ai.md +62 -0
- package/resources/stacks/web-backend-rust.md +57 -0
- package/resources/stacks/web-nextjs-turborepo.md +65 -0
- package/resources/submit-template.md +24 -0
- package/resources/task-template.md +8 -0
- package/skills/s1-orchestrator/SKILL.md +193 -0
- package/skills/s1-orchestrator/resources/duolithic-mode.md +114 -0
- package/skills/s1-orchestrator/resources/fast-mode.md +170 -0
- package/skills/s1-orchestrator/resources/session-init.md +65 -0
- package/skills/s1-orchestrator/resources/trivial-mode.md +113 -0
- package/skills/s10-git-commit/SKILL.md +37 -0
- package/skills/s10-git-commit/resources/breaking-change-guide.md +33 -0
- package/skills/s10-git-commit/resources/commit-examples.md +76 -0
- package/skills/s11-gemini-update/SKILL.md +36 -0
- package/skills/s11-gemini-update/resources/gemini-schema.md +35 -0
- package/skills/s11-gemini-update/resources/global-skill-suggester.md +29 -0
- package/skills/s2-codebase-audit/SKILL.md +116 -0
- package/skills/s2-codebase-audit/resources/audit-compiler.md +33 -0
- package/skills/s2-codebase-audit/resources/fullstack-persona-bank.md +33 -0
- package/skills/s2-codebase-audit/resources/minecraft-persona-bank.md +33 -0
- package/skills/s3-planning/SKILL.md +62 -0
- package/skills/s3-planning/resources/priority-rubric.md +54 -0
- package/skills/s4-plan-review/SKILL.md +75 -0
- package/skills/s4-plan-review/resources/plan-review-guide.md +51 -0
- package/skills/s6-coding/SKILL.md +48 -0
- package/skills/s6-coding/resources/anti-patterns.md +49 -0
- package/skills/s6-coding/resources/stack-detector.md +35 -0
- package/skills/s8-code-review/SKILL.md +55 -0
- package/skills/s8-code-review/resources/code-review-guide.md +42 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: s1-orchestrator
|
|
3
|
+
description: Initializes the ideal-agentic-workflow session, reads GEMINI.md, generates the session SHA, detects the operating mode, and prepares the workspace for the S2 Audit phase.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# S1 Orchestrator
|
|
7
|
+
|
|
8
|
+
## What This Skill Does
|
|
9
|
+
|
|
10
|
+
This skill is the absolute entry point for the `ideal-agentic-workflow` plugin.
|
|
11
|
+
|
|
12
|
+
It executes the "S1 Context Ingestion" phase defined in the PRD.
|
|
13
|
+
|
|
14
|
+
The reader of this document is the AI agent initiating a new workflow session.
|
|
15
|
+
|
|
16
|
+
The purpose of this skill is to establish the foundation for all subsequent steps.
|
|
17
|
+
|
|
18
|
+
It creates the isolated session environment where all temporary state will reside.
|
|
19
|
+
|
|
20
|
+
It also detects the project's technology stack and the user's requested operating mode.
|
|
21
|
+
|
|
22
|
+
Without executing this skill first, the rest of the workflow will fail due to missing context.
|
|
23
|
+
|
|
24
|
+
We MUST run this skill successfully before opening any source code files.
|
|
25
|
+
|
|
26
|
+
## Senior Developer Mindset
|
|
27
|
+
|
|
28
|
+
Before executing any other action in this skill, the agent MUST adopt the Senior Developer Mindset.
|
|
29
|
+
|
|
30
|
+
You are joining a real engineering team, not a hackathon.
|
|
31
|
+
|
|
32
|
+
Speed is not the goal; correctness, architecture-fit, and maintainability are paramount.
|
|
33
|
+
|
|
34
|
+
You MUST deliberately review and plan before making changes.
|
|
35
|
+
|
|
36
|
+
Rushing to write code without full context is a violation of this plugin's core philosophy.
|
|
37
|
+
|
|
38
|
+
For example, a Vibe Coding approach would immediately start modifying files to fix a reported bug.
|
|
39
|
+
|
|
40
|
+
In contrast, the Senior Developer approach mandates reading `GEMINI.md` to understand the system invariants before even opening the buggy file.
|
|
41
|
+
|
|
42
|
+
This deliberate pacing prevents the creation of brittle workarounds that violate established patterns.
|
|
43
|
+
|
|
44
|
+
## First Action: Context Ingestion
|
|
45
|
+
|
|
46
|
+
The very first action the agent MUST take is reading the project's `GEMINI.md` file.
|
|
47
|
+
|
|
48
|
+
This file is the single source of truth for the repository's architecture and rules.
|
|
49
|
+
|
|
50
|
+
We MUST NOT assume anything about the codebase that is not documented here.
|
|
51
|
+
|
|
52
|
+
Reading source files before reading `GEMINI.md` is a critical violation of the workflow invariants.
|
|
53
|
+
|
|
54
|
+
This guarantees that the agent adopts the correct context before making any decisions.
|
|
55
|
+
|
|
56
|
+
Precondition: The user has initiated a new workflow session in a project root containing `GEMINI.md`.
|
|
57
|
+
|
|
58
|
+
1. Execute the `view_file` tool targeting the absolute path to `GEMINI.md` in the project root.
|
|
59
|
+
- Expected Output: The full contents of `GEMINI.md` are loaded into the agent's context.
|
|
60
|
+
2. Parse Section 2.3 (Technology Stack) to identify all technologies explicitly listed in the Stack section.
|
|
61
|
+
- Expected Output: A list of detected stacks (e.g., "Next.js", "Spring Boot") is held in memory for later steps.
|
|
62
|
+
|
|
63
|
+
Postcondition: The agent possesses complete knowledge of the project's rules, directory structure, and technology stack.
|
|
64
|
+
|
|
65
|
+
## Session Resume Logic
|
|
66
|
+
|
|
67
|
+
Before initializing a completely new session, the agent MUST check if a previous, incomplete session exists.
|
|
68
|
+
|
|
69
|
+
This prevents abandoning work halfway and cluttering the `.agents/` directory with orphaned tasks.
|
|
70
|
+
|
|
71
|
+
If a previous session's `task.md` contains uncompleted items, the agent MUST give the user the choice to resume.
|
|
72
|
+
|
|
73
|
+
We MUST NOT automatically overwrite or ignore past incomplete sessions.
|
|
74
|
+
|
|
75
|
+
The user is the final arbiter of whether to continue past work or start fresh.
|
|
76
|
+
|
|
77
|
+
Precondition: The `.agents/` directory exists in the project root.
|
|
78
|
+
|
|
79
|
+
1. Scan the `.agents/` directory for any subdirectories starting with `session-`.
|
|
80
|
+
- Expected Output: A list of existing session directories is identified.
|
|
81
|
+
2. If any exist, check their internal `task.md` file for any tasks that are not marked as `[x]`.
|
|
82
|
+
- Expected Output: The agent determines if any session is incomplete.
|
|
83
|
+
3. If an incomplete session is found, output a message to the user: "Resume session [SHA] or start fresh?".
|
|
84
|
+
- Expected Output: The workflow pauses, waiting for the user's decision on how to proceed.
|
|
85
|
+
|
|
86
|
+
Postcondition: The agent either resumes the specified previous session or proceeds to generate a new session SHA.
|
|
87
|
+
|
|
88
|
+
## Session SHA Generation and Directory Initialization
|
|
89
|
+
|
|
90
|
+
To isolate the current workflow from past or parallel sessions, we MUST generate a unique identifier.
|
|
91
|
+
|
|
92
|
+
This identifier is used to create a dedicated working directory.
|
|
93
|
+
|
|
94
|
+
All temporary files, plans, and review artifacts will be stored here.
|
|
95
|
+
|
|
96
|
+
This prevents state corruption and allows for clean session resumption.
|
|
97
|
+
|
|
98
|
+
We MUST follow the specific SHA generation algorithm provided in the resources.
|
|
99
|
+
|
|
100
|
+
Precondition: Context ingestion is complete and no past session is being resumed.
|
|
101
|
+
|
|
102
|
+
1. Read the `resources/session-init.md` file to obtain the SHA generation algorithm.
|
|
103
|
+
- Expected Output: The agent understands the timestamp-based SHA1 logic.
|
|
104
|
+
2. Execute the generation algorithm to produce a 6-character lowercase hex string.
|
|
105
|
+
- Expected Output: A unique string like `e3f9a2` is generated.
|
|
106
|
+
3. Run the directory creation commands specified in `resources/session-init.md`.
|
|
107
|
+
- Expected Output: The `.agents/session-[SHA]/` directory tree is created with all required subdirectories and stub files.
|
|
108
|
+
|
|
109
|
+
Postcondition: A pristine, isolated workspace is ready for the current session's artifacts.
|
|
110
|
+
|
|
111
|
+
## Mode Detection
|
|
112
|
+
|
|
113
|
+
The user MAY specify a specific operating mode by including a keyword in their prompt.
|
|
114
|
+
|
|
115
|
+
These modes alter how subsequent phases behave.
|
|
116
|
+
|
|
117
|
+
If no keyword is detected, the agent MUST default to Standard Mode.
|
|
118
|
+
|
|
119
|
+
It is critical to detect this early so that downstream subagents are configured correctly.
|
|
120
|
+
|
|
121
|
+
We MUST record the detected mode in the session directory for persistence.
|
|
122
|
+
|
|
123
|
+
Precondition: The session directory tree has been initialized.
|
|
124
|
+
|
|
125
|
+
1. Analyze the user's initial prompt for mode trigger keywords (`/fast mode`, `/trivial`, `/duolithic mode`).
|
|
126
|
+
- Expected Output: The requested mode (or the default Standard Mode) is identified.
|
|
127
|
+
2. Write the identified mode to `.agents/session-[SHA]/mode.txt`.
|
|
128
|
+
- Expected Output: A file containing the mode string (e.g., "fast") exists.
|
|
129
|
+
3. Depending on the detected mode, read the corresponding resource file (`resources/duolithic-mode.md`, `resources/fast-mode.md`, or `resources/trivial-mode.md`).
|
|
130
|
+
- Expected Output: The agent explicitly loads and understands the specific protocol rules for the requested mode.
|
|
131
|
+
|
|
132
|
+
Postcondition: The operating mode is permanently recorded and the agent knows which protocol to follow.
|
|
133
|
+
|
|
134
|
+
## Stack Detection and Persistence
|
|
135
|
+
|
|
136
|
+
The detected technology stack MUST be recorded so that S2 subagents can load the correct rules.
|
|
137
|
+
|
|
138
|
+
This prevents downstream subagents from having to parse `GEMINI.md` independently.
|
|
139
|
+
|
|
140
|
+
It ensures all agents in the session agree on the environment they are auditing.
|
|
141
|
+
|
|
142
|
+
We MUST store this in a standardized format.
|
|
143
|
+
|
|
144
|
+
The `context.md` file serves as the communication medium for this state.
|
|
145
|
+
|
|
146
|
+
Precondition: The technology stack was identified during Context Ingestion and the session directory exists.
|
|
147
|
+
|
|
148
|
+
1. Create a `.agents/session-[SHA]/context.md` file.
|
|
149
|
+
- Expected Output: A new Markdown file is created in the session root.
|
|
150
|
+
2. Write the detected stack keywords into this file (e.g., `Stack: web-nextjs-turborepo`).
|
|
151
|
+
- Expected Output: The file contains the structured stack data.
|
|
152
|
+
|
|
153
|
+
Postcondition: The project's stack context is persisted for use by S2 auditors.
|
|
154
|
+
|
|
155
|
+
## Terminal Usage Rules
|
|
156
|
+
|
|
157
|
+
The following rules govern all terminal interactions during the session.
|
|
158
|
+
|
|
159
|
+
They exist to prevent state corruption, avoid path resolution errors, and ensure user safety.
|
|
160
|
+
|
|
161
|
+
Running destructive commands without oversight can result in unrecoverable data loss.
|
|
162
|
+
|
|
163
|
+
We MUST adhere to these constraints whenever executing bash commands.
|
|
164
|
+
|
|
165
|
+
Failure to follow these rules is a severe safety violation.
|
|
166
|
+
|
|
167
|
+
- Temp files MUST go in `.agents/session-SHA/` ONLY. Never in project root or system temp.
|
|
168
|
+
- Always use absolute paths in terminal commands to prevent silent failures.
|
|
169
|
+
- Do NOT run destructive commands (`rm -rf`, `git reset --hard`) without explicit user approval.
|
|
170
|
+
- Background commands MUST always set a schedule timer if waiting > 30 seconds.
|
|
171
|
+
|
|
172
|
+
## Completion Criteria
|
|
173
|
+
|
|
174
|
+
When S1 finishes, it MUST report its status to the user and prepare for S2.
|
|
175
|
+
|
|
176
|
+
This transition relies on verifying that all expected artifacts exist.
|
|
177
|
+
|
|
178
|
+
If any artifact is missing, S2 will crash or behave unpredictably.
|
|
179
|
+
|
|
180
|
+
We MUST output a summary to confirm readiness.
|
|
181
|
+
|
|
182
|
+
This hands control back to the user or transitions to the next automated step.
|
|
183
|
+
|
|
184
|
+
Precondition: All previous S1 procedures have been executed.
|
|
185
|
+
|
|
186
|
+
1. Verify the existence of `.agents/session-[SHA]/mode.txt` and `context.md`.
|
|
187
|
+
- Expected Output: Confirmation that persistent state files exist.
|
|
188
|
+
2. Verify the existence of the `audit/bin/`, `code-review/submit/`, and `code-review/review/` subdirectories.
|
|
189
|
+
- Expected Output: Confirmation that the directory tree is complete.
|
|
190
|
+
3. Output a summary message to the user stating that S1 is complete and the agent is ready for S2.
|
|
191
|
+
- Expected Output: The user sees a confirmation message in the chat interface.
|
|
192
|
+
|
|
193
|
+
Postcondition: The S1 Orchestrator has successfully completed its lifecycle and the workflow is ready for the S2 Codebase Audit.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Duolithic Mode Protocol
|
|
2
|
+
|
|
3
|
+
## What This Resource Does
|
|
4
|
+
|
|
5
|
+
This document details the operational protocol for Duolithic Mode within the workflow.
|
|
6
|
+
|
|
7
|
+
The reader of this document is the M-Agent (the primary Claude agent orchestrating the session).
|
|
8
|
+
|
|
9
|
+
The purpose of this protocol is to define how the M-Agent delegates heavy review tasks to the R-Agent.
|
|
10
|
+
|
|
11
|
+
The R-Agent is a secondary Gemini agent running in a separate, parallel conversation.
|
|
12
|
+
|
|
13
|
+
By splitting the workload, we leverage Claude's superior reasoning for implementation while using Gemini's higher quota for parallel subagent spawning.
|
|
14
|
+
|
|
15
|
+
This prevents quota exhaustion during intensive audit and review phases.
|
|
16
|
+
|
|
17
|
+
The M-Agent MUST follow this protocol exactly when `/duolithic mode` is detected.
|
|
18
|
+
|
|
19
|
+
Failure to follow this protocol will result in a breakdown of inter-agent communication.
|
|
20
|
+
|
|
21
|
+
## The Handoff Mechanism
|
|
22
|
+
|
|
23
|
+
The M-Agent and R-Agent do not communicate directly via an API.
|
|
24
|
+
|
|
25
|
+
Instead, they use the user as a bridge and the filesystem as a shared state repository.
|
|
26
|
+
|
|
27
|
+
The M-Agent generates an Onboarding Prompt that the user pastes into the R-Agent's conversation.
|
|
28
|
+
|
|
29
|
+
The R-Agent executes its subagents, writes the output to the filesystem, and signals completion.
|
|
30
|
+
|
|
31
|
+
The M-Agent then reads the output file and resumes the workflow.
|
|
32
|
+
|
|
33
|
+
This asynchronous handoff MUST be strictly managed to avoid race conditions.
|
|
34
|
+
|
|
35
|
+
We MUST rely on precise file paths to ensure the R-Agent writes exactly where the M-Agent expects to read.
|
|
36
|
+
|
|
37
|
+
### Generating the Onboarding Prompt
|
|
38
|
+
|
|
39
|
+
When the workflow reaches a phase delegated to the R-Agent (S2, S4, or S8), the M-Agent MUST generate a specific prompt.
|
|
40
|
+
|
|
41
|
+
This prompt instructs the R-Agent on its exact responsibilities.
|
|
42
|
+
|
|
43
|
+
It MUST be presented to the user in a clearly demarcated code block.
|
|
44
|
+
|
|
45
|
+
The prompt MUST include absolute paths to prevent resolution errors in the R-Agent's context.
|
|
46
|
+
|
|
47
|
+
Without this prompt, the user cannot correctly instruct the R-Agent.
|
|
48
|
+
|
|
49
|
+
Precondition: The M-Agent has reached S2, S4, or S8 in a Duolithic session.
|
|
50
|
+
|
|
51
|
+
1. Determine the current task type (`AUDIT`, `PLAN_REVIEW`, or `CODE_REVIEW`).
|
|
52
|
+
- Expected Output: The correct context string is selected based on the phase.
|
|
53
|
+
2. Compile the `R-AGENT ONBOARDING PROMPT` using the template provided below, substituting all bracketed variables with actual absolute paths and SHA values.
|
|
54
|
+
- Expected Output: A fully resolved prompt text block.
|
|
55
|
+
3. Output the prompt to the user inside a code block, accompanied by instructions to paste it into the R-Agent conversation and return when finished.
|
|
56
|
+
- Expected Output: The workflow pauses, waiting for the user's return signal.
|
|
57
|
+
|
|
58
|
+
Postcondition: The M-Agent is paused, waiting for the R-Agent's output file to appear on the filesystem.
|
|
59
|
+
|
|
60
|
+
## R-Agent Onboarding Prompt Template
|
|
61
|
+
|
|
62
|
+
The following template MUST be used verbatim, replacing only the bracketed variables.
|
|
63
|
+
|
|
64
|
+
It ensures the R-Agent receives all necessary constraints and context.
|
|
65
|
+
|
|
66
|
+
The template strictly forbids the R-Agent from modifying source code.
|
|
67
|
+
|
|
68
|
+
It also mandates the exact completion signal the R-Agent must output.
|
|
69
|
+
|
|
70
|
+
Any deviation from this template MAY cause the R-Agent to hallucinate or misbehave.
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
--- R-AGENT ONBOARDING PROMPT ---
|
|
74
|
+
|
|
75
|
+
You are the Reviewer Agent (R-Agent) in a Duolithic Agentic Engineering session.
|
|
76
|
+
|
|
77
|
+
## Your Role
|
|
78
|
+
You are operating as a specialized review coordinator. You do NOT write production code.
|
|
79
|
+
Your ONLY job is to execute the review/audit task described below and write the output file to the exact path specified.
|
|
80
|
+
|
|
81
|
+
## Session Context
|
|
82
|
+
- Project root: [ABSOLUTE_PROJECT_PATH]
|
|
83
|
+
- Session SHA: [6_CHAR_SHA]
|
|
84
|
+
- GEMINI.md path: [PROJECT_ROOT]/GEMINI.md
|
|
85
|
+
- Session dir: [PROJECT_ROOT]/.agents/session-[SHA]/
|
|
86
|
+
|
|
87
|
+
## Your Task
|
|
88
|
+
[TASK_TYPE: AUDIT | PLAN_REVIEW | CODE_REVIEW]
|
|
89
|
+
|
|
90
|
+
[TASK-SPECIFIC CONTEXT]:
|
|
91
|
+
- For AUDIT: "Read every source file listed in GEMINI.md's directory structure. Spawn 5 audit subagents using the personas defined in the persona-library."
|
|
92
|
+
- For PLAN_REVIEW: "Read plan.md at [PATH]. Spawn 3 plan-reviewer subagents."
|
|
93
|
+
- For CODE_REVIEW: "Read submit([N]).md at [PATH]. Spawn 4 code-reviewer subagents."
|
|
94
|
+
|
|
95
|
+
## Subagent Count
|
|
96
|
+
Spawn [N] subagents as specified above. Do NOT reduce this count.
|
|
97
|
+
|
|
98
|
+
## Output
|
|
99
|
+
Write your compiled output to: [EXACT_OUTPUT_PATH]
|
|
100
|
+
Follow the template schema exactly (audit-template / review-template).
|
|
101
|
+
|
|
102
|
+
## Completion Signal
|
|
103
|
+
When all subagents have successfully returned their review files, output EXACTLY this line (nothing else):
|
|
104
|
+
RAGENT_DONE: [OUTPUT_FILE_PATH]
|
|
105
|
+
|
|
106
|
+
## Strict Rules
|
|
107
|
+
- Do not write any production code.
|
|
108
|
+
- Do not modify any source files.
|
|
109
|
+
- Do not modify GEMINI.md.
|
|
110
|
+
- Output file must match the template schema exactly.
|
|
111
|
+
--- END ONBOARDING PROMPT ---
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
This prompt block acts as the payload for the R-Agent, ensuring it receives all context before launching subagents.
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Fast Mode Protocol
|
|
2
|
+
|
|
3
|
+
## What This Resource Does
|
|
4
|
+
|
|
5
|
+
This document defines the strict operational protocol for Fast Mode within the S1-S11 workflow.
|
|
6
|
+
|
|
7
|
+
The reader is the AI agent orchestrating the session after `/fast mode` has been detected.
|
|
8
|
+
|
|
9
|
+
The purpose of this protocol is to safely accelerate the workflow for well-scoped, low-risk tasks.
|
|
10
|
+
|
|
11
|
+
It explicitly outlines which phases are modified, reduced, or skipped entirely.
|
|
12
|
+
|
|
13
|
+
By following this protocol, the agent avoids unnecessary overhead while maintaining strict safety invariants.
|
|
14
|
+
|
|
15
|
+
The agent MUST follow these rules exactly, as they override the Standard Mode defaults.
|
|
16
|
+
|
|
17
|
+
Failure to follow these rules could result in unchecked scope creep or unreviewed code.
|
|
18
|
+
|
|
19
|
+
It is absolutely forbidden to skip phases not explicitly authorized by this document.
|
|
20
|
+
|
|
21
|
+
## S2 Codebase Audit Modification
|
|
22
|
+
|
|
23
|
+
In Fast Mode, the codebase audit is conditionally reduced to save time and quota.
|
|
24
|
+
|
|
25
|
+
We assume that for a fast fix, a full 5-agent audit is unnecessary if recent context exists.
|
|
26
|
+
|
|
27
|
+
However, we MUST still ensure the architecture and domain logic are respected.
|
|
28
|
+
|
|
29
|
+
This prevents the agent from making isolated fixes that break global patterns.
|
|
30
|
+
|
|
31
|
+
We MUST check the timestamp of the existing `audit.md` before making a decision.
|
|
32
|
+
|
|
33
|
+
Precondition: The S2 phase is starting in a Fast Mode session.
|
|
34
|
+
|
|
35
|
+
1. Check for the existence of `audit.md` in the project root or previous sessions.
|
|
36
|
+
- Expected Output: The agent determines if a prior audit exists.
|
|
37
|
+
2. If `audit.md` exists and is less than 7 days old, skip the S2 phase entirely.
|
|
38
|
+
- Expected Output: The workflow proceeds directly to S3 without spawning auditors.
|
|
39
|
+
3. If it does not exist or is older than 7 days, run S2 with exactly 2 auditors (Architecture + the domain auditor matching the stack's primary technology).
|
|
40
|
+
- Expected Output: A targeted, reduced-scope audit is generated.
|
|
41
|
+
|
|
42
|
+
Postcondition: The S2 phase is either skipped based on recency or executed with a minimal team.
|
|
43
|
+
|
|
44
|
+
## S3 Planning Modification
|
|
45
|
+
|
|
46
|
+
The planning phase MUST be simplified to match the reduced scope of the task.
|
|
47
|
+
|
|
48
|
+
In Standard Mode, the agent calculates priority rubrics and handles multiple tasks.
|
|
49
|
+
|
|
50
|
+
In Fast Mode, we assume the user has provided a single, specific issue to fix.
|
|
51
|
+
|
|
52
|
+
The agent MUST write a minimal, single-task plan inline without the full rubric calculation.
|
|
53
|
+
|
|
54
|
+
We MUST restrict the session to exactly one task.
|
|
55
|
+
|
|
56
|
+
Precondition: The S3 phase is starting in a Fast Mode session.
|
|
57
|
+
|
|
58
|
+
1. Create the `plan.md` artifact inline, focusing only on the immediate fix.
|
|
59
|
+
- Expected Output: A minimal implementation plan is drafted.
|
|
60
|
+
2. Create the `task.md` artifact containing exactly one task item.
|
|
61
|
+
- Expected Output: The task list is restricted to a single objective.
|
|
62
|
+
|
|
63
|
+
Postcondition: A simplified plan and single-item task list are ready for execution.
|
|
64
|
+
|
|
65
|
+
## Skipping S4 Plan Review
|
|
66
|
+
|
|
67
|
+
The Plan Review phase (S4) is explicitly skipped in Fast Mode.
|
|
68
|
+
|
|
69
|
+
This mode inherently trusts the developer's scoping and the agent's initial plan.
|
|
70
|
+
|
|
71
|
+
Because the task is trivial or highly isolated, peer review of the plan itself is unnecessary overhead.
|
|
72
|
+
|
|
73
|
+
The agent MUST proceed directly from S3 to S5/S6.
|
|
74
|
+
|
|
75
|
+
We MUST NOT spawn any Plan Critic subagents.
|
|
76
|
+
|
|
77
|
+
Precondition: The S3 phase has completed successfully.
|
|
78
|
+
|
|
79
|
+
1. Skip the generation of `submit(n).md` for the plan.
|
|
80
|
+
- Expected Output: No submit file is generated.
|
|
81
|
+
2. Skip spawning the plan-reviewer subagents.
|
|
82
|
+
- Expected Output: The workflow transitions immediately to the coding phase.
|
|
83
|
+
|
|
84
|
+
Postcondition: The agent proceeds to code generation without waiting for plan approval.
|
|
85
|
+
|
|
86
|
+
## S8 Code Review Modification
|
|
87
|
+
|
|
88
|
+
The Code Review phase (S8) MUST still execute, but with reduced reviewer count.
|
|
89
|
+
|
|
90
|
+
While the plan may skip review, the actual implementation MUST always be verified.
|
|
91
|
+
|
|
92
|
+
In Fast Mode, we reduce the reviewer count from 2 to 1 to speed up the loop.
|
|
93
|
+
|
|
94
|
+
This single reviewer MUST be the `implementation-reviewer` persona.
|
|
95
|
+
|
|
96
|
+
We MUST ensure tests pass (S7) before invoking this reviewer.
|
|
97
|
+
|
|
98
|
+
Precondition: The S7 automated testing phase has passed successfully.
|
|
99
|
+
|
|
100
|
+
1. Prepare the `submit(n).md` file containing the task's code changes.
|
|
101
|
+
- Expected Output: The submission file is ready for review.
|
|
102
|
+
2. Spawn exactly 1 code-reviewer subagent using the `implementation-reviewer` persona.
|
|
103
|
+
- Expected Output: A single reviewer evaluates the code against the rules.
|
|
104
|
+
|
|
105
|
+
Postcondition: The code is reviewed by a single specialized agent.
|
|
106
|
+
|
|
107
|
+
## Strict Escalation Guard
|
|
108
|
+
|
|
109
|
+
Fast Mode is not a license for silent scope creep or massive refactoring.
|
|
110
|
+
|
|
111
|
+
If the agent discovers during S6 (Coding) that the change is larger than anticipated, it MUST halt.
|
|
112
|
+
|
|
113
|
+
This prevents the agent from hiding massive architectural changes inside a "fast" loop.
|
|
114
|
+
|
|
115
|
+
The threshold for escalation is touching more than 3 files or writing more than 100 lines of code.
|
|
116
|
+
|
|
117
|
+
We MUST ask the user before proceeding if this threshold is crossed.
|
|
118
|
+
|
|
119
|
+
Precondition: The agent is actively modifying files in the S6 Coding phase.
|
|
120
|
+
|
|
121
|
+
1. Monitor the number of files modified and the total lines changed.
|
|
122
|
+
- Expected Output: The agent tracks the current delta size.
|
|
123
|
+
2. If the delta exceeds 3 files or 100 lines, immediately pause execution.
|
|
124
|
+
- Expected Output: The coding phase is halted.
|
|
125
|
+
3. Prompt the user: "This change is larger than expected (>3 files or >100 lines). Escalate to Standard Mode?"
|
|
126
|
+
- Expected Output: The user decides whether to continue in Fast Mode or escalate.
|
|
127
|
+
|
|
128
|
+
Postcondition: The agent either escalates to Standard Mode or receives explicit permission to continue in Fast Mode.
|
|
129
|
+
|
|
130
|
+
## S10 Commit Target Modification
|
|
131
|
+
|
|
132
|
+
In Fast Mode, the standard guidelines for commit sizing do not apply.
|
|
133
|
+
|
|
134
|
+
Normally, the agent aims for 50-150 lines per commit to ensure atomic units.
|
|
135
|
+
|
|
136
|
+
Since Fast Mode is designed for very small, single-issue fixes, there is no size target.
|
|
137
|
+
|
|
138
|
+
The agent MUST commit whatever changes the fix requires as a single logical unit.
|
|
139
|
+
|
|
140
|
+
We MUST still use the Conventional Commits format for the commit message.
|
|
141
|
+
|
|
142
|
+
Precondition: The S9 Bug Fix loop (if any) is complete and all tasks are `[x]`.
|
|
143
|
+
|
|
144
|
+
1. Stage all files related to the Fast Mode fix.
|
|
145
|
+
- Expected Output: The git index contains all necessary changes.
|
|
146
|
+
2. Formulate a single Conventional Commit message covering the entire fix without splitting it.
|
|
147
|
+
- Expected Output: The commit message is generated correctly.
|
|
148
|
+
|
|
149
|
+
Postcondition: The codebase is updated with a single, properly formatted commit.
|
|
150
|
+
|
|
151
|
+
## S11 GEMINI.md Lightweight Update
|
|
152
|
+
|
|
153
|
+
The final phase of the workflow is updated to reflect the targeted nature of Fast Mode.
|
|
154
|
+
|
|
155
|
+
Instead of scanning all of `GEMINI.md` for potential updates, the agent MUST perform a lightweight update.
|
|
156
|
+
|
|
157
|
+
The update MUST strictly be limited to Section 5 (Open Features) if the fix resolves a tracked issue.
|
|
158
|
+
|
|
159
|
+
This saves time and prevents unintended modifications to the broader project architecture documentation.
|
|
160
|
+
|
|
161
|
+
If the fix was completely unmentioned in Section 5, `GEMINI.md` is left untouched.
|
|
162
|
+
|
|
163
|
+
Precondition: The S10 commit has been successfully created.
|
|
164
|
+
|
|
165
|
+
1. Check if the task resolved an issue explicitly listed in `GEMINI.md` Section 5.
|
|
166
|
+
- Expected Output: The agent determines if documentation needs updating.
|
|
167
|
+
2. If yes, remove or update the corresponding entry in Section 5 only.
|
|
168
|
+
- Expected Output: Section 5 reflects the completed feature or fix.
|
|
169
|
+
|
|
170
|
+
Postcondition: The project documentation is accurately maintained with minimal overhead.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Session Initialization Protocol
|
|
2
|
+
|
|
3
|
+
## What This Resource Does
|
|
4
|
+
|
|
5
|
+
This document defines the exact procedure for generating a session SHA and creating the workspace tree.
|
|
6
|
+
|
|
7
|
+
The reader is the AI agent executing the S1 Orchestrator skill.
|
|
8
|
+
|
|
9
|
+
The purpose of this protocol is to ensure that every workflow session is cleanly isolated.
|
|
10
|
+
|
|
11
|
+
It provides the mathematical algorithm for the SHA and the shell commands for the directory structure.
|
|
12
|
+
|
|
13
|
+
By following this strictly, we prevent file collisions between concurrent or resumed sessions.
|
|
14
|
+
|
|
15
|
+
The agent MUST execute these steps verbatim during S1.
|
|
16
|
+
|
|
17
|
+
Failure to follow this protocol will result in scattered artifacts and broken downstream skills.
|
|
18
|
+
|
|
19
|
+
It is absolutely forbidden to create any files or folders before this initialization completes successfully.
|
|
20
|
+
|
|
21
|
+
## SHA Generation Algorithm
|
|
22
|
+
|
|
23
|
+
The session SHA is a 6-character hexadecimal string derived from the current system timestamp.
|
|
24
|
+
|
|
25
|
+
It serves as the unique identifier for the entire session lifecycle.
|
|
26
|
+
|
|
27
|
+
It MUST be pseudo-random enough to prevent collisions within a single project.
|
|
28
|
+
|
|
29
|
+
Using a hash of the timestamp ensures uniqueness even if multiple sessions start on the same day.
|
|
30
|
+
|
|
31
|
+
The agent MUST implement this logic internally before creating any files.
|
|
32
|
+
|
|
33
|
+
Precondition: The S1 skill has reached the SHA generation phase.
|
|
34
|
+
|
|
35
|
+
1. Obtain the current system time in milliseconds since the UNIX epoch (e.g., `1752419345892`).
|
|
36
|
+
- Expected Output: An integer representation of the current time.
|
|
37
|
+
2. Compute the SHA-1 hash of the string representation of that integer.
|
|
38
|
+
- Expected Output: A full 40-character hexadecimal SHA-1 string.
|
|
39
|
+
3. Extract the first 6 characters of the resulting hex string.
|
|
40
|
+
- Expected Output: A 6-character string (e.g., `e3f9a2`) that will act as the `[SHA]`.
|
|
41
|
+
|
|
42
|
+
Postcondition: The agent holds a valid 6-character session SHA in its active memory.
|
|
43
|
+
|
|
44
|
+
## Directory Tree Creation
|
|
45
|
+
|
|
46
|
+
Once the SHA is generated, the physical workspace MUST be initialized.
|
|
47
|
+
|
|
48
|
+
This involves creating a nested directory structure within the `.agents/` folder.
|
|
49
|
+
|
|
50
|
+
All paths MUST be absolute, anchored to the project root, to prevent execution context errors.
|
|
51
|
+
|
|
52
|
+
We MUST create empty stub files for `plan.md` and `task.md` so that S3 has a valid target to write to.
|
|
53
|
+
|
|
54
|
+
The agent MUST verify that these commands succeed without throwing permission errors.
|
|
55
|
+
|
|
56
|
+
Precondition: The `[SHA]` has been generated and the project root path is known.
|
|
57
|
+
|
|
58
|
+
1. Execute a shell command to create the root session directory: `mkdir -p [PROJECT_ROOT]/.agents/session-[SHA]/`.
|
|
59
|
+
- Expected Output: The root session folder exists.
|
|
60
|
+
2. Execute shell commands to create the subdirectories: `mkdir -p [PROJECT_ROOT]/.agents/session-[SHA]/audit/bin/`, `mkdir -p [PROJECT_ROOT]/.agents/session-[SHA]/code-review/submit/`, and `mkdir -p [PROJECT_ROOT]/.agents/session-[SHA]/code-review/review/`.
|
|
61
|
+
- Expected Output: All nested directories exist.
|
|
62
|
+
3. Execute shell commands to create the stub files: `touch [PROJECT_ROOT]/.agents/session-[SHA]/plan.md` and `touch [PROJECT_ROOT]/.agents/session-[SHA]/task.md`.
|
|
63
|
+
- Expected Output: The empty stub files are created in the session root.
|
|
64
|
+
|
|
65
|
+
Postcondition: The complete directory tree is present on the filesystem, ready for S2 and S3 operations.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Trivial Mode Protocol
|
|
2
|
+
|
|
3
|
+
## What This Resource Does
|
|
4
|
+
|
|
5
|
+
This document defines the strict operational protocol for the Trivial Change Protocol.
|
|
6
|
+
|
|
7
|
+
The reader is the AI agent orchestrating the session after `/trivial` has been detected.
|
|
8
|
+
|
|
9
|
+
The purpose of this protocol is to optimize the workflow for changes that have absolutely zero logic impact.
|
|
10
|
+
|
|
11
|
+
It explicitly outlines which phases are skipped to allow for immediate commits of trivial fixes.
|
|
12
|
+
|
|
13
|
+
By following this protocol, the agent bypasses heavy audits and reviews for safe documentation changes.
|
|
14
|
+
|
|
15
|
+
The agent MUST follow these rules exactly, as they drastically bypass the normal workflow.
|
|
16
|
+
|
|
17
|
+
Failure to follow these rules could result in unreviewed, broken code being committed.
|
|
18
|
+
|
|
19
|
+
It is absolutely forbidden to use this protocol for any logic-bearing changes.
|
|
20
|
+
|
|
21
|
+
## Defining Trivial Changes
|
|
22
|
+
|
|
23
|
+
The defining criterion for this mode is that no production logic is added, modified, or removed.
|
|
24
|
+
|
|
25
|
+
The agent MUST strictly enforce this definition before executing any changes.
|
|
26
|
+
|
|
27
|
+
Qualifying examples include README typo fixes, Markdown formatting corrections, or updating a version number in docs.
|
|
28
|
+
|
|
29
|
+
Adding a missing license header or fixing a comment that references a wrong file name also qualify.
|
|
30
|
+
|
|
31
|
+
If the request falls outside these examples, the agent MUST escalate to a higher mode.
|
|
32
|
+
|
|
33
|
+
Precondition: The user has requested `/trivial` mode.
|
|
34
|
+
|
|
35
|
+
1. Analyze the user's request against the definition of a trivial change.
|
|
36
|
+
- Expected Output: The agent confirms the request has zero logic impact.
|
|
37
|
+
2. If the request involves logic, configuration, or source code modifications, reject the `/trivial` flag.
|
|
38
|
+
- Expected Output: The agent escalates to Fast or Standard Mode.
|
|
39
|
+
|
|
40
|
+
Postcondition: The agent confirms the change is genuinely trivial.
|
|
41
|
+
|
|
42
|
+
## Skipped Phases
|
|
43
|
+
|
|
44
|
+
To maximize speed for documentation fixes, almost the entire standard workflow is skipped.
|
|
45
|
+
|
|
46
|
+
The agent MUST bypass S2, S3, S4, S5, and S6.
|
|
47
|
+
|
|
48
|
+
No audit, no plan, and no code review cycle are necessary for correcting a typo.
|
|
49
|
+
|
|
50
|
+
The agent makes the documentation or trivial change directly.
|
|
51
|
+
|
|
52
|
+
Furthermore, S8 (Code Review) and S11 (Update GEMINI.md phase) are also completely skipped.
|
|
53
|
+
|
|
54
|
+
We MUST proceed directly to S7 and S10.
|
|
55
|
+
|
|
56
|
+
Precondition: The change is confirmed to be trivial.
|
|
57
|
+
|
|
58
|
+
1. Skip S2, S3, S4, S5, and S6 entirely.
|
|
59
|
+
- Expected Output: No audit or plan artifacts are generated.
|
|
60
|
+
2. Apply the requested documentation or formatting change directly to the file.
|
|
61
|
+
- Expected Output: The change is made on the filesystem.
|
|
62
|
+
3. Skip S8 (Code Review) and S11 (Update GEMINI.md phase).
|
|
63
|
+
- Expected Output: No peer review is invoked, and the PRD is untouched.
|
|
64
|
+
|
|
65
|
+
Postcondition: The trivial change is applied and ready for validation and commit.
|
|
66
|
+
|
|
67
|
+
## S7 Build and S10 Commit
|
|
68
|
+
|
|
69
|
+
Even for trivial changes, basic sanity checks and strict commit hygiene apply.
|
|
70
|
+
|
|
71
|
+
The agent MUST run the build step in S7 to ensure a Markdown typo didn't break a generator.
|
|
72
|
+
|
|
73
|
+
However, running the full test suite is NOT required unless the file is test-adjacent.
|
|
74
|
+
|
|
75
|
+
The commit MUST strictly follow Conventional Commits format, using `docs` or `chore` types.
|
|
76
|
+
|
|
77
|
+
We MUST maintain a clean git history, even for tiny fixes.
|
|
78
|
+
|
|
79
|
+
Precondition: The trivial change has been applied.
|
|
80
|
+
|
|
81
|
+
1. Run the project's build command to verify structural integrity.
|
|
82
|
+
- Expected Output: The build passes successfully.
|
|
83
|
+
2. Group the change into a single atomic unit.
|
|
84
|
+
- Expected Output: The files are staged for commit.
|
|
85
|
+
3. Write a single commit with type `docs` or `chore`.
|
|
86
|
+
- Expected Output: The change is committed to the repository history.
|
|
87
|
+
|
|
88
|
+
Postcondition: The trivial change is safely integrated into the project.
|
|
89
|
+
|
|
90
|
+
## Hard Source File Guard
|
|
91
|
+
|
|
92
|
+
This guard is the ultimate safety mechanism for the Trivial Change Protocol.
|
|
93
|
+
|
|
94
|
+
If the agent detects that the change requires modifying ANY source file, it MUST immediately exit.
|
|
95
|
+
|
|
96
|
+
This includes files like `.ts`, `.js`, `.java`, `.rs`, `.py`, `.kt`, or `.json` (config files).
|
|
97
|
+
|
|
98
|
+
Trivial Protocol is for documentation and non-source files ONLY.
|
|
99
|
+
|
|
100
|
+
Attempting to modify a source file under this protocol is a critical safety violation.
|
|
101
|
+
|
|
102
|
+
We MUST escalate to Fast Mode or Standard Mode instantly if this rule is breached.
|
|
103
|
+
|
|
104
|
+
Precondition: The agent is about to modify a file.
|
|
105
|
+
|
|
106
|
+
1. Check the file extension and directory of the target file.
|
|
107
|
+
- Expected Output: The file type is identified.
|
|
108
|
+
2. If the file is a source file or configuration file, halt the operation.
|
|
109
|
+
- Expected Output: The modification is blocked.
|
|
110
|
+
3. Escalate the session to Fast Mode or Standard Mode and notify the user.
|
|
111
|
+
- Expected Output: The workflow resets to Fast Mode or Standard Mode.
|
|
112
|
+
|
|
113
|
+
Postcondition: Source files are protected from unreviewed modifications.
|