Auto workflow

From aaronjmars/aeon · View interactive version

Auto workflow is an AI agent skill from the GitHub repository aaronjmars/aeon. Two-mode aeon.yml workflow builder - analyze inspects URLs and emits a tiered, signal-verified skill-enablement plan plus an aeon.yml diff; enable flips slugs to enabled:true and opens a PR.

How to use this skill

Skill file

<!-- autoresearch: variation B — sharper output (priority tiers + data-verification gates + delta-against-existing + exit taxonomy) + slug-enable execution branch (validate → commit → PR) -->

${var} — selects the mode:

- Analyze (default): a URL to analyze (GitHub repo, X account, blog, project site, API docs, etc.). Multiple URLs comma-separated. Prefix a URL with force: to re-analyze one already in the ledger. Produces a tiered recommendation article + an aeon.yml diff — it does not mutate aeon.yml.

- Enable: enable:slug1,slug2,… — flip those skills' enabled: false → true in aeon.yml, validate each against skills/, then commit + open a PR. enable:dry-run:slug1,slug2 validates and reports without editing, committing, or opening a PR.

Example values: https://example.com/blog · @vitalikbuterin, github.com/foundry-rs/foundry · force:https://mirror.xyz/somedao · enable:rss-digest,github-monitor · enable:dry-run:price-alert

Overview

One skill, two ends of the same loop: analyze decides what to enable for a new watch target; enable actually flips the switch. Dispatch enable: with the slugs the analyze run put in its MUST tier and you close the loop — recommendation to merged PR — without a second skill.

Analyze mode verifies every recommendation is backed by an observed signal on the URL, tiers output into MUST (2–3 max) / SHOULD / NICE with a one-line concrete "why", emits a delta against the current aeon.yml rather than a full config dump, stays silent when existing config already covers the URL, and anchors skill names in skills.json (authoritative), not a stale mapping table. It writes an article + updates a ledger; it never edits aeon.yml.

Enable mode does the mechanical part analyze deliberately leaves to the operator: a slug-scoped enabled: false → true substitution in aeon.yml, gated by directory presence / current-disabled-state / chain-conflict checks, committed on a fresh branch and shipped as a PR with per-skill rationale. Explicit opt-in only — the operator names the slugs; nothing flips on main until they click merge.


Shared preamble (run for both modes)

  1. Read memory/MEMORY.md for high-level context and skim the last ~3 days of memory/logs/ — drop anything already reported so you don't re-emit the same signal.
  2. Parse ${var} to pick the branch:

Mode A — Analyze: generate recommendations + aeon.yml diff (default)

A0. Parse input and load context

If the (post-preamble) input is empty → exit AUTO_WORKFLOW_EMPTY, notify as above.

Parse ${var}:

Read context:

Ledger dedup: If a URL is in the ledger with analyzed_at within the last 14 days and force is not set for it, skip it with already_analyzed reason. If ALL inputs are dedup-skipped → exit AUTO_WORKFLOW_NO_CHANGE, notify nothing, log a one-line skip entry.


A1. Fetch and classify

For each remaining URL, WebFetch with prompt: "Return page title, meta description, all <link rel='alternate'>, og:* meta tags, social handle links (x.com, github.com, t.me, discord), detected RSS/Atom feed URLs, and any token contract addresses (0x… or Solana base58 near the words 'token'/'contract'/'mint'). Report the most recent date on the page. Report the tech stack (Jekyll/Hugo/Next.js/WordPress etc)."

If fetch fails or returns <300 chars of meaningful content, try fallbacks: /robots.txt, /sitemap.xml, gh api for github URLs. If all fail → mark this URL FETCH_FAILED with reason and continue to next URL.

Classify into ONE primary category: github-repo / github-org / x-account / blog-or-news / crypto-project / api-or-docs / research / product / community / personal-site / other.

Extract concrete signals (the "why" anchors for later recommendations):

If classification confidence is low (sparse signals, no category clearly matches), mark UNCLASSIFIED for this URL and skip to next.


A2. Match signals to installed skills

For each URL, generate candidate skills by intersecting:

Use this hint table — but only emit skills whose slug exists in skills.json (drop any slug not found):

| Category | Hint skills | Requires signal |

|----------|-------------|----------------|

| github-repo | github-monitor, github-issues, github-releases, pr-review, operator-scorecard, repo-pulse, repo-article, code-health | owner/repo resolves via gh api |

| github-org | github-monitor, repo-pulse, repo-scanner | owner resolves as Organization or User with ≥5 repos |

