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:

This protocol must be followed for:


1. Core Principles

  1. No non-trivial change without context.
  2. No decision without reasoning.
  3. No reasoning without calibration.
  4. No decision without logging.
  5. No logging without outcome tracking.
  6. 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:

If multiple valid solutions exist:

intelligence({
  action: "simulate",
  simulateAction: "<chosen approach>",
  context: "<system constraints>",
  alternatives: ["alt1", "alt2"]
})

This step is required for:


4. Phase 3 — Confidence Calibration (Required)

Before implementation:

intelligence({
  action: "calibrate",
  rawConfidence: 0.X,
  domain: "<architecture | angular | platform | performance>"
})

Interpretation:

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:

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)

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:

This is not just logging.

This is structured intelligence evolution.


End of Protocol.