gabbe-kit 1.0.3 → 1.1.1
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/README.md +21 -0
- package/agents/AGENTS.md +36 -3
- package/agents/CONSTITUTION.md +1 -1
- package/agents/guides/00-index.md +4 -4
- package/agents/guides/ai/agent-only-cognition.md +10 -2
- package/agents/guides/ai/agent-only-swarms.md +4 -4
- package/agents/guides/ai/agent-operating-ergonomics.md +1 -1
- package/agents/guides/ai/ai-agentic.md +2 -4
- package/agents/guides/ai/beyond-llms.md +12 -2
- package/agents/guides/ai/multi-agent-systems.md +1 -1
- package/agents/guides/architecture/api-standards.md +9 -7
- package/agents/guides/architecture/critical-systems-arch.md +10 -4
- package/agents/guides/architecture/microservices.md +2 -2
- package/agents/guides/architecture/orchestration.md +3 -3
- package/agents/guides/architecture/systems-architecture.md +6 -0
- package/agents/guides/ops/cost-optimization.md +1 -1
- package/agents/guides/patterns/agentic-patterns.md +12 -40
- package/agents/guides/patterns/ai-native-scenarios.md +4 -4
- package/agents/guides/patterns/design-patterns.md +11 -65
- package/agents/guides/patterns/software-design-patterns.md +4 -2
- package/agents/guides/principles/clean-code-standards.md +1 -1
- package/agents/guides/principles/evaluation-strategy.md +18 -13
- package/agents/guides/principles/future-tech.md +1 -1
- package/agents/guides/principles/human-agent-collaboration.md +4 -3
- package/agents/guides/principles/legacy-tech.md +7 -3
- package/agents/guides/principles/testing-strategy.md +5 -3
- package/agents/guides/processes/loki-sdlc-phases.md +1 -1
- package/agents/guides/security/api-security.md +1 -1
- package/agents/guides/security/cryptography-standards.md +8 -2
- package/agents/guides/security/privacy-data-protection.md +2 -2
- package/agents/guides/security/secure-architecture.md +1 -1
- package/agents/skills/00-index.md +16 -16
- package/agents/skills/brain/active-inference.skill.md +1 -1
- package/agents/skills/brain/brain-mode.skill.md +9 -2
- package/agents/skills/brain/cost-benefit-router.skill.md +20 -8
- package/agents/skills/brain/loki-mode.skill.md +13 -10
- package/agents/skills/brain/sequential-thinking.skill.md +1 -1
- package/agents/skills/coding/mobile-dev.skill.md +1 -0
- package/agents/skills/coding/secure-coding.skill.md +1 -1
- package/agents/skills/coding/tdd-cycle.skill.md +1 -1
- package/agents/skills/coding/testing-strategy.skill.md +1 -1
- package/agents/skills/coding/visual-design.skill.md +1 -0
- package/agents/skills/coordination/agent-interop.skill.md +5 -4
- package/agents/skills/coordination/meta-optimize.skill.md +2 -2
- package/agents/skills/coordination/multi-agent-orch.skill.md +1 -1
- package/agents/skills/coordination/persona-selector.skill.md +1 -1
- package/agents/skills/coordination/self-optimize.skill.md +1 -1
- package/agents/skills/coordination/swarm-consensus.skill.md +10 -0
- package/agents/skills/core/audit-trail.skill.md +1 -1
- package/agents/skills/core/emerging-tech.skill.md +1 -1
- package/agents/skills/core/integrity-check.skill.md +1 -1
- package/agents/skills/core/knowledge-connect.skill.md +1 -0
- package/agents/skills/core/preflight.skill.md +8 -0
- package/agents/skills/core/sdlc-checkpoint.skill.md +7 -2
- package/agents/skills/core/self-heal.skill.md +17 -4
- package/agents/skills/core/session-resume.skill.md +8 -3
- package/agents/skills/core/state-portability.skill.md +3 -2
- package/agents/skills/ops/incident-response.skill.md +1 -0
- package/agents/skills/ops/production-health.skill.md +1 -0
- package/agents/skills/ops/release-management.skill.md +1 -0
- package/agents/skills/ops/system-benchmark.skill.md +1 -0
- package/agents/skills/product/spec-writer.skill.md +6 -3
- package/agents/skills/security/ai-safety-guardrails.skill.md +15 -6
- package/agents/skills/security/legal-review.skill.md +1 -0
- package/agents/skills/security/reliability-engineering.skill.md +4 -3
- package/agents/templates/coding/CLEAN_CODE_CHECKLIST.md +1 -1
- package/agents/templates/coding/EVAL_RUBRIC_TEMPLATE.md +7 -0
- package/agents/templates/coding/GOLDEN_DATASET_TEMPLATE.md +1 -1
- package/agents/templates/coding/TEST_PLAN_TEMPLATE.md +2 -2
- package/agents/templates/coordination/AGENTS_TEMPLATE.md +133 -16
- package/agents/templates/core/AUDIT_LOG_TEMPLATE.md +1 -1
- package/agents/templates/core/SESSION_SNAPSHOT_TEMPLATE.md +3 -3
- package/agents/templates/ops/TECH_DEBT_TEMPLATE.md +1 -1
- package/agents/templates/product/PRD_TEMPLATE.md +8 -2
- package/agents/templates/product/SPEC_TEMPLATE.md +9 -3
- package/agents/templates/product/VISUAL_SPEC_PACKAGE_TEMPLATE.md +1 -1
- package/bin/install.js +36 -6
- package/docs/CLI_REFERENCE.md +43 -5
- package/docs/INSTALL.md +23 -10
- package/docs/adr/0002-brain-active-inference-runtime.md +29 -8
- package/package.json +2 -2
- package/scripts/init.py +488 -8
|
@@ -1,43 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Agentic Patterns — see the canonical catalog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Single source of truth.** The full agentic-pattern catalog — reasoning (ReAct,
|
|
4
|
+
> Reflection/self-correction, Chain-of-Thought/Plan-and-Solve), planning, workflow,
|
|
5
|
+
> multi-agent orchestration (orchestrator-worker, consensus), memory/context, tools &
|
|
6
|
+
> function calling, and reliability/safety — now lives in one place:
|
|
7
|
+
>
|
|
8
|
+
> **→ [`agentic-design-patterns.md`](agentic-design-patterns.md)**
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
2. **Action**: The model decides to call a tool.
|
|
9
|
-
3. **Observation**: The tool output is fed back to the model.
|
|
10
|
-
4. **Repeat**: Until the goal is met.
|
|
10
|
+
For multi-agent topologies and how GABBE wires personas together, see
|
|
11
|
+
[`../ai/multi-agent-systems.md`](../ai/multi-agent-systems.md) and
|
|
12
|
+
[`autonomous-swarm-patterns.md`](autonomous-swarm-patterns.md).
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **The Pattern**: `Draft` -> `Critique` -> `Refine`.
|
|
15
|
-
- **Implementation**:
|
|
16
|
-
- Generate a solution.
|
|
17
|
-
- Prompt the model: "Review the solution above for errors in logic or syntax."
|
|
18
|
-
- Prompt the model: "Based on the critique, generate a fixed version."
|
|
19
|
-
|
|
20
|
-
## 3. Memory Architecture
|
|
21
|
-
Agents need context beyond the immediate prompt.
|
|
22
|
-
- **Short-Term (Working Memory)**: The current context window. Summary management is key here.
|
|
23
|
-
- **Long-Term (Episodic)**: Vector Database (RAG). Stores past interactions.
|
|
24
|
-
- **Semantic (Knowledge)**: Knowledge Graph. Stores facts and relationships.
|
|
25
|
-
|
|
26
|
-
## 4. Planning (Chain of Thought)
|
|
27
|
-
For complex tasks, "winging it" fails.
|
|
28
|
-
- **Plan-and-Solve**:
|
|
29
|
-
1. Ask model to generate a step-by-step plan.
|
|
30
|
-
2. Execute step 1.
|
|
31
|
-
3. Feed result back.
|
|
32
|
-
4. Update plan if needed.
|
|
33
|
-
|
|
34
|
-
## 5. Tools & Function Calling
|
|
35
|
-
The agent's hands.
|
|
36
|
-
- **Safety**: Always validate tool inputs with JSON Schema (Zod/Pydantic).
|
|
37
|
-
- **Granularity**: Atomic tools (`readFile`, `writeFile`) are better than god-tools (`doEverything`).
|
|
38
|
-
- **Feedback**: Tool outputs must be descriptive. "Error: File not found" is better than "Error".
|
|
39
|
-
|
|
40
|
-
## 6. Multi-Agent Orchestration
|
|
41
|
-
(See `guides/ai/multi-agent-systems.md` for details)
|
|
42
|
-
- **Orchestrator-Worker**: Delegating sub-tasks.
|
|
43
|
-
- **Consensus**: Multiple agents voting on an answer.
|
|
14
|
+
For the classical (non-agentic) code/architecture patterns these sit on top of, see
|
|
15
|
+
[`software-design-patterns.md`](software-design-patterns.md).
|
|
@@ -8,11 +8,11 @@ This guide explores advanced "in the wild" use cases where GABBE 2.0 excels, lev
|
|
|
8
8
|
|
|
9
9
|
### Workflow:
|
|
10
10
|
1. **Prompt:**
|
|
11
|
-
> "Use the vibe-coding skill to analyze my existing prototype in `src/vibe`. Now, use the clean-coder and
|
|
11
|
+
> "Use the vibe-coding skill to analyze my existing prototype in `src/vibe`. Now, use the clean-coder and arch-design skills to refactor it into a Clean Architecture (Domain, Application, Adapters) with 100% test coverage using Vitest."
|
|
12
12
|
2. **Key Steps:**
|
|
13
13
|
- **Extract Logic:** The agent separates UI-only "vibe" code from business logic.
|
|
14
14
|
- **Apply Types:** Moving from `any` or loose JS to strict TypeScript.
|
|
15
|
-
- **Add Gates:** Setting up `ESLint` and `
|
|
15
|
+
- **Add Gates:** Setting up `ESLint` and `Prettier` to enforce the style discovered during the "vibe" phase.
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -46,11 +46,11 @@ This guide explores advanced "in the wild" use cases where GABBE 2.0 excels, lev
|
|
|
46
46
|
|
|
47
47
|
## 4. Multi-Agent Competitive Design (Brain Mode)
|
|
48
48
|
|
|
49
|
-
**The Scenario:** You have a high-stakes architectural decision (e.g., GraphQL vs REST for a high-traffic API) and want the agent to simulate a debate between two
|
|
49
|
+
**The Scenario:** You have a high-stakes architectural decision (e.g., GraphQL vs REST for a high-traffic API) and want the agent to simulate a debate between two specialist personas.
|
|
50
50
|
|
|
51
51
|
### Workflow:
|
|
52
52
|
1. **Prompt:**
|
|
53
|
-
> "Activate Brain Mode. Goal: Decide between GraphQL and REST for our mobile backend. Run a competitive simulation between `
|
|
53
|
+
> "Activate Brain Mode. Goal: Decide between GraphQL and REST for our mobile backend. Run a competitive simulation between `prod-architect` (GraphQL proponent) and `ops-sre` (REST proponent). Present a weighted decision matrix in `ARCHITECTURE_DECISION_MATRIX.md`."
|
|
54
54
|
2. **Key Steps:**
|
|
55
55
|
- **Debate:** The orchestrator runs 2-3 passes of debate, synthesizing the pros/cons.
|
|
56
56
|
- **Simulation:** Agent creates minimal benchmarks for both approaches.
|
|
@@ -1,68 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Design Patterns — see the canonical catalog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **Single source of truth.** The classical (non-agentic) design-pattern catalog —
|
|
4
|
+
> GoF creational/structural/behavioral patterns, architectural patterns, DDD, and
|
|
5
|
+
> enterprise/distributed patterns (Circuit Breaker, Sidecar, Backend-for-Frontend,
|
|
6
|
+
> Saga, Strangler Fig, …) — now lives in one place:
|
|
7
|
+
>
|
|
8
|
+
> **→ [`software-design-patterns.md`](software-design-patterns.md)**
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
|
|
10
|
+
That guide includes a smell-to-pattern map, a selection cheat-sheet, and the GABBE
|
|
11
|
+
skill that implements each family (`design-patterns.skill`, `enterprise-patterns.skill`, …).
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
- **Modern Use**: LLM Client factories (OpenAI vs Anthropic clients), Cloud SDK initialization.
|
|
11
|
-
- **When to use**: When the implementation needs to be swappable at runtime based on config.
|
|
12
|
-
|
|
13
|
-
### Builder
|
|
14
|
-
- **Concept**: Construct complex objects step-by-step.
|
|
15
|
-
- **Modern Use**: Constructing complex HTTP requests, prompt chains, or Kubernetes manifests.
|
|
16
|
-
- **When to use**: When an object has >3 optional constructor parameters.
|
|
17
|
-
|
|
18
|
-
### Singleton
|
|
19
|
-
- **Concept**: Ensure a class has only one instance.
|
|
20
|
-
- **Modern Use**: Database connection pools, Configuration managers, Logging services.
|
|
21
|
-
- **Warning**: Avoid for stateful business logic; it makes testing hard.
|
|
22
|
-
|
|
23
|
-
## 2. Structural Patterns
|
|
24
|
-
**Focus**: Class and object composition.
|
|
25
|
-
|
|
26
|
-
### Adapter
|
|
27
|
-
- **Concept**: Make incompatible interfaces work together.
|
|
28
|
-
- **Modern Use**: Standardizing different 3rd party APIs (e.g., Stripe vs PayPal) behind a single `PaymentProvider` interface.
|
|
29
|
-
|
|
30
|
-
### Facade
|
|
31
|
-
- **Concept**: Simple interface to a complex sub-system.
|
|
32
|
-
- **Modern Use**: A `CloudStorage` class that wraps the complexity of S3/GCS SDKs.
|
|
33
|
-
|
|
34
|
-
### Proxy
|
|
35
|
-
- **Concept**: A placeholder for another object to control access.
|
|
36
|
-
- **Modern Use**: Caching proxies, Lazy loading large datasets, Security/Auth gates.
|
|
37
|
-
|
|
38
|
-
## 3. Behavioral Patterns
|
|
39
|
-
**Focus**: Communication between objects.
|
|
40
|
-
|
|
41
|
-
### Strategy (The #1 Pattern)
|
|
42
|
-
- **Concept**: Define a family of algorithms, put each in a separate class, and make them interchangeable.
|
|
43
|
-
- **Modern Use**: Search algorithms (Exact vs Vector), Authentication strategies (OAuth vs API Key).
|
|
44
|
-
- **Why strict?**: It eliminates massive `if/else` or `switch` statements.
|
|
45
|
-
|
|
46
|
-
### Observer / Pub-Sub
|
|
47
|
-
- **Concept**: Notify subscribers of state changes.
|
|
48
|
-
- **Modern Use**: Event-Driven Architecture (receiving logic), UI Reactivity (Redux/MobX).
|
|
49
|
-
|
|
50
|
-
### Command
|
|
51
|
-
- **Concept**: Turn a request into a stand-alone object.
|
|
52
|
-
- **Modern Use**: Job queues (Sidekiq/Celery tasks), Undo/Redo functionality.
|
|
53
|
-
|
|
54
|
-
## 4. Cloud & Microservices Patterns
|
|
55
|
-
|
|
56
|
-
### Circuit Breaker
|
|
57
|
-
- **Problem**: Cascading failures in distributed systems.
|
|
58
|
-
- **Solution**: Stop calling a failing service for a timeout period.
|
|
59
|
-
- **Library**: `Polly` (.NET), `Resilience4j` (Java), `opossum` (Node).
|
|
60
|
-
|
|
61
|
-
### Sidecar
|
|
62
|
-
- **Problem**: Application logic polluted with infra concerns (logging, mTLS).
|
|
63
|
-
- **Solution**: Run a helper process alongside the main app container.
|
|
64
|
-
- **Example**: Envoy, Istio.
|
|
65
|
-
|
|
66
|
-
### Backend for Frontend (BFF)
|
|
67
|
-
- **Problem**: One API doesn't fit Mobile, Web, and IoT needs equally.
|
|
68
|
-
- **Solution**: Create separate API gateways for each client type.
|
|
13
|
+
For the *agentic* patterns that sit on top of these (reasoning, planning, workflow,
|
|
14
|
+
multi-agent, memory, safety), see [`agentic-design-patterns.md`](agentic-design-patterns.md).
|
|
@@ -63,11 +63,13 @@ tech) is the hard part. → `domain-model.skill`
|
|
|
63
63
|
|
|
64
64
|
- **Saga** — manage a distributed transaction as a sequence of local steps + compensations.
|
|
65
65
|
- **Outbox / Inbox** — reliable event publishing alongside a DB write.
|
|
66
|
-
- **Circuit Breaker** — stop calling a failing dependency; fail fast and recover.
|
|
66
|
+
- **Circuit Breaker** — stop calling a failing dependency for a timeout period; fail fast and recover. Avoids cascading failures. Libraries: `Resilience4j` (Java), `Polly` (.NET), `opossum` (Node).
|
|
67
67
|
- **Bulkhead** — isolate resource pools so one failure can't sink the whole system.
|
|
68
68
|
- **Retry with backoff + jitter**, **Timeout**, **Rate Limiting**, **Idempotency key**.
|
|
69
69
|
- **Strangler Fig** — incrementally replace a legacy system. → `enterprise-migration-scenario.skill`, `legacy-modernization.skill`
|
|
70
|
-
- **API Gateway**, **
|
|
70
|
+
- **API Gateway**, **Anti-Corruption Layer**, **Service Mesh**.
|
|
71
|
+
- **Backend-for-Frontend (BFF)** — separate API/gateway per client type (Mobile/Web/IoT) when one API can't serve all equally.
|
|
72
|
+
- **Sidecar** — run a helper process alongside the main app container to keep infra concerns (logging, mTLS, telemetry) out of application logic. Example: Envoy/Istio.
|
|
71
73
|
- Implemented by `enterprise-patterns.skill`, `error-handling-strategy.skill`, `middleware-design.skill`, `api-design.skill`.
|
|
72
74
|
|
|
73
75
|
---
|
|
@@ -20,7 +20,7 @@ Code is read 10x more than it is written. Optimize for readability and maintaina
|
|
|
20
20
|
|
|
21
21
|
### DRY (Don't Repeat Yourself)
|
|
22
22
|
- Every piece of knowledge needs a single, unambiguous representation.
|
|
23
|
-
- **Nuance**: duplication of *code* is sometimes
|
|
23
|
+
- **Nuance**: incidental duplication of *code* is sometimes tolerable — and even preferable — when removing it would force premature coupling between otherwise-independent modules. Duplication of *business logic* (a single rule encoded in two places) is always bad.
|
|
24
24
|
|
|
25
25
|
### KISS (Keep It Simple, Stupid)
|
|
26
26
|
- Avoid "clever" one-liners.
|
|
@@ -24,19 +24,24 @@ or reasoning).
|
|
|
24
24
|
|
|
25
25
|
## 2. The Eval Pyramid
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
This is the **authoritative eval taxonomy** for GABBE (the testing taxonomy lives in
|
|
28
|
+
`testing-strategy.md`; its "Level 5: Evaluation-Driven" defers here). Like the testing
|
|
29
|
+
pyramid, push work down to the cheapest, most-deterministic layer that can express the
|
|
30
|
+
check. Climb only when you must. The four layers are referred to elsewhere as **Tier-1**
|
|
31
|
+
through **Tier-4**:
|
|
32
|
+
|
|
33
|
+
1. **Tier-1 — Deterministic assertions (base)** — exact match, regex, JSON-schema
|
|
34
|
+
validation, set membership. Cheap, instant, 100% reproducible. Most "quality" checks are
|
|
35
|
+
secretly deterministic — catch them here.
|
|
36
|
+
2. **Tier-2 — Semantic similarity** — embedding cosine similarity against a reference
|
|
37
|
+
answer, with a threshold. Tolerates wording differences while still being mostly
|
|
38
|
+
reproducible.
|
|
39
|
+
3. **Tier-3 — LLM-as-judge** — a model scores the output against a rubric. Expensive,
|
|
40
|
+
subjective, non-deterministic; use for quality dimensions no formula captures (clarity,
|
|
41
|
+
helpfulness).
|
|
42
|
+
4. **Tier-4 — Human review (tip)** — the gold standard and the calibration anchor for
|
|
43
|
+
everything below it. Slowest and most expensive; reserve for high-stakes output and for
|
|
44
|
+
keeping the judges honest.
|
|
40
45
|
|
|
41
46
|
Each layer up costs more and is less reproducible. A good eval suite is fat at the base.
|
|
42
47
|
|
|
@@ -32,4 +32,4 @@ Software engineering moves fast. In 2026, we are building the foundations for 20
|
|
|
32
32
|
|
|
33
33
|
## 6. Post-Quantum Cryptography (PQC)
|
|
34
34
|
- **Threat**: Quantum computers (2030+) will break RSA/ECC encryption.
|
|
35
|
-
- **Action**: Start adopting NIST-approved PQC algorithms (CRYSTALS-Kyber) for long-term data storage.
|
|
35
|
+
- **Action**: Start adopting NIST-approved PQC algorithms (ML-KEM (FIPS 203, formerly CRYSTALS-Kyber)) for long-term data storage.
|
|
@@ -44,11 +44,12 @@ of the collaboration are:
|
|
|
44
44
|
architect persona bounds what the agent is and is *not* to do.
|
|
45
45
|
- **Transparency** → observability is non-negotiable (every run traced; see the
|
|
46
46
|
Observability mandate in AGENTS.md §5 and CONSTITUTION Article VI).
|
|
47
|
-
- **Control** → HITL gates + autonomy
|
|
48
|
-
|
|
47
|
+
- **Control** → HITL gates + the autonomy posture (`GABBE_AUTONOMY = ask | auto | hybrid`,
|
|
48
|
+
default **hybrid**; see `clarify.skill` / `preflight.skill`) scale intervention
|
|
49
|
+
frequency to the autonomy the human has granted.
|
|
49
50
|
|
|
50
51
|
## Final-review checklist (apply at integrity-check / S08)
|
|
51
52
|
A change is only "done" when all three facets hold:
|
|
52
53
|
- [ ] **Purpose** — scope/non-goals are explicit; the work maps to a spec/requirement.
|
|
53
54
|
- [ ] **Transparency** — the run is traced and legible (decisions, tools, cost) — no black box.
|
|
54
|
-
- [ ] **Control** — the right HITL gates fired for the autonomy
|
|
55
|
+
- [ ] **Control** — the right HITL gates fired for the autonomy posture; high-stakes/irreversible actions were human-approved.
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
# The Undying Tech Stack: Legacy Systems in
|
|
1
|
+
# The Undying Tech Stack: Legacy Systems in 2026
|
|
2
2
|
|
|
3
3
|
Legacy systems are not "dead" code. They are "proven" code.
|
|
4
4
|
|
|
5
|
-
> **
|
|
5
|
+
> **Context**: As of 2026, a large share of the world's banking and payment transactions
|
|
6
|
+
> still touch a mainframe, and COBOL remains pervasive in core banking and ATM networks.
|
|
7
|
+
> The often-quoted "95% of ATM swipes run COBOL" figure traces to a 2017 Reuters report
|
|
8
|
+
> attributed to industry estimates and has not been rigorously verified — treat it as a
|
|
9
|
+
> widely-cited illustration of COBOL's footprint, not a precise measurement.
|
|
6
10
|
|
|
7
11
|
## 1. The Critical Stack
|
|
8
12
|
|
|
@@ -12,7 +16,7 @@ Legacy systems are not "dead" code. They are "proven" code.
|
|
|
12
16
|
- **Risk**: Talent shortage. The average COBOL dev is 55+ years old.
|
|
13
17
|
|
|
14
18
|
### Fortran (Formula Translation)
|
|
15
|
-
- **Why it survives**: Speed.
|
|
19
|
+
- **Why it survives**: Speed. For certain dense numerical/array workloads it can match or beat naively-written C/C++ — partly because Fortran's lack of pointer aliasing lets compilers optimize array loops more aggressively, and because of decades of highly-tuned numerical libraries (BLAS/LAPACK). With equivalent effort and modern compilers, C/C++ is competitive; the advantage is workload- and code-specific, not absolute.
|
|
16
20
|
- **Where lies**: Weather forecasting, Nuclear simulation, Aerospace (NASA/Boeing).
|
|
17
21
|
|
|
18
22
|
### Mainframe (IBM Z-Series)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Comprehensive Testing Strategy Guide (
|
|
1
|
+
# Comprehensive Testing Strategy Guide (2026)
|
|
2
2
|
|
|
3
3
|
Testing is not just about "finding bugs" — it's about **confidence at speed**. This guide outlines modern testing strategies for robust applications.
|
|
4
4
|
|
|
@@ -51,14 +51,16 @@ Verify the whole system as a user sees it.
|
|
|
51
51
|
### Level 5: Evaluation-Driven (for agentic / LLM work)
|
|
52
52
|
When the system *is* an agent (or uses one), correctness is probabilistic, so the
|
|
53
53
|
acceptance bar must be defined **before** the agent is built and must **co-evolve**
|
|
54
|
-
with it.
|
|
54
|
+
with it. This level is a pointer: the **authoritative eval taxonomy** (the Tier-1–Tier-4
|
|
55
|
+
Eval Pyramid) lives in [`evaluation-strategy.md`](evaluation-strategy.md); the points
|
|
56
|
+
below summarize how it plugs into the test strategy.
|
|
55
57
|
- **Evals before implementation**: write the success criteria / eval set at the spec stage (S01–S02), not after — they are the executable form of the spec (golden thread).
|
|
56
58
|
- **Component-level evals**: evaluate each persona/gate/sub-step on its own, not only end-to-end. One sub-agent's slightly-wrong output becomes the next one's hopelessly-wrong input, so end-to-end checks alone hide where it broke.
|
|
57
59
|
- **Regression evals**: keep a growing fixture set of past failures; re-run on every change (ties to `CONTINUITY.md` and `self-heal`).
|
|
58
60
|
- **Judge/verifier pass**: for high-stakes output, an independent verifier/judge persona scores against the rubric before human sign-off (see `coordination/persona-selector.skill` voting + `core/final-review.skill`).
|
|
59
61
|
- **Metric shift**: measure decision quality, cost-efficiency, and reliability — not lines of code.
|
|
60
62
|
|
|
61
|
-
## 2b. Beyond Examples: Advanced
|
|
63
|
+
## 2b. Beyond Examples: Advanced Testing Techniques (2026)
|
|
62
64
|
|
|
63
65
|
Example-based unit and integration tests only cover the cases a human imagined. Four
|
|
64
66
|
advanced tiers close the remaining gaps and now sit alongside the pyramid/trophy:
|
|
@@ -70,7 +70,7 @@ Checkpoint: sdlc-checkpoint.skill S01
|
|
|
70
70
|
Personas: prod-architect (lead), ops-security (threat review)
|
|
71
71
|
Tasks: prod-architect:
|
|
72
72
|
- Write PLAN.md using C4 model
|
|
73
|
-
- Define Error Handling Strategy (RFC
|
|
73
|
+
- Define Error Handling Strategy (RFC 9457 Problem Details) using error-handling-strategy.skill
|
|
74
74
|
- Create docs/architecture/C4_ARCHITECTURE.md
|
|
75
75
|
- Write ADRs for all major decisions → docs/architecture/decisions/
|
|
76
76
|
ops-security:
|
|
@@ -13,7 +13,7 @@ Never roll your own crypto or identity provider. Use established standards.
|
|
|
13
13
|
|
|
14
14
|
### JWT Best Practices
|
|
15
15
|
- **Algorithm**: Enforce `alg: RS256` (or EdDSA). NEVER allow `alg: none`.
|
|
16
|
-
- **Payload**: Never store PII or sensitive data in the JWT payload (it's
|
|
16
|
+
- **Payload**: Never store PII or sensitive data in the JWT payload (it's base64 encoded, not encrypted).
|
|
17
17
|
- **Validation**: Always validate `exp` (expiration), `iss` (issuer), and `aud` (audience).
|
|
18
18
|
|
|
19
19
|
## 2. Authorization (Access Control)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Guide: Cryptography & Secrets Management (
|
|
1
|
+
# Guide: Cryptography & Secrets Management (2026)
|
|
2
2
|
<!-- Encryption, Hashing, Key Management, TLS -->
|
|
3
3
|
|
|
4
4
|
---
|
|
@@ -14,7 +14,7 @@ All network communication must be encrypted.
|
|
|
14
14
|
Encrypt sensitive data before storing it in databases or file systems.
|
|
15
15
|
|
|
16
16
|
- **Symmetric Encryption**: Use **AES-256-GCM** or **ChaCha20-Poly1305**. Both provide authenticated encryption (detects tampering).
|
|
17
|
-
- **Asymmetric Encryption**:
|
|
17
|
+
- **Asymmetric Encryption**: For new RSA keys use **RSA-3072** or higher (RSA-2048 is the absolute minimum for legacy interop). For Elliptic Curve Cryptography, keep signatures and key exchange separate: use **Ed25519** for *digital signatures* and **X25519** for *key exchange / key agreement* — Ed25519 is a signature scheme only and must not be used for key exchange.
|
|
18
18
|
- **Database level**: Utilize provider-level Transparent Data Encryption (TDE) for full disk encryption, plus application-level encryption for highly sensitive column data (e.g., SSNs, medical data).
|
|
19
19
|
|
|
20
20
|
## 3. Hashing (Passwords & Integrity)
|
|
@@ -36,3 +36,9 @@ API keys, database credentials, and certificates are secrets.
|
|
|
36
36
|
## 5. Random Number Generation
|
|
37
37
|
- **CSPRNG**: Always use Cryptographically Secure Pseudo-Random Number Generators (e.g., `/dev/urandom`, `crypto.randomBytes()`, `secrets` module in Python) for tokens, keys, and session IDs.
|
|
38
38
|
- Never use standard `Math.random()` or `rand()` for security purposes.
|
|
39
|
+
|
|
40
|
+
## 6. Post-Quantum Readiness & Crypto-Agility
|
|
41
|
+
A sufficiently large quantum computer would break RSA and classical ECC ("harvest now, decrypt later" makes long-lived secrets a present-day concern).
|
|
42
|
+
|
|
43
|
+
- **Standardized PQC**: NIST has standardized **ML-KEM (FIPS 203, formerly CRYSTALS-Kyber)** for key encapsulation and **ML-DSA (FIPS 204, formerly CRYSTALS-Dilithium)** for signatures. Prefer **hybrid** schemes (classical + PQC) during the transition so security holds even if one primitive is broken.
|
|
44
|
+
- **Crypto-agility**: Design systems so algorithms, key sizes, and providers can be swapped without re-architecting. Reference algorithms by configurable identifier rather than hardcoding them, and version your ciphertext/key material so a future rotation to PQC is a configuration change, not a rewrite.
|
|
@@ -23,14 +23,14 @@ PII directly or indirectly identifies a human being (Name, Email, IP Address, Lo
|
|
|
23
23
|
|
|
24
24
|
- **Logging**: **NEVER log PII**. Configure loggers to scrub emails, passwords, SSNs, and tokens before they hit stdout or centralized logging (Datadog/Splunk).
|
|
25
25
|
- **Encryption**: Encrypt highly sensitive PII (SSN, medical status, precise location) at the application level before writing to the database.
|
|
26
|
-
- **Searchability**: Encrypted PII is hard to search. Consider "Blind Indexing" (storing a
|
|
26
|
+
- **Searchability**: Encrypted PII is hard to search. Consider "Blind Indexing" (storing a **keyed HMAC** — e.g., HMAC-SHA-256 with a secret key — of the data alongside the encrypted data) to allow equality searches without revealing the plaintext. Use a keyed HMAC rather than a plain (unkeyed) hash, so an attacker who dumps the index cannot brute-force low-entropy values (emails, SSNs) offline.
|
|
27
27
|
|
|
28
28
|
## 3. Data Subject Rights
|
|
29
29
|
Your architecture must support these rights programmatically:
|
|
30
30
|
|
|
31
31
|
- **Right to Access/Portability**: Users must be able to download their data in a machine-readable format (JSON, CSV).
|
|
32
32
|
- **Right to Erasure (Right to be Forgotten)**: Define a clear "Hard Delete" vs "Soft Delete" policy. When a user requests deletion, PII must be scrubbed from backups within the legal time frame (usually 30 days).
|
|
33
|
-
- *Pattern*: Instead of deleting the relational row (which breaks foreign keys), overwrite PII fields with nulls or random UUIDs, leaving the
|
|
33
|
+
- *Pattern*: Instead of deleting the relational row (which breaks foreign keys), overwrite PII fields with nulls or random UUIDs, leaving the de-identified usage data intact. Note: if a **stable** UUID still links the rows to a retained identity/history, the result is **pseudonymization** (still personal data under GDPR), not anonymization — true anonymization must sever any path back to the individual.
|
|
34
34
|
|
|
35
35
|
## 4. Anonymization & Pseudonymization
|
|
36
36
|
- **Anonymization**: Irreversible removal of PII. The data can no longer be linked to an individual. Useful for analytics.
|
|
@@ -26,7 +26,7 @@ Implement overlapping layers of security. If one fails, another catches the brea
|
|
|
26
26
|
2. **Network**: VPCs, private subnets, strict Security Groups / Network Policies.
|
|
27
27
|
3. **Application**: Input validation, parameterized queries, rate limiting.
|
|
28
28
|
4. **Data**: Field-level encryption, KMS, backups.
|
|
29
|
-
5. **Monitoring**:
|
|
29
|
+
5. **Monitoring**: Intrusion Detection Systems (IDS), audit logging, SIEM alerts.
|
|
30
30
|
|
|
31
31
|
## 4. Secure Development Lifecycle (SDLC)
|
|
32
32
|
Shift security to the "Left" (early in the process).
|
|
@@ -277,17 +277,6 @@ ln -sf /path/to/agents/skills/*/*.skill.md ~/.agent/skills/
|
|
|
277
277
|
| Skill | File | Context | Purpose |
|
|
278
278
|
|---|---|---|---|
|
|
279
279
|
| Active Inference | `brain/active-inference.skill.md` | high | Predictive error minimization loop |
|
|
280
|
-
|
|
281
|
-
### 10. AI & Swarms (`ai/`)
|
|
282
|
-
| Skill | File | Triggers | Purpose |
|
|
283
|
-
|---|---|---|---|
|
|
284
|
-
| A2UI Protocols | `ai/a2ui-protocols.skill.md` | a2ui, genui | Agent-to-UI |
|
|
285
|
-
| Actor Frameworks | `ai/actor-agent-frameworks.skill.md` | langgraph | Actor frameworks |
|
|
286
|
-
| Agent Comm | `ai/agent-communication.skill.md` | a2a | Agent-to-Agent |
|
|
287
|
-
| Agent UI | `ai/agent-ui.skill.md` | agent ui | Specialized UI |
|
|
288
|
-
| Beyond LLMs | `ai/beyond-llms.skill.md` | neuro-symbolic | Non-LLM techniques |
|
|
289
|
-
| Multi-Agent Sys | `ai/multi-agent-systems.skill.md` | mas, swarm | Orchestrate MAS |
|
|
290
|
-
| Auto Swarm Pat. | `ai/autonomous-swarm-patterns.skill.md` | swarm patterns | Self-organizing swarms |
|
|
291
280
|
| Cognitive Architectures | `brain/cognitive-architectures.skill.md` | ref | Cognitive Turing Machine theory |
|
|
292
281
|
| Consciousness Loop | `brain/consciousness-loop.skill.md` | high | OODA + Strange Loops |
|
|
293
282
|
| Cost-Benefit Router | `brain/cost-benefit-router.skill.md` | high | Local vs Remote model routing |
|
|
@@ -298,21 +287,32 @@ ln -sf /path/to/agents/skills/*/*.skill.md ~/.agent/skills/
|
|
|
298
287
|
| Neuroscience Foundations | `brain/neuroscience-foundations.skill.md` | ref | Cortico-Thalamic theory |
|
|
299
288
|
| Self Improvement | `brain/self-improvement.skill.md` | high | Recursive self-editing |
|
|
300
289
|
| Sensory Motor | `brain/sensory-motor.skill.md` | med | Embodied tool use |
|
|
301
|
-
| Sequential Thinking | `brain/sequential-thinking.skill.md` | think, reason |
|
|
290
|
+
| Sequential Thinking | `brain/sequential-thinking.skill.md` | think, reason | Step-by-step reasoning |
|
|
302
291
|
| Working Memory | `brain/working-memory.skill.md` | high | Session state management |
|
|
292
|
+
| Cognitive Testing | `brain/cognitive-testing.skill.md` | cognitive test, invariant, convergence, shadow test | Test cognitive loops by invariants |
|
|
293
|
+
|
|
294
|
+
### 10. AI & Swarms (`ai/`)
|
|
295
|
+
| Skill | File | Triggers | Purpose |
|
|
296
|
+
|---|---|---|---|
|
|
297
|
+
| A2UI Protocols | `ai/a2ui-protocols.skill.md` | a2ui, genui | Agent-to-UI |
|
|
298
|
+
| Actor Frameworks | `ai/actor-agent-frameworks.skill.md` | langgraph | Actor frameworks |
|
|
299
|
+
| Agent Comm | `ai/agent-communication.skill.md` | a2a | Agent-to-Agent |
|
|
300
|
+
| Agent UI | `ai/agent-ui.skill.md` | agent ui | Specialized UI |
|
|
301
|
+
| Beyond LLMs | `ai/beyond-llms.skill.md` | neuro-symbolic | Non-LLM techniques |
|
|
302
|
+
| Multi-Agent Sys | `ai/multi-agent-systems.skill.md` | mas, swarm | Orchestrate MAS |
|
|
303
|
+
| Auto Swarm Pat. | `ai/autonomous-swarm-patterns.skill.md` | swarm patterns | Self-organizing swarms |
|
|
303
304
|
| LLM-as-Judge | `ai/llm-as-judge.skill.md` | llm judge, rubric scoring, eval bias | Score outputs with an LLM judge |
|
|
304
305
|
| RAG Evaluation | `ai/rag-evaluation.skill.md` | rag eval, faithfulness, context precision | Reference-free RAG metrics |
|
|
305
|
-
| Cognitive Testing | `brain/cognitive-testing.skill.md` | cognitive test, invariant, convergence, shadow test | Test cognitive loops by invariants |
|
|
306
306
|
| Context Engineering | `ai/context-engineering.skill.md` | context window, compaction, retrieval, prompt caching | Write/Select/Compress/Isolate context |
|
|
307
307
|
| Reasoning Patterns | `ai/reasoning-patterns.skill.md` | chain of thought, tree of thoughts, react, self-consistency | Reasoning-technique selection by problem shape |
|
|
308
308
|
|
|
309
|
-
###
|
|
309
|
+
### 11. Activation Modes (`brain/`)
|
|
310
310
|
| Skill | File | Triggers | Context | Purpose |
|
|
311
311
|
|---|---|---|---|---|
|
|
312
312
|
| **Brain Mode** | `brain/brain-mode.skill.md` | brain activate, supermode | high | **Meta-Cognitive Orchestrator** (Active Inference + Routing) |
|
|
313
|
-
| Loki Mode | `brain/loki-mode.skill.md` | loki, swarm | high |
|
|
313
|
+
| Loki Mode | `brain/loki-mode.skill.md` | loki, swarm | high | 14-phase lifecycle orchestrator (10-phase core build loop S01–S10 + Day-0 S00 + Day-2 S11–S13) |
|
|
314
314
|
|
|
315
|
-
###
|
|
315
|
+
### 12. Industry Specifications (`industry/`)
|
|
316
316
|
| Skill | File | Triggers | Purpose |
|
|
317
317
|
|---|---|---|---|
|
|
318
318
|
| Healthcare FHIR | `industry/healthcare-fhir.skill.md` | fhir, hl7 | Clinical integration |
|
|
@@ -15,7 +15,7 @@ Standard agents are goal-directed (maximize reward); **Active Inference** agents
|
|
|
15
15
|
- **Goal:** not just to "win" but to understand and control.
|
|
16
16
|
- **Surprise:** the gap between *expectation* and *observation*.
|
|
17
17
|
|
|
18
|
-
> **Implementation note:** the production `gabbe/brain.py` uses epsilon-greedy gene selection plus a monotonic `success_rate` reward (effectively a bandit over prompt variants); the free-energy / active-inference framing here is conceptual, not implemented math.
|
|
18
|
+
> **Implementation note (conceptual framing, not implemented CLI math):** the production `gabbe/brain.py` uses epsilon-greedy gene selection plus a monotonic `success_rate` reward (effectively a bandit over prompt variants); the free-energy / active-inference framing here is conceptual, not implemented math. Use it to *shape agent instructions*, not as a literal solver — and never claim it "guarantees correctness." See `guides/ai/self-evolving-skills.md` for what actually runs.
|
|
19
19
|
|
|
20
20
|
## 2. The Feedback Loop
|
|
21
21
|
1. **Predict:** "Running `go test` will output PASS."
|
|
@@ -13,6 +13,12 @@ context_cost: high
|
|
|
13
13
|
> **Concept**: Applies Active Inference (Free Energy Principle) to Software Engineering.
|
|
14
14
|
> **Goal**: Minimize "Surprise" (Bugs, Delays, Costs) by continuously updating internal models and routing work intelligently.
|
|
15
15
|
|
|
16
|
+
> **Conceptual framing, not implemented CLI math:** the OODA loop, Active Inference,
|
|
17
|
+
> and Free-Energy / "minimize surprise" language here are a *framing* for how the agent
|
|
18
|
+
> should reason and self-adapt — they guide instructions, not a literal free-energy solver.
|
|
19
|
+
> See `guides/ai/self-evolving-skills.md` for what is actually implemented (heuristic gene
|
|
20
|
+
> selection / success-rate reward), and `brain/active-inference.skill` for the same caveat.
|
|
21
|
+
|
|
16
22
|
## Skill, Guide & MCP Selection Mandate
|
|
17
23
|
**CRITICAL**: Throughout the Cognitive Loop, the orchestrator must **always select (and ask the user to confirm/select) the best guides and skills** for the specific tasks, user queries, actions being performed, gate passing, or system workflows. Never default to generic logic if a tailored skill exists. Additionally, the orchestrator must proactively recommend enabling any missing but highly relevant **MCP servers** (universal or task-specific) to optimally execute the workload.
|
|
18
24
|
|
|
@@ -64,7 +70,7 @@ graph TD
|
|
|
64
70
|
2. **Decision**:
|
|
65
71
|
- **Strategy A (Quick Fix)**: Direct tool use (coding/edit).
|
|
66
72
|
- **Strategy B (Deep Think)**: `sequential-thinking` -> `plan` -> `execute`.
|
|
67
|
-
- **Strategy C (Full Swarm)**: Initialize `loki-mode` (S01-
|
|
73
|
+
- **Strategy C (Full Swarm)**: Initialize `loki-mode` (full S00–S13 lifecycle; 10-phase core build loop S01–S10 plus Day-0 S00 and Day-2 S11–S13).
|
|
68
74
|
|
|
69
75
|
### Phase B03: Execution & Monitoring (The "Watcher")
|
|
70
76
|
If delegating to `loki-mode` or `sub-agents`, Brain Mode remains active as a **Supervisor**:
|
|
@@ -103,7 +109,8 @@ Brain Mode treats `loki-mode` as a **Sub-Routine**.
|
|
|
103
109
|
|
|
104
110
|
If `loki` is running:
|
|
105
111
|
- `brain-mode` watches `agents/memory/PROJECT_STATE.md`.
|
|
106
|
-
- It performs "Meta-Checks" at every checkpoint
|
|
112
|
+
- It performs "Meta-Checks" at every checkpoint across the full S00–S13 lifecycle
|
|
113
|
+
(Day-0 S00, the S01–S10 core build loop, and Day-2 S11–S13) — not only the core loop.
|
|
107
114
|
|
|
108
115
|
## Security & Guardrails
|
|
109
116
|
|
|
@@ -15,8 +15,9 @@ context_cost: low
|
|
|
15
15
|
## Logic Flow
|
|
16
16
|
|
|
17
17
|
### Steps
|
|
18
|
-
## 1. Complexity Scoring (0
|
|
19
|
-
|
|
18
|
+
## 1. Complexity Scoring (0–10 conceptual band)
|
|
19
|
+
This 0–10 banding is an illustrative conceptual scale; the actual `gabbe route` CLI scores
|
|
20
|
+
**0–100** against a single threshold and returns one `LOCAL`/`REMOTE` verdict. Analyze the prompt/task:
|
|
20
21
|
- **0-3 (Low)**: Typos, simple regex, one-line fixes, known boilerplate.
|
|
21
22
|
- *Recommendation*: **LOCAL** (Llama-3-8b, Mistral, Grep/Sed).
|
|
22
23
|
- **4-7 (Medium)**: React components, API integration, unit tests, refactoring.
|
|
@@ -60,13 +61,24 @@ Analyze the prompt/task:
|
|
|
60
61
|
|
|
61
62
|
## Self-Adaptive Routing
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
**
|
|
65
|
-
|
|
64
|
+
> **Conceptual framing vs the actual CLI.** The implemented `gabbe route` command returns a
|
|
65
|
+
> **one-shot binary decision** (`LOCAL` / `REMOTE`) by scoring complexity on a **0–100** scale
|
|
66
|
+
> against a threshold, with a **PII/DLP override that forces `LOCAL`**. The richer behaviors
|
|
67
|
+
> described below — the multi-tier ladder, the **self-correction / escalation loop**, the
|
|
68
|
+
> per-task **heuristic updates**, and **autonomy-gating** (`ask`/`auto`/`hybrid`) — are
|
|
69
|
+
> *conceptual framing for how an agent should route work*, not features the one-shot CLI
|
|
70
|
+
> performs. Treat them as guidance for the orchestrator's own loop, and don't claim the router
|
|
71
|
+
> "guarantees" the optimal/cheapest path. See `guides/ai/self-evolving-skills.md`.
|
|
72
|
+
|
|
73
|
+
In GABBE the router is designed to behave self-adaptively end to end: it scores task **complexity**,
|
|
74
|
+
layers in **privacy** (a PII/DLP hit forces `LOCAL`, overriding any complexity score), and weighs
|
|
75
|
+
**context size** to pick the cheapest path that can still do the job. Conceptually it is gated by
|
|
66
76
|
autonomy level (`GABBE_AUTONOMY` = `ask` | `auto` | `hybrid`): `ask` confirms each route,
|
|
67
|
-
`auto` routes silently, `hybrid` auto-routes the safe cases and asks on the rest. The
|
|
68
|
-
|
|
69
|
-
remote model (re-checking privacy first) and updates its heuristics for next time
|
|
77
|
+
`auto` routes silently, `hybrid` auto-routes the safe cases and asks on the rest. The framing also
|
|
78
|
+
includes **self-correction** — when a `LOCAL` attempt fails, the orchestrator escalates up the tier
|
|
79
|
+
ladder to a remote model (re-checking privacy first) and updates its heuristics for next time —
|
|
80
|
+
though the bare `gabbe route` CLI returns only the single LOCAL/REMOTE verdict (the loop lives in
|
|
81
|
+
the calling agent).
|
|
70
82
|
|
|
71
83
|
## Self-Correction
|
|
72
84
|
If a routed task FAILS (e.g., Local model produces garbage):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: loki-mode
|
|
3
|
-
description: Master multi-agent swarm orchestration — coordinates personas across the 10-phase
|
|
3
|
+
description: Master multi-agent swarm orchestration — coordinates personas across the 14-phase lifecycle (10-phase core build loop S01–S10, plus Day-0 S00 and Day-2 S11–S13) with checkpoints, memory, and HITL gates.
|
|
4
4
|
triggers: [loki, swarm, orchestrate, big project, autonomous build, multi-agent, spawn, coordinate swarm]
|
|
5
5
|
tags: [brain]
|
|
6
6
|
core: true
|
|
@@ -47,10 +47,11 @@ sections below:
|
|
|
47
47
|
Before doing anything else (after preflight above):
|
|
48
48
|
|
|
49
49
|
```
|
|
50
|
-
1. Check: does agents/memory/PROJECT_STATE.md exist AND phase is a real
|
|
51
|
-
(i.e. NOT one of: absent, NOT_STARTED
|
|
50
|
+
1. Check: does agents/memory/PROJECT_STATE.md exist AND phase is a real lifecycle
|
|
51
|
+
phase S00–S13 (i.e. NOT one of: absent, NOT_STARTED)?
|
|
52
52
|
- YES → This is a RESUMED project → invoke session-resume.skill first
|
|
53
53
|
Load all memory (RESUME_POINTER first), then continue from the current phase
|
|
54
|
+
(S00 Day-0 strategy and S11–S13 Day-2 phases are real phases — resume into them)
|
|
54
55
|
- NO → This is a NEW project → proceed with INIT below
|
|
55
56
|
```
|
|
56
57
|
|
|
@@ -77,11 +78,12 @@ Before doing anything else (after preflight above):
|
|
|
77
78
|
|
|
78
79
|
---
|
|
79
80
|
|
|
80
|
-
## Orchestration Loop —
|
|
81
|
+
## Orchestration Loop — 14-Phase Lifecycle (S00–S13)
|
|
81
82
|
|
|
82
|
-
Run each phase in order; gate before advancing. **
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
Run each phase in order; gate before advancing. The lifecycle is **14 phases**: a 10-phase
|
|
84
|
+
**core** build loop (S01–S10) bracketed by Day-0 strategy (S00) and Day-2 operate/evolve/sunset
|
|
85
|
+
(S11–S13). **Full per-phase detail (personas, tasks, outputs, gates, checkpoints) lives in
|
|
86
|
+
`agents/guides/processes/loki-sdlc-phases.md`** — load it on demand when orchestrating.
|
|
85
87
|
|
|
86
88
|
| Phase | Persona(s) | Output | Gate |
|
|
87
89
|
|---|---|---|---|
|
|
@@ -137,6 +139,7 @@ On unexpected interruption (context limit, crash):
|
|
|
137
139
|
## Human-in-the-Loop Protocol
|
|
138
140
|
|
|
139
141
|
Loki Mode requires human approval at these gates (consistent with `sdlc-checkpoint.skill`):
|
|
142
|
+
- **S00**: Strategy & discovery GO/NO-GO (problem statement, opportunity) — hard stop before any build
|
|
140
143
|
- **S01**: Requirements approval (PRD.md) — hard stop
|
|
141
144
|
- **S02**: Architecture approval (PLAN.md + threat model) — hard stop
|
|
142
145
|
- **S07**: Security sign-off (SECURITY_REVIEW.md — accepted risks / no HIGH findings)
|
|
@@ -245,8 +248,8 @@ Current position: Phase S0X, Task T-NNN
|
|
|
245
248
|
|
|
246
249
|
### Steps
|
|
247
250
|
## 1. Skill Security (Loki Mode)
|
|
248
|
-
- **Swarm Blast Radius**: Because `loki-mode` orchestrates multiple autonomous personas concurrently, a compromised sub-agent can execute tasks rapidly without individual human oversight. Loki must enforce mathematically rigid boundaries for each persona: a `prod-pm` persona must
|
|
249
|
-
- **Gate Override Protection**: The
|
|
251
|
+
- **Swarm Blast Radius**: Because `loki-mode` orchestrates multiple autonomous personas concurrently, a compromised sub-agent can execute tasks rapidly without individual human oversight. Loki must enforce mathematically rigid boundaries for each persona: a `prod-pm` persona must physically lack the kernel-level permissions to execute code, and an `eng-qa` persona must lack permissions to deploy or merge to the `main` branch.
|
|
252
|
+
- **Gate Override Protection**: The 14-phase lifecycle contains mandatory "HUMAN APPROVAL REQUIRED" gates (S00 GO/NO-GO, S01, S02, S07, S08). Loki is strictly prohibited from autonomously advancing `PROJECT_STATE.md` to the next phase without cryptographically verifying a Human-In-The-Loop interaction. The LLM must not be allowed to "hallucinate" human approval based on implicit context.
|
|
250
253
|
|
|
251
254
|
### 2. System Integration Security
|
|
252
255
|
- **Check-Point Integrity**: Loki utilizes `sdlc-checkpoint.skill` to save state. If an attacker manipulates the filesystem to alter `SESSION_SNAPSHOT` or `CONTINUITY.md` between phases, Loki will reboot into a compromised state. The orchestrator must generate hashes of critical checkpoints and verify them upon resumption to prevent rollback or state-tampering attacks.
|
|
@@ -258,7 +261,7 @@ Current position: Phase S0X, Task T-NNN
|
|
|
258
261
|
|
|
259
262
|
### 4. Experimental CLI Integration & Swarm Containment
|
|
260
263
|
- **Optional Enhancement**: The `gabbe` CLI is strictly optional. Loki Mode can be operated entirely as a conceptual orchestration framework driven exclusively by an LLM reading this markdown file (e.g., inside Cursor, Claude Code, or Copilot).
|
|
261
|
-
- **Platform Control Limits**: If utilizing the experimental CLI, Swarm engineering runs using multiple sub-agents can exhaust LLM tokens exponentially. `loki-mode` should strictly be operated inside the boundaries of `gabbe serve-mcp` or `gabbe verify` gateways so all API calls adhere to the
|
|
264
|
+
- **Platform Control Limits**: If utilizing the experimental CLI, Swarm engineering runs using multiple sub-agents can exhaust LLM tokens exponentially. `loki-mode` should strictly be operated inside the boundaries of `gabbe serve-mcp` or `gabbe verify` gateways so all API calls adhere to the budgets laid out in `PLATFORM_CONTROLS.md`.
|
|
262
265
|
- **Enforced Determinism**: When using the CLI, Loki commits its entire SDLC transitions to the SQLite internal `project/state.db`. If any sub-agent violates the `PolicyEngine` (such as accessing restricted tools), the RunContext halts Swarm execution and generates a `pending_escalation` requiring human remediation.
|
|
263
266
|
|
|
264
267
|
### 5. Agent-Only (CLI-Less) Execution Tactics
|
|
@@ -24,7 +24,7 @@ Solve complex problems by breaking them down into small, logical steps. This pre
|
|
|
24
24
|
- Validating each step before moving to the next.
|
|
25
25
|
- If a step fails or reveals new info, update the Plan.
|
|
26
26
|
|
|
27
|
-
4. **Review &
|
|
27
|
+
4. **Review & Synthesize**
|
|
28
28
|
- Review your chain of reasoning. Does the conclusion logically follow?
|
|
29
29
|
- Formulate the final answer based on the verified steps.
|
|
30
30
|
|