Skip to content

feat(chat): add the focus areas' seven skills and New for you on Chat Home (W2-23b) - #1918

Merged
gkhngyk merged 11 commits into
ansvisor:mainfrom
cihan-gyk:feature/chat-w2-23b-focus-skills
Nov 1, 2026
Merged

gkhngyk merged 11 commits into
ansvisor:mainfrom
cihan-gyk:feature/chat-w2-23b-focus-skills

Conversation

@cihan-gyk

Copy link
Copy Markdown
Collaborator

Summary

Chat W2-23b adds the focus areas' seven skills and New for you on Chat Home (CHAT-24 §4–5, mockup CHAT-mockup-v2.html#s-dept).

Stacked on #1915 (W2-23a), which is stacked on #1914 (W2-22). Merge those first. This PR's own change is c7cd1d1. After it, a merge brings in #1915's approved head (b3d251e: #1914's Cancel fix and main). Web and skills/ only. No migration. Behind CHAT_AGENTIC.

Seven new skills (skills/*/SKILL.md, read into library.json):

Skill Name Areas
/questions Buyer questions Product
/features How AI compares us Product
/gaps No clear leader Product
/markets Who AI recommends by market Markets and sources
/listings Listing gaps Markets and sources
/rivals Rival brief Competitors
/audit-fix Site audit fixes SEO
  • CHAT-24 calls one of them /compare. It is named /features because compare (Comparison page) already exists.
  • CHAT-24's /factcheck is the existing /wrongclaim, so it isn't added again.
  • Each skill names only tools Chat already has. None writes beyond what its tools already allow, with the role check and card as for any write.

21 skills. The library now holds 21. The prompt lists the 20 best matches (MAX_LISTED_SKILLS). skillsForPrompt already drops the weakest match per request, and that code is unchanged.

  • engine.test.ts used to expect every skill in the prompt. It now expects the ones skillsForPrompt picks: min(enabled, 20).

New for you on Chat Home shows up to four of the picked areas' new skills, as cards with their one-line description. Selecting one asks Chat with that skill through the existing onAsk. Nothing is stored, and there is no new server action.

The / menu lists each picked area's skills, then that area's new ones, before the rest. For Competitors + Product + Markets that is /beat, /compare, /listings, /rivals, /faq, /markets, /questions, /gaps, /features, then the others.

Not in this PR: adding the seven skills to agents (agent-skills.ts, ANSVISOR_SKILLS) comes in a later PR.

Help: help/chat/skills.md gets the seven skills, and help/chat/focus.md gets New for you (both approved: false). skills/README.md is updated too.

Related issue

None. Chat Wave 2 (W2-23b).

Type of change

  • feat — New feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. Set CHAT_AGENTIC=true. Give a person the focus Competitors, Product and Markets.
  2. Open Chat Home. New for you shows /rivals, /questions, /listings and /features. Selecting one starts a chat that asks with it.
  3. Type / in the composer:
    • the focus skills come first, with each area's new ones right after its own;
    • all 21 skills and the shortcuts are listed.
  4. With no focus, Home has no New for you.
  5. Unit tests: library, focus-home, chat-home, engine and _chat-page-access.

Checked in the browser at 1024px, light and dark: New for you and the / menu. The user approved the screens. Screenshots are available on request.

Checklist

  • Branch follows the naming convention
  • Commits follow Conventional Commits
  • yarn lint passes (0 errors; 7 old warnings in files this PR doesn't touch)
  • yarn typecheck passes
  • yarn format:check passes
  • Changes are focused — one concern per PR
  • Help article updated under help/ (or no user-visible change)

Checks

  • Full checks on c7cd1d1:
    • web: 802 files / 8,375 tests pass, and yarn build passes;
    • server: format:check and lint are clean, and 351 files / 4,987 tests pass (3 skipped).
  • After merging b3d251e:
    • tsc --noEmit is clean;
    • help, skills library, focus-home, focus-picker, chat-home and subscription-guard-coverage tests pass: 8 files, 111 tests.

🤖 Generated with Claude Code

cihan-gyk and others added 10 commits October 31, 2026 23:20
…son's work areas (W2-22)

CHAT-24 §3: the focus picker opens once on the first Chat Home (marked
shown as it opens) with the areas the person's work areas suggest, Home's
pill reopens it, and Settings › General › Your focus keeps changes at
once. Focus only changes suggestions; no migration (00400 focus, 00408
focus_prompted_at).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Main hid Answer language, notifications and "Thought for N s" in Chat
Settings (ansvisor#1903). Keep them hidden and keep the new Your focus row, in
the component, the page comment and the help article.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…uestions and a competitor's rise (W2-23a)

CHAT-24 §4: For you now takes the picked areas' shortcuts in turn (five
beside Ask anything, CHAT-08 v2's six chips; the three jobs keep their
counts and rules), Start with a question offers four in the workspace's
own competitor, topic and market or their general wording, the line under
the greeting says a competitor's mention rate rose 3+ points this week
when nothing needs the person, and the / menu lists the focus's skills
first. No migration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… own settings

saveChatFocus, skipChatFocus and markFocusPrompted write only the person's
own chat_user_prefs row and cost nothing, like saveChatGeneralSettings, so
they join the read-only coverage test's open list with their reasons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… Home (W2-23b)

Adds /questions, /features, /gaps, /markets, /listings, /rivals and
/audit-fix (CHAT-24 §5) to the skills library, so it holds twenty-one.
Chat Home shows up to four of them under "New for you" for the picked
focus areas, and the / menu lists each area's new skills right after
its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… pill is cancelled

From the pill the picker's way out still saved an empty focus, so changing
your mind wiped the focus you had. Opened from the pill it now reads
Cancel and only closes; Skip for now stays the first opening's answer.
gkhngyk
gkhngyk previously approved these changes Nov 1, 2026

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# Conflicts:
#	help/chat/focus.md
#	web/messages/en.json
#	web/src/app/[locale]/(dashboard)/dashboard/chat/_chat-page-access.test.ts
#	web/src/components/chat/chat-home.test.tsx
#	web/src/components/chat/chat-home.tsx
#	web/src/lib/chat/focus-home.test.ts
#	web/src/lib/chat/focus-home.ts

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gkhngyk
gkhngyk merged commit 2833cfb into ansvisor:main Nov 1, 2026
5 checks passed
gkhngyk added a commit that referenced this pull request Nov 1, 2026
* feat(chat): ask once what Chat should focus on, starting from the person's work areas (W2-22)

CHAT-24 §3: the focus picker opens once on the first Chat Home (marked
shown as it opens) with the areas the person's work areas suggest, Home's
pill reopens it, and Settings › General › Your focus keeps changes at
once. Focus only changes suggestions; no migration (00400 focus, 00408
focus_prompted_at).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(chat): fit Chat Home to the person's focus: shortcuts, starter questions and a competitor's rise (W2-23a)

CHAT-24 §4: For you now takes the picked areas' shortcuts in turn (five
beside Ask anything, CHAT-08 v2's six chips; the three jobs keep their
counts and rules), Start with a question offers four in the workspace's
own competitor, topic and market or their general wording, the line under
the greeting says a competitor's mention rate rose 3+ points this week
when nothing needs the person, and the / menu lists the focus's skills
first. No migration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(chat): keep the focus actions open in read-only, as the person's own settings

saveChatFocus, skipChatFocus and markFocusPrompted write only the person's
own chat_user_prefs row and cost nothing, like saveChatGeneralSettings, so
they join the read-only coverage test's open list with their reasons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(chat): add the focus areas' seven skills and New for you on Chat Home (W2-23b)

Adds /questions, /features, /gaps, /markets, /listings, /rivals and
/audit-fix (CHAT-24 §5) to the skills library, so it holds twenty-one.
Chat Home shows up to four of them under "New for you" for the picked
focus areas, and the / menu lists each area's new skills right after
its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(chat): leave a focus as it was when the picker opened from Home's pill is cancelled

From the pill the picker's way out still saved an empty focus, so changing
your mind wiped the focus you had. Opened from the pill it now reads
Cancel and only closes; Skip for now stays the first opening's answer.

* feat(agents): let agents use the seven focus skills

New agent's skill step and its follow-on list offered only the fourteen
skills of W2-04. The focus areas' seven (W2-23b: Buyer questions, How AI
compares us, No clear leader, Who AI recommends by market, Listing gaps,
Rival brief and Site audit fixes) are in Chat's library, so an agent can
run them too.

- agent-skills.ts: the seven join ANSVISOR_SKILLS in the library's order
  (SKILL_ORDER). Their SKILL.md files read only Ansvisor's own data and
  public pages, and save page work as drafts, so none needs a connection:
  /listings reads the sites AI cites, not a catalog; /audit-fix writes a
  robots or CMS change for the person to make.
- en.json: their titles under chatAgents.skills, as their SKILL.md says.
- Tests: agent-skills.test.ts (every library skill, in order, titled as
  its SKILL.md, the seven with no connection), syncConnections, and the
  form's skill grid and follow-on list.
- Help: agents.md says which skills an agent can use.

Stacked on #1918 (W2-23b).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Gökhan Geyik <[email protected]>
gkhngyk added a commit that referenced this pull request Nov 2, 2026
…y to use (#1962)

* feat(chat): ask once what Chat should focus on, starting from the person's work areas (W2-22)

CHAT-24 §3: the focus picker opens once on the first Chat Home (marked
shown as it opens) with the areas the person's work areas suggest, Home's
pill reopens it, and Settings › General › Your focus keeps changes at
once. Focus only changes suggestions; no migration (00400 focus, 00408
focus_prompted_at).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(chat): fit Chat Home to the person's focus: shortcuts, starter questions and a competitor's rise (W2-23a)

CHAT-24 §4: For you now takes the picked areas' shortcuts in turn (five
beside Ask anything, CHAT-08 v2's six chips; the three jobs keep their
counts and rules), Start with a question offers four in the workspace's
own competitor, topic and market or their general wording, the line under
the greeting says a competitor's mention rate rose 3+ points this week
when nothing needs the person, and the / menu lists the focus's skills
first. No migration.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(chat): keep the focus actions open in read-only, as the person's own settings

saveChatFocus, skipChatFocus and markFocusPrompted write only the person's
own chat_user_prefs row and cost nothing, like saveChatGeneralSettings, so
they join the read-only coverage test's open list with their reasons.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(agents): add the Ready to use tab with the launch agents and Soon cards

Agent Center opens on Ready to use (?tab=ready|yours); Your agents keeps
the Mine, Workspace, Paused and Archived filters. Ready-to-use agents are
presets kept as data (lib/chat/agents/presets/*.json, read through
catalog.json): skills from the library, triggers New agent offers, a mode,
connections, and for Soon cards what they wait for. Use this agent opens
New agent filled in (?preset=); nothing is saved or turned on by itself.
A mode the plan keeps closed shows its lock (planGateLock), and opens on
Auto, ask before changes. Analysts and Agency partners see the cards with
the read-only line. Goal is the only filter until a preset carries a
business type, industry or role. Help article updated.

The presets ask for connections as #1909 defines them: any CMS (Required
for Ready to Publish, Optional for Citation Win-back and Task Finisher),
any catalog source for AI Shopping Readiness, Search Console Optional.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(chat): add the focus areas' seven skills and New for you on Chat Home (W2-23b)

Adds /questions, /features, /gaps, /markets, /listings, /rivals and
/audit-fix (CHAT-24 §5) to the skills library, so it holds twenty-one.
Chat Home shows up to four of them under "New for you" for the picked
focus areas, and the / menu lists each area's new skills right after
its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(chat): leave a focus as it was when the picker opened from Home's pill is cancelled

From the pill the picker's way out still saved an empty focus, so changing
your mind wiped the focus you had. Opened from the pill it now reads
Cancel and only closes; Skip for now stays the first opening's answer.

* feat(agents): let agents use the seven focus skills

New agent's skill step and its follow-on list offered only the fourteen
skills of W2-04. The focus areas' seven (W2-23b: Buyer questions, How AI
compares us, No clear leader, Who AI recommends by market, Listing gaps,
Rival brief and Site audit fixes) are in Chat's library, so an agent can
run them too.

- agent-skills.ts: the seven join ANSVISOR_SKILLS in the library's order
  (SKILL_ORDER). Their SKILL.md files read only Ansvisor's own data and
  public pages, and save page work as drafts, so none needs a connection:
  /listings reads the sites AI cites, not a catalog; /audit-fix writes a
  robots or CMS change for the person to make.
- en.json: their titles under chatAgents.skills, as their SKILL.md says.
- Tests: agent-skills.test.ts (every library skill, in order, titled as
  its SKILL.md, the seven with no connection), syncConnections, and the
  form's skill grid and follow-on list.
- Help: agents.md says which skills an agent can use.

Stacked on #1918 (W2-23b).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* feat(agents): add business-type and role packs to Agent Center's Ready to use

Ready to use offered the core agents only. AGENTS plan §8 adds packs by
business type (§8.1) and role helpers (§8.3), recommended to the person
on day one. This adds them as presets, with the brand's site type and the
person's work areas deciding what comes first.

- Presets: businessTypes are the brand's site types (b2b, ecommerce, b2c,
  as brands.site_type) plus app, which brand settings don't offer yet;
  roles are the work areas of Menu access (00374). The 12 business-type
  agents and 7 role helpers join the catalog: 10 ready, made of skills an
  agent can use today (the 14 and the 7 focus skills), and 9 Soon, each
  saying what it waits for (app store data, review site data, a catalog
  read, a seasonal, content plan or AI traffic skill, local listings).
  The §8.3 helpers that are core agents (Freshness, Prompt Portfolio,
  Crawler & Technical Fixer) get the role on their core preset instead of
  a copy. Reports and reads run on Auto, outreach and wrong-claim fixes
  on Ask me first.
- Ready to use: Business type and For your role filters beside Goal. The
  agents made for the site type of the brand on screen, or for one of the
  person's work areas, come first among the ready ones and among the Soon
  ones, marked For your site type or For your role. The page reads the
  person's work areas (profiles.work_areas).
- Tests: every preset's skills are ones an agent can use, Soon ones say
  what they need, no pack agent is a core agent's skills under another
  name, the tags follow the site types and work areas, the filters and
  the default order; the page passes the work areas.
- Help: agents.md covers the packs, the filters and the marks.

Stacked on feat/agents-focus-skills (on #1918) with #1917 merged in.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(agents): wrap a ready-to-use card's skills and mode instead of cutting the mode off

A pack agent with three skills pushed the mode chip past the card's edge
("Auto, ask before chan…"). On a card the formula chips wrap to a second
line; the agent list's one-line rows are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Cihan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Gökhan Geyik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants