tasks ready
This commit is contained in:
@@ -33,8 +33,9 @@ Decision memory prevents architectural drift. It records the *Decision Space* (W
|
||||
2. **Task Guardrails:** Preventative `@REJECTED` tags injected by the Orchestrator to keep you away from known LLM pitfalls.
|
||||
3. **Reactive Micro-ADR (Your Responsibility):** If you encounter a runtime failure, use `explore()`, and invent a valid workaround, you MUST ascend to the `[DEF]` header and document it via `@RATIONALE [Why]` and `@REJECTED [The failing path]` BEFORE closing the task.
|
||||
|
||||
**⚠️ `@RATIONALE`/`@REJECTED` ARE C5-ONLY.**
|
||||
Decision Memory tags belong exclusively to C5 contracts per Std:Semantics:Core complexity scale. C4 adds `@PRE`/`@POST`/`@SIDE_EFFECT` — not decision memory. Adding them below C5 violates INV_7 (verbosity/erosion). If a C1-C4 contract genuinely needs decision memory, it should be C5.
|
||||
**`@RATIONALE` / `@REJECTED` are ORTHOGONAL tags.** Per `axiom_config.yaml`, these are `protected: true` and `orthogonal: true` — they may appear at ANY complexity level (C1-C5) when a node records a deliberate architectural choice. They are REQUIRED for `ADR` type contracts. Removal of an existing `@RATIONALE`/`@REJECTED` requires `<ESCALATION>` to the Architect.
|
||||
|
||||
If a C1-C4 contract records a workaround after a runtime failure, add `@RATIONALE`/`@REJECTED` at that node's header BEFORE closing the task. This is a Reactive Micro-ADR — it does NOT require bumping the complexity to C5.
|
||||
|
||||
**Resurrection Ban:** Silently reintroducing a coding pattern, library, or logic flow previously marked as `@REJECTED` is classified as a fatal regression. If the rejected path is now required, emit `<ESCALATION>` to the Architect.
|
||||
|
||||
|
||||
@@ -42,9 +42,15 @@ Format depends on the execution environment:
|
||||
- JS/TS: `// [DEF:Id:Type] ... // [/DEF:Id:Type]`
|
||||
*Allowed Types: Root, Standard, Module, Class, Function, Component, Store, Block, ADR, Tombstone.*
|
||||
|
||||
**Module Header Tags (required for `Module` type at ALL complexity levels):**
|
||||
- `@LAYER` — architectural layer: `Domain` (business logic), `UI` (interface), `Infra` (infrastructure), `Test` (tests).
|
||||
- `@SEMANTICS` — orthogonal semantic markers (comma-separated keywords, e.g. `indexing, validation, metadata`).
|
||||
|
||||
**ADR Type Override:** `ADR` type has its own contract rules — `@COMPLEXITY` is FORBIDDEN. ADR requires only: `@PURPOSE`, `@RELATION`, `@RATIONALE`, `@REJECTED`. Optional orthogonal tags: `@STATUS` (ACTIVE, DEPRECATED, EXPERIMENTAL).
|
||||
|
||||
**Graph Dependencies (GraphRAG):**
|
||||
`@RELATION PREDICATE -> TARGET_ID`
|
||||
*Allowed Predicates:* DEPENDS_ON, CALLS, INHERITS, IMPLEMENTS, DISPATCHES, BINDS_TO.
|
||||
*Allowed Predicates:* DEPENDS_ON, CALLS, INHERITS, IMPLEMENTS, DISPATCHES, BINDS_TO, VERIFIES.
|
||||
|
||||
## III. COMPLEXITY SCALE (1-5)
|
||||
The level of control is defined in the Header via `@COMPLEXITY`. Default is 1 if omitted.
|
||||
@@ -54,6 +60,10 @@ The level of control is defined in the Header via `@COMPLEXITY`. Default is 1 if
|
||||
- **C4 (Orchestration):** Adds `@PRE`, `@POST`, `@SIDE_EFFECT`. Requires Belief State runtime logging.
|
||||
- **C5 (Critical):** Adds `@DATA_CONTRACT`, `@INVARIANT`, and mandatory Decision Memory tracking.
|
||||
|
||||
**Module type** additionally requires `@LAYER` and `@SEMANTICS` at EVERY complexity level (C1-C5). These are Module‑only — not required for Function, Class, Block, or Component types.
|
||||
|
||||
**`@RATIONALE` / `@REJECTED` are orthogonal tags** — they may appear at ANY complexity level (C1-C5) when decision memory is needed. They are `protected: true` (cannot be removed without escalation) and are REQUIRED for `ADR` type. Adding them to lower‑complexity nodes does NOT violate INV_7 — the tag belongs to the decision space, not the complexity hierarchy.
|
||||
|
||||
## IV. DOMAIN SUB-PROTOCOLS (ROUTING)
|
||||
Depending on your active task, you MUST request and apply the following domain-specific rules:
|
||||
- For Backend Logic & Architecture: Use `skill({name="semantics-contracts"})` and `skill({name="semantics-belief"})`.
|
||||
@@ -81,7 +91,7 @@ The complexity scale is NOT a checklist — each level has a STRICT MAXIMUM of a
|
||||
Do NOT add tags from higher levels. The examples below show the boundary of what is acceptable at each tier.
|
||||
|
||||
### C1 (Atomic) — DTOs, simple constants, trivial wrappers
|
||||
Requires ONLY `[DEF]...[/DEF]`. No `@PURPOSE`, no `@RELATION`, no `@RATIONALE`, no `@PRE`/`@POST`.
|
||||
Requires ONLY `[DEF]...[/DEF]`. No `@PURPOSE`, no `@RELATION`, no `@PRE`/`@POST`.
|
||||
```python
|
||||
# [DEF:UserDTO:Class]
|
||||
@dataclass
|
||||
@@ -91,10 +101,11 @@ class UserDTO:
|
||||
email: str
|
||||
# [/DEF:UserDTO:Class]
|
||||
```
|
||||
Do NOT add: `@PURPOSE`, `@RATIONALE`, `@REJECTED`, `@PRE`, `@POST`, `@SIDE_EFFECT`, `@RELATION`, `@DATA_CONTRACT`, `@INVARIANT`.
|
||||
Do NOT add: `@PURPOSE`, `@PRE`, `@POST`, `@SIDE_EFFECT`, `@RELATION`, `@DATA_CONTRACT`, `@INVARIANT`.
|
||||
Note: `@RATIONALE`/`@REJECTED` are orthogonal — they MAY appear at C1 if the node records a deliberate architectural choice (e.g., "why this DTO has field X instead of Y").
|
||||
|
||||
### C2 (Simple) — Utility functions, pure computations
|
||||
Adds `@PURPOSE`. Still NO `@RELATION`, NO `@RATIONALE`, NO `@PRE`/`@POST`.
|
||||
Adds `@PURPOSE`. Still NO `@RELATION`, NO `@PRE`/`@POST`.
|
||||
```python
|
||||
# [DEF:format_timestamp:Function]
|
||||
# @COMPLEXITY 2
|
||||
@@ -105,7 +116,7 @@ def format_timestamp(ts: datetime) -> str:
|
||||
```
|
||||
|
||||
### C3 (Flow) — Multi-step logic with dependencies
|
||||
Adds `@RELATION` for dependencies. Still NO `@RATIONALE`, NO `@PRE`/`@POST`.
|
||||
Adds `@RELATION` for dependencies. Still NO `@PRE`/`@POST`.
|
||||
```python
|
||||
# [DEF:load_and_validate:Function]
|
||||
# @COMPLEXITY 3
|
||||
@@ -121,7 +132,7 @@ def load_and_validate(path: str) -> dict:
|
||||
|
||||
### C4 (Orchestration) — Stateful operations with side effects
|
||||
Adds `@PRE`, `@POST`, `@SIDE_EFFECT`. Add `belief_scope()` + `reason()`/`reflect()` in body.
|
||||
Still NO `@RATIONALE`, NO `@REJECTED`, NO `@DATA_CONTRACT`, NO `@INVARIANT`.
|
||||
Still NO `@DATA_CONTRACT`, NO `@INVARIANT`.
|
||||
```python
|
||||
# [DEF:migrate_database:Function]
|
||||
# @COMPLEXITY 4
|
||||
@@ -149,8 +160,8 @@ def migrate_database(conn: Connection) -> None:
|
||||
# [/DEF:migrate_database:Function]
|
||||
```
|
||||
|
||||
### C5 (Critical) — Core infrastructure with invariants and decision memory
|
||||
Adds `@RATIONALE`, `@REJECTED`, `@DATA_CONTRACT`, `@INVARIANT`. Use all belief markers.
|
||||
### C5 (Critical) — Core infrastructure with invariants and data contracts
|
||||
Adds `@DATA_CONTRACT`, `@INVARIANT`. Use all belief markers. `@RATIONALE`/`@REJECTED` are expected here for architectural decisions.
|
||||
```python
|
||||
# [DEF:rebuild_index:Function]
|
||||
# @COMPLEXITY 5
|
||||
@@ -190,12 +201,14 @@ def rebuild_index(root: Path) -> IndexSnapshot:
|
||||
### Quick reference
|
||||
| Level | Allowed tags | Forbidden tags |
|
||||
|-------|-------------|----------------|
|
||||
| C1 | only `[DEF]` | PURPOSE, RELATION, PRE, POST, SIDE_EFFECT, DATA_CONTRACT, INVARIANT, RATIONALE, REJECTED |
|
||||
| C2 | +PURPOSE | RELATION, PRE, POST, SIDE_EFFECT, DATA_CONTRACT, INVARIANT, RATIONALE, REJECTED |
|
||||
| C3 | +RELATION | PRE, POST, SIDE_EFFECT, DATA_CONTRACT, INVARIANT, RATIONALE, REJECTED |
|
||||
| C4 | +PRE, POST, SIDE_EFFECT | DATA_CONTRACT, INVARIANT, RATIONALE, REJECTED |
|
||||
| C5 | +DATA_CONTRACT, INVARIANT, RATIONALE, REJECTED | — |
|
||||
| C1 | only `[DEF]` | PURPOSE, RELATION, PRE, POST, SIDE_EFFECT, DATA_CONTRACT, INVARIANT |
|
||||
| C2 | +PURPOSE | RELATION, PRE, POST, SIDE_EFFECT, DATA_CONTRACT, INVARIANT |
|
||||
| C3 | +RELATION | PRE, POST, SIDE_EFFECT, DATA_CONTRACT, INVARIANT |
|
||||
| C4 | +PRE, POST, SIDE_EFFECT | DATA_CONTRACT, INVARIANT |
|
||||
| C5 | +DATA_CONTRACT, INVARIANT | — |
|
||||
|
||||
**Key rule:** `@RATIONALE`/`@REJECTED` are C5-only. Adding them to C1-C4 violates INV_7 (fractal limit) and dilutes real decision memory.
|
||||
**Key rule:** `@RATIONALE` / `@REJECTED` are ORTHOGONAL tags. They are NOT gated by complexity — they may appear at ANY level (C1-C5) when a node records a deliberate architectural choice. They are `protected: true` (removal requires `<ESCALATION>`). They are REQUIRED for `ADR` type contracts.
|
||||
|
||||
**Module type:** `@LAYER` and `@SEMANTICS` are REQUIRED at EVERY complexity level (C1-C5) in addition to the tags above.
|
||||
|
||||
# [/DEF:Std:Semantics:Core]
|
||||
|
||||
Reference in New Issue
Block a user