Agent Integration Guide

This page is for coding agents and developers who receive the instruction: integrate this project with NCP.

Agent Workflow

If you are a coding agent asked to "integrate this project with NCP", do this:

1. Inspect the project.
   Start at the application layer, not infrastructure monitoring.
   Identify what the app knows that matters to a user: projects, trips,
   expeditions, budgets, customers, orders, content, messages, workouts,
   deadlines, opportunities, and domain-specific state changes.
   Then note which NerveEndings can produce those signals. NerveEndings can
   represent platform telemetry, application telemetry, or lifestyle passive OS
   signals. Google Analytics can produce application-level signals such as
   missing-song, visitor intent, conversion, or content demand signals; Firebase
   alerting or budget alerts can produce cost/auth/hosting signals; error tools
   can produce reliability signals.

2. Propose high-value signals before coding.
   Do not wire every possible event silently. Ask the developer which signals
   should wake their NerveOS System.

3. Prefer signals that reduce missed opportunities or expensive surprises.
   Good defaults:
   - product-specific opportunity signal
   - user-facing deadline or conflict
   - meaningful status change
   - readiness or availability window
   - important customer/user action
   - cost overrun from Firebase or cloud budget alerts
   - application or visitor behavior signal from Google Analytics
   - failed payment
   - error spike or scheduled job failure
   - security or secret exposure

4. Choose the right enablement boundary.
   Static/site project: enable per site.
   SaaS: enable per workspace, tenant, project, or billing account.
   SummitOS/adventure: enable per expedition.
   Finance: enable per budget, account, bill, or obligation.
   Calendar/lifestyle: enable per calendar, trip, household, or protected time block.

5. Implement NCP Auth v0.1.
   Use the docs at /docs/auth.

6. Emit valid NCP triggers.
   Use the schema at /spec and examples at /examples.

7. Protect sensitive data.
   Put dashboards, logs, private records, and detailed source data in context_refs.
   Do not copy secrets, full private emails, payment data, private messages,
   raw GPS traces, health data, or legal content into the NCP trigger.

8. Add a test firing.
   Add a safe test signal so the developer can confirm NerveSynapse receives,
   validates, routes, and displays the trigger.

Ask Before Coding

Coding agents should suggest the highest-value application signals and ask the developer which to enable. NCP should wake a NerveOS System for meaningful user-facing signals. NerveEndings can come from app code, Google Analytics, Firebase alerting, devices, calendars, health data, or other sources; the source does not decide whether a signal is application-level, platform-level, or lifestyle-level.

I found these likely NCP signals for this project:

1. Product-specific opportunity signal
2. User-facing deadline or conflict
3. Meaningful status change
4. Readiness or availability window
5. Important customer/user action
6. Cost overrun
7. Traffic spike or drop
8. Error spike or scheduled job failure

Which should I enable first?

I will implement only the approved signals, use NCP Auth v0.1, avoid sensitive raw payloads, and add a test firing for each signal.

Signal Suggestions

Project typeSignals to suggestDomainDelivery
Consumer/product appImportant user action, status change, deadline, opportunityproduct.signalsdaily_digest or same_hour
Marketplace/SaaS appActivation milestone, renewal risk, churn risk, account health, failed paymentgrowth.activation or finance.opsdaily_digest
Adventure/lifestyle appWeather window, readiness change, deadline, availability conflictadventure.planning or personal.opssame_hour
SummitOS-style appWeather window, readiness change, deadline, route warningadventure.planningsame_hour
Marketing/content siteGoogle Analytics can produce app-domain signals: missing-song demand, visitor intent, content spike, conversion milestonegrowth.analyticsdaily_digest or same_hour
Lifestyle passive OSLocation, calendar, health, weather, intent, availability, missing content, and readiness signalspersonal.ops, family.logistics, adventure.planningsame_hour or interrupt_now
Infrastructure supportFirebase budget/alerting for cost/auth/hosting; error tools for failures; GA can still carry app behaviorfinance.ops, reliability.ops, securitysame_hour or interrupt_now

Implementation Prompt

Implement NCP integration for this project.

Requirements:
- Add NerveOS System connection settings at the correct boundary.
- Store NerveSynapse endpoint and ncp_live token server-side only.
- Use NCP Auth v0.1 from /docs/auth.
- Sign the exact raw JSON body sent on the wire.
- Include X-NCP-Event-Id for idempotency.
- Treat 409 duplicate as success.
- Treat 401 as reconnect required.
- Treat 403 as source/event scope mismatch.
- Emit valid NCP triggers from /spec.
- Use context_refs instead of copying sensitive raw payloads.
- Add a safe test firing path.

Before coding, inspect the application domain and propose the highest-value user-facing signals for approval. NerveEndings are not only infrastructure monitors: they can produce platform telemetry, application telemetry, and lifestyle passive OS signals. Google Analytics can be used for application-level behavior signals such as missing-song, content demand, conversion, and visitor intent. Firebase alerting or budget alerts cover cost/auth/hosting. Error tools cover reliability.

Required References