| x-account | fetch-tweets, tweet-roundup, list-digest, refresh-x | x_handle extracted |

| blog-or-news | rss-digest, digest, article | ≥1 feed_url OR dated articles |

| crypto-project | price-alert, token-movers, onchain-monitor, defi-overview, treasury-info | token_contract OR token_symbol |

| api-or-docs | deep-research | product is genuinely new + operator interest match |

| research | paper-pick, paper-digest, research-brief | arXiv-like URL or lab site |

| community | reddit-digest, telegram-digest, farcaster-digest, channel-recap | corresponding channel URL on page |

| product | deep-research, search-skill | operator interest match |

| personal-site | rss-digest, fetch-tweets | needs feed OR handle |

For each candidate, verify: does this URL actually have the data the skill needs?

| Skill need | Verification |

|------------|-------------|

| RSS feed URL | at least one valid feed_url in signals |

| X handle | x_handle extracted (not just a generic x.com link) |

| GitHub owner/repo | gh api returns 200 |

| Token contract | contract verified on DexScreener/CoinGecko (WebFetch fallback) |

| Topic string | operator's MEMORY.md mentions the topic or category |

If verification fails, do not recommend the skill. Record the skipped candidate as unverified: <reason> in the source-status footer — never carry to the output table.


A3. Tier and justify

Rank each verified candidate into exactly one tier:

For each tiered recommendation, write a single-sentence why that names at least one concrete signal from the URL:

Banned justifications: "typically", "often", "you might want", "could be useful", "in case". If you catch one of those, rewrite or drop the recommendation.

Dormant URLs (update_cadence = dormant): demote all candidates by one tier. If MUST → SHOULD. If SHOULD → NICE. If NICE → drop.


A4. Compare against current aeon.yml (delta, not dump)

For each tiered recommendation, compute the delta:

| Recommended state | Current state in aeon.yml | Action |

|-------------------|--------------------------|--------|

| enabled:true, var:"X", schedule:"Y" | enabled:false | ENABLE |

| enabled:true, var:"X" | enabled:true, var:"" | SET_VAR |

| enabled:true, var:"X,Y" | enabled:true, var:"X" | APPEND_VAR |

| enabled:true, schedule:"Y" | enabled:true, schedule:"Z" (equivalent cadence) | NO_CHANGE |

| already enabled matching suggestion | — | NO_CHANGE |

Skills with action NO_CHANGE drop out of the output. If EVERY tiered recommendation is NO_CHANGE → exit AUTO_WORKFLOW_NO_CHANGE:

Recommendations with action ENABLE are the exact slugs the operator can hand back to Enable mode — surface them as a copy-paste enable: dispatch (see A6).


A5. Emit secret/config gaps

For each MUST/SHOULD skill:

Never read or echo secret values. Enumerate names only.


A6. Write article and notify

Output shape (keep it tight — no tables for empty categories):

# Auto-Workflow: ${input_summary}
*${today} · ${exit_mode}*

**Verdict:** ${one_line}
<!-- examples:
"2 new enables, 1 var update. Missing VERCEL_TOKEN blocks deploy-prototype recommendation."
"1 new enable. All else already active."
-->

## URLs

| URL | Category | Cadence | Key signals |
|-----|----------|---------|-------------|
| ... | blog-or-news | active | feed=/rss.xml, 12 posts/30d |

## MUST (apply now)

- **rss-digest** - `ENABLE`, var: `"https://example.com/feed"`, schedule: `"0 7 * * *"`. Feed at /feed.xml, 12 posts in 30d. Secrets: OK.
- **fetch-tweets** - `SET_VAR`, var append: `"@example"`, schedule unchanged. Handle active, 3 product threads last week. Secrets: MISSING_SECRET: X_API_BEARER.

## SHOULD (consider this week)

- **github-monitor** - ...

## NICE (only if interested)

- **paper-pick** - ...

## aeon.yml diff

