Repository navigation
feat(action-center): plan a task list instead of copying one - #830
Merged
Merged
Conversation
Every action of a given kind got the same task list, written inline in its
definition, regardless of what the brand had. A brand with no analytics
connection was still told to measure what a visibility drop cost in sessions.
Both specifications rule that out: the plan should follow from the action's
targets and the data the workspace holds.
Task text stops being a string in a definition and becomes a primitive with
an identity — a registry of 24, each declaring the sources it needs, who can
carry it out, whether carrying it out reaches outside Ansvisor, what must
finish first, and what its result carries. The planner selects from that per
action; definitions list task ids and nothing else.
Against production sources, the same definition for two brands:
with analytics analyze_losses -> measure_traffic_impact -> coverage_gaps
-> update_content -> internal_links -> validate
without analyze_losses -> coverage_gaps -> update_content
-> internal_links -> validate
Three tasks exist only for a connected source, which is what makes the plans
differ. Seven brands of 151 have analytics, 20 have audits, 126 have
competitors — so this is not a theoretical difference.
A dropped task takes its name out of everyone's dependsOn. A dependency that
is not in the plan is not a dependency; leaving the name behind would block a
task on work nobody was asked to do.
Tasks that can name what they are about now do — the platform, the
competitor, the count — as i18n parameters rather than resolved text, so a
planned task stays translatable. Half a title is worse than none, so the
planner names nothing unless the payload resolves every value the message
needs.
Nothing executes yet. `mode` and `permission` are declarations phase 7 reads,
decided task by task now rather than in a hurry later: outreach is the one
task marked as needing approval, because it is the one that reaches outside.
Refs #818
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01SQ2H6mSd9JDpmqonk2VWBj
33 of 37 tasks
6 tasks done
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.
Summary
Phase 5 of #818. The task list stops being a constant.
Every action of a given kind was given the same list of tasks, written inline
in its definition, regardless of what the brand actually had. A brand with no
analytics connection was still told to measure what a visibility drop cost in
sessions — a question it has no way to answer.
Task text is now a primitive with an identity. The registry holds 24 of them,
each declaring:
requiresmodeagentwhen the work is reading data we already hold,manualwhen it changes something we do not ownpermissionapprovalwhen carrying it out reaches outside AnsvisordependsOnoutputsversionDefinitions now list task ids and nothing else. The planner selects.
The exit condition, against production
Two brands, the same definition, their real connected sources:
Three tasks exist only for a connected source —
measure_traffic_impact(analytics),
competitor_pressure(competitors),page_readiness(audits).They are what makes the plans differ, and the difference is not theoretical:
of 151 brands, 7 have analytics connected, 20 have audits, 126 have
competitors.
This also gives phase 4's
optionalsource declarations their first reader.They were declared with nothing consuming them; the planner is what consumes
them.
Dependencies follow the plan, not the registry
A dropped task takes its name out of everyone's
dependsOn. A dependencythat is not in the plan is not a dependency — leaving the name behind would
block a task on work nobody was asked to do.
Tasks name what they are about
Compare how gemini-web answers the affected prompts against chatgpt-webrather than
Compare how each engine answers the affected prompts.The values travel as i18n parameters, not as resolved text, so a planned task
stays translatable — the same reasoning as resolving task text at creation in
phase 1, arrived at from the other side. Half a title is worse than none, so
the planner names nothing unless the payload resolves every value the
message needs; a partially filled payload falls back to the plain message
rather than rendering "against undefined".
Two tests guard the pair that can only fail in front of a user: every task
has a message, every target-aware task has a
_targetvariant, and nomessage names a value the planner does not supply. They read
web/messages/en.jsondirectly, because a missing key is silent untilsomeone sees it.
Nothing executes yet
modeandpermissionare declarations phase 7 reads. Deciding them task bytask now is safer than deciding them in a hurry later. Outreach is the single
task marked as needing approval, because it is the one that reaches outside.
Deferred
Third-party outreach state (prepared → sent → accepted → placed). The
product has no outreach feature;
identify_sourcesandstrengthen_sourcesare research and relationship work a person does today. A four-state machine
with no producer and no consumer would be a schema for a feature that does
not exist. It returns with the feature.
Related issue
Refs #818
Type of change
feat— New featureHow to test
On the next nightly run,
action_tasksrows carrymode,permission,depends_on,task_versionandtitle_params; a brand with an analyticsconnection receives one more task on a recovery than a brand without.
Migration
00088is applied to the hosted database. Every column is additivewith a default that reproduces today's behaviour, so the 111 existing tasks
are unchanged.
Checklist
feature/)yarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)🤖 Generated with Claude Code
https://claude.ai/code/session_01SQ2H6mSd9JDpmqonk2VWBj