Mcp Set Decisions
Documentation for Prompts
MCP GoGrab AI — Decision & Logging Execution Protocol
Purpose
This document defines the mandatory process for making, validating, logging, and reinforcing development decisions inside mcp-gograb-ai.
The objective is not just to solve a problem.
The objective is to:
- Make high-confidence decisions (≥ 0.9 calibrated)
- Record institutional knowledge
- Reinforce or correct outcomes
- Strengthen long-term system intelligence
This protocol must be followed for:
- Architecture decisions
- Bug fixes
- Refactors
- Pattern adoptions
- Convention changes
- Performance optimizations
- Module-level implementations
- Strategic technical pivots
1. Core Principles
- No non-trivial change without context.
- No decision without reasoning.
- No reasoning without calibration.
- No decision without logging.
- No logging without outcome tracking.
- No outcome without reinforcement or correction.
If any of these are skipped, the intelligence loop is broken.
2. Phase 1 — Context Enforcement (Mandatory)
Before making any meaningful decision:
preflight({ task: "<clear task description>" })
If similar issues may exist:
find_similar({ query: "<problem summary>" })
If conventions may apply:
convention({ action: "get" })
If the decision touches architecture or prior patterns:
intelligence({ action: "recall", situation: "<context>" })
Never decide in isolation.
3. Phase 2 — Decision Framing
Before selecting a solution, explicitly define:
- What exactly is the problem?
- What is the root cause?
- What constraints exist?
- What are viable alternatives?
- What are long-term risks of each alternative?
If multiple valid solutions exist:
intelligence({
action: "simulate",
simulateAction: "<chosen approach>",
context: "<system constraints>",
alternatives: ["alt1", "alt2"]
})
This step is required for:
- Architectural shifts
- State management changes
- Platform mutations
- Multi-module refactors
4. Phase 3 — Confidence Calibration (Required)
Before implementation:
intelligence({
action: "calibrate",
rawConfidence: 0.X,
domain: "<architecture | angular | platform | performance>"
})
Interpretation:
- ≥ 0.9 → Safe to proceed
- 0.75–0.89 → Acceptable but requires monitoring
- < 0.75 → Insufficient certainty, continue research
No architectural decision should proceed below 0.85.
5. Phase 4 — Implementation & Validation
Perform the work.
If code-related:
code({ action: "review", target: "...", reviewType: "full" })
code({ action: "validate", modulePath: "...", strictMode: true })
If platform-related:
platform({ action: "mutate", operation: "...", entity: "...", data: {...} })
If multi-agent coordination required:
agent({ action: "handoff_create", ... })
Validation must precede logging.
6. Phase 5 — Decision Logging (Mandatory)
Immediately after validation:
log_decision({
type: "architecture | implementation | bugfix | refactor | pattern | convention | documentation | milestone",
question: "<what decision was being made?>",
chosen: "<what was selected?>",
reasoning: "<root cause explanation and tradeoff analysis>",
confidence: 0.9,
options: ["alternative1", "alternative2"],
files: ["fileA.ts", "fileB.ts"],
task: "<task context>"
})
Minimum logging requirements:
- Clear problem statement
- Alternatives considered
- Explicit tradeoffs
- Root cause reasoning
- Calibrated confidence
- Affected files or modules
Do not log vague summaries.
7. Phase 6 — Reinforcement Loop (Outcome Tracking)
After deployment, test validation, or real-world usage:
outcome({
action: "report",
decisionId: "<id>",
wasSuccessful: true | false,
feedback: "<what actually happened>",
rating: 1-5
})
If module-level:
outcome({
action: "module",
moduleName: "<module>",
outcome: "success | partial | failed"
})
If triggered by system events:
outcome({
action: "track",
decisionId: "<id>",
triggerType: "git_commit | build | test"
})
No decision is complete without outcome reporting.
8. Phase 7 — System Hardening (If Needed)
If the issue exposed structural weakness:
Add Convention
convention({
action: "add",
category: "<angular | testing | architecture>",
rule: "<clear enforceable rule>",
examples: ["example snippet"],
source: "decision <id>"
})
Reflect for Learning
intelligence({
action: "reflect",
taskSummary: "...",
outcome: "...",
lessonsLearned: ["lesson1", "lesson2"]
})
Detect Gaps
intelligence({ action: "gaps", domain: "..." })
This transforms fixes into systemic improvement.
9. Decision Classification Rules
| Type | When to Use |
|---|---|
| architecture | Structural or cross-module change |
| implementation | Tactical coding decision |
| refactor | Internal restructuring |
| bugfix | Reactive issue correction |
| pattern | Reusable design approach |
| convention | Rule added to codebase |
| documentation | Process clarification |
| milestone | Major strategic completion |
Misclassification weakens future recall accuracy.
10. Anti-Patterns (Prohibited)
- Logging without calibrated confidence.
- Logging without alternatives.
- Skipping outcome reporting.
- Overriding sessions improperly.
- Making architectural changes without simulation.
- Logging trivial changes.
If the change does not meaningfully affect behavior, do not log it.
11. Minimal Required Flow (Quick Reference)
preflight({ task: "..." })
find_similar({ query: "..." })
intelligence({ action: "simulate", ... })
intelligence({ action: "calibrate", rawConfidence: 0.X, domain: "..." })
... implement ...
log_decision({ ... })
outcome({ action: "report", ... })
If confidence < 0.9 → Do not finalize.
If outcome fails → Reflect + adjust.
12. System-Level Goal
Following this protocol ensures:
- Decisions become institutional memory
- Confidence becomes measurable
- Agents improve over time
- Anti-patterns are detected early
- Architecture converges toward stability
- Reinforcement learning loops stay intact
This is not just logging.
This is structured intelligence evolution.
End of Protocol.