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:
@@ -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.
|
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.
|
- **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.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ Before delivering a diagram, verify:
|
|||||||
|
|
||||||
## Boundaries
|
## 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.
|
- **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.
|
- **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.
|
- **Flag uncertainty.** If a service or feature is too new for your tools to have data on, say so and suggest where to verify.
|
||||||
|
|||||||
@@ -13,13 +13,14 @@ Personal Team (Iolaus):
|
|||||||
|
|
||||||
Work Team (Mentor):
|
Work Team (Mentor):
|
||||||
Alan (Strategy), Ann (Marketing), Jeffrey (Sales),
|
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):
|
Engineering Team (Kottos):
|
||||||
Scotty (Infrastructure), Harper (Prototyping)
|
Scotty (Infrastructure), Harper (Prototyping)
|
||||||
|
|
||||||
Schema Reference:
|
Schema Reference:
|
||||||
docs/neo4j-unified-schema.md (v2.3.0)
|
docs/neo4j-unified-schema.md (v2.4.0)
|
||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
pip install neo4j
|
pip install neo4j
|
||||||
@@ -75,7 +76,7 @@ class LifeGraphSchema:
|
|||||||
"""
|
"""
|
||||||
Create uniqueness constraints on key node properties.
|
Create uniqueness constraints on key node properties.
|
||||||
This ensures data integrity and creates indexes automatically.
|
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 = [
|
constraints = [
|
||||||
# ── Universal nodes ──────────────────────────────────────
|
# ── 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 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 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",
|
"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 ──────────────────────────────────
|
# ── Engineering: Scotty ──────────────────────────────────
|
||||||
"CREATE CONSTRAINT infrastructure_id IF NOT EXISTS FOR (n:Infrastructure) REQUIRE n.id IS UNIQUE",
|
"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 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 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 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 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 prototype_name IF NOT EXISTS FOR (n:Prototype) ON (n.name)",
|
||||||
"CREATE INDEX investment_ticker IF NOT EXISTS FOR (n:Investment) ON (n.ticker)",
|
"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 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 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 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_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 task_priority IF NOT EXISTS FOR (n:Task) ON (n.priority)",
|
||||||
"CREATE INDEX content_status IF NOT EXISTS FOR (n:Content) ON (n.status)",
|
"CREATE INDEX content_status IF NOT EXISTS FOR (n:Content) ON (n.status)",
|
||||||
@@ -465,10 +474,17 @@ class LifeGraphSchema:
|
|||||||
("Constraint: Communication",
|
("Constraint: Communication",
|
||||||
"SHOW CONSTRAINTS WHERE name = 'communication_id'",
|
"SHOW CONSTRAINTS WHERE name = 'communication_id'",
|
||||||
lambda r: len(list(r)) == 1),
|
lambda r: len(list(r)) == 1),
|
||||||
# Total constraint count (79 node types as of v2.3.0)
|
# Quentin sample (v2.4.0)
|
||||||
("Total constraints >= 79",
|
("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",
|
"SHOW CONSTRAINTS",
|
||||||
lambda r: len(list(r)) >= 79),
|
lambda r: len(list(r)) >= 81),
|
||||||
]
|
]
|
||||||
|
|
||||||
if include_schema_tests:
|
if include_schema_tests:
|
||||||
@@ -778,14 +794,15 @@ Alan (Strategy) Client, Vendor, Competitor, MarketTrend, Technology, Decisio
|
|||||||
Ann (Marketing) Content, Publication, Topic, Event (domain='work')
|
Ann (Marketing) Content, Publication, Topic, Event (domain='work')
|
||||||
Jeffrey (Sales) Contact (domain='work'), Opportunity, Proposal, Meeting
|
Jeffrey (Sales) Contact (domain='work'), Opportunity, Proposal, Meeting
|
||||||
Jarvis (Execution) Task (domain='work'), Meeting, Note, Decision, Project
|
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):
|
ENGINEERING TEAM (Kottos):
|
||||||
────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────
|
||||||
Scotty (Infra) Infrastructure, Incident
|
Scotty (Infra) Infrastructure, Incident
|
||||||
Harper (Hacking) Prototype, Experiment
|
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
|
constraints. Contact/Event/Task are Universal with a `domain` field
|
||||||
('personal' or 'work') disambiguating Shawn vs. Jarvis/Jeffrey ownership.
|
('personal' or 'work') disambiguating Shawn vs. Jarvis/Jeffrey ownership.
|
||||||
|
|
||||||
@@ -800,7 +817,7 @@ Project -[GENERATES_REVENUE]-> Account (Work ↔ Personal)
|
|||||||
Training -[BUILDS]-> Skill (Personal ↔ Work)
|
Training -[BUILDS]-> Skill (Personal ↔ Work)
|
||||||
Communication -[WITH]-> Contact (Shawn: personal interaction history)
|
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)
|
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.
|
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
|
Compares the live database's current state to the v2.4.0 schema spec
|
||||||
(79 constraints, all indexes, 14 sample nodes, 7 sample rels). For
|
(81 constraints, all indexes, 14 sample nodes, 7 sample rels). For
|
||||||
each category, reports: what already exists, what's missing, and
|
each category, reports: what already exists, what's missing, and
|
||||||
what would be added on a full run.
|
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.
|
queries against the live DB but does not modify any data.
|
||||||
"""
|
"""
|
||||||
# Known totals from this script's create_* methods. Kept in sync with
|
# 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().
|
# the v2.4.0 schema doc; verified by the unit tests in run_tests().
|
||||||
EXPECTED_CONSTRAINTS = 79
|
EXPECTED_CONSTRAINTS = 81
|
||||||
EXPECTED_SAMPLE_NODES = 14
|
EXPECTED_SAMPLE_NODES = 14
|
||||||
EXPECTED_SAMPLE_RELS = 7
|
EXPECTED_SAMPLE_RELS = 7
|
||||||
|
|
||||||
@@ -1136,7 +1153,7 @@ def main():
|
|||||||
schema.document_schema()
|
schema.document_schema()
|
||||||
|
|
||||||
# Create constraints (includes automatic indexes)
|
# Create constraints (includes automatic indexes)
|
||||||
logger.info("Creating constraints (79 node types)...")
|
logger.info("Creating constraints (81 node types)...")
|
||||||
schema.create_constraints()
|
schema.create_constraints()
|
||||||
|
|
||||||
# Create additional indexes
|
# Create additional indexes
|
||||||
|
|||||||
Reference in New Issue
Block a user