ANNEX D · P-01 · NEOCOREPeter BardenhagenOnline Profile
Available · Brisbane / Remote
P-01Neocortex · The AI BrainPersonal R&D · Brisbane, Australia

Enterprise architecture · Agentic AI · Product engineering

I built the AI Brain I couldn't buy.

I architected and developed Neocortex at home because I couldn't find an off-the-shelf solution that brought together the capabilities I wanted: a connected Second Brain, governed agentic AI, enterprise integration, autonomous software delivery and a human-controlled operating layer.

This began as a practical architecture problem, not an attempt to add a chatbot to a dashboard. I wanted one coherent system that could understand context across work and technology, coordinate specialist AI workers, use real tools, carry work through to verifiable outcomes and remain accountable to a human operator. Existing products solved individual parts of that problem; I wanted the architecture and control plane that connected them.

Neocortex became the reference implementation: a working personal platform and a proving ground for enterprise architecture decisions. It is developed and operated from my home environment, with cloud services and registered local execution hosts. It is not represented as a production deployment for an external client.

Neocortex product overview ↗ · Neocortex source repository ↗

P-02Architecture at a glanceC4 · logical views

The architecture separates experience, control, execution and data planes. The control plane resolves identity and context, plans work, applies policy and records evidence. The execution plane runs bounded agents and tools. The data plane retains canonical relational state and source artefacts, while vector and graph structures provide derived retrieval views.

These are logical C4 models, not a claim that every box is a separate deployed service. Solid components represent platform capabilities; proposed extensions are called out in the text. Tenant scope and policy are enforced server-side.

FIG. P-01.1C4 Level 1 · System contextInteractive

Rendering diagram…

People, Neocortex, connected customer systems and replaceable external providers.

FIG. P-01.2C4 Level 2 · Container viewInteractive

Rendering diagram…

Experience, core control plane, execution runtimes and data boundaries.

FIG. P-01.3C4 Level 3 · Governed task componentsInteractive

Rendering diagram…

Context resolution and policy evaluation precede dispatch; verification and evidence follow execution.

FIG. P-01.4Deployment view · Home-built and cloud-connected topologyInteractive

Rendering diagram…

Cloud application and data services connect to authenticated local execution hosts and external providers. This is a reference topology, not a high-availability or security certification.

FIG. P-01.5Sequence · A governed agent taskInteractive

Rendering diagram…

A human request becomes a scoped, policy-checked, verifiable workflow with recorded evidence.

P-03Architecture domainsCapability map

Neocortex is organised around stable Core primitives and independently evolving capability domains. The maturity labels below deliberately separate working foundations from staged architecture and roadmap items.

01 · Identity, tenancy and access

User, organisation, project, environment, agent and device identities; membership, roles, permissions, provider-neutral identity adapters and tenant-scoped data access.

Implementation position: Foundation implemented; multi-tenant maturity continues to evolve.

02 · AI Gateway and model routing

Provider abstraction, capability-aware model selection, budgets, limits, fallback eligibility and a single governed model boundary.

Implementation position: Repository implementation includes the canonical AI router; policy and provider coverage evolve.

03 · Agent runtime and Personas

Agents are bounded digital workers with purpose, owner, context, skills, tools, autonomy and trust policy. Specialist workers can collaborate under Conductor.

Implementation position: Agent registry, runs, decisions and multi-agent workflows exist; per-agent policy granularity is still being completed.

04 · Conductor and orchestration

Human-facing orchestration, task lifecycle, workflow state, scheduling, concurrency, dispatch, approvals and recovery.

Implementation position: Existing Conductor, task and agent execution capabilities; broader durable execution contracts are being standardised.

05 · Second Brain and Atlas

Knowledge ingestion, source references, semantic retrieval and a typed entity graph connecting notes, people, organisations, repositories, tools and decisions.

Implementation position: Second Brain foundation exists. Atlas graph is an accepted staged architecture; distinguish delivered phases from planned connectors and AI graph features.

06 · Integration and MCP federation

Native tools, external MCP discovery/dispatch, API/webhook adapters, OAuth and connected-app integrations behind scoped contracts.

Implementation position: Unified MCP endpoint and integration registry are present; persisted source configuration and full scope separation are staged.

07 · Device, Terminal and execution fabric

Registered hosts, signed heartbeats, authenticated host channels, local terminal sessions, isolated workspaces and capability-aware job routing.

Implementation position: Local Dev Manager and Terminal are implemented surfaces; expanded host/runtime federation continues.

08 · Dev Studio, Coder and DevOps

Repository-aware development projects, branches, pull requests, CI, build/test, preview deployments, releases and rollback evidence.

Implementation position: Working platform surfaces and repository workflows; capability product boundaries are evolving.

09 · Trust Fabric and SecOps

Deterministic tool policy, risk tiers, allow/approval/deny decisions, security posture, dependency and AI-boundary checks, findings and evidence.

Implementation position: Tool-dispatch enforcement is implemented. Per-agent data-class policies and quarantine are future work.

10 · Data governance and intelligence

Data inventory, classification, lineage, ownership, retention, access reviews, residency and policy at data movement boundaries.

