97 lines
4.3 KiB
Markdown
97 lines
4.3 KiB
Markdown
# BOOTSTRAP.md — Dynamic Resynchronization Protocol (DRP)
|
|
|
|
Version: 1.0.0 | Status: RATIFIED | Owner: Senior Quant Engineering Manager / Lead MQL5 Architect
|
|
|
|
---
|
|
|
|
## 1. Purpose
|
|
|
|
Any AI-assisted session (Claude, GPT, local agents, future maintainers) must be able to
|
|
regain full project context **instantly and reliably** — without hardcoded file lists that
|
|
drift out of date. This file defines a **reusable prompt template** that performs live
|
|
discovery: the AI scans the workspace, reads every header and document it finds, and
|
|
internalizes the architectural constraints directly from source.
|
|
|
|
The protocol is **self-healing**: if PROGRESS.md disagrees with what the AI finds on disk,
|
|
the AI must say so explicitly. No stale context, no invented modules.
|
|
|
|
---
|
|
|
|
## 2. The Reusable Prompt Template
|
|
|
|
> Copy the entire block below into any new AI session. Replace `<PROJECT_ROOT>` with the
|
|
> canonical project root and `<NONCE>` with a fresh random token (4–6 chars) before sending.
|
|
> The AI **must** echo the nonce verbatim in its acknowledgment — proof it actually read
|
|
> this file.
|
|
|
|
```text
|
|
[DRP BOOTSTRAP — v1.0.0]
|
|
You are resuming work on the Centaur Quant Architecture project at <PROJECT_ROOT>
|
|
(absolute path). Do not assume any file paths — discover everything live.
|
|
|
|
Resynchronize in EXACTLY this order:
|
|
|
|
1. SCAN — enumerate the full directory tree of the project root, recursively,
|
|
INCLUDING empty folders. Record the structure you observe.
|
|
|
|
2. READ — open and read the FULL contents of:
|
|
- every documentation file (*.md) under 00_CONCEPT/ (charter, progress, bootstrap)
|
|
- every source header (*.mqh) under MQL5/Include/ (recursively)
|
|
Do not skim; read entire files.
|
|
|
|
3. INTERNALIZE — the five non-negotiable architectural constraints:
|
|
a. CENTAUR SYSTEM — three cooperating agents: Executor (MQL5, deterministic SMC),
|
|
Probability Analyst (LLM, advisory), Data Harvest Core (Python + DB, the true core).
|
|
Every tick, context, score, and trade outcome MUST be recorded.
|
|
b. ANTI-VETO PRINCIPLE — AI scores influence position sizing and dynamic trade
|
|
management ONLY. They NEVER block baseline algorithmic execution.
|
|
c. STANDARDIZED DATA PROTOCOL (SDP) — one ratified JSON envelope schema for all
|
|
outbound payloads. CSDPEncoder is the SINGLE permitted JSON serializer in MQL5;
|
|
raw JSON building elsewhere is forbidden.
|
|
d. DYNAMIC NORMALIZATION — zero hardcoded per-symbol point buffers. All distances,
|
|
SL/TP, and lot sizes resolved at runtime via SymbolInfo*() and ATR.
|
|
e. NON-BLOCKING ARCHITECTURE — every socket/network operation bounded by explicit
|
|
timeouts; the MT5 event loop (OnTick/OnTimer) must never hang or freeze.
|
|
|
|
4. VERIFY — cross-check PROGRESS.md (module inventory, compilation status, sprint state,
|
|
completion %) against what you actually found on disk. Report every discrepancy.
|
|
|
|
5. ACKNOWLEDGE — output the acknowledgment line below, echoing the nonce verbatim.
|
|
|
|
Acknowledgment line (output verbatim, replacing placeholders):
|
|
DRP-RESYNC | CODE NAME: CHIRON | SDP v1.0.0 | modules_verified=<count>
|
|
| last_verified=<file> | nonce=<NONCE>
|
|
|
|
Rules:
|
|
- If a file listed in PROGRESS.md is missing, or extra files exist, state it explicitly
|
|
in the acknowledgment and propose the PROGRESS.md update.
|
|
- Do not modify CENTAUR_CHARTER.md without a formal charter amendment.
|
|
- Do not invent modules, schema fields, or protocol keys absent from the files you read.
|
|
```
|
|
|
|
---
|
|
|
|
## 3. Acknowledgment Code Names
|
|
|
|
| DRP Version | Code Name | Meaning |
|
|
|-------------|-----------|---------|
|
|
| 1.0.0 | **CHIRON** | The wise centaur tutor — the session regains full context |
|
|
|
|
Future DRP revisions must register a new code name here before ratification.
|
|
|
|
---
|
|
|
|
## 4. Session Nonce (Anti-Skim Guard)
|
|
|
|
Replace `<NONCE>` with a random 4–6 character token (e.g., `K7xq`) before pasting the
|
|
template. A session that acknowledges without echoing the token, or echoes the wrong
|
|
token, has NOT read this file — treat its output as unverified.
|
|
|
|
---
|
|
|
|
## 5. Amendment Rules
|
|
|
|
- This file and PROGRESS.md may be updated by any maintainer after each working session.
|
|
- Changes to the protocol steps or code names require a new DRP version entry above.
|
|
- CENTAUR_CHARTER.md remains the single source of truth for architecture; this file only
|
|
describes how to resynchronize to it.
|