Separate what a worker does from what a company needs filled
Owliver could offer neither create. The Create Position flow worked and no chip anywhere suggested it, because the chip row is entirely the backend's static catalogue and no intent in it wrote anything. The gap was never in the frontend's trigger matching — every phrasing already routed. `employee_roles` is the supply side of `job_postings`. A posting is what the ORGANIZATION needs filled; this is what a WORKER says they do. They share a vocabulary and almost nothing else: "3 years" on a posting is a minimum an applicant must clear, and the same words here are what the person has. There is deliberately no foreign key between them — supply and demand already meet through `job_applications`, which carries the funnel, the interview and the outcome, and a second weaker link would disagree with it the first time somebody withdrew. NO NEW COMPANY ENTITY, AND THAT IS THE LOAD-BEARING DECISION. "Create a company position" reads like it needs a client record. `organizations` is the TENANT — absent from the resource table, absent from the policy map, written only by the seeder — so creating a row there from a chat flow would provision a new tenant, and the position would carry an org_id the operator's session cannot see. The operator could never view the record they just created. That breaks I5 and I1 to add a feature nobody asked for. The client stays free text on the posting, per blueprint decision D2, and the flow simply offers the clients this organization already staffs for as chips. No schema change, no endpoint change. Create is operators-only, and that is an I1 decision rather than a deferral. The worker is named explicitly on the row and is deliberately NOT derived from the session, because an operator recording a role on somebody's behalf is the whole point of the flow. Granting talent the same Create would let a talent caller write a role under any worker_email in the tenant — the attribution hole Phase 3D closed elsewhere. Talent reads its own via a ScopeEmail predicate, which is in place now so the grant is one line when a talent console exists. `created_by` is in gen_resources.py's SERVER_OWNED as well as the policy's Derived list. Both are required and the pairing is easy to miss: Derived fills the column from the session, SERVER_OWNED is what makes the descriptor ReadOnly so a request body cannot set it in the first place. Without it, TestDerivedColumnsAreReadOnlyOrTalentScoped fails — verified by mutation, not by reading. The two catalogue intents carry PHRASE terms only. A bare "position" or "role" term scores 10, the same as every reading on that page, and wins the tie on declaration order — so a create chip would have arrived by evicting `positions-attention` from the exact ordered result TestPositionsSuggestions asserts. An offer to create something must not displace the reading a person actually asked for. Neither declares a Subject, on the precedent of `position-spec-steps`: a Subject would let the bare query "summarize" match through matchShape and survive filterOnTopic. Neither declares a Signal, so an empty composer still reports what the organization needs rather than proposing paperwork. Chip text is the coupling with nothing else holding it together: no page context declares `capabilities`, so every server suggestion dispatches as its own TEXT and is answered by whichever skill's trigger that text matches. A renamed chip would open nothing, silently. Asserted on the frontend side. The down migration drops `employee_role_status` and keeps `english_level`, which is shared with job_postings.english_required and job_applications.english_level. Rolled back and re-applied against the database to prove it, not asserted. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PJvibeSc1JYXjatankqM1g
This commit is contained in:
@@ -222,6 +222,55 @@ var catalogue = map[string][]Intent{
|
||||
/* ── Positions — the roles being filled ────────────────────────────── */
|
||||
|
||||
"positions": {
|
||||
{
|
||||
/**
|
||||
* Creating a position, offered as a chip.
|
||||
*
|
||||
* The only intent on this page that WRITES, which is why it reads
|
||||
* job-postings with OpCreate: the permission gate ahead of ranking
|
||||
* then answers "may this caller create one?" from the same policy
|
||||
* table the endpoint uses, and a talent caller is never offered it.
|
||||
*
|
||||
* Terms are PHRASES ONLY, deliberately. A bare "position" or "role"
|
||||
* term would join the score-10 tie every reading on this page is in
|
||||
* and evict one of them from the exact ordered result
|
||||
* TestPositionsSuggestions asserts — a create chip would arrive by
|
||||
* pushing a reading out, which is not a trade this page should make
|
||||
* silently.
|
||||
*
|
||||
* No Subject and no Shapes, on the precedent of position-spec-steps:
|
||||
* a Subject would let the bare query "summarize" match this through
|
||||
* matchShape and survive filterOnTopic, offering "Summarize creating
|
||||
* a position" to somebody who asked for an overview of the page.
|
||||
*
|
||||
* OrgWide stays false. ScopeFor is the READ predicate; it says
|
||||
* nothing about a write and asking it here would be a category
|
||||
* error that happens to return the right answer.
|
||||
*
|
||||
* No Signal: never offered unprompted. An empty composer should
|
||||
* report what the organization needs, not propose paperwork.
|
||||
*/
|
||||
ID: "create-company-position", Text: "Create a company position",
|
||||
Terms: []string{"create position", "create a position", "create new position",
|
||||
"create a new position", "new position", "post a job", "post a new job",
|
||||
"create a company position", "open a role", "add a position", "create"},
|
||||
Reads: []Need{{Resource: "job-postings", Op: domain.OpCreate}},
|
||||
},
|
||||
{
|
||||
/**
|
||||
* The supply-side twin, offered here as well as on Talent Pool
|
||||
* because "create" on Positions is ambiguous between the two and
|
||||
* showing both is how the reader tells them apart. The wording is
|
||||
* what disambiguates: "company" and "employee" carry it, and the
|
||||
* chip text is what the panel dispatches, so the choice the reader
|
||||
* makes is the one that routes.
|
||||
*/
|
||||
ID: "create-employee-role", Text: "Create an employee role",
|
||||
Terms: []string{"create employee role", "create an employee role",
|
||||
"add an employee role", "new employee role", "create worker role",
|
||||
"add a worker role", "employee role", "worker role"},
|
||||
Reads: []Need{{Resource: "employee-roles", Op: domain.OpCreate}},
|
||||
},
|
||||
{
|
||||
ID: "position-drafts", Text: "Which positions are still unfinished drafts?",
|
||||
Subject: "the unfinished drafts", Shapes: []string{"list", "table"},
|
||||
@@ -484,6 +533,22 @@ var catalogue = map[string][]Intent{
|
||||
/* ── Talent Pool — supply, before anyone applies ───────────────────── */
|
||||
|
||||
"talent-pool": {
|
||||
{
|
||||
/**
|
||||
* Recording what a worker does, offered as a chip.
|
||||
*
|
||||
* The write on this page. Same construction as its twin on
|
||||
* Positions — phrases only, no Subject, no Signal — and the same
|
||||
* permission gate: employee-roles grants Create to operators, so a
|
||||
* talent caller is never offered it even though they may read their
|
||||
* own.
|
||||
*/
|
||||
ID: "create-employee-role", Text: "Create an employee role",
|
||||
Terms: []string{"create employee role", "create an employee role",
|
||||
"add an employee role", "new employee role", "create worker role",
|
||||
"add a worker role", "employee role", "worker role", "add a worker"},
|
||||
Reads: []Need{{Resource: "employee-roles", Op: domain.OpCreate}},
|
||||
},
|
||||
{
|
||||
ID: "talent-priorities", Text: "Who should I prioritize in the talent pool?",
|
||||
Subject: "the talent priorities", Shapes: []string{"list", "table", "stats"},
|
||||
|
||||
Reference in New Issue
Block a user