Implementation position: Partial foundation only. Unified catalogue, labels, policy enforcement, access reviews, retention and evidence export remain staged.

11 · Evidence, telemetry and quality

Brain Activity, audit trail, run outcomes, health, test evidence, release gates, performance and privacy-safe traces.

Implementation position: Activity/audit and health foundations exist; comprehensive telemetry and quality control planes continue to mature.

12 · Business capability and Q2C

Quotes, agreements, rate cards, client activities, invoices, reconciliation and commercial evidence.

Implementation position: Existing business workflows map to the Q2C capability; productisation is ongoing.

13 · Platform control plane and extensibility

Capability registry, version compatibility, configuration boundaries, integration catalogue, release channels and independently replaceable adapters.

Implementation position: Architecture direction established; complete lifecycle and customer rollout control plane is roadmap.

P-04Agentic AI design patternsApplied patterns

The design avoids the “one powerful agent with unrestricted tools” model. Work is decomposed into explicit tasks, assigned to bounded capabilities and evaluated against acceptance criteria. The model can recommend; deterministic platform policy decides whether an action may run.

01 · Planner / executor / verifier

Conductor decomposes intent, bounded workers execute, and an independent verifier checks acceptance criteria. The executor does not mark its own work as proven.

02 · Capability-based routing

Resolve hard eligibility first (policy, provider availability, modality, region, budget and capability), then rank eligible models or runtimes.

03 · MCP tool boundary and federation

Native and external tools are composed through a unified MCP surface; discovery is separate from authorisation and execution.

04 · Human-in-the-loop approvals

Consequential actions pause for an approval bound to the exact action, payload, actor and expiry.

05 · Durable workflows and checkpoints

Persist task state before dispatch; resume from checkpoints, use bounded retries and record safe references rather than credentials.

06 · Saga and compensating actions

Multi-system workflows make compensations explicit; they do not assume that a remote side effect can be rolled back.

07 · At-least-once delivery with idempotency

Use durable events, deduplication and reconciliation rather than claiming impossible end-to-end exactly-once delivery.

08 · Bulkheads, backpressure and circuit breakers

Isolate workloads and tenants, constrain concurrency, and contain provider or worker failures.

09 · Lease and fencing-token ownership

Prevent stale workers from committing after a lease has expired or another worker has taken ownership.

10 · Graph-based context and provenance

Relate notes, people, projects, repositories, tools and decisions; check source ACLs during retrieval and traversal.

11 · Strangler adapters and provider neutrality

Replace models, connectors and execution providers behind contracts without rewriting domain workflows.

12 · Selective event/evidence journal

Record consequential lifecycle events and trace context without turning every mutable domain into an event-sourced system.

Anti-patterns deliberately avoided

  • God agents, unbounded delegation and unbounded fan-out.
  • Chat transcripts used as the system of record.
  • Model-generated permissions or tool discovery treated as authorisation.
  • Blind provider fallback that ignores residency or data classification.
  • Infinite retries, long-lived worker credentials and false exactly-once guarantees.
  • Agent self-reported success without independent verification.
P-05Extensions, frameworks and technologyComposable stack

Core platform and application

Next.js 16, React 19, TypeScript / JavaScript, Node.js, Tailwind CSS 4, Supabase and PostgreSQL, deployed through Vercel. The platform uses a modular application architecture and stable API contracts rather than requiring every capability to become a microservice.

AI, agents and context

Provider-neutral model routing; OpenAI and other model-provider integrations; LangChain components where useful; MCP for tool and context exchange; A2A patterns for agent collaboration; agent Personas, skills and capability registries; retrieval-augmented generation and vector retrieval; Atlas graph relationships for structured knowledge context.

Integration and extensibility

Unified Neocortex MCP composition, Composio-connected applications, OAuth and provider-native integrations, REST APIs, webhooks, GitHub integration, Microsoft 365 connectivity and replaceable connector adapters. Integration ownership and credential scope are treated as separate concerns.

Data and infrastructure

Supabase PostgreSQL is the canonical relational store. Document/object storage, vector indexes and Atlas graph projections serve distinct retrieval and content purposes. Local development and execution are supported through registered host infrastructure, including PB-LEGION and SVR01, with authenticated host channels rather than public shell exposure.

Developer experience and quality

Dev Studio, Dev Projects, Coder workspaces, Terminal, Local Dev Manager, GitHub branches and pull requests, CI/CD, Playwright, Vitest, Storybook, accessibility checks, visual regression and build/type checks. Observability and security tools are adapters; the platform owns the evidence and policy contracts.

Design system

Shared design tokens, reusable components, responsive dashboard and PWA surfaces, Storybook and a documented solution-design viewer. C4 and sequence diagrams are rendered as interactive, zoomable figures so architecture can be inspected on desktop and mobile.

Stack principle: choose frameworks to solve a defined capability need, keep provider-specific details behind adapters, and avoid making optional extensions hard dependencies of Core.

P-06Trust centre · Data governance and internal controlsControls and evidence

