source_monitor 0.7.1 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.claude/commands/release.md +18 -6
- data/.claude/skills/sm-configure/SKILL.md +10 -1
- data/.claude/skills/sm-configure/reference/configuration-reference.md +44 -0
- data/.claude/skills/sm-host-setup/reference/initializer-template.md +17 -0
- data/.claude/skills/sm-host-setup/reference/setup-checklist.md +2 -0
- data/.claude/skills/sm-job/reference/job-conventions.md +26 -0
- data/.claude/skills/sm-upgrade/reference/version-history.md +22 -0
- data/.gitignore +10 -0
- data/AGENTS.md +1 -1
- data/CHANGELOG.md +45 -0
- data/CLAUDE.md +24 -3
- data/Gemfile.lock +1 -1
- data/README.md +6 -4
- data/Rakefile +0 -2
- data/VERSION +1 -1
- data/app/assets/builds/source_monitor/application.css +43 -0
- data/app/assets/builds/source_monitor/application.js +127 -0
- data/app/assets/builds/source_monitor/application.js.map +3 -3
- data/app/assets/javascripts/source_monitor/application.js +2 -0
- data/app/assets/javascripts/source_monitor/controllers/notification_container_controller.js +138 -0
- data/app/assets/javascripts/source_monitor/controllers/notification_controller.js +11 -0
- data/app/controllers/source_monitor/source_favicon_fetches_controller.rb +38 -0
- data/app/controllers/source_monitor/sources_controller.rb +11 -0
- data/app/helpers/source_monitor/application_helper.rb +51 -0
- data/app/jobs/source_monitor/favicon_fetch_job.rb +71 -0
- data/app/jobs/source_monitor/import_opml_job.rb +9 -0
- data/app/jobs/source_monitor/source_health_check_job.rb +10 -0
- data/app/models/source_monitor/source.rb +2 -0
- data/app/views/layouts/source_monitor/application.html.erb +23 -2
- data/app/views/source_monitor/import_sessions/steps/_preview.html.erb +7 -2
- data/app/views/source_monitor/shared/_toast.html.erb +1 -0
- data/app/views/source_monitor/sources/_details.html.erb +34 -5
- data/app/views/source_monitor/sources/_row.html.erb +11 -6
- data/config/routes.rb +1 -0
- data/docs/configuration.md +1 -1
- data/docs/upgrade.md +22 -0
- data/lib/generators/source_monitor/install/templates/source_monitor.rb.tt +15 -1
- data/lib/source_monitor/configuration/favicons_settings.rb +42 -0
- data/lib/source_monitor/configuration/http_settings.rb +1 -1
- data/lib/source_monitor/configuration/scraping_settings.rb +1 -1
- data/lib/source_monitor/configuration.rb +3 -1
- data/lib/source_monitor/favicons/discoverer.rb +196 -0
- data/lib/source_monitor/fetching/feed_fetcher/source_updater.rb +21 -0
- data/lib/source_monitor/fetching/feed_fetcher.rb +1 -0
- data/lib/source_monitor/http.rb +5 -3
- data/lib/source_monitor/version.rb +1 -1
- data/lib/source_monitor.rb +4 -0
- data/source_monitor.gemspec +1 -1
- metadata +6 -106
- data/.vbw-planning/PROJECT.md +0 -51
- data/.vbw-planning/ROADMAP.md +0 -53
- data/.vbw-planning/SHIPPED.md +0 -63
- data/.vbw-planning/STATE.md +0 -27
- data/.vbw-planning/codebase/ARCHITECTURE.md +0 -147
- data/.vbw-planning/codebase/CONCERNS.md +0 -99
- data/.vbw-planning/codebase/CONVENTIONS.md +0 -97
- data/.vbw-planning/codebase/DEPENDENCIES.md +0 -100
- data/.vbw-planning/codebase/INDEX.md +0 -86
- data/.vbw-planning/codebase/META.md +0 -42
- data/.vbw-planning/codebase/PATTERNS.md +0 -262
- data/.vbw-planning/codebase/STACK.md +0 -101
- data/.vbw-planning/codebase/STRUCTURE.md +0 -324
- data/.vbw-planning/codebase/TESTING.md +0 -154
- data/.vbw-planning/config.json +0 -53
- data/.vbw-planning/discovery.json +0 -26
- data/.vbw-planning/milestones/default/ROADMAP.md +0 -115
- data/.vbw-planning/milestones/default/STATE.md +0 -82
- data/.vbw-planning/milestones/default/phases/01-coverage-analysis-quick-wins/PLAN-01-SUMMARY.md +0 -56
- data/.vbw-planning/milestones/default/phases/01-coverage-analysis-quick-wins/PLAN-01.md +0 -187
- data/.vbw-planning/milestones/default/phases/01-coverage-analysis-quick-wins/PLAN-02-SUMMARY.md +0 -64
- data/.vbw-planning/milestones/default/phases/01-coverage-analysis-quick-wins/PLAN-02.md +0 -137
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-01-SUMMARY.md +0 -67
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-01.md +0 -142
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-02-SUMMARY.md +0 -64
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-02.md +0 -138
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-03-SUMMARY.md +0 -85
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-03.md +0 -147
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-04-SUMMARY.md +0 -63
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-04.md +0 -129
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-05-SUMMARY.md +0 -74
- data/.vbw-planning/milestones/default/phases/02-critical-path-test-coverage/PLAN-05.md +0 -154
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/03-VERIFICATION-wave1.md +0 -303
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/03-VERIFICATION.md +0 -510
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-01-SUMMARY.md +0 -61
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-01.md +0 -161
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-02-SUMMARY.md +0 -66
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-02.md +0 -132
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-03-SUMMARY.md +0 -59
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-03.md +0 -171
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-04-SUMMARY.md +0 -56
- data/.vbw-planning/milestones/default/phases/03-large-file-refactoring/PLAN-04.md +0 -152
- data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/04-CONTEXT.md +0 -33
- data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-01-SUMMARY.md +0 -42
- data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-01.md +0 -119
- data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-02-SUMMARY.md +0 -52
- data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-02.md +0 -195
- data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-03-SUMMARY.md +0 -79
- data/.vbw-planning/milestones/default/phases/04-code-quality-conventions-cleanup/PLAN-03.md +0 -130
- data/.vbw-planning/milestones/generator-enhancements/REQUIREMENTS.md +0 -72
- data/.vbw-planning/milestones/generator-enhancements/ROADMAP.md +0 -125
- data/.vbw-planning/milestones/generator-enhancements/SHIPPED.md +0 -40
- data/.vbw-planning/milestones/generator-enhancements/STATE.md +0 -43
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-CONTEXT.md +0 -33
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/01-VERIFICATION.md +0 -86
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01-SUMMARY.md +0 -61
- data/.vbw-planning/milestones/generator-enhancements/phases/01-generator-steps/PLAN-01.md +0 -380
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/02-VERIFICATION.md +0 -78
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/PLAN-01-SUMMARY.md +0 -46
- data/.vbw-planning/milestones/generator-enhancements/phases/02-verification/PLAN-01.md +0 -500
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/03-VERIFICATION.md +0 -89
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/PLAN-01-SUMMARY.md +0 -48
- data/.vbw-planning/milestones/generator-enhancements/phases/03-docs-alignment/PLAN-01.md +0 -456
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/04-VERIFICATION.md +0 -129
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01-SUMMARY.md +0 -70
- data/.vbw-planning/milestones/generator-enhancements/phases/04-dashboard-ux/PLAN-01.md +0 -747
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/05-VERIFICATION.md +0 -156
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-01-SUMMARY.md +0 -69
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-01.md +0 -455
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-02-SUMMARY.md +0 -39
- data/.vbw-planning/milestones/generator-enhancements/phases/05-active-storage-images/PLAN-02.md +0 -488
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/06-VERIFICATION.md +0 -100
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/PLAN-01-SUMMARY.md +0 -37
- data/.vbw-planning/milestones/generator-enhancements/phases/06-netflix-feed-fix/PLAN-01.md +0 -345
- data/.vbw-planning/milestones/upgrade-assurance/REQUIREMENTS.md +0 -80
- data/.vbw-planning/milestones/upgrade-assurance/ROADMAP.md +0 -75
- data/.vbw-planning/milestones/upgrade-assurance/STATE.md +0 -29
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/01-VERIFICATION.md +0 -144
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01-SUMMARY.md +0 -43
- data/.vbw-planning/milestones/upgrade-assurance/phases/01-upgrade-command/PLAN-01.md +0 -405
- data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01-SUMMARY.md +0 -27
- data/.vbw-planning/milestones/upgrade-assurance/phases/02-config-deprecation/PLAN-01.md +0 -303
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/03-VERIFICATION.md +0 -380
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01-SUMMARY.md +0 -36
- data/.vbw-planning/milestones/upgrade-assurance/phases/03-upgrade-skill-docs/PLAN-01.md +0 -652
- data/.vbw-planning/phases/01-aia-certificate-resolution/.context-dev.md +0 -17
- data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-01-SUMMARY.md +0 -26
- data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-01.md +0 -71
- data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-02-SUMMARY.md +0 -16
- data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-02.md +0 -56
- data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-03-SUMMARY.md +0 -17
- data/.vbw-planning/phases/01-aia-certificate-resolution/PLAN-03.md +0 -98
- data/.vbw-planning/phases/02-test-performance/.context-dev.md +0 -75
- data/.vbw-planning/phases/02-test-performance/.context-lead.md +0 -89
- data/.vbw-planning/phases/02-test-performance/.context-qa.md +0 -23
- data/.vbw-planning/phases/02-test-performance/02-RESEARCH.md +0 -56
- data/.vbw-planning/phases/02-test-performance/02-VERIFICATION.md +0 -51
- data/.vbw-planning/phases/02-test-performance/PLAN-01-SUMMARY.md +0 -37
- data/.vbw-planning/phases/02-test-performance/PLAN-01.md +0 -156
- data/.vbw-planning/phases/02-test-performance/PLAN-02-SUMMARY.md +0 -33
- data/.vbw-planning/phases/02-test-performance/PLAN-02.md +0 -120
- data/.vbw-planning/phases/02-test-performance/PLAN-03-SUMMARY.md +0 -30
- data/.vbw-planning/phases/02-test-performance/PLAN-03.md +0 -154
- data/.vbw-planning/phases/02-test-performance/PLAN-04-SUMMARY.md +0 -28
- data/.vbw-planning/phases/02-test-performance/PLAN-04.md +0 -133
|
@@ -1,652 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
phase: 3
|
|
3
|
-
plan: "01"
|
|
4
|
-
title: upgrade-skill-and-documentation
|
|
5
|
-
type: execute
|
|
6
|
-
wave: 1
|
|
7
|
-
depends_on: []
|
|
8
|
-
cross_phase_deps:
|
|
9
|
-
- {phase: 1, plan: "01", artifact: "lib/source_monitor/setup/upgrade_command.rb", reason: "Skill documents the upgrade command workflow"}
|
|
10
|
-
- {phase: 1, plan: "01", artifact: "lib/source_monitor/setup/verification/runner.rb", reason: "Skill references verification suite"}
|
|
11
|
-
- {phase: 1, plan: "01", artifact: "lib/source_monitor/setup/cli.rb", reason: "Skill references CLI entry point"}
|
|
12
|
-
- {phase: 2, plan: "01", artifact: "lib/source_monitor/configuration/deprecation_registry.rb", reason: "Skill covers deprecation warnings in upgrade flow"}
|
|
13
|
-
autonomous: true
|
|
14
|
-
effort_override: thorough
|
|
15
|
-
skills_used: [sm-host-setup]
|
|
16
|
-
files_modified:
|
|
17
|
-
- .claude/skills/sm-upgrade/SKILL.md
|
|
18
|
-
- .claude/skills/sm-upgrade/reference/upgrade-workflow.md
|
|
19
|
-
- .claude/skills/sm-upgrade/reference/version-history.md
|
|
20
|
-
- docs/upgrade.md
|
|
21
|
-
- .claude/skills/sm-host-setup/SKILL.md
|
|
22
|
-
- lib/source_monitor/setup/skills_installer.rb
|
|
23
|
-
- test/lib/source_monitor/setup/skills_installer_test.rb
|
|
24
|
-
- CLAUDE.md
|
|
25
|
-
must_haves:
|
|
26
|
-
truths:
|
|
27
|
-
- "Running `PARALLEL_WORKERS=1 bin/rails test test/lib/source_monitor/setup/skills_installer_test.rb` exits 0 with 0 failures"
|
|
28
|
-
- "Running `bin/rubocop lib/source_monitor/setup/skills_installer.rb` exits 0 with no offenses"
|
|
29
|
-
- "Running `bin/rails test` exits 0 with 1002+ runs and 0 failures"
|
|
30
|
-
- "Running `bin/rubocop` exits 0 with no offenses"
|
|
31
|
-
- "`grep -r 'sm-upgrade' lib/source_monitor/setup/skills_installer.rb` returns a match in CONSUMER_SKILLS"
|
|
32
|
-
- "`grep -r 'sm-upgrade' CLAUDE.md` returns a match in Consumer Skills table"
|
|
33
|
-
artifacts:
|
|
34
|
-
- path: ".claude/skills/sm-upgrade/SKILL.md"
|
|
35
|
-
provides: "AI skill guide for gem upgrade workflows (REQ-29)"
|
|
36
|
-
contains: "sm-upgrade"
|
|
37
|
-
- path: ".claude/skills/sm-upgrade/reference/upgrade-workflow.md"
|
|
38
|
-
provides: "Step-by-step upgrade workflow with CHANGELOG parsing and edge cases"
|
|
39
|
-
contains: "bin/source_monitor upgrade"
|
|
40
|
-
- path: ".claude/skills/sm-upgrade/reference/version-history.md"
|
|
41
|
-
provides: "Version-specific upgrade notes for agents to reference"
|
|
42
|
-
contains: "0.3.x"
|
|
43
|
-
- path: "docs/upgrade.md"
|
|
44
|
-
provides: "Human-readable upgrade guide with version-specific instructions (REQ-30)"
|
|
45
|
-
contains: "Upgrade Guide"
|
|
46
|
-
- path: ".claude/skills/sm-host-setup/SKILL.md"
|
|
47
|
-
provides: "Updated host setup skill with cross-reference to upgrade flow"
|
|
48
|
-
contains: "sm-upgrade"
|
|
49
|
-
- path: "lib/source_monitor/setup/skills_installer.rb"
|
|
50
|
-
provides: "Skills installer updated with sm-upgrade in CONSUMER_SKILLS"
|
|
51
|
-
contains: "sm-upgrade"
|
|
52
|
-
- path: "test/lib/source_monitor/setup/skills_installer_test.rb"
|
|
53
|
-
provides: "Tests still pass with updated CONSUMER_SKILLS constant"
|
|
54
|
-
contains: "sm-upgrade"
|
|
55
|
-
- path: "CLAUDE.md"
|
|
56
|
-
provides: "Updated skill catalog listing sm-upgrade"
|
|
57
|
-
contains: "sm-upgrade"
|
|
58
|
-
key_links:
|
|
59
|
-
- from: "SKILL.md"
|
|
60
|
-
to: "REQ-29"
|
|
61
|
-
via: "Skill covers CHANGELOG parsing, running upgrade command, interpreting results, handling edge cases"
|
|
62
|
-
- from: "docs/upgrade.md"
|
|
63
|
-
to: "REQ-30"
|
|
64
|
-
via: "Versioned upgrade guide with general steps, 0.3.x to 0.4.x notes, troubleshooting"
|
|
65
|
-
- from: "SKILL.md"
|
|
66
|
-
to: "upgrade_command.rb"
|
|
67
|
-
via: "Skill references the upgrade command as the primary tool"
|
|
68
|
-
- from: "SKILL.md"
|
|
69
|
-
to: "deprecation_registry.rb"
|
|
70
|
-
via: "Skill covers interpreting deprecation warnings during upgrade"
|
|
71
|
-
- from: "sm-host-setup/SKILL.md"
|
|
72
|
-
to: "SKILL.md"
|
|
73
|
-
via: "Host setup skill cross-references sm-upgrade for post-install upgrades"
|
|
74
|
-
- from: "skills_installer.rb"
|
|
75
|
-
to: "SKILL.md"
|
|
76
|
-
via: "Installer distributes sm-upgrade as a consumer skill to host apps"
|
|
77
|
-
---
|
|
78
|
-
<objective>
|
|
79
|
-
Create the `sm-upgrade` AI skill (REQ-29) and `docs/upgrade.md` human upgrade guide (REQ-30), then wire the skill into the skills installer as a consumer skill. The sm-upgrade skill teaches AI agents how to guide host app developers through gem updates -- reading the CHANGELOG between versions, running `bin/source_monitor upgrade`, interpreting verification results, and handling deprecation warnings and edge cases. The docs/upgrade.md provides the same guidance in human-readable form with version-specific migration notes (0.3.x to 0.4.x, 0.4.x to current). Update sm-host-setup to cross-reference the upgrade flow, and update CLAUDE.md to list the new skill.
|
|
80
|
-
</objective>
|
|
81
|
-
<context>
|
|
82
|
-
@lib/source_monitor/setup/upgrade_command.rb -- The upgrade command orchestrator built in Phase 1. It compares the stored `.source_monitor_version` marker against `SourceMonitor::VERSION`, and if different: runs MigrationInstaller, re-runs InstallGenerator, runs Verification::Runner, then writes the new version marker. If same: returns "Already up to date" summary. The skill must document this full workflow and what each step does, so agents can explain outputs to users.
|
|
83
|
-
|
|
84
|
-
@lib/source_monitor/setup/cli.rb -- The Thor CLI that provides `bin/source_monitor upgrade` as the entry point. Also provides `install` and `verify` subcommands. The skill should reference all three commands in context (upgrade is primary, verify for post-upgrade checks, install for first-time setup).
|
|
85
|
-
|
|
86
|
-
@lib/source_monitor/setup/verification/runner.rb -- Runs 4 verifiers in sequence: PendingMigrationsVerifier, SolidQueueVerifier, RecurringScheduleVerifier, ActionCableVerifier. The upgrade command calls this automatically. The skill should explain what each verifier checks and how to interpret failures.
|
|
87
|
-
|
|
88
|
-
@lib/source_monitor/configuration/deprecation_registry.rb -- The deprecation framework built in Phase 2. When host apps upgrade and their initializer uses deprecated config options, they get :warning or :error messages. The skill must cover how to handle these: read the deprecation message, find the replacement option, update the initializer, re-run configure.
|
|
89
|
-
|
|
90
|
-
@CHANGELOG.md -- Keep a Changelog format with version sections. The skill should teach agents to parse this file to identify what changed between the user's current version and the target version. Each version section has Added/Changed/Fixed/Removed subsections.
|
|
91
|
-
|
|
92
|
-
@.claude/skills/sm-host-setup/SKILL.md -- Existing consumer skill for initial setup. Has a "When to Use" section that includes "Re-running setup after upgrading the gem" -- this should be updated to reference the sm-upgrade skill instead. Add a cross-reference in the References section pointing to sm-upgrade for upgrade workflows.
|
|
93
|
-
|
|
94
|
-
@lib/source_monitor/setup/skills_installer.rb -- The installer that copies sm-* skills to host apps. CONSUMER_SKILLS constant must include "sm-upgrade". The test file creates fake skills for each entry in CONSUMER_SKILLS, so updating the constant means the test will automatically include sm-upgrade in its assertions.
|
|
95
|
-
|
|
96
|
-
@test/lib/source_monitor/setup/skills_installer_test.rb -- Tests for the skills installer. Tests iterate CONSUMER_SKILLS and CONTRIBUTOR_SKILLS constants. Adding sm-upgrade to CONSUMER_SKILLS is enough -- existing test assertions use the constants dynamically. However, the first test "install defaults to consumer group" hardcodes specific skill names ("sm-dashboard-widget", "sm-host-setup") and should NOT need updating since it only checks a subset. Verify this after the change.
|
|
97
|
-
|
|
98
|
-
@docs/setup.md -- Existing setup documentation. The upgrade guide should cross-reference this for initial installation. The setup doc should NOT be modified (it already covers initial install).
|
|
99
|
-
|
|
100
|
-
@docs/troubleshooting.md -- Existing troubleshooting guide. The upgrade guide should link to this for common issues. The troubleshooting doc should NOT be modified.
|
|
101
|
-
|
|
102
|
-
@CLAUDE.md lines 182-209 -- Consumer and Contributor Skills tables. Add sm-upgrade row to the Consumer Skills table.
|
|
103
|
-
</context>
|
|
104
|
-
<tasks>
|
|
105
|
-
<task type="auto">
|
|
106
|
-
<name>create-sm-upgrade-skill</name>
|
|
107
|
-
<files>
|
|
108
|
-
.claude/skills/sm-upgrade/SKILL.md
|
|
109
|
-
</files>
|
|
110
|
-
<action>
|
|
111
|
-
Create `.claude/skills/sm-upgrade/SKILL.md` following the established skill file pattern (frontmatter with name, description, allowed-tools, then markdown body).
|
|
112
|
-
|
|
113
|
-
Frontmatter:
|
|
114
|
-
```yaml
|
|
115
|
-
---
|
|
116
|
-
name: sm-upgrade
|
|
117
|
-
description: Use when upgrading SourceMonitor to a new gem version, including CHANGELOG review, running the upgrade command, interpreting verification results, and handling configuration deprecations.
|
|
118
|
-
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
|
119
|
-
---
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Body sections (follow the pattern from sm-host-setup):
|
|
123
|
-
|
|
124
|
-
**# sm-upgrade: Gem Upgrade Workflow**
|
|
125
|
-
|
|
126
|
-
Brief intro: guides agents through upgrading SourceMonitor in a host Rails application after a new gem version is released.
|
|
127
|
-
|
|
128
|
-
**## When to Use**
|
|
129
|
-
- Host app is updating the source_monitor gem version in Gemfile
|
|
130
|
-
- User reports deprecation warnings after a gem update
|
|
131
|
-
- User wants to know what changed between versions
|
|
132
|
-
- Troubleshooting a broken upgrade
|
|
133
|
-
- Migrating configuration after breaking changes
|
|
134
|
-
|
|
135
|
-
**## Prerequisites**
|
|
136
|
-
Table: existing SourceMonitor installation (check `.source_monitor_version` or `config/initializers/source_monitor.rb`), access to CHANGELOG.md (bundled with gem).
|
|
137
|
-
|
|
138
|
-
**## Upgrade Workflow**
|
|
139
|
-
|
|
140
|
-
Step-by-step numbered workflow:
|
|
141
|
-
1. **Review CHANGELOG** -- Read `CHANGELOG.md` in the gem source. Identify changes between the current installed version (from `.source_monitor_version` or `Gemfile.lock`) and the target version. Focus on Added, Changed, Fixed, Removed sections. Flag any breaking changes or deprecation notices.
|
|
142
|
-
2. **Update Gemfile** -- Bump the version constraint in the host app's Gemfile: `gem "source_monitor", "~> X.Y"`. Run `bundle update source_monitor`.
|
|
143
|
-
3. **Run the upgrade command** -- `bin/source_monitor upgrade`. This automatically: detects the version change via `.source_monitor_version` marker, copies new migrations, re-runs the install generator (idempotent), runs the full verification suite.
|
|
144
|
-
4. **Run database migrations** -- `bin/rails db:migrate` if the upgrade command copied new migrations.
|
|
145
|
-
5. **Handle deprecation warnings** -- If the configure block in the initializer uses deprecated options, Rails logger will show warnings at boot. Read each warning, identify the replacement, update the initializer. See `sm-configure` skill for configuration reference.
|
|
146
|
-
6. **Run verification** -- `bin/source_monitor verify` to confirm all checks pass.
|
|
147
|
-
7. **Restart processes** -- Restart web server and Solid Queue workers to pick up the new version.
|
|
148
|
-
|
|
149
|
-
**## Interpreting Upgrade Results**
|
|
150
|
-
|
|
151
|
-
Table of verification check results and what they mean:
|
|
152
|
-
| Check | OK | Warning | Failure |
|
|
153
|
-
| PendingMigrations | All engine migrations present | - | Missing migrations need copying |
|
|
154
|
-
| SolidQueue | Workers running | - | Start Solid Queue workers |
|
|
155
|
-
| RecurringSchedule | Tasks registered | - | Re-run generator or check queue.yml |
|
|
156
|
-
| ActionCable | Adapter configured | - | Configure Solid Cable or Redis |
|
|
157
|
-
|
|
158
|
-
**## Handling Deprecation Warnings**
|
|
159
|
-
|
|
160
|
-
Explain the two severity levels:
|
|
161
|
-
- `:warning` -- Option renamed. The old name still works but logs a deprecation message. Update initializer to use the new option name. The message includes the replacement path.
|
|
162
|
-
- `:error` -- Option removed. Using the old name raises `SourceMonitor::DeprecatedOptionError`. You must remove or replace the option before the app can boot.
|
|
163
|
-
|
|
164
|
-
Pattern for fixing:
|
|
165
|
-
1. Read the deprecation message (logged to Rails.logger or raised as error)
|
|
166
|
-
2. Find the replacement option path in the message
|
|
167
|
-
3. Update `config/initializers/source_monitor.rb`
|
|
168
|
-
4. Restart and verify
|
|
169
|
-
|
|
170
|
-
**## Edge Cases**
|
|
171
|
-
|
|
172
|
-
- **First install (no .source_monitor_version file):** Upgrade command treats this as a version change and runs the full workflow. Safe to run on first install.
|
|
173
|
-
- **Same version (no change):** Command reports "Already up to date (vX.Y.Z)" and exits cleanly.
|
|
174
|
-
- **Skipped versions (e.g., 0.2.0 to 0.4.0):** Read all CHANGELOG sections between the two versions. Multiple migrations may need running.
|
|
175
|
-
- **Failed verification after upgrade:** Read the verification output. Most common: pending migrations (run db:migrate), missing Solid Queue workers (start workers), stale recurring schedule (re-run generator).
|
|
176
|
-
- **Custom scrapers or event handlers:** Check CHANGELOG for API changes in Scrapers::Base or event callback signatures.
|
|
177
|
-
|
|
178
|
-
**## Key Source Files**
|
|
179
|
-
|
|
180
|
-
Table mapping file to purpose:
|
|
181
|
-
| File | Purpose |
|
|
182
|
-
| `lib/source_monitor/setup/upgrade_command.rb` | Upgrade orchestrator |
|
|
183
|
-
| `lib/source_monitor/setup/cli.rb` | CLI entry point (`bin/source_monitor upgrade`) |
|
|
184
|
-
| `lib/source_monitor/setup/verification/runner.rb` | Verification runner (4 verifiers) |
|
|
185
|
-
| `lib/source_monitor/configuration/deprecation_registry.rb` | Deprecation framework |
|
|
186
|
-
| `CHANGELOG.md` | Version history (Keep a Changelog format) |
|
|
187
|
-
| `.source_monitor_version` | Version marker in host app root |
|
|
188
|
-
|
|
189
|
-
**## References**
|
|
190
|
-
- `docs/upgrade.md` -- Human-readable upgrade guide
|
|
191
|
-
- `docs/setup.md` -- Initial setup documentation
|
|
192
|
-
- `docs/troubleshooting.md` -- Common issues and fixes
|
|
193
|
-
- `sm-host-setup` skill -- Initial installation workflow
|
|
194
|
-
- `sm-configure` skill -- Configuration reference for updating deprecated options
|
|
195
|
-
|
|
196
|
-
**## Checklist**
|
|
197
|
-
- [ ] CHANGELOG reviewed for version range
|
|
198
|
-
- [ ] Gemfile updated and `bundle update source_monitor` run
|
|
199
|
-
- [ ] `bin/source_monitor upgrade` completed successfully
|
|
200
|
-
- [ ] Database migrations applied if needed
|
|
201
|
-
- [ ] Deprecation warnings addressed in initializer
|
|
202
|
-
- [ ] `bin/source_monitor verify` passes all checks
|
|
203
|
-
- [ ] Web server and workers restarted
|
|
204
|
-
</action>
|
|
205
|
-
<verify>
|
|
206
|
-
Read the created file. Confirm: (a) frontmatter has name/description/allowed-tools, (b) all 8 body sections present (When to Use, Prerequisites, Upgrade Workflow, Interpreting Results, Handling Deprecation Warnings, Edge Cases, Key Source Files, References), (c) references upgrade_command.rb, cli.rb, verification runner, deprecation_registry.rb, (d) covers CHANGELOG parsing workflow, (e) documents both :warning and :error deprecation severities, (f) checklist present.
|
|
207
|
-
</verify>
|
|
208
|
-
<done>
|
|
209
|
-
sm-upgrade SKILL.md created with comprehensive upgrade workflow guide covering CHANGELOG parsing, upgrade command, verification interpretation, deprecation handling, and edge cases.
|
|
210
|
-
</done>
|
|
211
|
-
</task>
|
|
212
|
-
<task type="auto">
|
|
213
|
-
<name>create-sm-upgrade-reference-files</name>
|
|
214
|
-
<files>
|
|
215
|
-
.claude/skills/sm-upgrade/reference/upgrade-workflow.md
|
|
216
|
-
.claude/skills/sm-upgrade/reference/version-history.md
|
|
217
|
-
</files>
|
|
218
|
-
<action>
|
|
219
|
-
Create two reference files in `.claude/skills/sm-upgrade/reference/`.
|
|
220
|
-
|
|
221
|
-
**File 1: `upgrade-workflow.md`**
|
|
222
|
-
|
|
223
|
-
Detailed step-by-step reference that agents can follow mechanically. This is more prescriptive than the SKILL.md overview.
|
|
224
|
-
|
|
225
|
-
Title: "Upgrade Workflow Reference"
|
|
226
|
-
|
|
227
|
-
Sections:
|
|
228
|
-
|
|
229
|
-
**## Pre-Upgrade Checklist**
|
|
230
|
-
1. Identify current version: `grep source_monitor Gemfile.lock` or `cat .source_monitor_version`
|
|
231
|
-
2. Identify target version: check RubyGems or GitHub releases
|
|
232
|
-
3. Read CHANGELOG.md between those versions (in gem source: `bundle show source_monitor` to find gem path, then read CHANGELOG.md)
|
|
233
|
-
4. Note any breaking changes, removed options, or new required configuration
|
|
234
|
-
|
|
235
|
-
**## CHANGELOG Parsing Guide**
|
|
236
|
-
- Format: Keep a Changelog (https://keepachangelog.com)
|
|
237
|
-
- Each version has a `## [X.Y.Z] - YYYY-MM-DD` header
|
|
238
|
-
- Subsections: Added, Changed, Fixed, Removed, Deprecated, Security
|
|
239
|
-
- For multi-version jumps, read ALL sections between current and target
|
|
240
|
-
- Key things to flag: "Removed" entries (breaking), "Changed" entries (behavioral), "Deprecated" entries (action needed)
|
|
241
|
-
- Example: To upgrade from 0.3.1 to 0.4.0, read sections [0.3.2], [0.3.3], and [0.4.0]
|
|
242
|
-
|
|
243
|
-
**## Upgrade Command Internals**
|
|
244
|
-
How `bin/source_monitor upgrade` works internally:
|
|
245
|
-
1. Reads `.source_monitor_version` from host app root (nil if first run)
|
|
246
|
-
2. Compares stored version against `SourceMonitor::VERSION` (current gem version)
|
|
247
|
-
3. If same: returns "Already up to date" with exit 0
|
|
248
|
-
4. If different:
|
|
249
|
-
a. `MigrationInstaller.install` -- copies new engine migrations to `db/migrate/`
|
|
250
|
-
b. `InstallGenerator.run` -- re-runs the install generator (idempotent: skips existing routes, initializer, etc.)
|
|
251
|
-
c. `Verification::Runner.call` -- runs all 4 verifiers
|
|
252
|
-
d. Writes current version to `.source_monitor_version`
|
|
253
|
-
5. Prints verification summary and exits (0 = all OK, 1 = any failure)
|
|
254
|
-
|
|
255
|
-
**## Post-Upgrade Verification**
|
|
256
|
-
Detailed explanation of each verifier:
|
|
257
|
-
- **PendingMigrationsVerifier**: Checks that all SourceMonitor migrations in the gem have corresponding files in host `db/migrate/`. Warns if any are missing or not yet run. Fix: `bin/rails db:migrate`.
|
|
258
|
-
- **SolidQueueVerifier**: Checks that Solid Queue workers are running. Fix: start workers via `bin/rails solid_queue:start` or ensure `Procfile.dev` has a `jobs:` entry.
|
|
259
|
-
- **RecurringScheduleVerifier**: Checks that SourceMonitor recurring tasks (ScheduleFetchesJob, scrape scheduling, cleanup jobs) are registered in Solid Queue. Fix: ensure `config/recurring.yml` exists and `config/queue.yml` dispatchers have `recurring_schedule: config/recurring.yml`.
|
|
260
|
-
- **ActionCableVerifier**: Checks that Action Cable is configured with a production-ready adapter (Solid Cable or Redis). Fix: add Solid Cable gem or configure Redis adapter.
|
|
261
|
-
|
|
262
|
-
**## Troubleshooting Common Upgrade Issues**
|
|
263
|
-
- "Already up to date" but expected changes: Check that `bundle update source_monitor` actually pulled the new version. Verify `Gemfile.lock` shows the expected version.
|
|
264
|
-
- Migrations fail: Check for conflicting migration timestamps. Remove duplicates and re-run `bin/rails db:migrate`.
|
|
265
|
-
- Deprecation errors at boot: Option was removed. Check the error message for the replacement. Update initializer before restarting.
|
|
266
|
-
- Generator fails: Usually safe to re-run manually: `bin/rails generate source_monitor:install`. It is idempotent.
|
|
267
|
-
|
|
268
|
-
**File 2: `version-history.md`**
|
|
269
|
-
|
|
270
|
-
Version-specific upgrade notes for each major/minor version transition.
|
|
271
|
-
|
|
272
|
-
Title: "Version-Specific Upgrade Notes"
|
|
273
|
-
|
|
274
|
-
**## 0.3.x to 0.4.0**
|
|
275
|
-
Released: 2026-02-12
|
|
276
|
-
|
|
277
|
-
Key changes:
|
|
278
|
-
- Install generator now auto-patches `Procfile.dev` and `queue.yml` dispatcher config
|
|
279
|
-
- New Active Storage image download feature (opt-in via `config.images.download_to_active_storage`)
|
|
280
|
-
- SSL certificate store configuration added to HTTPSettings
|
|
281
|
-
- RecurringScheduleVerifier and SolidQueueVerifier enhanced with better remediation messages
|
|
282
|
-
|
|
283
|
-
Action items:
|
|
284
|
-
1. Re-run `bin/source_monitor upgrade` (or `bin/rails generate source_monitor:install`) to get Procfile.dev and queue.yml patches
|
|
285
|
-
2. If using Active Storage image downloads, add `config.images.download_to_active_storage = true` to initializer
|
|
286
|
-
3. If experiencing SSL certificate errors, new `config.http.ssl_*` settings are available
|
|
287
|
-
4. No breaking changes -- all existing configuration remains valid
|
|
288
|
-
|
|
289
|
-
**## 0.2.x to 0.3.0**
|
|
290
|
-
Released: 2026-02-10
|
|
291
|
-
|
|
292
|
-
Key changes:
|
|
293
|
-
- Major refactoring: FeedFetcher, Configuration, ImportSessionsController, ItemCreator all extracted into smaller modules
|
|
294
|
-
- Ruby autoload replaces eager requires in `lib/source_monitor.rb`
|
|
295
|
-
- LogEntry no longer uses hard-coded table name
|
|
296
|
-
- Skills system added (14 `sm-*` skills)
|
|
297
|
-
|
|
298
|
-
Action items:
|
|
299
|
-
1. If you monkey-patched or referenced internal classes (FeedFetcher internals, Configuration nested classes), check that your references still resolve
|
|
300
|
-
2. Run `bin/source_monitor upgrade` to copy any new migrations
|
|
301
|
-
3. Optionally install skills: `bin/rails source_monitor:skills:install`
|
|
302
|
-
4. No configuration changes required -- public API unchanged
|
|
303
|
-
|
|
304
|
-
**## 0.1.x to 0.2.0**
|
|
305
|
-
Released: 2025-11-25
|
|
306
|
-
|
|
307
|
-
Key changes:
|
|
308
|
-
- OPML import wizard added
|
|
309
|
-
- ImportHistory model and migrations added
|
|
310
|
-
|
|
311
|
-
Action items:
|
|
312
|
-
1. Copy and run new migrations: `bin/rails railties:install:migrations FROM=source_monitor && bin/rails db:migrate`
|
|
313
|
-
2. No configuration changes required
|
|
314
|
-
|
|
315
|
-
**## Future Versions**
|
|
316
|
-
Template for documenting future upgrades:
|
|
317
|
-
```
|
|
318
|
-
## X.Y.Z to A.B.C
|
|
319
|
-
Released: YYYY-MM-DD
|
|
320
|
-
|
|
321
|
-
Key changes:
|
|
322
|
-
- ...
|
|
323
|
-
|
|
324
|
-
Action items:
|
|
325
|
-
1. ...
|
|
326
|
-
|
|
327
|
-
Deprecations:
|
|
328
|
-
- `old_option` replaced by `new_option` (warning in A.B.C, removal planned for D.E.F)
|
|
329
|
-
```
|
|
330
|
-
</action>
|
|
331
|
-
<verify>
|
|
332
|
-
Read both created files. Confirm: (a) upgrade-workflow.md has Pre-Upgrade Checklist, CHANGELOG Parsing Guide, Upgrade Command Internals, Post-Upgrade Verification, and Troubleshooting sections, (b) version-history.md has sections for 0.3.x->0.4.0, 0.2.x->0.3.0, 0.1.x->0.2.0 transitions, (c) both files reference correct file paths and command names, (d) upgrade-workflow.md documents all 4 verifiers.
|
|
333
|
-
</verify>
|
|
334
|
-
<done>
|
|
335
|
-
Two reference files created: upgrade-workflow.md with detailed mechanical workflow and CHANGELOG parsing guide; version-history.md with version-specific migration notes for all released transitions.
|
|
336
|
-
</done>
|
|
337
|
-
</task>
|
|
338
|
-
<task type="auto">
|
|
339
|
-
<name>create-docs-upgrade-and-cross-reference-host-setup</name>
|
|
340
|
-
<files>
|
|
341
|
-
docs/upgrade.md
|
|
342
|
-
.claude/skills/sm-host-setup/SKILL.md
|
|
343
|
-
</files>
|
|
344
|
-
<action>
|
|
345
|
-
**File 1: Create `docs/upgrade.md`**
|
|
346
|
-
|
|
347
|
-
Human-readable upgrade guide (REQ-30). This is for developers reading docs, not AI agents.
|
|
348
|
-
|
|
349
|
-
Title: "# SourceMonitor Upgrade Guide"
|
|
350
|
-
|
|
351
|
-
**## General Upgrade Steps**
|
|
352
|
-
|
|
353
|
-
Numbered list:
|
|
354
|
-
1. Review the [CHANGELOG](../CHANGELOG.md) for changes between your current and target versions
|
|
355
|
-
2. Update your Gemfile version constraint and run `bundle update source_monitor`
|
|
356
|
-
3. Run the upgrade command: `bin/source_monitor upgrade`
|
|
357
|
-
4. Apply database migrations if new ones were copied: `bin/rails db:migrate`
|
|
358
|
-
5. Address any deprecation warnings in your initializer (see Deprecation Handling below)
|
|
359
|
-
6. Run verification: `bin/source_monitor verify`
|
|
360
|
-
7. Restart your web server and background workers
|
|
361
|
-
|
|
362
|
-
**## Quick Upgrade (Most Cases)**
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
# 1. Update the gem
|
|
366
|
-
bundle update source_monitor
|
|
367
|
-
|
|
368
|
-
# 2. Run the upgrade command (handles migrations, generator, verification)
|
|
369
|
-
bin/source_monitor upgrade
|
|
370
|
-
|
|
371
|
-
# 3. Migrate if needed
|
|
372
|
-
bin/rails db:migrate
|
|
373
|
-
|
|
374
|
-
# 4. Restart
|
|
375
|
-
# (restart web server and Solid Queue workers)
|
|
376
|
-
```
|
|
377
|
-
|
|
378
|
-
**## Deprecation Handling**
|
|
379
|
-
|
|
380
|
-
When upgrading, you may see deprecation warnings in your Rails log:
|
|
381
|
-
|
|
382
|
-
```
|
|
383
|
-
[SourceMonitor] DEPRECATION: 'http.old_option' was deprecated in v0.5.0 and replaced by 'http.new_option'.
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
To resolve:
|
|
387
|
-
1. Open `config/initializers/source_monitor.rb`
|
|
388
|
-
2. Find the deprecated option (e.g., `config.http.old_option = value`)
|
|
389
|
-
3. Replace with the new option from the warning message (e.g., `config.http.new_option = value`)
|
|
390
|
-
4. Restart and verify the warning is gone
|
|
391
|
-
|
|
392
|
-
If a removed option raises an error (`SourceMonitor::DeprecatedOptionError`), you must update the initializer before the app can boot.
|
|
393
|
-
|
|
394
|
-
**## Version-Specific Notes**
|
|
395
|
-
|
|
396
|
-
### Upgrading to 0.4.0 (from 0.3.x)
|
|
397
|
-
|
|
398
|
-
**Released:** 2026-02-12
|
|
399
|
-
|
|
400
|
-
**What changed:**
|
|
401
|
-
- Install generator now auto-patches `Procfile.dev` with a Solid Queue `jobs:` entry
|
|
402
|
-
- Install generator now patches `config/queue.yml` dispatcher with `recurring_schedule: config/recurring.yml`
|
|
403
|
-
- Active Storage image download feature added (opt-in)
|
|
404
|
-
- SSL certificate configuration added to HTTP settings
|
|
405
|
-
- Enhanced verification messages for SolidQueue and RecurringSchedule verifiers
|
|
406
|
-
|
|
407
|
-
**Upgrade steps:**
|
|
408
|
-
```bash
|
|
409
|
-
bundle update source_monitor
|
|
410
|
-
bin/source_monitor upgrade
|
|
411
|
-
bin/rails db:migrate
|
|
412
|
-
```
|
|
413
|
-
|
|
414
|
-
**Notes:**
|
|
415
|
-
- No breaking changes. All existing configuration remains valid.
|
|
416
|
-
- Re-running the generator (`bin/rails generate source_monitor:install`) will add missing `Procfile.dev` and `queue.yml` entries without overwriting existing config.
|
|
417
|
-
- New optional features: `config.images.download_to_active_storage = true`, `config.http.ssl_ca_file`, `config.http.ssl_ca_path`, `config.http.ssl_verify`.
|
|
418
|
-
|
|
419
|
-
### Upgrading to 0.3.0 (from 0.2.x)
|
|
420
|
-
|
|
421
|
-
**Released:** 2026-02-10
|
|
422
|
-
|
|
423
|
-
**What changed:**
|
|
424
|
-
- Internal refactoring: FeedFetcher, Configuration, ImportSessionsController, and ItemCreator extracted into smaller modules
|
|
425
|
-
- Eager requires replaced with Ruby autoload
|
|
426
|
-
- Skills system added (14 `sm-*` Claude Code skills)
|
|
427
|
-
|
|
428
|
-
**Upgrade steps:**
|
|
429
|
-
```bash
|
|
430
|
-
bundle update source_monitor
|
|
431
|
-
bin/source_monitor upgrade
|
|
432
|
-
bin/rails db:migrate
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
**Notes:**
|
|
436
|
-
- No breaking changes to the public API.
|
|
437
|
-
- If you referenced internal classes directly (e.g., `SourceMonitor::FeedFetcher` internals), verify your code against the new module structure.
|
|
438
|
-
- Optionally install AI skills: `bin/rails source_monitor:skills:install`
|
|
439
|
-
|
|
440
|
-
### Upgrading to 0.2.0 (from 0.1.x)
|
|
441
|
-
|
|
442
|
-
**Released:** 2025-11-25
|
|
443
|
-
|
|
444
|
-
**What changed:**
|
|
445
|
-
- OPML import wizard with multi-step flow
|
|
446
|
-
- New `ImportHistory` model and associated migrations
|
|
447
|
-
|
|
448
|
-
**Upgrade steps:**
|
|
449
|
-
```bash
|
|
450
|
-
bundle update source_monitor
|
|
451
|
-
bin/rails railties:install:migrations FROM=source_monitor
|
|
452
|
-
bin/rails db:migrate
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
**Notes:**
|
|
456
|
-
- New database tables required. Run migrations after updating.
|
|
457
|
-
- No configuration changes needed.
|
|
458
|
-
|
|
459
|
-
**## Troubleshooting**
|
|
460
|
-
|
|
461
|
-
### "Already up to date" but I expected changes
|
|
462
|
-
- Verify the gem version actually changed: `bundle show source_monitor`
|
|
463
|
-
- Check `Gemfile.lock` for the resolved version
|
|
464
|
-
- If the `.source_monitor_version` marker was manually edited, delete it and re-run upgrade
|
|
465
|
-
|
|
466
|
-
### Migrations fail with duplicate timestamps
|
|
467
|
-
- Remove the duplicate migration file from `db/migrate/` (keep the newer one)
|
|
468
|
-
- Re-run `bin/rails db:migrate`
|
|
469
|
-
|
|
470
|
-
### Deprecation error prevents boot
|
|
471
|
-
- Read the error message for the replacement option
|
|
472
|
-
- Update your initializer before restarting
|
|
473
|
-
- If unsure which option to use, consult `docs/configuration.md`
|
|
474
|
-
|
|
475
|
-
### Verification failures after upgrade
|
|
476
|
-
- **PendingMigrations:** Run `bin/rails db:migrate`
|
|
477
|
-
- **SolidQueue:** Ensure workers are running. Check `Procfile.dev` for a `jobs:` entry.
|
|
478
|
-
- **RecurringSchedule:** Re-run `bin/rails generate source_monitor:install` to patch `config/queue.yml`
|
|
479
|
-
- **ActionCable:** Configure Solid Cable or Redis adapter
|
|
480
|
-
|
|
481
|
-
For additional help, see [Troubleshooting](troubleshooting.md).
|
|
482
|
-
|
|
483
|
-
**## See Also**
|
|
484
|
-
- [Setup Guide](setup.md) -- Initial installation
|
|
485
|
-
- [Configuration Reference](configuration.md) -- All configuration options
|
|
486
|
-
- [Troubleshooting](troubleshooting.md) -- Common issues and fixes
|
|
487
|
-
- [CHANGELOG](../CHANGELOG.md) -- Full version history
|
|
488
|
-
|
|
489
|
-
---
|
|
490
|
-
|
|
491
|
-
**File 2: Update `.claude/skills/sm-host-setup/SKILL.md`**
|
|
492
|
-
|
|
493
|
-
Make two changes:
|
|
494
|
-
|
|
495
|
-
1. In the "## When to Use" section, change the bullet "Re-running setup after upgrading the gem" to:
|
|
496
|
-
"Re-running setup after upgrading the gem (see also: `sm-upgrade` skill for full upgrade workflow)"
|
|
497
|
-
|
|
498
|
-
2. In the "## References" section at the bottom, add a new bullet:
|
|
499
|
-
"- `sm-upgrade` skill -- Upgrade workflow for gem version updates"
|
|
500
|
-
|
|
501
|
-
3. In the "## Testing" section, after item 3 ("Create a source and trigger..."), add item 4:
|
|
502
|
-
"4. For subsequent gem updates, use `bin/source_monitor upgrade` -- see the `sm-upgrade` skill"
|
|
503
|
-
</action>
|
|
504
|
-
<verify>
|
|
505
|
-
Read `docs/upgrade.md`. Confirm: (a) General Upgrade Steps section with 7 steps, (b) Quick Upgrade section with bash commands, (c) Deprecation Handling section with example warning message, (d) version-specific notes for 0.4.0, 0.3.0, 0.2.0, (e) Troubleshooting section with 4 subsections, (f) See Also section linking to setup, configuration, troubleshooting, CHANGELOG.
|
|
506
|
-
|
|
507
|
-
Read `.claude/skills/sm-host-setup/SKILL.md`. Confirm: (a) "When to Use" bullet updated to reference sm-upgrade, (b) References section includes sm-upgrade, (c) Testing section includes item 4 referencing sm-upgrade.
|
|
508
|
-
</verify>
|
|
509
|
-
<done>
|
|
510
|
-
docs/upgrade.md created with general steps, quick upgrade commands, deprecation handling, version-specific notes for all 3 major transitions, and troubleshooting. sm-host-setup SKILL.md updated with 3 cross-references to sm-upgrade.
|
|
511
|
-
</done>
|
|
512
|
-
</task>
|
|
513
|
-
<task type="auto">
|
|
514
|
-
<name>update-skills-installer-and-catalog</name>
|
|
515
|
-
<files>
|
|
516
|
-
lib/source_monitor/setup/skills_installer.rb
|
|
517
|
-
test/lib/source_monitor/setup/skills_installer_test.rb
|
|
518
|
-
CLAUDE.md
|
|
519
|
-
</files>
|
|
520
|
-
<action>
|
|
521
|
-
**File 1: Update `lib/source_monitor/setup/skills_installer.rb`**
|
|
522
|
-
|
|
523
|
-
Add `sm-upgrade` to the CONSUMER_SKILLS constant. Insert it in alphabetical order within the array:
|
|
524
|
-
|
|
525
|
-
```ruby
|
|
526
|
-
CONSUMER_SKILLS = %w[
|
|
527
|
-
sm-configure sm-dashboard-widget sm-event-handler
|
|
528
|
-
sm-host-setup sm-model-extension sm-scraper-adapter
|
|
529
|
-
sm-upgrade
|
|
530
|
-
].freeze
|
|
531
|
-
```
|
|
532
|
-
|
|
533
|
-
Note: the original order is not strictly alphabetical (sm-host-setup comes first). Maintain the existing grouping style but add sm-upgrade at the end of the array (after sm-dashboard-widget, before the closing bracket), keeping the same line-break pattern:
|
|
534
|
-
|
|
535
|
-
```ruby
|
|
536
|
-
CONSUMER_SKILLS = %w[
|
|
537
|
-
sm-host-setup sm-configure sm-scraper-adapter
|
|
538
|
-
sm-event-handler sm-model-extension sm-dashboard-widget
|
|
539
|
-
sm-upgrade
|
|
540
|
-
].freeze
|
|
541
|
-
```
|
|
542
|
-
|
|
543
|
-
**File 2: Update `test/lib/source_monitor/setup/skills_installer_test.rb`**
|
|
544
|
-
|
|
545
|
-
The existing tests iterate `SkillsInstaller::CONSUMER_SKILLS` dynamically, so they will automatically pick up the new entry. However, the first test "install defaults to consumer group" only creates 3 fake skills ("sm-dashboard-widget", "sm-host-setup", "sm-domain-model"). It checks that consumer skills are installed and contributor skills are not. Since sm-upgrade is now in CONSUMER_SKILLS, the test might need adjustment if it checks the result count.
|
|
546
|
-
|
|
547
|
-
Review the test: it creates sm-dashboard-widget and sm-host-setup as consumer fakes, then asserts they are in `result[:installed]` and sm-domain-model is NOT. Since sm-upgrade is not created as a fake skill in this test, it simply will not appear in installed or skipped -- the installer only processes skills that exist on disk. So the test should still pass as-is.
|
|
548
|
-
|
|
549
|
-
However, add a NEW test to explicitly verify sm-upgrade is included in the consumer group:
|
|
550
|
-
|
|
551
|
-
```ruby
|
|
552
|
-
test "sm-upgrade is included in consumer skills" do
|
|
553
|
-
assert_includes SkillsInstaller::CONSUMER_SKILLS, "sm-upgrade"
|
|
554
|
-
end
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
This is a simple, fast assertion that documents the requirement.
|
|
558
|
-
|
|
559
|
-
**File 3: Update `CLAUDE.md`**
|
|
560
|
-
|
|
561
|
-
In the Consumer Skills table (around line 188-195), add a new row after the sm-dashboard-widget row:
|
|
562
|
-
|
|
563
|
-
```markdown
|
|
564
|
-
| `sm-upgrade` | Gem upgrade workflow with CHANGELOG parsing |
|
|
565
|
-
```
|
|
566
|
-
|
|
567
|
-
The updated table should read:
|
|
568
|
-
```markdown
|
|
569
|
-
| Skill | Purpose |
|
|
570
|
-
|-------|---------|
|
|
571
|
-
| `sm-host-setup` | Full host app setup walkthrough |
|
|
572
|
-
| `sm-configure` | DSL configuration across all sub-sections |
|
|
573
|
-
| `sm-scraper-adapter` | Custom scraper inheriting `Scrapers::Base` |
|
|
574
|
-
| `sm-event-handler` | Lifecycle callbacks (after_item_created, etc.) |
|
|
575
|
-
| `sm-model-extension` | Extend engine models from host app |
|
|
576
|
-
| `sm-dashboard-widget` | Dashboard queries, presenters, Turbo broadcasts |
|
|
577
|
-
| `sm-upgrade` | Gem upgrade workflow with CHANGELOG parsing |
|
|
578
|
-
```
|
|
579
|
-
</action>
|
|
580
|
-
<verify>
|
|
581
|
-
Run `PARALLEL_WORKERS=1 bin/rails test test/lib/source_monitor/setup/skills_installer_test.rb` -- all tests pass (11 existing + 1 new = 12 tests). Run `bin/rubocop lib/source_monitor/setup/skills_installer.rb` -- 0 offenses. Confirm `grep 'sm-upgrade' lib/source_monitor/setup/skills_installer.rb` returns a match. Confirm `grep 'sm-upgrade' CLAUDE.md` returns a match. Confirm `grep 'sm-upgrade' test/lib/source_monitor/setup/skills_installer_test.rb` returns a match.
|
|
582
|
-
</verify>
|
|
583
|
-
<done>
|
|
584
|
-
Skills installer updated with sm-upgrade in CONSUMER_SKILLS. New test asserts sm-upgrade inclusion. CLAUDE.md consumer skills table updated with sm-upgrade row.
|
|
585
|
-
</done>
|
|
586
|
-
</task>
|
|
587
|
-
<task type="auto">
|
|
588
|
-
<name>full-suite-verification</name>
|
|
589
|
-
<files>
|
|
590
|
-
</files>
|
|
591
|
-
<action>
|
|
592
|
-
Run the full verification suite to confirm no regressions and all quality gates pass.
|
|
593
|
-
|
|
594
|
-
1. `bin/rails test` -- full test suite passes with 1002+ runs, 0 failures
|
|
595
|
-
2. `bin/rubocop` -- 0 offenses across all files
|
|
596
|
-
3. `bin/brakeman --no-pager` -- 0 warnings
|
|
597
|
-
|
|
598
|
-
If any failures:
|
|
599
|
-
- Test failures: read the failure output, identify the root cause, fix in the appropriate file
|
|
600
|
-
- RuboCop offenses: fix style issues in the offending files
|
|
601
|
-
- Brakeman warnings: evaluate and fix security concerns
|
|
602
|
-
|
|
603
|
-
After all gates pass, confirm all Phase 3 artifacts exist:
|
|
604
|
-
- `ls -la .claude/skills/sm-upgrade/SKILL.md` -- file exists
|
|
605
|
-
- `ls -la .claude/skills/sm-upgrade/reference/upgrade-workflow.md` -- file exists
|
|
606
|
-
- `ls -la .claude/skills/sm-upgrade/reference/version-history.md` -- file exists
|
|
607
|
-
- `ls -la docs/upgrade.md` -- file exists
|
|
608
|
-
- `grep 'sm-upgrade' lib/source_monitor/setup/skills_installer.rb` -- match found
|
|
609
|
-
- `grep 'sm-upgrade' CLAUDE.md` -- match found
|
|
610
|
-
- `grep 'sm-upgrade' .claude/skills/sm-host-setup/SKILL.md` -- match found (cross-reference)
|
|
611
|
-
- `grep 'sm-upgrade' test/lib/source_monitor/setup/skills_installer_test.rb` -- match found
|
|
612
|
-
|
|
613
|
-
All success criteria met:
|
|
614
|
-
- REQ-29: sm-upgrade skill covers CHANGELOG parsing, upgrade command, verification results, deprecation handling, edge cases
|
|
615
|
-
- REQ-30: docs/upgrade.md includes general steps, version-specific notes (0.1.x through 0.4.0), troubleshooting
|
|
616
|
-
- Skills installer includes sm-upgrade in consumer set
|
|
617
|
-
- sm-host-setup cross-references upgrade flow
|
|
618
|
-
</action>
|
|
619
|
-
<verify>
|
|
620
|
-
`bin/rails test` exits 0 with 1002+ runs, 0 failures. `bin/rubocop` exits 0. `bin/brakeman --no-pager` exits 0. All 8 grep/ls checks return matches.
|
|
621
|
-
</verify>
|
|
622
|
-
<done>
|
|
623
|
-
Full suite green with 1002+ runs. RuboCop clean. Brakeman clean. All Phase 3 success criteria met. REQ-29 and REQ-30 implemented: sm-upgrade skill with comprehensive upgrade workflow, docs/upgrade.md with versioned instructions, skills installer updated, sm-host-setup cross-referenced.
|
|
624
|
-
</done>
|
|
625
|
-
</task>
|
|
626
|
-
</tasks>
|
|
627
|
-
<verification>
|
|
628
|
-
1. `PARALLEL_WORKERS=1 bin/rails test test/lib/source_monitor/setup/skills_installer_test.rb` -- 12 tests pass
|
|
629
|
-
2. `bin/rails test` -- 1002+ runs, 0 failures
|
|
630
|
-
3. `bin/rubocop` -- 0 offenses
|
|
631
|
-
4. `bin/brakeman --no-pager` -- 0 warnings
|
|
632
|
-
5. `ls .claude/skills/sm-upgrade/SKILL.md` -- file exists
|
|
633
|
-
6. `ls .claude/skills/sm-upgrade/reference/upgrade-workflow.md` -- file exists
|
|
634
|
-
7. `ls .claude/skills/sm-upgrade/reference/version-history.md` -- file exists
|
|
635
|
-
8. `ls docs/upgrade.md` -- file exists
|
|
636
|
-
9. `grep -n 'sm-upgrade' lib/source_monitor/setup/skills_installer.rb` -- match in CONSUMER_SKILLS
|
|
637
|
-
10. `grep -n 'sm-upgrade' CLAUDE.md` -- match in Consumer Skills table
|
|
638
|
-
11. `grep -n 'sm-upgrade' .claude/skills/sm-host-setup/SKILL.md` -- match in cross-references
|
|
639
|
-
12. `grep -n 'sm-upgrade' test/lib/source_monitor/setup/skills_installer_test.rb` -- match in test assertion
|
|
640
|
-
</verification>
|
|
641
|
-
<success_criteria>
|
|
642
|
-
- sm-upgrade skill covers: reading CHANGELOG between versions, running upgrade command, interpreting results, handling edge cases (REQ-29)
|
|
643
|
-
- Skill references the upgrade command (upgrade_command.rb) and verification suite (runner.rb) (REQ-29)
|
|
644
|
-
- docs/upgrade.md includes: general upgrade steps, version-specific notes (0.1.x through 0.4.0), troubleshooting (REQ-30)
|
|
645
|
-
- Skills installer updated to include sm-upgrade in consumer set
|
|
646
|
-
- Existing sm-host-setup skill cross-references upgrade flow
|
|
647
|
-
- CLAUDE.md updated with sm-upgrade in Consumer Skills table
|
|
648
|
-
- bin/rails test passes with 1002+ runs, RuboCop clean, Brakeman clean
|
|
649
|
-
</success_criteria>
|
|
650
|
-
<output>
|
|
651
|
-
.vbw-planning/phases/03-upgrade-skill-docs/PLAN-01-SUMMARY.md
|
|
652
|
-
</output>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
## Phase 1 Context
|
|
2
|
-
|
|
3
|
-
### Goal
|
|
4
|
-
Not available
|
|
5
|
-
|
|
6
|
-
### Codebase Map Available
|
|
7
|
-
Codebase mapping exists in `.vbw-planning/codebase/`. Key files:
|
|
8
|
-
- `ARCHITECTURE.md`
|
|
9
|
-
- `CONCERNS.md`
|
|
10
|
-
- `PATTERNS.md`
|
|
11
|
-
- `DEPENDENCIES.md`
|
|
12
|
-
- `STRUCTURE.md`
|
|
13
|
-
- `CONVENTIONS.md`
|
|
14
|
-
- `TESTING.md`
|
|
15
|
-
- `STACK.md`
|
|
16
|
-
|
|
17
|
-
Read CONVENTIONS.md, PATTERNS.md, STRUCTURE.md, and DEPENDENCIES.md first to bootstrap codebase understanding.
|