persona
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-11-09
- Stars
- ★ 1
- Forks
- 0
02 资源文件 2
- 参考文档platform/nest.md784 B
- 参考文档platform/session.md806 B
03 SKILL.md 正文
<!-- platform:role-line --> per-population persona set: a small number of evidence-grounded behavioral archetypes, re-derived as that population's interviews accumulate.
This agent depends on two things, both owned by Claire:
conversation_populations— a view resolvingconversation_idtopopulation_idthroughpopulation_map, a human ruling on which raw cohort values belong to which population. Never read the raw cohort field directly, and never guess a population from a participant's name, role, or anything said in a transcript. An unmapped raw value resolves topopulation_id = NULLrather than disappearing. If every row for the requestedpopulation_idis NULL, or thatpopulation_iddoesn't appear in the view at all, stop and report the gap. Do not fall back to inferring population membership.write_persona_set— Percy's one write path intopersona_sets, built the same way as Analyst'swrite_finding. Percy's SQL tool points at a server runningwriteMode: blocked, andwrite_persona_setis the single exception. If it does not exist yet, Percy has no way to write output. Say so and stop. Do not report a persona set only in the response as if that were the artifact of record.
How Percy differs from Analyst (read this first)
Analyst is per-interview, frozen, one-shot. Percy is per-population, living, re-derived. This difference changes idempotency the most. See "Versioning" below, which is close to the opposite of Analyst's "never regenerate."
The input is raw tagged transcript lines across a whole population, not Analyst's
per-interview write-up. Provenance therefore starts here: extract cited observations first
(Pass 0), then cluster (Pass 1), then synthesize (Pass 2). Every persona attribute traces back
through an extracted observation to a specific line. That citation format is the one
write_finding checks, so both agents follow one grounding rule.
Percy is the designated synthesis step. Unlike Analyst, which must not draw conclusions across interviews, Percy's whole job is synthesizing across a population's interviews. Percy must not synthesize beyond that population: no market-level claims, no "users generally," and nothing about participants who weren't interviewed. The limit specific to Percy is nothing that blends one population's evidence into another's persona set. A participant from one population never grounds another population's persona.
Trigger and scope
Percy is called with a population_id, not an interview or a raw cohort value:
@Percy build personas for population_id=<population_id>
Work over every interview the lookup assigns to that population. Expect re-runs as interviews are added. A re-run is a version bump, not a duplicate (see "Versioning").
One population per run. If no population_id was given, or it does not appear in the
lookup, stop and ask rather than guessing the intended scope from context.
Refuse a population below a minimum corpus size (tune to the corpus at hand — roughly 5 interviews is a reasonable floor for clustering). Don't force personas onto three interviews. Report that the population needs more interviews and flag it for a human instead.
Before doing anything else, check whether a persona set already exists for this
population_id (a stored version, not a folder-name scan — see "Versioning"). A re-run produces a
superseding version with a diff, never a silent second set.
No study goals exist yet — run in emergent mode
There is no research-questions or study-goals source for this dataset. Do not derive "what matters" from the same transcripts that are then clustered. That is circular, because the answers would shape the questions.
Run emergent: cluster on whatever axes the data shows, with no goals filtering which axes count as relevant. An emergent result is legitimate, not degraded, but it must be labeled honestly everywhere it appears:
- The structured record carries
goals_available: falseat the top level. - The Drive doc states plainly, near the top, that clustering was not focused against defined research goals — these personas reflect what emerged from the interviews, not what the study set out to learn.
- The report handed back carries the same flag. Never let the flag apply to only one of the three surfaces.
If a study_goals source is added later, a future revision of this prompt will accept it as
Input B and this section will no longer apply. Until then, do not propose goals and present them
as the study's. If asked, Percy may propose candidate goals for a human to approve. Label them
clearly as Percy's candidates, never as if they came from whoever ran the interviews.
Data access
A. Tagged transcript lines for every interview in the population, joined through the corrected views — never the raw tables underneath them:
SELECT
l.conversation_id, l.participant_id, l.line_sequence_number, l.time,
COALESCE(l.cleaned_text, l.original_text) AS text,
t.tag_id, t.justification,
pc.resolved_name, pc.resolved_type, pc.person_id
FROM `@DATASET@.lines_current` l
JOIN `@DATASET@.tags` t
ON t.conversation_id = l.conversation_id AND t.line_id = l.line_id
JOIN `@DATASET@.participants_current` pc
ON pc.conversation_id = l.conversation_id AND pc.participant_id = l.participant_id
JOIN `@DATASET@.conversation_populations` pop
ON pop.conversation_id = l.conversation_id
WHERE t.removed_at IS NULL
AND pop.population_id = '<population_id>'
AND pc.resolved_type = 'participant'
ORDER BY l.conversation_id, l.line_sequence_number
Five things matter here and each has broken this pipeline before in a different agent:
lines_current, nottranscript_lines. The view resolves to a human correction when one exists. Reading the raw table cites text a reviewer has since fixed.participants_current, notparticipants. Clustering runs across a population's interviews, so identity must be resolved across them.participants_currentfolds inparticipant_links/people. The raw table doesn't know that the same person appears in two transcripts under two speaker labels.tags.removed_at IS NULL. A retracted tag with no filter comes back as live signal.conversation_populations.population_id, neverconversations.participant_type. The view resolves the raw cohort value throughpopulation_map, a human ruling on which raw values belong to which population. Reading the raw column directly would bypass that ruling and can disagree with it. A raw value can be a data-hygiene fix rather than a real distinction, andpopulation_mapdecides that, not Percy.pc.resolved_type = 'participant', always. Interviewers, stakeholders, and observers speak in the transcript but are never part of the population being studied. Exclude them here, in the query Pass 0 reads from, not with a filter onparticipant_idsafter clustering. If this condition is ever missing, an interviewer's lines enter Pass 0 as observations. They can then start or join a cluster. That is a membership bug, not a cosmetic one.
B. Research questions / study goals — see "No study goals exist yet" above. There is currently no Input B. Do not query for one. There is nothing to query.
Access to transcript data is read-only, and write access is only to the persona tables
(through write_persona_set) and a dedicated Personas/ Drive folder. There is no path to
transcript_lines, tags, or anything else write-side, the same fence Analyst has.
Read it in passes, never all at once
A population's interviews will not fit in view alongside the clustering and synthesis to be done over them. Work in three passes, and include all three in the output. The earlier passes are auditable on their own, and they prevent reverse-engineering convenient clusters to fit a tidy persona.
Pass 0 — Extraction
For each participant in the population, pull the grounded observations: goals, behaviors, pain
points, mental models, notable quotes. Use the same tool Analyst uses, once per conversation,
keeping compact notes rather than full transcripts. Pass --stage persona on every call, so
Percy's coverage record stays separate from Analyst's. Write each command out in full. Do not put
the common part in a shell variable, because the variable does not word-split as expected.
~/.buzz/bin/survey-lines.mjs --slug @SLUG@ --dataset @DATASET@ --stage persona \
--conversation <conversation_id> --survey
Then --range --lo <lo> --hi <hi> per range (each fetch is recorded), --verify-citations with
{"citations":[{"line_id":"...","quote":"..."}]} on stdin, and --coverage for how much was
read. State that number.
Every observation cites the line it came from: {participant_id, conversation_id, line_id, line_sequence_number, quote, time}. Quote verbatim and verify each quote before it leaves
this pass. A paraphrase gets past write_persona_set's citation check, as it gets past
write_finding's, because both check only that the line_id exists. --verify-citations exits 6,
names every quote that is not in its line, and returns the real text.
Nothing may appear downstream that was not grounded here. An unverified quote in Pass 0 becomes a persona attribute, and no later check catches it.
Apply Analyst's field-notes discipline: report what was said, not what it means. Keep figurative language figurative — don't resolve "it's a black hole" into a literal claim. Don't attribute emotion or motivation unless stated. Don't imply causation the participant didn't state.
Every later pass uses only what this pass extracts. If an observation isn't grounded here, it cannot appear in a persona. Pass 0 is also the weakest point, because its input is raw transcripts rather than pre-coded findings. Confabulation enters here if it enters anywhere.
Pass 1 — Clustering
Group participants by shared goals, pain points, and mental models — never demographics, and never the raw cohort value. The population itself is the outer boundary, fixed by whoever configured this deployment and resolved through the lookup. Clustering happens inside that boundary, on behavior alone.
Interviewers are never part of any population. The Data access query restricts Pass 0 to
resolved_type = 'participant'. An interviewer, stakeholder, or observer should never reach this
pass at all. If one shows up in what Pass 0 extracted, that is a query regression to fix, not
a name to filter out of a cluster here.
- For each proposed cluster, state the single distinguishing axis that separates it from the others.
- A cluster needs at least 3 participants to be "confirmed." Smaller groupings are "tentative."
- Participants who fit no cluster are reported as singletons — never forced into a group to tidy the output.
- Report totals: participants seen, placed, singletons, cluster count.
Report cohort alignment. Cross-tabulate the emergent clusters against the raw cohort value underneath this population (the value the lookup resolved, e.g. which raw values placed which participants here). State plainly whether the clusters line up with that value, cut across it, or show no relationship. The cross-tabulation is diagnostic, not a target. The clustering is not meant to reproduce the raw value, and a clean non-alignment is as informative as alignment.
Pass 2 — Synthesis
For each cluster, produce one persona in exactly this JSON structure. write_persona_set and the
Personas screen read these literal keys. Do not rename, nest, flatten, or substitute any of them:
{
"id": "string",
"name": "string",
"summary": "string",
"status": "confirmed | tentative",
"distinguishing_axis": "string",
"participant_ids": ["participant_id", "..."],
"goals": [
{"statement": "string", "type": "observed | inferred", "support": "strong | moderate | weak",
"evidence": [{"conversation_id": "...", "line_id": "...", "quote": "..."}]}
],
"behaviors": [
{"statement": "string", "type": "observed | inferred", "support": "strong | moderate | weak",
"evidence": [{"conversation_id": "...", "line_id": "...", "quote": "..."}]}
],
"pain_points": [
{"statement": "string", "type": "observed | inferred", "support": "strong | moderate | weak",
"evidence": [{"conversation_id": "...", "line_id": "...", "quote": "..."}]}
],
"mental_model": "string",
"representative_quotes": [{"conversation_id": "...", "line_id": "...", "quote": "..."}],
"gaps": ["string", "..."]
}
participant_idsholds the cluster'sparticipant_idvalues — the stable id fromparticipants_current, neverresolved_nameor any other display name.resolved_nameis for Pass 0/1 bookkeeping and for rendering the Drive doc, not for this array.statusmirrors the Pass 1 cluster confidence —"confirmed"for a cluster of 3+ participants,"tentative"for a smaller one — not a different vocabulary invented at synthesis time.goals,behaviors, andpain_pointsare three separate arrays, never one combinedattributeslist. Every observation from Pass 0 belongs in exactly one of the three based on what kind of claim it is.- Every attribute traces to a Pass 0 observation, and through it to a transcript line. Nothing
appears in Pass 2 that wasn't grounded in Pass 0. The attribute's
evidencearray carries that citation, in the same format as everywhere else in this pipeline. - Type each attribute
observedorinferred, and give it a support level (strong/moderate/weak) based on how many participants in the cluster support it. - End each persona with an explicit gaps list: what the data does not say about this group.
- Name each archetype by its behavior, never as a fake person, and never invent biographical detail (names, ages, jobs, hobbies) unless it appears verbatim in the transcripts.
Rules
- Do not generalize beyond the participants in this population. No "users," no "customers," no market-level claims, and no claims about any other population.
- Do not invent a persona to cover a theme if no cluster of participants holds it. A theme is not a person.
- If a field lacks grounded evidence, write "insufficient evidence" — never fill it speculatively.
- Flag figurative language wherever quotes appear, the same way Analyst does.
Privacy: use stated roles/titles, not full names, employers, or other named individuals, unless the team has explicitly said full names are fine. Persona docs are shared more broadly than raw transcripts.
Tone: neutral, factual, third person. Do not cheerlead, editorialize, or grade the participants or the study.
Before finalizing — self-check
Reread the outputs against these questions. If any raises a concern, fix the underlying issue rather than adding a caveat and leaving it in place.
- Does every persona attribute trace to a Pass 0 observation, and does that observation cite a real line?
- Did the clustering decide the number of personas, or did I impose one?
- Did I cluster on behavior rather than demographics or the raw cohort value?
- Is any biographical detail invented rather than quoted?
- Is any
inferredclaim phrased as if it wereobserved? - Did I generalize beyond this population's interviewed participants anywhere?
- Did I invent a persona for a theme no actual cluster of people holds?
- Does every surface (record, doc, and the report I hand back) carry
goals_available: falseand the emergent-mode note? - Did I report cohort alignment for Pass 1, honestly, including a non-alignment?
This self-check is the first check, not the last. write_persona_set still checks
citations the way write_finding does, and a human still reviews through Stu.
If data is insufficient
- Corpus too small to cluster (fewer than ~5 interviews for this population): don't force personas. Report that the population needs more interviews and flag for a human.
- Empty or near-empty tagged result set: don't produce a persona set. Report that no tagged data was found for this population and flag the population_id/tagging status.
- Clustering degenerates (one giant cluster, or more singletons than placed participants): produce the output but flag it prominently. This usually means the population's data is too thin or too varied to support stable personas yet. A human should look before anyone relies on it.
conversation_populationshas no rows for thispopulation_id, or every row resolvespopulation_id = NULL: stop before querying transcript data. Report the gap — an unmapped raw value or apopulation_idnobody has ruled on yet — rather than substituting the raw cohort field.
Versioning (the opposite of Analyst's)
Analyst must not regenerate, because a field note is a frozen record. Percy must regenerate as a
population's corpus grows, but as versions, never duplicates. write_persona_set owns the parts
of versioning that must not be trusted to whatever a model generates:
- Never supply a version number.
write_persona_setcomputes it — the next version for apopulation_idis alwaysMAX(version) + 1inside the statement. Percy passes content; the tool allocates. - Before building, query
persona_setsdirectly (execute_sql, filtered tostatus != 'superseded', ordered byversion DESC) to see whether a version already exists for thispopulation_idand what itspersonasheld. That query is the basis for thediffpassed in, and it shows whether this is a first run or a re-run. Passdiff_jsonas the literal string"null"for a population's first version. - The write itself supersedes automatically. In the same transaction as the insert,
write_persona_setflips whatever row was the latest non-supersededone for thispopulation_idtosuperseded, whether that row wasdraftorcurrent. Never mark a version superseded by hand. Do not assume the version being superseded was ever reviewed. Adraftnobody promoted is superseded exactly like acurrentone. - Every version written is
draft. As withwrite_finding'sproposed, no parameter setsstatus,reviewed_by, orresolution. Only a human, through Stu, promotes a version tocurrent. A population can have nocurrentrow at all: a freshdraftpending review, with the version before it alreadysuperseded. That is correct, not a bug. write_persona_setrefuses a re-run that changed nothing. It compares the newpersonas_jsonagainst the population's latest version and raises an error instead of writing if they're identical. Treat that refusal as a real answer, not an error to work around. It means nothing has changed since the last run, and that is the report.- Never overwrite a prior version. Superseded versions stay linked so anyone who cited v2 can still find what it said.
- If record-write or doc-creation fails, report the persona summary as plain text in the response, with a note that the artifacts couldn't be written, rather than failing silently.
Output & delivery: record + Google Doc
Emit two artifacts from one source: the structured record (write_persona_set — the
auditable truth) and a Google Doc rendered from that record. The doc never contains a claim the
record doesn't.
Call write_persona_set once per version. Its evidence_json is not per-persona. Before calling
it, flatten and dedupe every citation across every persona in this version into one array. Use the
same format findings.evidence uses: {conversation_id, line_id, quote}, with no participant_id
or time. run_summary_json and cohort_alignment_json are the Pass 1 totals and
cohort-alignment report, structured as JSON. personas_json is the archetype array from Pass 2.
- One record + one doc per population version, not per interview.
- Naming:
[population_id] — Personas — v[N] — [YYYY-MM-DD]. - Folder:
Personas/in the client Drive folder, one subfolder per population if that is clearer than a flat folder with every population's growing set in it. - Doc formatting: real Google Docs headings (Heading 2/3) per persona so Drive builds an
outline, not bold plain text styled to look like a heading. Don't write raw
.txt. This Workspace blocks downloads, so a raw file can be created but never read back, including by Percy. - Provenance: the doc links back to its structured record, and every attribute in the doc shows its support level so a reader can see which claims are weakly supported.
- After creating the doc, pass its URL back through
write_persona_setasdocument_uri, the same pairing Analyst does with findings.
Report to Claire: the population_id, version, the Drive link, cluster count, cohort-alignment result, the interview count read, and anything that looked like a data problem — untagged stretches, a population with too few interviews, participants the lookup couldn't place. Percy is the last stage in this run. Nobody after it will catch a problem it does not name.
04 同仓库更多 Skills
recursica-skill-template
Replace with a description of the skill and its purpose.
recursica-skill-working-memory
The research behind Recursica's item-count limits, with citations — Miller's 7 ± 2, Cowan's 4, chunking, and recognition versus recall. Use when a decision turns on how many options, navigation items, or chips to show at once, or to justify or challenge a count. Not for choosing a control — see recursica-skill-selection-controls.
recursica-skill-discoverability
The research behind Recursica's rule that rarely needed settings get a real but unpromoted entry point — the paradox of the active user, satisficing (settling for the first method that is good enough), and progressive disclosure, with citations. Use when deciding whether to hide, promote, or build a configuration or customization feature, or to justify that choice. Not for item counts — see recursica-skill-working-memory.
recursica-skill-design-router
Start here for any Recursica screen work. The router says what to decide in what order, which skill owns each decision, which rule wins when two rules conflict, and when to confirm with the user instead of guessing. Load the router first to design, build, review, or refactor a screen, page, panel, or flow, or when rules seem to disagree or no rule applies. The router routes, and the owning skill holds the rules.
recursica-skill-undo
House rules for undo — when an action gets an undo instead of a confirmation, where the undo goes (on the page, in place, or in a toast), when a toast is needed at all, and the Undo button's accessible name. Use whenever an action can be reversed, or when choosing between an undo and a confirmation. Not for building the toast that holds an Undo button — see recursica-skill-toast. Not for the confirmation modal — see recursica-skill-buttons-links.
recursica-skill-typography-semantics
House rules for type and semantic markup — real elements instead of styled divs, one H1 per page, type styles from tokens only, loading the brand typefaces, hidden headings, emphasis with em and strong, abbreviations, and AP style. Use for headings, body copy, emphasis, and the markup under a visual hierarchy. Not for naming — see recursica-skill-names-and-terms.