feat(onboarding): add links stage + bridge onboarding to profile.json - #513
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (18)
📝 WalkthroughWalkthroughThe PR adds text-question defaults, rewrites overture onboarding around ChangesOnboarding and profile persistence
Session routing and score compilation
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Session
participant Router
participant DesignAPulse
participant AmicoTools
Session->>Router: provide live state and opening request
Router->>DesignAPulse: invoke pulse-design workflow
DesignAPulse->>AmicoTools: record staged choices
DesignAPulse-->>Session: report solve or inspection status
Suggested reviewers: ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
- Expand ENTITY_FIELDS.profile to accept description, research_area,
experiment_kind, scholar, github, custom_link_url, custom_link_label
(previously silently dropped by sanitizePayload)
- Add 'links' stage to overture SCORE: asks for Scholar, GitHub, and
custom link URLs (all optional/skippable)
- Add materializeProfileJson(): on onboarding_completed, replay the
events stream and write identity fields to ~/.amico/profile.json
(additive merge — never clobbers fields already set by inline editor)
- Update amicode_profile tool description to document new fields
- Regenerate golden snapshot
Field mapping (onboarding → profile.json):
name → name, role → role, org → affiliation, research_area → focus,
description → description, scholar → scholar, github → github,
custom_link_url + custom_link_label → custom_link: {url, label}
Part of harmoniqs/opencode#231
The overture (generic researcher onboarding) was chained directly into the pulse-designer interview, forcing quantum-specific questions on all users immediately after onboarding. This made no sense for a domain-neutral product. Now the overture runs standalone. The pulse-designer (or any domain interview) starts in a subsequent session via the onset router, only when the user actively chooses it. - Remove compileChainedScore/chainManifest usage from routing - shouldOnboard no longer requires score0 (pulse-designer) to be present - Update routing test to expect standalone overture behavior
… exists When onboarding runs on a user who already has a complete profile (all of name, intent, goals present), the overture now asks 'keep my current profile' or 'start fresh' before proceeding. Prevents the interview from skipping all stages and doing nothing useful on a redo. Partial profiles (resumed sessions) still skip answered stages as before.
The question tool requires an options array with label+description for choice questions. Clarify the SCORE instruction to explicitly specify the options format so the agent generates valid tool calls.
When events.jsonl is empty/missing (e.g. the agent wrote the profile via a different path), the bridge now accepts an optional inline profile payload so profile.json is still written. This closes the edge case where redo-onboarding clears events.jsonl but the distiller writes the vault note from session context.
…ol call The agent was generating invalid question tool calls (missing options array) because the instruction format was ambiguous. Now includes the exact JSON payload so the agent produces a valid choice question.
…e intent Reorder stages so the identity card fields are collected first: 1. orientation: name → role → affiliation (was just name) 2. links: Scholar, GitHub, custom link (was stage 8, now stage 2) 3. context_seed (unchanged) 4. intent (unchanged) 5-9. goals, research_area, environment, devices, handoff (unchanged) This ensures the profile dropdown is populated with the core identity fields early in the interview, and link pills are filled before the more domain-specific questions.
…g path The agent was bypassing the events pipeline and writing profile data directly to vault markdown files. This left events.jsonl empty and profile.json never got written (the dropdown was blank). Add an explicit HARD RULE in the SCORE body forbidding any path other than amicode_profile for recording onboarding answers.
…uestions The question tool schema requires the 'options' key even for kind:'text' questions (it can be an empty array but must be present). The agent was omitting it, causing SchemaError. Updated the protocol instruction to make this explicit.
…ystem writes Three issues addressed: 1. Jargon leakage: agent was saying 'vault', 'distiller', 'materialize', 'events pipeline' etc. to users during onboarding. Added strict language rules that ban all internal/infrastructure terms from user-facing dialogue. 2. Filesystem writes: agent was bypassing amicode_profile and writing directly to ~/.amico/ files (events.jsonl, vault notes, etc.). Added an absolute filesystem prohibition — the agent must NEVER write/edit/create any file under ~/.amico/ during onboarding. The only persistence path is amicode_profile; if unavailable, nothing is saved (transcript is backup). 3. Tone: rewrote the persona and greeting to be warmer and more conversational. 'Ciao — I'm Amico. Let me get to know you a little so I can be actually useful from the start.' instead of the transactional 'I'll remember your setup so we can move fast.' Also: added tool-unavailability fallback (proceed fresh if amicode_profile isn't in tool list, never tell user about tool issues).
jeonghun-jj-lee
force-pushed
the
profile-onboarding-bridge
branch
from
August 23, 2026 12:22
e4edfc5 to
cf607fb
Compare
The overture was drifting off-script — asking about transmon parameters,
generating invalid question calls, and conflating onboarding with the
pulse-designer interview. Root causes:
1. Too many conditional stages (environment, devices, context_seed) gave the
agent room to improvise and branch incorrectly.
2. No explicit scope fence — the agent could see the pulse-designer interview
in the same compiled prompt and sometimes started running it.
3. Free-form guidance ('weave naturally') invited freestyle.
Fix: rewrite to exactly 6 stages with mechanical instructions:
1. orientation (name, role, affiliation)
2. links (scholar, github, custom — all skippable)
3. intent (multi-select)
4. goals (free text)
5. research_area (only if experiments intent — 2 questions)
6. handoff (auto-description + completion marker)
Removed: context_seed (move to a post-onboarding flow), environment, devices
(these are pulse-designer concerns, not profile concerns).
Added a SCOPE FENCE at the top: explicit prohibition on asking about quantum
hardware, Hamiltonians, pulse parameters, etc. Those belong to a different
interview in a different session.
Added a hard STOP fence at the end: after Stage 6, the interview is OVER —
no more questions, no pulse-designer, no suggested next steps beyond 'start
a new session.'
…, not pulse-designer The compiler was hardcoding '## Pulse-designer interview' as the heading for ALL compiled scores — including the overture. The agent would see that heading during onboarding and naturally think it should run a pulse-designer interview. Fix: compileScore now uses a dynamic heading based on the score id: - 'overture' → '## Onboarding interview' - anything else → '## Pulse-designer interview' Also: added a hidden HTML comment marker (SPLICE_MARKER) so spliceIntoAgentsMd can locate the section reliably regardless of heading text. Falls back to the legacy heading for backward compat.
…demand only The full pulse-designer interview (270 lines of quantum-specific protocol) was being compiled into EVERY post-onboarding session's AGENTS.md. This polluted the context for general users and caused the agent to proactively start pulse-design interviews even when users just wanted to code. Now: post-onboarding sessions get only the onset router + a minimal stub that says 'you are a general-purpose autoresearch copilot, do NOT start domain interviews unless explicitly asked.' The pulse-design workflow is still available on-demand via the skill system (transmon, atoms, bosonic, etc.) when the user asks for it. Also updated the onset router to remove pulse-designer-centric framing: - Removed the SYSTEM_FIRST_SCORE constant - 'Design a new pulse' is now described generically (invoke platform skill) - Router language no longer references 'the interview below'
…mand content Created skills/design-a-pulse/SKILL.md: the orchestration guide for walking a user through pulse design (platform → model → formulation → solve → inspect). It's a thin coordination layer that tells the agent which platform skills to invoke (transmon, atoms, bosonic, etc.) and what stages to follow. This replaces the old approach of compiling the full pulse-designer SCORE body into every session's system prompt. Now it loads on-demand when the user asks to design a pulse, keeping general sessions lean. Also updated the onset router to reference the skill by name: 'invoke the design-a-pulse skill for the guided interview.'
Two issues fixed: 1. The amicode_profile plugin tool wasn't loading (the local-built opencode binary silently failed to import it), so the onboarding agent had no way to persist answers. Fix: the SCORE now instructs the agent to write ~/.amico/profile.json directly using standard file tools. The plugin tool is nice-to-have for analytics but no longer the critical path. 2. The link questions (Scholar, GitHub, custom) didn't pre-fill with 'skip', forcing users to type it. Fix: added `default` field support to the question schema overlay + UI initialization from it, and the SCORE now passes `default: "skip"` on each link question. Changes: - Grant ~/.amico/** in external_directory permissions (subsumes library, problems, onboarding — all already under ~/.amico) - SCORE rewritten: reads/writes ~/.amico/profile.json directly; completion marker is now a file (~/.amico/amicode/onboarding/completed) - hasOnboardingCompleted() checks for both the new file marker and the legacy events.jsonl marker - QuestionV2 schema overlay + SDK types: added optional `default` field - session-question-dock.tsx: initializes text input from question.default - Tests updated to match new SCORE content
jeonghun-jj-lee
marked this pull request as ready for review
August 23, 2026 13:50
This was referenced Aug 23, 2026
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.
Part of harmoniqs/opencode#231
Bridges onboarding data into
~/.amico/profile.jsonso the new profile dropdown popover (opencode PR #234) is populated immediately after onboarding completes.Changes
description,research_area,experiment_kind,scholar,github,custom_link_url,custom_link_labelno longer silently dropped bysanitizePayloadonboarding_completed, replays events stream and writes identity fields toprofile.json(additive merge, never clobbers inline edits)Summary by CodeRabbit
New Features
Improvements