Trust is an architectural control plane, not a prompt instruction or a model setting. Neocortex applies deterministic checks at identity, retrieval, tool dispatch, data movement and execution boundaries. The marketing Trust Centre and solution-design narrative should be read alongside the implementation status below: controls are not described as certified, universally enforced or complete unless the repository supports that claim.

Implemented foundations

  • Trust Fabric at tool dispatch: model-originated tool calls from AI Chat, external MCP endpoints and platform agents pass through the policy guard. The policy engine classifies risk and returns allow, require approval or deny. Decisions are recorded in Brain Activity with risk tier and trust decision.
  • Human approval for consequential actions: high-impact writes and platform configuration changes are gated; client portal access is read-only; operator access is separately trusted and recorded.
  • Tenant and organisation scoping: organisation-scoped records and access checks are part of the current foundation. Identity, agent identity and device identity are distinct architecture concerns.
  • Secret handling: secrets are resolved through the Vault or scoped provider references; they must not be exposed in prompts, graph payloads, logs, tool results or topology metadata.
  • Audit and activity: agent runs, decisions and activity evidence provide a basis for traceability and review.
  • Application security: cookie-authenticated mutation routes have CSRF protections through the shared security helpers; upload routes are wired to malware scanning controls, with the live state dependent on ClamAV configuration.
  • Health and availability visibility: health endpoints and telemetry report measured state. A 99% availability figure is a target, not a guarantee or independently attested SLA.

Governance model

  • Data map: catalogue data stores, integrations, AI providers, reads, writes and scopes.
  • Classification: Public, Internal, Confidential and Restricted labels, with data-type tags such as personal, financial, client-confidential and credentials.
  • Policy at movement boundaries: constrain external model use, residency, export and approval according to data classification and tenant policy.
  • Access reviews: review human, agent-key and integration access, scopes and last-used evidence.
  • Lifecycle: retention, legal hold, soft delete and audited hard deletion.
  • Evidence: record policy/label changes, access and AI-bound data flows, with exportable control evidence.

Current maturity: unified data governance is accepted as a staged programme and remains partially implemented. Existing foundations include org scoping, soft delete/recycle bin, activity and audit trails, outbound approval gates, secret-handling rules, an integration registry, SecOps runner and health dashboard. The unified data map, classification labels, complete policy engine, access reviews, retention rules and governance evidence export must not be represented as shipped until each slice is live and verified.

Trust and security boundaries

  • Tool discovery does not grant execution permission; policy is evaluated at dispatch.
  • Tenant context is derived from authenticated server-side identity, not model-supplied arguments.
  • Unknown or untrusted content retrieved from pages and documents is data, never executable instruction.
  • Provider fallback is subject to hard policy eligibility; no blind fallback for restricted data.
  • Production writes, deployments and destructive actions require explicit policy and approval.
  • Local terminal access uses registered, authenticated hosts; no arbitrary public shell endpoint.
  • WAF/DMZ protection is an infrastructure configuration responsibility, not an application feature. Telemetry detects edge headers but does not certify a WAF.

Related source decisions: Master Architecture, Security Controls, ADR-018 · Unified Data Governance, ADR-033 · Atlas and ADR-034 · Second Brain Infrastructure Plane.

P-07Ways of working · Architecting and building at homeOperating model

The working model combines enterprise architecture discipline with hands-on product engineering. I work from a real backlog and source repository, use architecture decisions to make trade-offs explicit, and evolve the implementation in small, testable increments.

  1. Discover the problem: define the user outcome, constraints, existing systems, risks and success measures.
  2. Model before building: map capabilities, context, data flows, trust boundaries and C4 views; record significant decisions as ADRs.
  3. Plan the work: break outcomes into issues, acceptance criteria, dependencies and bounded tasks.
  4. Delegate with boundaries: use specialist agents and skills for research, design, implementation, documentation and review; keep identity, permissions and budgets explicit.
  5. Build in the real codebase: work through branches, pull requests, code review, migration discipline and reusable components.
  6. Test and verify: run unit, integration, browser, accessibility, visual and security checks appropriate to the change. The agent that implements a change is not its sole verifier.
  7. Release deliberately: require human review for consequential changes, retain evidence, monitor health and preserve rollback paths.
  8. Learn and evolve: update the architecture, skills, runbooks and knowledge base as the implementation changes.

Working principles

  • Plan → Design → Develop → Test → Review → Release → Learn.
  • Human accountability remains continuous; AI accelerates work but does not own business or risk acceptance.
  • Prefer a modular monolith and clear contracts until a real scaling or isolation need justifies service separation.
  • Reuse canonical registries and services rather than creating parallel queues, vaults, identity stores or tool gateways.
  • Measure outcomes; do not publish unverified productivity, ROI or uptime claims.
  • Keep architecture documentation aligned with code and mark proposals as proposals.

What this demonstrates

Enterprise solution architecture, product strategy, full-stack engineering, agentic workflow design, integration architecture, security and data governance, technical leadership and end-to-end delivery. Most importantly, it demonstrates the ability to turn an ambiguous enterprise problem into a working, governed platform—not simply to select an AI vendor.

Product and solution overview ↗ · Explore the implementation ↗ · Back to portfolio