74 lines
6.9 KiB
Markdown
74 lines
6.9 KiB
Markdown
|
|
# CocotteCockpitKit — Prospector
|
||
|
|
|
||
|
|
The **Prospector 1-view** (Life / Dates / Digital channels with Mr Number scoring, classification badges, stage, and operations sub-categories) is implemented as `ProspectorView.swift` + supporting types in this kit.
|
||
|
|
|
||
|
|
It is exposed as a primary tab (tag 3, "Prospector") in the iOS client shell (`ios-fe/App.swift` → `ProspectorTab` → `ProspectorView`).
|
||
|
|
|
||
|
|
## Status (as of latest build)
|
||
|
|
|
||
|
|
- UI shell complete and matching the spec from the feature tracker prototypes (channels segmented, row with avatar + last message + badges for MR score / classification / stage, summary bar for classified count + high score, "Classify All" toolbar action, detail navigation stub).
|
||
|
|
- Demo / mock data using the exact taxonomy:
|
||
|
|
- Life: personal:friends
|
||
|
|
- Dates: work:dates (in-person bookings)
|
||
|
|
- Digital: work:digital (OF/content audience, cams, digital work)
|
||
|
|
- Operations sub-cats under work (medical, hair, beauty) + misc / spam
|
||
|
|
- Dark theme, NavigationStack + List + Picker(.segmented) + NavigationLink to detail (stub `ProspectorDetail`).
|
||
|
|
- Wired into the TabView in `CocotteCockpitiOSApp` (after Fleet, before Activity/Insights). Can be selected directly with `--tab 3` (or the simulator run script that does the reorder + launch).
|
||
|
|
|
||
|
|
**Current wiring**: internal `@State` mock data in `onAppear`.
|
||
|
|
**Next (real data)**: feed from `CockpitModel` / `LiveCockpitAPI` (engagement-events with prospect classification/state, Mr Number via specialist or dedicated endpoint, stage from prospect state machine). The "Classify All" button will call the platform classifier (fast rules + GPU LLM via mcp-prospector or direct when `PROSPECT_LLM_BACKEND=modelboss`).
|
||
|
|
|
||
|
|
See the feature tracker for the full initiative history and spec:
|
||
|
|
- `.project/feature_quinn-prospector-ios/README.md`
|
||
|
|
- `.project/feature_quinn-prospector-ios/objectives/README.md` (especially 0003 UI port + classification, 0008 wireless/sim state)
|
||
|
|
- Prototypes (for reference): `swift-ui/ProspectorMessengerView.swift` and the quinn-my-ui TSX version (headers now point here as the live home).
|
||
|
|
|
||
|
|
## Build / Run (iOS client)
|
||
|
|
|
||
|
|
The Prospector tab is part of the normal CocotteCockpitiOS build. Use the DX in the `ios-fe` directory:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cd @platform/codebase/@features/ai-copilot/ios-fe
|
||
|
|
|
||
|
|
# Typical dev cycle (see the feature tracker's scripts/README.md for the full historical context and the reorder that made Prospector a primary tab)
|
||
|
|
./scripts/run-ios-sim.sh # or the equivalent that builds + installs to simulator with --tab 3
|
||
|
|
# or
|
||
|
|
xcodebuild ... -scheme CocotteCockpitiOS ... # then launch with args for tab selection
|
||
|
|
```
|
||
|
|
|
||
|
|
The `ios-fe` has its own `ios-tools.config.json`, `project.yml`, and scripts (the old quinn-ios ones in the tracker are retained only as historical reference).
|
||
|
|
|
||
|
|
After build/install/launch with the Prospector tab selected, the UI appears with the channels, list, badges, and summary exactly as prototyped.
|
||
|
|
|
||
|
|
## Architecture notes (live implementation)
|
||
|
|
|
||
|
|
- **UI**: Pure SwiftUI in this kit (`ProspectorView`, `ProspectorChannel`, `ProspectorItem`, `ProspectorRow`, `ProspectorDetail` stub). Reuses kit design tokens / components where possible (the view is self-contained for the initial integration).
|
||
|
|
- **Shell**: `ios-fe/Sources/App.swift` owns the `TabView` (Drops 0, Assets 1, Fleet 2, **Prospector 3**, Activity 4, Insights 5). `ProspectorTab` is a thin wrapper that gives it a NavigationStack + title.
|
||
|
|
- **Data / backend**: Will use the shared `CocottePlatformModels` + `CocottePlatformAPIClient` (or the higher-level `CockpitModel` / `LiveCockpitAPI` in the feature). Classification comes from the platform ai-copilot surfaces + mcp-prospector (or direct for the 1-view). Mr Number screening and prospect state (stage) from the central prospector engine.
|
||
|
|
- **quinn-my / web parity**: The same 1-view + channels + badges + summary is prototyped in the tracker's `quinn-my-ui/ProspectorMessenger.tsx` to drive the web implementation.
|
||
|
|
- **macOS / desktop**: A parallel native macOS experience (separate target or app) can reuse the same visual spec / components (see the tracker prototypes and the companion OSX designs in the workspace). The backend (engagement + classifier + macsync for threads/pastebin/outbox) is shared.
|
||
|
|
|
||
|
|
## Related (live vs planning)
|
||
|
|
|
||
|
|
- **Live code**: this `ProspectorView.swift`, the tab registration in `ios-fe/App.swift`, the platform backend (prospector features in api + mcp-prospector).
|
||
|
|
- **Tracker / planning** (history of the port from quinn-ios prototype, objectives, handoffs, the original sample that this view was ported from): `.project/feature_quinn-prospector-ios/` (both in the lilith worktree and main tree copies). These are now updated to point here as the correct/current implementation location. quinn-ios references are explicitly historical/legacy.
|
||
|
|
- **Designs / contracts** (the v4 prospecting sub-features like cross-provider graph, auto-qualify, warm intros, marketplace): still in the planning surface (`.project/designs/prospecting/` and ai-copilot specialist contracts).
|
||
|
|
- **Executor / inbound handling instructions**: See the platform `mcp-prospector/README.md` and the operator's Executor workspace (`Documents/Claude/Projects/Executor/prospecting/`) for the state machine, pastebin via macsync, macsync outbox wiring, DO GPU model usage, corrections loop, etc.
|
||
|
|
|
||
|
|
## Wiring notes (for future real data)
|
||
|
|
|
||
|
|
- Pass `CockpitModel` (or a prospect-specific slice) down to `ProspectorView`.
|
||
|
|
- Map platform `engagement-events` (or `/my/prospects` + classifier results) to `ProspectorItem`.
|
||
|
|
- Classification badge from the fast + full (GPU) path.
|
||
|
|
- Mr Number score from the screening specialist / mr-number endpoints.
|
||
|
|
- Stage from the prospect state machine (prospect-qualification / runner).
|
||
|
|
- "Classify All" → call the classifier for the current filtered set (with macsync context for pastebin/templates if drafting).
|
||
|
|
- Detail view → full thread context + actions (mark worked, correction for training, draft/send via macsync outbox).
|
||
|
|
|
||
|
|
**Packages / shared client note (Wave 1 restructure)**: The ProspectorClient/ProspectorUI (and future wiring to real LP data) are now published from the new canonical home `@applications/@prospector/@packages/` (ProspectorClient, ProspectorUI). Update consumers here to use those (path for MVP, registry post-publish). Old `@packages/@swift/@prospector/` and `@applications/@quinn-prospector/` are deprecated (see their READMEs + plan.md). LP remains source of truth (prospect-runner, mcp-prospector, quinn-api, macsync pastebin). GPU on-demand via provision script + health script verification. MVP: OSX @prospector app as central to replace Executor inbound.
|
||
|
|
|
||
|
|
The tab is intentionally lightweight in the shell so the heavy lifting (model, API client, tokens) stays in the shared kit and platform layers.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
*This document lives with the live implementation. The feature tracker in lilith-platform describes the initiative and the port from the original prototypes. All active iOS work for the Prospector 1-view is in @cocottetech paths.*
|