mirror of
https://github.com/codewhale-hq/Codewhale.git
synced 2026-11-11 01:51:34 -10:00
Bundle generation 13: trim social-media/health, feedback goes repo-local
social-media and health leave the shipped pack (phone-export workflows, not everyday skills); feedback joins contributor-onboarding under docs/skills/ with the same leave-in-place upgrade rule. Fresh installs receive neither; a generation-12 feedback copy is never deleted by name. Tests: generation pin to 13, new trim/leave-in-place test. skills:: 222 passed; check clean.
This commit is contained in:
1 parent
20cc9cfb94
commit
641766b08e
7 files changed
+83
-109
No files matched your search
@@ -15,7 +15,7 @@
|
||||
"in_model_catalogue": "true when the skill renders as an ambient catalogue line",
|
||||
"shadowed_aliases": "aliases that collide with another canonical bundled name; the canonical skill wins resolution"
|
||||
},
|
||||
"generation": "12",
|
||||
"generation": "13",
|
||||
"skills": [
|
||||
{
|
||||
"name": "skill-creator",
|
||||
@@ -331,14 +331,6 @@
|
||||
"in_model_catalogue": true,
|
||||
"shadowed_aliases": []
|
||||
},
|
||||
{
|
||||
"name": "social-media",
|
||||
"tier": "core",
|
||||
"invocation": "model+user",
|
||||
"aliases": [],
|
||||
"in_model_catalogue": true,
|
||||
"shadowed_aliases": []
|
||||
},
|
||||
{
|
||||
"name": "money",
|
||||
"tier": "core",
|
||||
@@ -371,14 +363,6 @@
|
||||
"in_model_catalogue": true,
|
||||
"shadowed_aliases": []
|
||||
},
|
||||
{
|
||||
"name": "health",
|
||||
"tier": "core",
|
||||
"invocation": "model+user",
|
||||
"aliases": [],
|
||||
"in_model_catalogue": true,
|
||||
"shadowed_aliases": []
|
||||
},
|
||||
{
|
||||
"name": "shopping",
|
||||
"tier": "core",
|
||||
@@ -426,14 +410,6 @@
|
||||
"aliases": [],
|
||||
"in_model_catalogue": true,
|
||||
"shadowed_aliases": []
|
||||
},
|
||||
{
|
||||
"name": "feedback",
|
||||
"tier": "core",
|
||||
"invocation": "model+user",
|
||||
"aliases": [],
|
||||
"in_model_catalogue": true,
|
||||
"shadowed_aliases": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
---
|
||||
name: health
|
||||
description: Analyze Apple Health and Health Connect exports — workouts, sleep, trends. Use when: health, workouts, sleep, steps, heart rate, apple health, healthkit, or health connect.
|
||||
invocation: model+user
|
||||
---
|
||||
|
||||
# Health
|
||||
|
||||
## When to use
|
||||
Answering questions about the user's activity, sleep, workouts, and trends
|
||||
from their own exported health data.
|
||||
|
||||
## Setup
|
||||
The user exports once from their phone and points you at the files:
|
||||
|
||||
- iPhone: Health app → profile → Export All Health Data → `export.xml`
|
||||
- Android: Health Connect → Export data
|
||||
|
||||
Fail loud when no export is present. Never ask for health-app credentials —
|
||||
exports only.
|
||||
|
||||
## Workflow
|
||||
1. Parse `export.xml` (or the Health Connect export) with a script; do not
|
||||
paste the whole file into context.
|
||||
2. Answer the question asked: totals, averages, trends over explicit date ranges.
|
||||
3. Charts on request via the `dataviz` skill.
|
||||
|
||||
## Non-goals
|
||||
- Do not diagnose, prescribe, or interpret data as medical advice.
|
||||
- Do not copy health data anywhere except the analysis the user asked for.
|
||||
- Do not retain health facts in memory unless the user explicitly asks.
|
||||
@@ -1,32 +0,0 @@
|
||||
---
|
||||
name: social-media
|
||||
description: Read and analyze Messenger, Instagram, Threads, and Facebook via official data export, or the Graph API when tokened. Use when: messenger, instagram, threads, facebook, DMs, posts, or messages on social apps.
|
||||
invocation: model+user
|
||||
---
|
||||
|
||||
# Social Media
|
||||
|
||||
## When to use
|
||||
Finding, reading, or summarizing the user's messages, posts, and activity on
|
||||
Meta services: Messenger, Instagram, Threads, Facebook.
|
||||
|
||||
## Setup
|
||||
Two paths, in this order:
|
||||
|
||||
1. **Official export (works for everyone).** The user downloads their data
|
||||
(Accounts Center → Download your information, JSON format), unzips it
|
||||
locally, and points you at the folder. Analyze `message_*.json`, posts,
|
||||
and media on disk. Fail loud when the folder is missing.
|
||||
2. **Graph API (optional).** Only when the user already has a user token:
|
||||
`GET graph.facebook.com/v19.0/me/conversations`. Never walk the user
|
||||
through creating a Meta developer app unprompted — the export path first.
|
||||
|
||||
## Workflow
|
||||
1. Establish which service and whose messages/posts are in scope.
|
||||
2. Search the export for people, keywords, or date ranges; quote with dates.
|
||||
3. Summarize threads; distinguish what the user wrote from what others wrote.
|
||||
|
||||
## Non-goals
|
||||
- Do not post, send, like, follow, or delete anything on any service.
|
||||
- Do not log into accounts or handle passwords/2FA codes.
|
||||
- Do not retain or repeat other people's private messages beyond the task.
|
||||
@@ -24,7 +24,10 @@ use std::path::Path;
|
||||
/// shopping/travel, media, github, goals, forget, feedback) and demotes
|
||||
/// `contributor-onboarding` to a repo-local project skill: existing installed
|
||||
/// copies are left in place, new installs do not receive it.
|
||||
const BUNDLED_SKILL_VERSION: &str = "12";
|
||||
/// Generation 13 trims the pack: `social-media` and `health` ship to nobody
|
||||
/// (phone-export workflows, not everyday), and `feedback` joins
|
||||
/// `contributor-onboarding` as a repo-local project skill.
|
||||
const BUNDLED_SKILL_VERSION: &str = "13";
|
||||
|
||||
// ── system & extension (meta) ───────────────────────────────────────────────
|
||||
const SKILL_CREATOR_BODY: &str = include_str!("../../assets/skills/skill-creator/SKILL.md");
|
||||
@@ -64,12 +67,10 @@ const SPREADSHEETS_ALIAS_BODY: &str = include_str!("../../assets/skills/spreadsh
|
||||
const GITHUB_BODY: &str = include_str!("../../assets/skills/github/SKILL.md");
|
||||
const GMAIL_BODY: &str = include_str!("../../assets/skills/gmail/SKILL.md");
|
||||
const GOOGLE_CALENDAR_BODY: &str = include_str!("../../assets/skills/google-calendar/SKILL.md");
|
||||
const SOCIAL_MEDIA_BODY: &str = include_str!("../../assets/skills/social-media/SKILL.md");
|
||||
const MONEY_BODY: &str = include_str!("../../assets/skills/money/SKILL.md");
|
||||
const SPOTIFY_BODY: &str = include_str!("../../assets/skills/spotify/SKILL.md");
|
||||
const TTS_BODY: &str = include_str!("../../assets/skills/tts/SKILL.md");
|
||||
const PODCAST_BODY: &str = include_str!("../../assets/skills/podcast/SKILL.md");
|
||||
const HEALTH_BODY: &str = include_str!("../../assets/skills/health/SKILL.md");
|
||||
const SHOPPING_BODY: &str = include_str!("../../assets/skills/shopping/SKILL.md");
|
||||
const FLIGHTS_BODY: &str = include_str!("../../assets/skills/flights/SKILL.md");
|
||||
const PHOTOS_BODY: &str = include_str!("../../assets/skills/photos/SKILL.md");
|
||||
@@ -315,11 +316,6 @@ const BUNDLED_SKILLS: &[BundledSkill] = &[
|
||||
body: GOOGLE_CALENDAR_BODY,
|
||||
introduced_in: 12,
|
||||
},
|
||||
BundledSkill {
|
||||
name: "social-media",
|
||||
body: SOCIAL_MEDIA_BODY,
|
||||
introduced_in: 12,
|
||||
},
|
||||
BundledSkill {
|
||||
name: "money",
|
||||
body: MONEY_BODY,
|
||||
@@ -340,11 +336,6 @@ const BUNDLED_SKILLS: &[BundledSkill] = &[
|
||||
body: PODCAST_BODY,
|
||||
introduced_in: 12,
|
||||
},
|
||||
BundledSkill {
|
||||
name: "health",
|
||||
body: HEALTH_BODY,
|
||||
introduced_in: 12,
|
||||
},
|
||||
BundledSkill {
|
||||
name: "shopping",
|
||||
body: SHOPPING_BODY,
|
||||
@@ -375,11 +366,6 @@ const BUNDLED_SKILLS: &[BundledSkill] = &[
|
||||
body: FORGET_BODY,
|
||||
introduced_in: 12,
|
||||
},
|
||||
BundledSkill {
|
||||
name: "feedback",
|
||||
body: FEEDBACK_BODY,
|
||||
introduced_in: 12,
|
||||
},
|
||||
];
|
||||
|
||||
/// Product-facing grouping for the bundled catalog.
|
||||
@@ -455,6 +441,13 @@ fn contributor_onboarding_body() -> &'static str {
|
||||
CONTRIBUTOR_ONBOARDING_BODY
|
||||
}
|
||||
|
||||
/// Last shipped `feedback` body (removed from the bundle in generation 13;
|
||||
/// now a repo-local project skill). Retained so an installed copy stays
|
||||
/// recognizable and is left in place, never deleted by name.
|
||||
fn feedback_body() -> &'static str {
|
||||
FEEDBACK_BODY
|
||||
}
|
||||
|
||||
/// Whether a skill name matches one of the bundled first-party skills.
|
||||
///
|
||||
/// Used by `/skills` to distinguish user-created skills (which should be
|
||||
@@ -573,6 +566,9 @@ pub fn install_system_skills(skills_dir: &Path) -> std::io::Result<()> {
|
||||
// Feishu above — never delete by name alone.
|
||||
let _ = contributor_onboarding_body();
|
||||
|
||||
// Feedback is repo-local since generation 13: same leave-in-place rule.
|
||||
let _ = feedback_body();
|
||||
|
||||
if changed || repair_marker {
|
||||
fs::create_dir_all(skills_dir)?;
|
||||
if marker.exists() && !marker.is_file() {
|
||||
|
||||
@@ -73,8 +73,9 @@ fn contributor_onboarding_is_repo_local_and_keeps_its_refusals() {
|
||||
// The pin tracks the current catalog generation: 9 added handoff,
|
||||
// 10 added mcp-discovery (#5238), 11 rewrote mcp-discovery from a
|
||||
// Registry-first gate into a missing-capability fallback, 12 added the
|
||||
// everyday pack and demoted contributor-onboarding to repo-local.
|
||||
assert_eq!(BUNDLED_SKILL_VERSION, "12");
|
||||
// everyday pack and demoted contributor-onboarding to repo-local, 13
|
||||
// trimmed social-media/health and demoted feedback to repo-local.
|
||||
assert_eq!(BUNDLED_SKILL_VERSION, "13");
|
||||
assert!(
|
||||
!is_bundled_skill_name("contributor-onboarding"),
|
||||
"contributor-onboarding must not ship to every user anymore"
|
||||
@@ -129,6 +130,42 @@ fn upgrade_to_generation_12_leaves_contributor_onboarding_in_place() {
|
||||
);
|
||||
}
|
||||
|
||||
/// Generation 13 trims `social-media` and `health` from the bundle and moves
|
||||
/// `feedback` repo-local. None of the three may ship to new installs; a
|
||||
/// generation-12 `feedback` copy is left in place, never deleted by name.
|
||||
#[test]
|
||||
fn generation_13_trims_pack_and_feedback_goes_repo_local() {
|
||||
for name in ["social-media", "health", "feedback"] {
|
||||
assert!(
|
||||
!is_bundled_skill_name(name),
|
||||
"{name} must not ship in generation 13"
|
||||
);
|
||||
}
|
||||
|
||||
let tmp = TempDir::new().unwrap();
|
||||
fs::write(marker_file(&tmp), "12").unwrap();
|
||||
let dir = skill_dir(&tmp, "feedback");
|
||||
fs::create_dir_all(&dir).unwrap();
|
||||
fs::write(dir.join("SKILL.md"), feedback_body()).unwrap();
|
||||
|
||||
install_system_skills(tmp.path()).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
fs::read_to_string(skill_file(&tmp, "feedback")).unwrap(),
|
||||
feedback_body(),
|
||||
"upgrade must leave the installed feedback copy untouched"
|
||||
);
|
||||
|
||||
let fresh = TempDir::new().unwrap();
|
||||
install_system_skills(fresh.path()).unwrap();
|
||||
for name in ["social-media", "health", "feedback"] {
|
||||
assert!(
|
||||
!skill_file(&fresh, name).exists(),
|
||||
"fresh installs must not receive {name}"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn fresh_install_skills_parse_for_discovery() {
|
||||
let tmp = TempDir::new().unwrap();
|
||||
|
||||
@@ -16,4 +16,4 @@ To activate:
|
||||
|
||||
Skills: gh-file-issue, gh-compile-issues, gh-assign-issues, gh-find-prs,
|
||||
gh-treasure-hunt, gh-close-issues, gh-credit-harvest, codew-release-qa-sweep,
|
||||
contributor-onboarding.
|
||||
contributor-onboarding, feedback.
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
name: feedback
|
||||
description: Report a Codewhale bug or idea as a GitHub issue. Use when: codewhale bug, feature request, feedback on codewhale, report an issue, or this should work differently.
|
||||
invocation: model+user
|
||||
---
|
||||
|
||||
# Feedback
|
||||
|
||||
## When to use
|
||||
The user hit a Codewhale bug or wants Codewhale to do something new, and
|
||||
wants it reported upstream.
|
||||
|
||||
## Setup
|
||||
Requires the `gh` CLI, authenticated (`gh auth status`). Fail loud when it
|
||||
is missing — fall back to printing the issue text for manual filing.
|
||||
|
||||
## Workflow
|
||||
1. Reproduce or pin the behavior first: version (`codewhale --version`),
|
||||
command, expected vs actual, minimal steps.
|
||||
2. Draft the issue (title, repro, expected, actual, version) and read it back.
|
||||
3. File only with explicit approval:
|
||||
`gh issue create -R Hmbown/Codewhale --title "..." --body "..."`.
|
||||
4. Report the issue URL back.
|
||||
|
||||
## Non-goals
|
||||
- Do not file without showing the user the exact title and body first.
|
||||
- Do not file duplicates — search open issues for the same report first.
|
||||
- Do not include secrets, tokens, or private data in the issue body.
|
||||
Reference in new issue
Block a user