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,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "S4 Plan Review"
|
|
3
|
+
description: "Executes the critical quality gate, spawning specialized subagents to evaluate the implementation plan against architectural constraints and audit findings."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# S4 Plan Review
|
|
7
|
+
|
|
8
|
+
## 1. Introduction and Purpose
|
|
9
|
+
This document defines the strict execution protocol for the S4 Plan Review phase within the `ideal-agentic-workflow` plugin.
|
|
10
|
+
The S4 phase acts as the primary defense mechanism against flawed logic, preventing poorly conceived implementation plans from reaching the coding stage.
|
|
11
|
+
The orchestrating agent MUST execute the protocols defined below to guarantee that autonomous plan-critic subagents thoroughly evaluate the proposed architecture.
|
|
12
|
+
Skipping this phase in Standard or Duolithic modes violates the core invariant that all generated plans MUST be peer-reviewed before execution.
|
|
13
|
+
This rigorous review cycle mimics the human pull request process, ensuring that multiple expert personas validate the strategy against project constraints.
|
|
14
|
+
The orchestrating agent MUST prepare the exact inputs required by the subagents and handle the resulting feedback deterministically.
|
|
15
|
+
Failure to properly orchestrate this review will result in the deployment of brittle, non-compliant code that degrades the repository's health.
|
|
16
|
+
The S4 phase explicitly determines whether the workflow advances to coding or loops back to planning for necessary revisions.
|
|
17
|
+
|
|
18
|
+
## 2. Modal Execution Protocols
|
|
19
|
+
The exact behavior of the S4 phase is strictly governed by the operating mode established during the S1 Orchestration phase.
|
|
20
|
+
The agent MUST evaluate the current mode from the `.agents/session-[SHA]/mode.txt` file (or its internal state) and execute the corresponding protocol branch.
|
|
21
|
+
Applying the wrong protocol wastes time spawning unnecessary subagents or dangerously bypasses the review for complex, high-risk changes.
|
|
22
|
+
The Fast Mode and Trivial Protocol explicitly trust the developer's initial scoping and skip this phase entirely to maximize execution speed.
|
|
23
|
+
Conversely, the Standard and Duolithic modes mandate a rigorous, multi-agent review process to guarantee architectural safety.
|
|
24
|
+
The agent MUST strictly adhere to the mutually exclusive branches of logic defined below based on the active session mode.
|
|
25
|
+
The agent MUST NOT attempt to blend these instructions; a session is either fully reviewed or explicitly bypassed based on the mode.
|
|
26
|
+
If the operating mode is unclear, the agent MUST default to the Standard mode protocol to guarantee that safety is never compromised.
|
|
27
|
+
|
|
28
|
+
### 2.1 Fast and Trivial Mode Bypass
|
|
29
|
+
When the session is explicitly marked as `/fast mode` or `/trivial`, the agent MUST completely bypass the entire S4 Plan Review phase.
|
|
30
|
+
These modes are designed for low-risk, tightly scoped changes where the developer's initial direction does not require secondary validation.
|
|
31
|
+
Spawning plan-critic subagents for a trivial documentation fix or a single-line bug patch constitutes a massive waste of AI quota and wall-clock time.
|
|
32
|
+
The agent MUST NOT prepare a `submit(n).md` file or spawn any reviewers under these specific protocols.
|
|
33
|
+
The agent MUST immediately advance the workflow directly to the S6 Coding phase, trusting the inline plan generated during S3.
|
|
34
|
+
|
|
35
|
+
### 2.2 Standard Mode Protocol
|
|
36
|
+
When operating in Standard Mode, the agent MUST execute the native, multi-agent review process within the current conversation context.
|
|
37
|
+
This protocol guarantees that the proposed plan is scrutinized by objective subagents dedicated solely to architectural compliance.
|
|
38
|
+
The agent MUST prepare the `.agents/session-[SHA]/code-review/submit/submit(n).md` file containing the `plan.md` contents and the `plan-review-guide.md` instructions.
|
|
39
|
+
The agent MUST spawn exactly two (2) plan-reviewer subagents utilizing the `plan-critic.md` persona defined in the persona bank.
|
|
40
|
+
The agent MUST wait for both subagents to generate their respective `.agents/session-[SHA]/code-review/review/review(n).md` output files before proceeding to evaluation.
|
|
41
|
+
|
|
42
|
+
### 2.3 Duolithic Mode Protocol
|
|
43
|
+
When operating in Duolithic Mode, the orchestrating M-Agent MUST delegate the entire review process to the R-Agent operating in a parallel conversation.
|
|
44
|
+
This protocol balances the superior reasoning capabilities of the primary model against the higher quota limits required for parallel subagent spawning.
|
|
45
|
+
The M-Agent MUST NOT spawn any plan-critic subagents directly within its own execution context.
|
|
46
|
+
The M-Agent MUST generate the specific handoff prompt defined below, present it to the user, and explicitly pause its own execution until the R-Agent completes the task.
|
|
47
|
+
The M-Agent MUST execute the following exact sequence to guarantee a seamless transition across the dual-conversation architecture.
|
|
48
|
+
- **Prompt Generation**: The M-Agent MUST generate the exact R-Agent Onboarding Prompt template defined in PRD Section 4.4.
|
|
49
|
+
- **Context Injection**: The M-Agent MUST insert the precise string: `"Read plan.md at [PATH]. Spawn 3 plan-reviewer subagents."` into the `[TASK-SPECIFIC CONTEXT]` block of the prompt.
|
|
50
|
+
- **Explicit Pause**: The M-Agent MUST explicitly halt execution and instruct the user to paste the prompt into the R-Agent conversation.
|
|
51
|
+
- **Completion Signal**: The M-Agent MUST strictly wait for the user to return the exact completion signal: `RAGENT_DONE: [OUTPUT_FILE_PATH]` before resuming operations and reading the generated review files.
|
|
52
|
+
|
|
53
|
+
## 3. Transition Logic and Evaluation
|
|
54
|
+
Regardless of whether the reviews were generated via Standard Mode or Duolithic Mode, the orchestrating agent MUST rigorously evaluate the final `review(n).md` outputs.
|
|
55
|
+
This evaluation determines the immediate next step in the workflow lifecycle, enforcing the rule that unapproved plans cannot proceed to execution.
|
|
56
|
+
The agent MUST read the conclusions of all spawned plan-critics and aggregate their final verdicts.
|
|
57
|
+
If the reviewers reach a consensus, the agent MUST advance the workflow; if a single reviewer objects, the plan MUST be revised.
|
|
58
|
+
The agent MUST strictly follow the transition logic defined below based on the aggregated review status.
|
|
59
|
+
Failure to enforce this logic breaks the fundamental invariant of the agentic engineering process.
|
|
60
|
+
This explicit transition gate prevents subjective interpretation of the review results.
|
|
61
|
+
The agent MUST execute one of the following two transition pathways.
|
|
62
|
+
|
|
63
|
+
### 3.1 Approval Transition (S6 Code One Task)
|
|
64
|
+
If all plan-reviewer subagents explicitly approve the implementation plan without requesting mandatory changes, the plan is considered verified.
|
|
65
|
+
The orchestrating agent MUST mark the S4 phase as complete and immediately transition the workflow to the S6 Coding phase.
|
|
66
|
+
The agent MUST select the first incomplete task from the `task.md` file and begin generating production code.
|
|
67
|
+
The agent MUST ensure the `task.md` file is accurately updated as the coding phase commences.
|
|
68
|
+
The agent MUST NOT modify the approved `plan.md` file after this transition occurs.
|
|
69
|
+
|
|
70
|
+
### 3.2 Rejection Transition (S5 Plan Fix)
|
|
71
|
+
If any single plan-reviewer subagent requests changes or rejects the proposed architecture, the plan is considered flawed.
|
|
72
|
+
The orchestrating agent MUST explicitly transition the workflow to the S5 Plan Fix phase to remediate the identified issues.
|
|
73
|
+
The agent MUST read the specific criticisms from the `review(n).md` files, revise the `plan.md` and `task.md` artifacts accordingly, and loop back to the beginning of S4 to request a fresh review cycle.
|
|
74
|
+
This cyclical process MUST continue indefinitely until all architectural concerns are fully resolved.
|
|
75
|
+
The agent MUST NOT proceed to S6 until a flawless approval is secured from all designated reviewers.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Plan Review Guide
|
|
2
|
+
|
|
3
|
+
## 1. Introduction and Purpose
|
|
4
|
+
This document defines the strict criteria that all plan-reviewer subagents MUST utilize when evaluating an implementation plan during the S4 phase.
|
|
5
|
+
The plan review acts as an impenetrable quality gate, preventing poorly scoped or architecturally unsound logic from reaching the coding phase.
|
|
6
|
+
Without this explicit set of evaluation criteria, reviewers risk rubber-stamping the orchestrator's output without conducting a meaningful analysis.
|
|
7
|
+
By enforcing these specific checks, the `ideal-agentic-workflow` plugin guarantees that every proposed code change aligns with the project's long-term health.
|
|
8
|
+
Every plan-reviewer MUST cross-reference the proposed `plan.md` against the rules defined below.
|
|
9
|
+
The reviewer MUST issue a rejection if the plan violates any single criterion in this document.
|
|
10
|
+
Compromising on these checks inevitably leads to regressions, performance bottlenecks, and mounting technical debt.
|
|
11
|
+
Reviewers MUST NOT rely on intuition; they MUST trace every proposed change back to the foundational architecture constraints.
|
|
12
|
+
|
|
13
|
+
## 2. Core Review Dimensions
|
|
14
|
+
The review process is divided into three non-negotiable dimensions that the critic MUST analyze simultaneously.
|
|
15
|
+
The reviewer MUST verify that the proposed logic does not violate the established stack pack rules for the repository.
|
|
16
|
+
The reviewer MUST guarantee that the plan adequately addresses the critical findings identified in the previous S2 audit phase.
|
|
17
|
+
The reviewer MUST scan the proposed implementation steps for known anti-patterns documented in the project's registry.
|
|
18
|
+
Failing to examine all three dimensions guarantees that critical flaws will slip into the production codebase.
|
|
19
|
+
Each dimension carries equal weight in the evaluation process.
|
|
20
|
+
A failure in any single dimension constitutes an automatic rejection of the entire implementation plan.
|
|
21
|
+
The reviewer MUST evaluate the plan against the exact criteria outlined below.
|
|
22
|
+
|
|
23
|
+
### 2.1 Stack Pack Adherence
|
|
24
|
+
The plan-reviewer MUST evaluate every proposed change against the specific architecture rules defined in the active stack packs (e.g., `web-nextjs-turborepo.md`).
|
|
25
|
+
The reviewer MUST ensure that the plan does not propose patterns explicitly forbidden by the chosen framework.
|
|
26
|
+
If the plan introduces a direct conflict with the stack's defined best practices, the reviewer MUST reject it immediately.
|
|
27
|
+
The reviewer MUST explicitly cite the violated stack pack rule in their `review(n).md` output to provide actionable feedback.
|
|
28
|
+
The reviewer MUST examine the following architectural boundaries.
|
|
29
|
+
- **Routing and File Structure**: Verify that the plan places files in the correct framework directories (e.g., Next.js App Router vs. Pages Router).
|
|
30
|
+
- **State Management**: Verify that the plan proposes the correct state management paradigm defined for the project (e.g., Server Components vs. Client Components).
|
|
31
|
+
- **Data Access Patterns**: Verify that database interactions conform to the designated ORM or query builder rules.
|
|
32
|
+
|
|
33
|
+
### 2.2 Audit Report Coverage
|
|
34
|
+
The plan-reviewer MUST read the `.agents/session-[SHA]/audit/audit.md` file and verify that the proposed plan addresses the high-priority vulnerabilities identified within it.
|
|
35
|
+
A plan that focuses exclusively on new features while ignoring critical security warnings from the audit MUST be rejected.
|
|
36
|
+
The reviewer MUST trace the tasks in the plan back to the specific audit findings to guarantee complete coverage.
|
|
37
|
+
If a critical audit finding is deliberately deferred, the reviewer MUST verify that the plan includes a valid, documented justification for the delay.
|
|
38
|
+
The reviewer MUST assess the following coverage metrics.
|
|
39
|
+
- **Security Mitigation**: Verify that the plan proposes explicit fixes for any active vulnerabilities flagged during S2.
|
|
40
|
+
- **Performance Remediation**: Verify that the plan addresses severe performance bottlenecks or memory leaks identified by the auditors.
|
|
41
|
+
- **Technical Debt Reduction**: Verify that the plan allocates time to refactor deprecated API usage or convoluted logic flows.
|
|
42
|
+
|
|
43
|
+
### 2.3 Anti-Pattern Prevention
|
|
44
|
+
The plan-reviewer MUST analyze the proposed logic flow to intercept any known anti-patterns before they manifest as code.
|
|
45
|
+
The reviewer MUST cross-reference the plan against the project's central anti-pattern registry located in the resources directory.
|
|
46
|
+
If the plan suggests a brittle implementation, such as hardcoding environment variables or writing monolithic functions, the reviewer MUST reject it.
|
|
47
|
+
The reviewer MUST mandate that the plan adopts defensive programming practices and robust error handling mechanisms.
|
|
48
|
+
The reviewer MUST actively hunt for the following conceptual flaws.
|
|
49
|
+
- **Simulation Code**: Verify that the plan strictly prohibits the generation of mock data, placeholders, or non-production simulation logic.
|
|
50
|
+
- **Verbose Comments**: Verify that the plan does not encourage writing excessive, narrative comments inside the source files.
|
|
51
|
+
- **Compiler Appeasement**: Verify that the plan does not propose suppressing warnings or bypassing type safety solely to force a successful build.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "S6 Coding"
|
|
3
|
+
description: "Executes the core code generation phase, strictly enforcing senior developer standards, stack architecture rules, and anti-pattern prevention."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# S6 Coding
|
|
7
|
+
|
|
8
|
+
## 1. Introduction and Purpose
|
|
9
|
+
This document defines the strict execution protocol for the S6 Coding phase within the `ideal-agentic-workflow` plugin.
|
|
10
|
+
The S6 phase is the critical execution engine where the theoretically sound plans from S4 are transformed into functional, production-ready software.
|
|
11
|
+
The orchestrating agent MUST execute the protocols defined below to guarantee that code is generated with a disciplined, senior-developer mindset rather than rapid, sloppy prototyping.
|
|
12
|
+
Skipping this phase or ignoring its constraints violates the core invariant that all generated code MUST be robust, maintainable, and free of architectural debt.
|
|
13
|
+
This rigorous approach ensures that the output is indistinguishable from code written by a highly experienced human engineer intimately familiar with the project.
|
|
14
|
+
The orchestrating agent MUST strictly manage task state, enforce coding idioms, and actively hunt for anti-patterns during generation.
|
|
15
|
+
Failure to properly execute this phase will result in the accumulation of technical debt, immediate rejection during S8 Code Review, and a degraded repository state.
|
|
16
|
+
The S6 phase explicitly bridges the gap between approved planning and automated testing.
|
|
17
|
+
|
|
18
|
+
## 2. The Senior Developer Mandate
|
|
19
|
+
The quality of the output in this phase relies entirely on the agent adopting the correct persona and operational mindset.
|
|
20
|
+
The agent MUST explicitly adopt the following foundational mandate before generating any code, treating it as the highest behavioral directive.
|
|
21
|
+
> "You are a senior engineer on a production team. Speed is not the goal. Correctness, architecture-fit, and maintainability are your absolute priorities. You write lean, idiomatic code that respects existing patterns."
|
|
22
|
+
The agent MUST NOT generate boilerplate code; every line written MUST serve a distinct, necessary purpose for the feature.
|
|
23
|
+
The agent MUST ensure that all new implementations perfectly match the existing coding idioms and stylistic conventions found within the repository.
|
|
24
|
+
The agent MUST NOT invent new structural paradigms unless explicitly directed to do so by the approved `plan.md`.
|
|
25
|
+
The agent MUST verify its own output against this mandate continuously throughout the execution cycle.
|
|
26
|
+
The agent MUST strictly enforce the following specific execution rules and modal constraints.
|
|
27
|
+
|
|
28
|
+
### 2.1 Architectural Alignment and Task Selection
|
|
29
|
+
Before writing code, the agent MUST explicitly instruct itself to read `resources/stack-detector.md` and subsequently load the applicable stack packs based on the `GEMINI.md` definitions.
|
|
30
|
+
The agent MUST NOT attempt to write framework-specific logic without having the corresponding stack pack loaded into active memory.
|
|
31
|
+
Once the architecture is understood, the agent MUST select the lowest-indexed incomplete task from the `.agents/session-[SHA]/task.md` file.
|
|
32
|
+
The agent MUST immediately mark this selected task with the `[/]` notation to indicate that work is actively in progress.
|
|
33
|
+
The agent MUST isolate its focus entirely to this single task, refusing to address unrelated issues or future steps until the current task is fully resolved.
|
|
34
|
+
|
|
35
|
+
### 2.2 Anti-Pattern Enforcement and Post-Coding Check
|
|
36
|
+
During the actual code generation process, the agent MUST explicitly enforce all constraints defined in the `resources/anti-patterns.md` registry.
|
|
37
|
+
The agent MUST guarantee zero simulation code, zero verbose comments, zero TODOs, and zero instances of compiler appeasement.
|
|
38
|
+
Upon completing the code generation for the selected task, the agent MUST perform a rigorous self-audit before declaring the work finished.
|
|
39
|
+
The agent MUST mandate and execute this precise post-coding check: "Mentally check every named anti-pattern against the code just written. If any matches, fix before proceeding to S7".
|
|
40
|
+
The agent MUST NOT transition to the automated testing phase until it is absolutely certain no anti-patterns remain in the generated files.
|
|
41
|
+
|
|
42
|
+
### 2.3 Fast Mode Escalation Rule
|
|
43
|
+
When operating under Fast Mode, the agent is trusted to execute rapid, low-risk changes without a formal S4 plan review.
|
|
44
|
+
However, Fast Mode is strictly not a license to silently engage in scope creep or execute massive architectural shifts under the radar.
|
|
45
|
+
The agent MUST constantly monitor the size and impact of its generated code during the Fast Mode execution cycle.
|
|
46
|
+
The agent MUST explicitly mandate the following Fast Mode escalation rule: if the agent discovers the necessary change exceeds 3 files or 100 lines of code, it MUST explicitly pause execution.
|
|
47
|
+
Upon pausing, the agent MUST ask the user whether to escalate the session to Standard Mode.
|
|
48
|
+
The agent MUST NOT continue generating code beyond this threshold without explicit human authorization.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Anti-Pattern Registry
|
|
2
|
+
|
|
3
|
+
## 1. Introduction and Purpose
|
|
4
|
+
This document defines the definitive registry of forbidden coding practices within the `ideal-agentic-workflow` plugin.
|
|
5
|
+
The core philosophy of this workflow dictates that speed is never a virtue if it comes at the expense of architectural integrity or maintainability.
|
|
6
|
+
Without this explicit registry, autonomous coding agents often default to generating brittle, performative code that appears functional but collapses under real-world usage.
|
|
7
|
+
By strictly defining and prohibiting these specific behaviors, the workflow guarantees that all generated code adheres to the highest senior developer standards.
|
|
8
|
+
The executing agent MUST cross-reference every line of generated code against these defined anti-patterns before declaring a task complete.
|
|
9
|
+
The agent MUST immediately rewrite any logic that violates these constraints, regardless of whether the code compiles successfully.
|
|
10
|
+
Allowing any of these anti-patterns to slip into a commit violates the fundamental behavioral rules outlined in the project's PRD.
|
|
11
|
+
The agent MUST enforce the following four mandatory constraints across all generated files.
|
|
12
|
+
|
|
13
|
+
## 2. Core Anti-Patterns
|
|
14
|
+
The following sub-sections detail the specific coding behaviors that are strictly forbidden during the S6 Coding phase.
|
|
15
|
+
These constraints are not merely guidelines; they are non-negotiable hard rules that dictate the quality of the final output.
|
|
16
|
+
The agent MUST treat the presence of any of these patterns as a critical failure requiring immediate remediation.
|
|
17
|
+
The overarching goal is to produce lean, self-documenting, production-ready code that matches existing project idioms.
|
|
18
|
+
The agent MUST rigorously analyze its own output against these four explicitly named anti-patterns.
|
|
19
|
+
The agent MUST guarantee that the final commit contains zero instances of these prohibited structures.
|
|
20
|
+
If a reviewer during S8 Code Review detects any of these patterns, the agent MUST accept the rejection and rewrite the implementation.
|
|
21
|
+
The agent MUST strictly enforce the following specific prohibitions.
|
|
22
|
+
|
|
23
|
+
### 2.1 AP-001: Zero Simulation or Mock Code
|
|
24
|
+
The agent MUST NOT generate placeholder data, hardcoded mock responses, or simulation logic under any circumstances.
|
|
25
|
+
Writing fake implementations gives a false sense of progress while offloading the actual engineering work onto future tasks.
|
|
26
|
+
If a feature requires a database query, the agent MUST write the actual query using the project's designated ORM.
|
|
27
|
+
If an external API is required, the agent MUST implement the real HTTP client logic.
|
|
28
|
+
The agent MUST ensure the generated code is completely production-ready.
|
|
29
|
+
|
|
30
|
+
### 2.2 AP-002: Zero Verbose Comments
|
|
31
|
+
The agent MUST NOT clutter the source code with narrative, conversational, or overly explanatory comments.
|
|
32
|
+
Code MUST be self-documenting through clear variable naming, well-structured functions, and explicit type definitions.
|
|
33
|
+
Adding paragraphs of comments explaining basic language syntax or obvious logic flows degrades readability and creates maintenance burdens.
|
|
34
|
+
The agent MUST restrict comments exclusively to documenting non-obvious business logic, complex algorithms, or necessary hacks.
|
|
35
|
+
The agent MUST delete any generated comments that merely restate what the code does.
|
|
36
|
+
|
|
37
|
+
### 2.3 AP-003: Zero TODO or FIXME Comments
|
|
38
|
+
The agent MUST NOT leave `TODO`, `FIXME`, or `PENDING` comments in the generated codebase.
|
|
39
|
+
The purpose of the S6 phase is to complete the assigned task entirely; leaving a `TODO` is an explicit admission of incomplete work.
|
|
40
|
+
If a task cannot be fully implemented due to missing dependencies, the agent MUST halt execution and request user intervention.
|
|
41
|
+
The agent MUST NOT commit partial implementations that rely on future developers to finish the logic.
|
|
42
|
+
The agent MUST ensure that every line of code written represents a finalized, working state.
|
|
43
|
+
|
|
44
|
+
### 2.4 AP-004: Zero Compiler Appeasement
|
|
45
|
+
The agent MUST NOT bypass type safety, suppress linter warnings, or violate architectural boundaries simply to force a successful compilation.
|
|
46
|
+
Using `any` types in TypeScript, `// @ts-ignore` directives, or forced unwrap operators in Swift are strictly forbidden unless explicitly authorized by the project rules.
|
|
47
|
+
Compiler errors indicate a fundamental misunderstanding of the data flow or the framework's constraints.
|
|
48
|
+
The agent MUST solve the underlying architectural issue rather than masking it with unsafe type casting or suppressed warnings.
|
|
49
|
+
The agent MUST guarantee that the code compiles cleanly while adhering to the strictest type safety settings available.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Stack Detector Instructions
|
|
2
|
+
|
|
3
|
+
## 1. Introduction and Purpose
|
|
4
|
+
This document provides the mandatory protocol for identifying the current technology stack during the S6 Coding phase.
|
|
5
|
+
Because the `ideal-agentic-workflow` plugin operates across diverse projects ranging from web applications to Minecraft mods, the coding agent must adapt its architectural approach dynamically.
|
|
6
|
+
Without a mechanism to detect the active stack, the agent risks generating code that violates the project's foundational framework rules (e.g., mixing Next.js Pages router logic into an App router project).
|
|
7
|
+
By enforcing this detection protocol, the workflow ensures that all generated code is highly specific, idiomatic, and framework-compliant.
|
|
8
|
+
The agent MUST execute these detection steps at the very beginning of the S6 phase, before writing a single line of production code.
|
|
9
|
+
The agent MUST NOT rely on internal assumptions or general language knowledge; it must strictly adhere to the rules defined in the corresponding stack pack.
|
|
10
|
+
Failure to detect and apply the correct stack pack guarantees that the plan reviewers will reject the implementation.
|
|
11
|
+
The agent MUST rigorously follow the detection and loading sequence defined below.
|
|
12
|
+
|
|
13
|
+
## 2. Stack Detection Protocol
|
|
14
|
+
The identification of the active technology stack is a deterministic process relying entirely on the project's primary knowledge base.
|
|
15
|
+
The agent MUST NOT attempt to infer the stack by arbitrarily scanning source files or package configuration files, as this is prone to error and misinterpretation.
|
|
16
|
+
The definitive source of truth for the project's architecture is explicitly documented within the `GEMINI.md` file.
|
|
17
|
+
The agent MUST read this central document to determine which specific architectural constraints apply to the current task.
|
|
18
|
+
Once identified, the agent MUST locate and load the corresponding instruction files from the plugin's resource directory.
|
|
19
|
+
The agent MUST apply these rules consistently across all code generation tasks in the current session.
|
|
20
|
+
The agent MUST execute the following exact steps to secure the architectural context.
|
|
21
|
+
The agent MUST NOT proceed to coding if the stack pack file cannot be located.
|
|
22
|
+
|
|
23
|
+
### 2.1 Read GEMINI.md Technology Stack
|
|
24
|
+
The agent MUST open and parse the `GEMINI.md` file located at the root of the project workspace.
|
|
25
|
+
The agent MUST locate the specific section detailing the "Technology Stack" or "Architecture" to identify the primary frameworks in use.
|
|
26
|
+
If the project utilizes multiple frameworks (e.g., a React frontend and a Spring Boot backend), the agent MUST identify the stack relevant to the specific task at hand.
|
|
27
|
+
The agent MUST extract the exact framework names and versions defined by the user in this document.
|
|
28
|
+
The agent MUST use this extracted information to determine which stack pack applies.
|
|
29
|
+
|
|
30
|
+
### 2.2 Load Applicable Stack Packs
|
|
31
|
+
After identifying the framework from `GEMINI.md`, the agent MUST locate the corresponding file within the `resources/stacks/` directory.
|
|
32
|
+
The agent MUST read the contents of this stack pack (e.g., `web-nextjs-turborepo.md` or `mc-fabric.md`) completely into its active context.
|
|
33
|
+
The agent MUST explicitly memorize the "Architecture Rules" and "Common Anti-Patterns" defined within that specific stack pack.
|
|
34
|
+
The agent MUST apply these loaded rules to every line of code generated during the S6 phase, ensuring total compliance with the project's idiomatic constraints.
|
|
35
|
+
The agent MUST explicitly verify its implementation against these rules before concluding the task.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "S8 Code Review"
|
|
3
|
+
description: "Orchestrates the rigorous peer review phase, strictly gating progression based on automated test results and multi-agent consensus."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# S8 Code Review
|
|
7
|
+
|
|
8
|
+
## 1. Introduction and Purpose
|
|
9
|
+
This document defines the strict execution protocol for the S8 Code Review phase within the `ideal-agentic-workflow` plugin.
|
|
10
|
+
The S8 phase is the uncompromising quality gate designed to prevent untested, flawed, or architecturally unsound code from progressing to the commit stage.
|
|
11
|
+
The orchestrating agent MUST execute the protocols defined below to guarantee that the peer review process remains objective, thorough, and completely isolated from the authoring context.
|
|
12
|
+
Bypassing this phase or manipulating the review outcomes violates the core tenets of the workflow and completely invalidates the integrity of the generated codebase.
|
|
13
|
+
This rigorous approach mimics a real-world engineering team where peer consensus is an absolute prerequisite for merging.
|
|
14
|
+
The orchestrating agent MUST strictly manage the creation of review requests, coordinate the reviewer subagents, and enforce the absolute gating rules.
|
|
15
|
+
Failure to properly execute this phase will result in the accumulation of technical debt and broken builds in the main branch.
|
|
16
|
+
The S8 phase explicitly bridges the gap between verified local testing and the final commit preparation.
|
|
17
|
+
|
|
18
|
+
## 2. Hard Gating and Behavioral Rules
|
|
19
|
+
The integrity of the review process relies entirely on strict adherence to the project's foundational behavioral constraints.
|
|
20
|
+
The agent MUST explicitly verify the following gating rules before attempting to initiate any peer review sequence.
|
|
21
|
+
The agent MUST acknowledge the absolute prohibition: "NEVER invoke S8 code review if any automated test is failing."
|
|
22
|
+
If the S7 Testing phase reported any compiler errors, failing unit tests, or linter warnings, the agent MUST immediately loop back to S6 and fix the code.
|
|
23
|
+
Furthermore, the agent MUST obey the core behavioral rule: "NEVER write a review file yourself. Review MUST come from real subagents or R-Agent."
|
|
24
|
+
The agent MUST NOT attempt to fake a positive review to bypass the subagent invocation process.
|
|
25
|
+
The agent MUST explicitly verify these prerequisites before proceeding to submit the code.
|
|
26
|
+
The agent MUST enforce the following specific execution rules regarding submission and reviewer management.
|
|
27
|
+
|
|
28
|
+
### 2.1 Submit File Creation Protocol
|
|
29
|
+
Before spawning reviewers, the agent MUST formally document the changes by creating a `submit(N).md` file in the `.agents/session-[SHA]/code-review/submit/` directory.
|
|
30
|
+
The agent MUST format this file meticulously to ensure the reviewers have all necessary context to perform a deep semantic evaluation.
|
|
31
|
+
The agent MUST include a clear task description detailing the original requirements and the implemented solution.
|
|
32
|
+
The agent MUST include a comprehensive list of all files changed and a detailed diff summary of the modifications.
|
|
33
|
+
The agent MUST include specific questions for the reviewers, highlighting complex logic or architectural decisions that require extra scrutiny.
|
|
34
|
+
|
|
35
|
+
### 2.2 Modal Reviewer Invocation
|
|
36
|
+
The agent MUST determine the exact number and type of reviewer subagents to spawn based on the active session mode.
|
|
37
|
+
For Fast Mode, the agent MUST spawn exactly 1 reviewer utilizing the `implementation-reviewer` persona.
|
|
38
|
+
For Standard Mode, the agent MUST spawn exactly 2 reviewers utilizing the `implementation-reviewer` persona and one other persona specifically matched to the detected project type (e.g., `security-code-reviewer` for fullstack, or `game-performance-auditor` for minecraft).
|
|
39
|
+
For Duolithic Mode, the agent MUST NOT spawn subagents directly; instead, it MUST generate the explicit onboarding prompt: "Read submit([N]).md at [PATH]. Spawn 4 code-reviewer subagents."
|
|
40
|
+
After generating the Duolithic prompt, the agent MUST pause execution and wait for the exact `RAGENT_DONE` signal from the user.
|
|
41
|
+
If the active mode is Trivial Protocol, the agent MUST skip the S8 phase entirely and proceed directly to S10.
|
|
42
|
+
|
|
43
|
+
### 2.3 Patience Directive and Status Checking
|
|
44
|
+
The peer review process is computationally intensive and may require significant time to complete deep semantic analysis.
|
|
45
|
+
The orchestrating agent MUST exhibit patience and refrain from interrupting or unnecessarily polling the reviewer subagents.
|
|
46
|
+
The agent MUST explicitly use the `schedule` tool to set a 300-second timer if the subagents are particularly slow to respond.
|
|
47
|
+
The agent MUST NOT spam status checks in a tight loop, as this wastes resources and clutters the session context.
|
|
48
|
+
The agent MUST patiently await the explicit arrival of the completed `review(n).md` files from the subagents or the R-Agent.
|
|
49
|
+
|
|
50
|
+
### 2.4 Progression and Iteration Loops
|
|
51
|
+
Upon receiving all requested reviews, the agent MUST evaluate the consensus to determine the next phase of the workflow.
|
|
52
|
+
The agent MUST enforce the absolute progression gate: "LGTM from ALL reviewers required before proceeding. One CHANGES_REQUESTED blocks and loops to S9 Bug Fix."
|
|
53
|
+
If any reviewer requests changes, the agent MUST enter the S9 Bug Fix phase, resolve the issues, strictly re-run the S7 automated testing suite, and then send a message to the reviewers with a detailed changelog of what was fixed before requesting a re-review.
|
|
54
|
+
If ALL reviewers explicitly provide an `LGTM` (Looks Good To Me) approval, the agent MUST mark the current task as `[x]` (completed) in the `task.md` tracker.
|
|
55
|
+
Following a successful approval, the agent MUST loop back to S6 if incomplete tasks remain, or proceed directly to S10 Commit if all tasks are finished.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Code Review Guide
|
|
2
|
+
|
|
3
|
+
## 1. Introduction and Purpose
|
|
4
|
+
This document provides the definitive evaluation framework that all code reviewer subagents MUST utilize during the S8 Code Review phase.
|
|
5
|
+
The code review phase is the final, uncompromising barrier preventing defective logic, architectural drift, and technical debt from merging into the target repository.
|
|
6
|
+
Unlike standard linters, the reviewer subagents are tasked with deep semantic analysis, evaluating whether the implementation truly fulfills the task requirements robustly.
|
|
7
|
+
By establishing these rigorous evaluation criteria, the workflow ensures that every line of code meets the high standards of a senior engineering team.
|
|
8
|
+
Reviewers MUST strictly evaluate the submitted code against these predefined dimensions rather than relying on subjective stylistic preferences.
|
|
9
|
+
Reviewers MUST immediately issue a `CHANGES_REQUESTED` status if any of the following constraints are violated, detailing the exact lines requiring modification.
|
|
10
|
+
Rubber-stamping bad code fundamentally compromises the Agentic Engineering philosophy and is strictly forbidden.
|
|
11
|
+
The reviewer MUST verify the implementation against the following core dimensions.
|
|
12
|
+
|
|
13
|
+
## 2. Review Dimensions
|
|
14
|
+
The following sub-sections define the precise technical areas that the code reviewer subagents MUST scrutinize.
|
|
15
|
+
These dimensions represent the most common failure points where autonomous agents introduce bugs, security vulnerabilities, or brittle implementations.
|
|
16
|
+
Reviewers MUST approach the code with skepticism, hunting for flaws rather than assuming the original author's logic is sound.
|
|
17
|
+
If the reviewer cannot definitively prove that the code is correct, they MUST reject it and demand clarification or refactoring.
|
|
18
|
+
The reviewer MUST evaluate the code contextually, ensuring it aligns perfectly with the detected project persona loaded from the stack pack (e.g., fullstack web architecture versus minecraft modding paradigms).
|
|
19
|
+
A fullstack web feature requires different architectural considerations (like REST API security) than a Minecraft mod feature (like tick-rate performance).
|
|
20
|
+
The reviewer MUST rigorously assess the submitted diff against the following specific criteria.
|
|
21
|
+
The reviewer MUST reject the submission if any of these dimensions fail.
|
|
22
|
+
|
|
23
|
+
### 2.1 Anti-Pattern Verification
|
|
24
|
+
The reviewer MUST actively hunt for the four explicitly banned anti-patterns defined in the S6 Coding phase (AP-001 through AP-004).
|
|
25
|
+
The reviewer MUST reject the code if it contains any simulation logic, mock data implementations, or placeholder text.
|
|
26
|
+
The reviewer MUST reject the code if it includes verbose, narrative comments that simply restate obvious logic flows.
|
|
27
|
+
The reviewer MUST reject the code if it contains any `TODO`, `FIXME`, or `PENDING` notes, demanding complete implementations.
|
|
28
|
+
The reviewer MUST reject the code if it utilizes compiler appeasement tactics like unauthorized `any` types or suppressed warnings.
|
|
29
|
+
|
|
30
|
+
### 2.2 Architectural Compliance
|
|
31
|
+
The reviewer MUST verify that the submitted implementation aligns perfectly with the established architectural guidelines of the repository.
|
|
32
|
+
The reviewer MUST ensure the code does not introduce new structural paradigms, unauthorized third-party dependencies, or conflicting design patterns.
|
|
33
|
+
If the project follows a strict MVC pattern, the reviewer MUST reject logic that tightly couples database queries directly to view components.
|
|
34
|
+
The reviewer MUST verify that the specific constraints of the loaded stack pack (e.g., Next.js App Router rules) are strictly obeyed.
|
|
35
|
+
The reviewer MUST mandate a refactor if the code deviates from the established repository idioms.
|
|
36
|
+
|
|
37
|
+
### 2.3 Persona-Specific Logic Verification
|
|
38
|
+
The reviewer MUST evaluate the logic specifically through the lens of the project's designated persona (e.g., fullstack versus minecraft).
|
|
39
|
+
For fullstack projects, the reviewer MUST prioritize verifying data sanitization, API security, and proper asynchronous state management.
|
|
40
|
+
For Minecraft projects, the reviewer MUST prioritize verifying tick-rate efficiency, memory management, and proper mixin implementation without conflicts.
|
|
41
|
+
The reviewer MUST ensure that the implementation is not just syntactically correct, but contextually robust for the target environment.
|
|
42
|
+
The reviewer MUST reject the code if it fails to account for these domain-specific vulnerabilities.
|