fix(quentin): add Solution/Demo to schema-init; correct aws_sa scope

Bring neo4j-schema-init.py in line with the v2.4.0 schema doc: add Solution
and Demo node types (constraints + name/status indexes), 79 -> 81 node types,
update test guards and the dry-run constant. Quentin's Solution/Demo writes
now get id-uniqueness constraints instead of allowing duplicates.

Correct aws_sa's scope framing: it has no host or environment, so a demo-only
boundary on it asserted access it doesn't have. Remove the demo-only claim from
aws-sa.md (keep the subagent-relationship framing); soften quentin.md so the
demo boundary is owned by Quentin (his Ergon host), not a property of aws_sa.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-22 12:09:42 -04:00
parent cd35289671
commit a8143827bd
3 changed files with 33 additions and 16 deletions

View File

@@ -212,7 +212,7 @@ Do not assume the current date — conversations span days. Call the time tool b
You drive two subagents. They are called as tools, not addressed as collaborators, and they don't own graph nodes — you persist anything worth keeping.
- **aws_sa** — your exclusive AWS architecture subagent. Delegate when a solution needs AWS architecture depth: service selection, network topology, Well-Architected trade-offs, multi-AZ/region considerations, or a current AWS pricing/availability answer. Its distinctive output is **SVG architecture diagrams** (explicit VPC/subnet/AZ/region grouping, labelled data-flow arrows, AWS conventions). aws_sa is **demo-scoped** like you. Do **not** delegate implementation (Terraform/CDK/CloudFormation — that's Harper/Scotty), non-AWS cloud, or obvious service picks where the design doesn't need Well-Architected discipline. Persist its decisions onto the relevant `Solution`.
- **aws_sa** — your exclusive AWS architecture subagent. Delegate when a solution needs AWS architecture depth: service selection, network topology, Well-Architected trade-offs, multi-AZ/region considerations, or a current AWS pricing/availability answer. Its distinctive output is **SVG architecture diagrams** (explicit VPC/subnet/AZ/region grouping, labelled data-flow arrows, AWS conventions). aws_sa designs to whatever scope your task sets — for a demo, brief it for demo-scale; the demo boundary is yours (your host, your ownership), not a property of aws_sa. Do **not** delegate implementation (Terraform/CDK/CloudFormation — that's Harper/Scotty), non-AWS cloud, or obvious service picks where the design doesn't need Well-Architected discipline. Persist its decisions onto the relevant `Solution`.
- **tech_research** — technical investigation: library/framework/API comparisons, documentation, real-world code examples. Checks Context7 → GitHub → Argos and returns structured analysis with cited recommendations. Delegate for non-AWS technical depth feeding a demo or design. Use **Argos directly** for quick tactical checks.
---

View File

@@ -67,7 +67,7 @@ Before delivering a diagram, verify:
## Boundaries
- **Demo environments only.** You operate in demo environments exclusively — demo-scale designs, no production accounts, data, or hardening. You are Quentin's subagent; production architecture, capacity, failover, and DR design route to Scotty (via Quentin), not to you.
- **You are Quentin's subagent.** Quentin calls you with a task and a scope; you design to that scope (for a demo, demo-scale — Quentin sets that). Production architecture, capacity, failover, and DR design route to Scotty (via Quentin), not to you. You don't message peers or own graph nodes — return your work to Quentin.
- **You design, you don't build.** No CloudFormation, CDK, Terraform, or deployment scripts. If asked, explain that implementation is outside your scope and should be handed to the appropriate engineering assistant.
- **Stay current.** Use the knowledge and documentation servers rather than relying on potentially outdated training data. AWS evolves fast.
- **Flag uncertainty.** If a service or feature is too new for your tools to have data on, say so and suggest where to verify.

View File

@@ -13,13 +13,14 @@ Personal Team (Iolaus):
Work Team (Mentor):
Alan (Strategy), Ann (Marketing), Jeffrey (Sales),
Jarvis (Execution), AWS SA (Architecture)
Jarvis (Execution), Quentin (Solution Architecture)
Subagent: AWS SA (Quentin's AWS architecture subagent — no node ownership)
Engineering Team (Kottos):
Scotty (Infrastructure), Harper (Prototyping)
Schema Reference:
docs/neo4j-unified-schema.md (v2.3.0)
docs/neo4j-unified-schema.md (v2.4.0)
Requirements:
pip install neo4j
@@ -75,7 +76,7 @@ class LifeGraphSchema:
"""
Create uniqueness constraints on key node properties.
This ensures data integrity and creates indexes automatically.
All 79 node types get an id uniqueness constraint.
All 81 node types get an id uniqueness constraint.
"""
constraints = [
# ── Universal nodes ──────────────────────────────────────
@@ -184,6 +185,10 @@ class LifeGraphSchema:
"CREATE CONSTRAINT meeting_id IF NOT EXISTS FOR (n:Meeting) REQUIRE n.id IS UNIQUE",
"CREATE CONSTRAINT note_id IF NOT EXISTS FOR (n:Note) REQUIRE n.id IS UNIQUE",
"CREATE CONSTRAINT decision_id IF NOT EXISTS FOR (n:Decision) REQUIRE n.id IS UNIQUE",
# ── Work: Solution Architecture (Quentin) ────────────────
"CREATE CONSTRAINT solution_id IF NOT EXISTS FOR (n:Solution) REQUIRE n.id IS UNIQUE",
"CREATE CONSTRAINT demo_id IF NOT EXISTS FOR (n:Demo) REQUIRE n.id IS UNIQUE",
# ── Engineering: Scotty ──────────────────────────────────
"CREATE CONSTRAINT infrastructure_id IF NOT EXISTS FOR (n:Infrastructure) REQUIRE n.id IS UNIQUE",
@@ -240,6 +245,8 @@ class LifeGraphSchema:
"CREATE INDEX skill_name IF NOT EXISTS FOR (n:Skill) ON (n.name)",
"CREATE INDEX task_title IF NOT EXISTS FOR (n:Task) ON (n.title)",
"CREATE INDEX meeting_title IF NOT EXISTS FOR (n:Meeting) ON (n.title)",
"CREATE INDEX solution_name IF NOT EXISTS FOR (n:Solution) ON (n.name)",
"CREATE INDEX demo_name IF NOT EXISTS FOR (n:Demo) ON (n.name)",
"CREATE INDEX infrastructure_name IF NOT EXISTS FOR (n:Infrastructure) ON (n.name)",
"CREATE INDEX prototype_name IF NOT EXISTS FOR (n:Prototype) ON (n.name)",
"CREATE INDEX investment_ticker IF NOT EXISTS FOR (n:Investment) ON (n.ticker)",
@@ -291,6 +298,8 @@ class LifeGraphSchema:
"CREATE INDEX opportunity_status IF NOT EXISTS FOR (n:Opportunity) ON (n.status)",
"CREATE INDEX proposal_status IF NOT EXISTS FOR (n:Proposal) ON (n.status)",
"CREATE INDEX project_status IF NOT EXISTS FOR (n:Project) ON (n.status)",
"CREATE INDEX solution_status IF NOT EXISTS FOR (n:Solution) ON (n.status)",
"CREATE INDEX demo_status IF NOT EXISTS FOR (n:Demo) ON (n.status)",
"CREATE INDEX task_status IF NOT EXISTS FOR (n:Task) ON (n.status)",
"CREATE INDEX task_priority IF NOT EXISTS FOR (n:Task) ON (n.priority)",
"CREATE INDEX content_status IF NOT EXISTS FOR (n:Content) ON (n.status)",
@@ -465,10 +474,17 @@ class LifeGraphSchema:
("Constraint: Communication",
"SHOW CONSTRAINTS WHERE name = 'communication_id'",
lambda r: len(list(r)) == 1),
# Total constraint count (79 node types as of v2.3.0)
("Total constraints >= 79",
# Quentin sample (v2.4.0)
("Constraint: Solution",
"SHOW CONSTRAINTS WHERE name = 'solution_id'",
lambda r: len(list(r)) == 1),
("Constraint: Demo",
"SHOW CONSTRAINTS WHERE name = 'demo_id'",
lambda r: len(list(r)) == 1),
# Total constraint count (81 node types as of v2.4.0)
("Total constraints >= 81",
"SHOW CONSTRAINTS",
lambda r: len(list(r)) >= 79),
lambda r: len(list(r)) >= 81),
]
if include_schema_tests:
@@ -778,14 +794,15 @@ Alan (Strategy) Client, Vendor, Competitor, MarketTrend, Technology, Decisio
Ann (Marketing) Content, Publication, Topic, Event (domain='work')
Jeffrey (Sales) Contact (domain='work'), Opportunity, Proposal, Meeting
Jarvis (Execution) Task (domain='work'), Meeting, Note, Decision, Project
AWS SA (Architecture) No domain ownership — writes Note (messages) only
Quentin (Solution Architecture) Solution, Demo
Subagent: AWS SA — Quentin's AWS architecture subagent, no domain ownership
ENGINEERING TEAM (Kottos):
────────────────────────────────────────────────────────────────
Scotty (Infra) Infrastructure, Incident
Harper (Hacking) Prototype, Experiment
TOTAL: 79 node types, 16 assistants. All node types have id uniqueness
TOTAL: 81 node types, 16 assistants. All node types have id uniqueness
constraints. Contact/Event/Task are Universal with a `domain` field
('personal' or 'work') disambiguating Shawn vs. Jarvis/Jeffrey ownership.
@@ -800,7 +817,7 @@ Project -[GENERATES_REVENUE]-> Account (Work ↔ Personal)
Training -[BUILDS]-> Skill (Personal ↔ Work)
Communication -[WITH]-> Contact (Shawn: personal interaction history)
Full schema: docs/neo4j-unified-schema.md (v2.3.0)
Full schema: docs/neo4j-unified-schema.md (v2.4.0)
════════════════════════════════════════════════════════════════
"""
print(schema_doc)
@@ -810,8 +827,8 @@ Full schema: docs/neo4j-unified-schema.md (v2.3.0)
"""
Print what a full init run WOULD create, without writing anything.
Compares the live database's current state to the v2.3.0 schema spec
(79 constraints, all indexes, 14 sample nodes, 7 sample rels). For
Compares the live database's current state to the v2.4.0 schema spec
(81 constraints, all indexes, 14 sample nodes, 7 sample rels). For
each category, reports: what already exists, what's missing, and
what would be added on a full run.
@@ -819,8 +836,8 @@ Full schema: docs/neo4j-unified-schema.md (v2.3.0)
queries against the live DB but does not modify any data.
"""
# Known totals from this script's create_* methods. Kept in sync with
# the v2.3.0 schema doc; verified by the unit tests in run_tests().
EXPECTED_CONSTRAINTS = 79
# the v2.4.0 schema doc; verified by the unit tests in run_tests().
EXPECTED_CONSTRAINTS = 81
EXPECTED_SAMPLE_NODES = 14
EXPECTED_SAMPLE_RELS = 7
@@ -1136,7 +1153,7 @@ def main():
schema.document_schema()
# Create constraints (includes automatic indexes)
logger.info("Creating constraints (79 node types)...")
logger.info("Creating constraints (81 node types)...")
schema.create_constraints()
# Create additional indexes