feat(connect-interviews): schema + 3 atoms for V1 automation#386
Merged
Conversation
Foundation for ACE-automated Connect Interviews launches. Bumps adopt the
"ACE owns end-to-end" model: HQ domain creation, Connect-program creation,
OCS bot construction all go through atoms rather than human UI clicks.
Schema (docs/connect-interviews/checklist-schema.yaml): structured form of
the team's two prose checklists (domain-config gsheet + opp-creation
gdoc), plus OCS-side rules derived from the technical design doc. 3
per_program items, 24 per_domain (HQ plumbing + OCS bot structure), 25
per_cohort (apps + lookup rows + Connect opp + payment unit + OCS
interview nodes), 1 per_user. atom_gaps section enumerates 15 read + 18
write + 6 OCS authoring atoms needed; existing atoms (19) reused for the
rest. README + probe-report.md companions.
New atoms (3 of ~39):
- commcare_create_domain: POST /register/domain/ via DomainRegistrationForm.
Handles known failure modes (name-taken, daily-limit, RESTRICT_DOMAIN_
CREATION) with explicit errors. Used to create ace-interviews-master
+ ace-interviews-test for V1 round-trip.
- commcare_link_domains: jQuery-RMI POST to /a/<upstream>/remote_link/
service/ with Djng-Remote-Method: create_domain_link header. Gated by
LITE_RELEASE_MANAGEMENT (Pro Edition) — currently 403s on the new
domains; unblocks once accounts@ provisions Pro.
- ocs_create_chatbot: POST /a/<team>/chatbots/new/ via ChatbotForm.
Used to create the V1 stub Dynamic Router Bot template
(experiment 12213, pipeline 5981 in connect-ace team).
3 probe scripts (probe-commcare-create-domain, -link-domains,
-ocs-create-chatbot) — verified end-to-end against live HQ + OCS.
Connect program "ACE Interviews Test" created in ai-demo-space (id
f65e0633-cdb2-4d93-875a-b237ed241b18, slug ace-interviews-test).
Subscription request sent to accounts@ for Pro Edition on the two new
HQ domains.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Second OCS authoring atom (2/5 in task #13). Splices nodes into a chatbot's pipeline graph via the existing /a/<team>/pipelines/data/<id>/ GET-mutate-POST pattern. Supports the common case of inserting a node between two existing ones via disconnect_edge + connect_from + connect_to. Live-verified by splicing StaticRouterNode between the Start and LLMResponseWithPrompt nodes of the ACE Interviews Stub Template (experiment 12213, pipeline 5981). Findings captured for future OCS authoring work: - Each node carries TWO type fields: top-level React-Flow `type` ("startNode" | "endNode" | "pipelineNode") AND `data.type` (the OCS class name like "StaticRouterNode"). Both required by the pipeline-save endpoint. Without the top-level type, OCS 500s. - Edges need sourceHandle ("output") + targetHandle ("input"). Multi- output nodes use "output_0", "output_1" etc. but the defaults work for simple wiring. - data.id must mirror top-level id. - OCS pipeline-save validates AFTER commit: 200 + node-level errors in the response body, but the save IS persisted. Caller must check response errors even though status is success. - "DynamicRouterNode" doesn't exist server-side. The team's "Dynamic Router Bot" architecture maps to OCS's StaticRouterNode (routes by participant-data field values via the `keywords` array). - StaticRouterNode requires `name` + `route_key` params. Schema: - FlowNode now carries optional top-level `type` + `data.id`. - FlowEdge now carries optional sourceHandle/targetHandle. pipeline-patch.ts error path: pipeline-save POST failures now surface the response body (truncated to 800 chars) and sniff Django exception_value / title from HTML error pages. Surfaced the missing required-field issue that was hidden behind the previous generic error message. probe-ocs-add-pipeline-node.ts — verified end-to-end against live OCS. probe-ocs-peek-raw.ts — small diagnostic for dumping the full pipeline JSON (useful when debugging shape mismatches). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
auto-merge was automatically disabled
May 21, 2026 23:31
Pull request was closed
jjackson
added a commit
that referenced
this pull request
May 21, 2026
Completes the 5-atom OCS authoring batch (1 was in PR #386). Together these atoms let ACE construct a full Connect Interviews Dynamic Router Bot from scratch, no human UI clicks. New atoms (all verified end-to-end against live OCS): - ocs_add_chatbot_event — POST events/timeout/new/ with the THREE combined forms (TimeoutTriggerForm + EventActionForm + action-params). Verified: attached 24hr timeout event to stub bot (action_type=log). - ocs_add_custom_action — POST /a/<team>/actions/new/ (NOT /custom-actions/ as the original probe report said). OpenAPI-schema- driven, not webhook config. Scrapes /actions/table/ to recover the new action_id since the 302 redirect goes to the team-manage page with no id in the Location. Verified: created action 35 with a stub schema for HQ session-completion posting. - ocs_link_action_to_node — appends "<action_id>:<operation_id>" to a pipeline node's data.params.custom_actions. String format verified against apps/custom_actions/form_utils.py:make_model_id. Idempotent. Verified: wired action 35:postSessionCompletion to LLM node in pipeline 5981. Verification doc (docs/connect-interviews/ocs-verification.md) corrects multiple wrong claims from the original ocs-probe-report.md: - custom action URL is /a/<team>/actions/, not /custom-actions/ - CustomActionForm fields are OpenAPI-driven (name, server_url, api_schema, +optional description/prompt/auth_provider/healthcheck_path) NOT the simple-webhook fields the probe report claimed - Events cannot directly fire custom_actions — ACTION_PARAMS_FORMS only has {log, send_message_to_bot, end_conversation, schedule_trigger, pipeline_start}. The tech doc's "24hr fires custom action" pattern requires a secondary pipeline + action_type=pipeline_start. - DynamicRouterNode doesn't exist — use StaticRouterNode (route_key + keywords against participant_data) - Pipeline-save validates AFTER commit (200 + errors in body but state persists); FlowNode needs both top-level type + data.type + data.id. Stub bot now structurally complete: - experiment 12213 (ACE Interviews Stub Template) in team connect-ace - pipeline 5981: Start → StaticRouterNode-8f9a7 → LLM (custom_actions= ["35:postSessionCompletion"]) → End - 24hr timeout event attached - action 35 (session-completion API stub) Tasks #3 and #13 → completed. PR builds on top of #386 (merged). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
5 tasks
jjackson
added a commit
that referenced
this pull request
May 22, 2026
- /ace:interview-domain-bootstrap → skill orchestrates per-domain
plumbing using the atoms shipped in PRs #386-393. Walks per_domain
section of checklist-schema.yaml; documents 4 manual-fallback steps
(subscription, UCR expression create, custom-data-field, conditional
alert) where atoms are gap-tagged.
- /ace:interview-cohort-create → skill orchestrates per-cohort launch.
Takes a Cohort tracker-style YAML; runs the per_cohort section of
the schema. Manual fallbacks: linked-app copy, user-field choice
add, conditional alert create, OCS router-keywords update.
- /ace:interview-opp-verify → read-only verifier. Walks every rule
in checklist-schema.yaml against a live opp; produces a pass /
fail / unverifiable / out_of_band report. Cross-system consistency
checks included (OCS custom action target URL == HQ Inbound API URL).
Exit codes 0/1/2 for clean/fail/unverifiable.
Each skill points at its slash command + the canonical schema doc.
Manual-fallback steps are explicit prompts; atoms for those land in V1.5.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Foundation for ACE-automated Dimagi Connect Interviews launches. Adopts the "ACE owns end-to-end" model: HQ domain creation, Connect-program creation, and OCS bot construction all flow through atoms rather than human UI clicks.
docs/connect-interviews/checklist-schema.yaml): structured form of the team's two prose checklists (domain-config gsheet + opp-creation gdoc) plus OCS-side rules from the technical design doc. 3per_program+ 24per_domain+ 25per_cohort+ 1per_useritems.atom_gapsenumerates 15 read + 18 write + 6 OCS authoring atoms still to build; 19 existing atoms reused for the rest.commcare_create_domain— drives/register/domain/form. Verified end-to-end (createdace-interviews-master,ace-interviews-test).commcare_link_domains— jQuery-RMI to/a/<upstream>/remote_link/service/. Code complete; currently 403s pending Pro Edition provisioning by accounts@.ocs_create_chatbot— POSTschatbots/new/form. Verified end-to-end (createdACE Interviews Stub Template, experiment 12213, pipeline 5981).scripts/probe-commcare-{create,link}-domains.ts+scripts/probe-ocs-create-chatbot.ts. All verified against live infra.Live infrastructure now exists
ace-interviews-master,ace-interviews-test(Free tier; subscription email pending)ace-interviews-testinai-demo-space(idf65e0633-cdb2-4d93-875a-b237ed241b18)connect-aceteam (experiment 12213)Up next (separate PRs)
ocs_add_pipeline_node,ocs_add_chatbot_event,ocs_add_custom_action,ocs_link_action_to_node) to flesh out the stub bot's structurecommcare_*atoms (users, cases, lookup tables, app releases, linked-domain push)commcare_*atoms (conditional alerts CSV, user fields hidden-JSON)commcare_*atoms (motech surface — connections, repeaters, form forwarders)/ace:interview-domain-bootstrap,/ace:interview-cohort-create,/ace:interview-opp-verify)Test plan
npx tsx scripts/probe-commcare-create-domain.ts --commit— created 2 domainsnpx tsx scripts/probe-commcare-link-domains.ts --commit— 403 confirmed gated on Pro Editionnpx tsx scripts/probe-ocs-create-chatbot.ts --commit— created stub bot🤖 Generated with Claude Code