\`\`\`yaml
# enable
rss-digest: { enabled: true, schedule: "0 7 * * *" }

# update var (existing: "")
fetch-tweets: { enabled: true, var: "@example" }
\`\`\`

## Apply the enables

Flip the `ENABLE` recommendations in one dispatch:

\`\`\`
enable:${comma_separated_ENABLE_slugs}
\`\`\`

(or `enable:dry-run:${...}` to preview the PR without committing)

## feeds.yml additions

\`\`\`yaml
feeds:
  - name: Example
    url: https://example.com/feed
\`\`\`

## New skill proposals

(none unless ≥2 URLs share a gap no installed skill fills - see constraints)

## Source status

- fetch: ${N_OK}/${N_TOTAL} (failed: ${list with reasons})
- classification: ${N_CLASSIFIED} / ${UNCLASSIFIED count}
- verification: ${verified_count} passed, ${unverified_count} dropped (${sample reasons})
- catalog drift: ${list of referenced slugs missing on disk, or "none"}
- missing secrets: ${sorted unique list, or "none"}
- ledger: ${dedup_skipped} URLs already analyzed in last 14d (use `force:URL` to re-run)

## Exit mode
${AUTO_WORKFLOW_OK | AUTO_WORKFLOW_NO_CHANGE | AUTO_WORKFLOW_EMPTY | AUTO_WORKFLOW_FETCH_FAILED | AUTO_WORKFLOW_UNCLASSIFIED | AUTO_WORKFLOW_ERROR}

Append to memory/topics/auto-workflow-analyzed.md:

## ${today}
- ${normalized_url} - ${category} - ${N_must} MUST / ${N_should} SHOULD - output/articles/auto-workflow-${today}.md

Log to memory/logs/${today}.md (see the shared Log section — analyze discriminator).

Notify via ./notify — but only if exit_mode ∈ {OK, FETCH_FAILED_PARTIAL, ERROR, UNCLASSIFIED}. Skip on NO_CHANGE.

Template:

*Auto-Workflow - ${today}*
${exit_mode}

${verdict_one_line}

MUST (${N}):
- skill-a → ${action} (why)
- skill-b → ${action} (why)

${missing_secrets_line_if_any}

Apply: enable:${comma_separated_ENABLE_slugs}
Full: output/articles/auto-workflow-${today}.md

Mode B — Enable: flip skills enabled by slug (validate → commit → PR)

Today is ${today}. Skills can sit at enabled: false for days while the operator is occupied elsewhere. The human review of "is this skill ready to run" is not what blocks activation — the typing is. This branch makes the typing one dispatch.

Flipping enabled: false → true in aeon.yml is mechanical:

Explicit opt-in is the safety bar. No scheduled run, no automatic discovery. The operator names the slugs (or copies them from an analyze run's enable: line). The branch validates them and writes a PR — nothing flips on main until the operator clicks merge.

The input to this branch is the post-enable: remainder of ${var} (call it ENABLE_INPUT).

B1. Parse the slug list

Split the slug list on comma. Trim whitespace from each entry. Drop empty entries (handles trailing commas). Lowercase each slug. Deduplicate, preserving first-seen order.

Validate slug format: each must match ^[a-z0-9][a-z0-9-]{0,63}$. Slugs that fail this check are tagged BAD_SLUG_FORMAT in step B3 — they don't poison the run, but they don't get enabled either.

If after parsing the input list is empty (e.g. it was just commas/whitespace), log SKILL_ENABLER_NO_INPUT and exit silently.

B2. Read source state

Required reads — all in the current working directory (this fork's repo root):

If aeon.yml is missing or unreadable → log SKILL_ENABLER_NO_CONFIG and exit with notification (operator can't proceed without it).

B3. Validate each slug

For each parsed slug, walk these gates in order. The first failing gate is the slug's verdict; do not check subsequent gates for that slug.

| Gate | Pass condition | Failure tag |

|------|----------------|-------------|

| 1. Format | matches ^[a-z0-9][a-z0-9-]{0,63}$ | BAD_SLUG_FORMAT |

| 2. Directory | skills/${slug}/SKILL.md exists | MISSING_DIRECTORY |

| 3. Present in aeon.yml | aeon.yml contains a top-level entry ${slug}: under skills: | NOT_IN_AEON_YML |

| 4. Not under chains | the slug does NOT appear as a skill: entry under chains: (chains run skills as steps, not standalone — flipping the top-level entry produces double-runs) | CHAIN_CONFLICT |

| 5. Currently disabled | the slug's line currently contains enabled: false | ALREADY_ENABLED if enabled: true; UNPARSEABLE_STATE if neither |

For each slug record one of:

B4. Apply edits (skip in dry-run)

For each ELIGIBLE slug, patch the matching line in aeon.yml:

${slug}: { enabled: false, ...   →   ${slug}: { enabled: true, ...

Use an exact-match substitution scoped to the slug — never a global enabled: false → true replace. Each slug should match exactly one line; if the file contains the slug twice (e.g. a chain reference duplicated as a top-level entry), gate 4 would have caught it as CHAIN_CONFLICT and we wouldn't be editing it here.

Preserve every other character on the line — schedule, model, var, the trailing comment — byte-for-byte. The only change is false → true in the enabled: field.

After all eligible slugs are patched, write aeon.yml once. Do not write per-slug; one final write avoids partial-state on a mid-loop failure.

If zero slugs are ELIGIBLE:

B5. Commit, branch, push (skip in dry-run)

git checkout -b feat/enable-skills-${today}
git add aeon.yml
git commit -m "chore: enable ${N} skill(s) — ${comma_separated_slugs}"
git push -u origin feat/enable-skills-${today}

${N} is the count of ELIGIBLE slugs that were patched. ${comma_separated_slugs} lists their slugs (capped at 6 in the title; if more, append +${overflow}).

If git push fails with auth issues (workflows-scope PAT not configured, etc.), log SKILL_ENABLER_PUSH_FAILED and notify with the underlying error message — the operator may need to set up the right token. Do not retry indefinitely.

B6. Open PR (skip in dry-run)

gh pr create \
  --title "chore: enable ${N} skill(s)" \
  --body "$(cat <<EOF
## What
Flips \`enabled: false → true\` for ${N} skill(s) in \`aeon.yml\`:

${per_skill_table}

## Why
Operator dispatch via \`auto-workflow\` enable mode with explicit slug list. Each slug was validated against skills/ directory presence, current disabled state, and chain-conflict checks before patching.

## Verify
- [ ] Each enabled skill's next scheduled run lands on its expected cron tick
- [ ] No regressions in adjacent skills (cron windows don't overlap with newly enabled work)
- [ ] Notification channels (Telegram / Discord / Slack) are configured if the enabled skill writes notifications

---
*Built autonomously by auto-workflow (enable mode)*
EOF
)"

${per_skill_table} is a Markdown table with columns: Slug | Schedule | Rationale. Rationale is pulled from skills.json description, or skills/${slug}/SKILL.md frontmatter description, or the slug itself if neither is available. Schedule is the cron string from the patched aeon.yml line.

Capture the PR URL from gh pr create's stdout. If gh pr create fails, log SKILL_ENABLER_PR_FAILED with the error, but do not roll back the push — the branch is already on origin and the operator can open the PR manually from the GitHub UI.

B7. Notify

Send via ./notify:

*Auto-Workflow (enable) - ${today}*

Enabled ${N} skill(s) in aeon.yml via PR:
${bullet_list_eligible_slugs}

${ineligible_section_if_any}

PR: ${pr_url}
Branch: feat/enable-skills-${today}

Note: cron picks up the change on next scheduled tick after the PR merges. Use \`gh workflow run aeon.yml -f skill=<slug>\` to fire any of them immediately if you want a same-day signal.

${ineligible_section_if_any} is omitted entirely if every slug was ELIGIBLE. Otherwise, group the ineligible slugs by failure tag and list them:

Ineligible (${M}):
- ALREADY_ENABLED (${k}): slug-a, slug-b
- MISSING_DIRECTORY (${k}): slug-c
- NOT_IN_AEON_YML (${k}): slug-d
- ...

For dry-run mode, prefix the notification with [DRY RUN — no changes made] and omit the PR: / Branch: lines.

B8. Log

Log to memory/logs/${today}.md (see the shared Log section — enable discriminator).

Status mapping (the Status field in the log):


Log

Append to memory/logs/${today}.md under ONE ### auto-workflow heading (the health loop parses this shape). The first bullet is a Mode: discriminator naming which branch ran.

Analyze run:

### auto-workflow
- Mode: analyze
- Input: ${var}
- Exit: ${exit_mode}
- URLs: ${N_OK}/${N_TOTAL} analyzed
- Recommendations: ${N_must} MUST, ${N_should} SHOULD, ${N_nice} NICE (${N_no_change} already active, dropped)
- Missing secrets: ${list or "none"}
- Article: output/articles/auto-workflow-${today}.md

Enable run:

### auto-workflow
- Mode: enable (${execute|dry-run})
- Input slugs: ${enable_remainder_of_var}
- Eligible: ${N} - ${list_eligible}
- Ineligible: ${M} - ${grouped_by_tag}
- PR: ${pr_url_or_none}
- Branch: ${branch_or_none}
- File touched: aeon.yml
- Notification: sent
- Status: ${SKILL_ENABLER_* status from B8}

Network note

Security

Constraints

Analyze mode:

Enable mode:

Edge cases (enable mode)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.