Skip to content

Commit f08ce0b

Browse files
authored
Merge branch 'master' into patch-1
2 parents 660dc2f + 54796b3 commit f08ce0b

1,455 files changed

Lines changed: 377356 additions & 100662 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"schemaVersion": 1,
3+
"packageName": "@rxjs/migrate",
4+
"packageVersion": "9.0.0-beta.0",
5+
"digestAlgorithm": "sha256",
6+
"digest": "2b5c6b52bc8060df40c48443cfb5ebb0d55da5687bb74806daf95ac4912594fa",
7+
"files": [
8+
"SKILL.md",
9+
"assets/migration-report.md",
10+
"references/assessment-and-contract.md",
11+
"references/engine-and-batches.md",
12+
"references/review-checklist.md",
13+
"references/test-migration.md",
14+
"references/verification-and-closeout.md"
15+
],
16+
"installSchemaVersion": 1,
17+
"adapter": "agents",
18+
"compatibleHarnesses": [
19+
"codex",
20+
"cursor"
21+
],
22+
"targetPath": ".agents/skills/rxjs-next-migration"
23+
}
Lines changed: 218 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,218 @@
1+
---
2+
name: rxjs-next-migration
3+
description: Migrate an RxJS 7 application, library, or test suite to RxJS Next through an agent-led workflow that establishes a green behavioral baseline, makes Observable lifecycle choices explicit, uses @rxjs/migrate only for bounded fixture-proved rewrites, repairs without weakening evidence, and records a versioned migration contract. Use for repository assessment, migration planning or execution, lifecycle review, TestScheduler conversion, or migration closeout.
4+
---
5+
6+
# RxJS 7 to RxJS Next migration
7+
8+
Treat this as reviewed project work, not a codemod run. The objective is an
9+
intentional RxJS Next contract backed by the project's own build and behavior
10+
evidence. A transformed file, a clean diff, or one passing test is not proof
11+
that the migration is complete.
12+
13+
Work through all eight stages in order. Re-enter an earlier stage whenever new
14+
evidence changes scope, coverage, or lifecycle intent. Keep the developer
15+
involved at every explicit pause.
16+
17+
## Non-negotiable rules
18+
19+
- Read and obey repository-local instructions before acting. Protect existing
20+
work and stay within the authorized repository and paths.
21+
- Establish the RxJS 7 baseline before changing dependencies or source.
22+
- Never infer platform sharing versus producer-per-direct-subscription behavior
23+
from syntax, filenames, operator names, or a currently passing output.
24+
- Use the installed engine's versioned registry and schemas as authority. Do
25+
not reconstruct capability mappings from this Skill or from memory.
26+
- Run the deterministic engine without writes first. A refusal is a successful
27+
safety outcome, not permission to improvise a mechanical rewrite.
28+
- Preserve the project's test framework by default. Select a framework adapter
29+
only when the developer asked for that separate conversion.
30+
- Do not weaken, skip, delete, or replace a behavioral expectation merely to
31+
make the migrated suite green.
32+
- Do not add RxJS 7 compatibility shims, string-named platform methods, local
33+
substitute operators, or runtime generators unless the developer separately
34+
authorizes that product work.
35+
- Keep changes in small coherent batches. Review and verify each batch before
36+
widening the scope.
37+
- Do not call a migration complete while a required command is unknown,
38+
unapproved, skipped, or red without an explicitly accepted blocker.
39+
40+
## Working record
41+
42+
Create or locate a checked-in migration contract manifest and a concise
43+
human-readable report. Use the schema exported by the installed
44+
`@rxjs/migrate`; schema validity and migration readiness are separate checks.
45+
Use [assets/migration-report.md](assets/migration-report.md) for the report.
46+
47+
For every migration unit, preserve source locations and record:
48+
49+
- its current RxJS 7 behavioral claim;
50+
- the target lifecycle selected by the developer;
51+
- its evidence classification and supporting tests;
52+
- approval state, diagnostics, and any intentional divergence; and
53+
- verification or a named blocker.
54+
55+
## Stage 1: Establish authority and scope
56+
57+
1. Locate repository instructions, package and workspace metadata, lockfiles,
58+
CI configuration, RxJS versions, build/test commands, and current working
59+
tree state.
60+
2. Identify the repository root, migration boundary, permitted writes,
61+
package manager, network policy, and candidate verification commands.
62+
3. Record the installed `@rxjs/migrate` version and canonical Skill digest.
63+
If the installed Skill does not match its package, stop and synchronize it
64+
before trusting these instructions.
65+
4. State the proposed read, write, dependency, and command scope before broad
66+
changes.
67+
68+
Pause for the developer if the target repository or allowed scope is unclear,
69+
existing changes overlap the migration, or destructive, networked, external,
70+
or broader actions require new authority.
71+
72+
Exit only when the scope, allowed writes, package manager, and candidate gates
73+
are recorded.
74+
75+
## Stage 2: Assess usage, lifecycle risk, and coverage
76+
77+
Inventory installed RxJS versions and import forms, then locate Observable
78+
construction, custom producers, Subjects, subscription ownership, repeated
79+
subscriptions, retry/refresh/cache paths, schedulers and timing, test helpers,
80+
interop inputs, cancellation, teardown, and error handling. Include direct and
81+
transitive operator usage.
82+
83+
For each lifecycle-sensitive path, link exact source evidence and mark it as:
84+
85+
- covered by an existing baseline;
86+
- requiring a characterization test;
87+
- explicitly unsupported; or
88+
- an uncovered risk the developer accepts.
89+
90+
Produce a risk and coverage report before proposing rewrites. Read
91+
[references/assessment-and-contract.md](references/assessment-and-contract.md)
92+
for the inventory and characterization protocol.
93+
94+
Exit only when every in-scope lifecycle-sensitive use has one recorded
95+
coverage disposition. Missing coverage is not evidence that behavior is safe.
96+
97+
## Stage 3: Establish the green RxJS 7 baseline
98+
99+
Run the agreed build, type, lint, unit, integration, and behavior checks against
100+
the unchanged RxJS 7 project. Record exact commands, environment facts, exit
101+
codes, and concise results.
102+
103+
Add focused characterization tests where Stage 2 found material gaps. Protect
104+
observable values, completion/error behavior, producer multiplicity,
105+
cancellation, abort reasons, teardown ordering, timing, and externally visible
106+
subscription effects as applicable. Every characterization test must pass on
107+
RxJS 7 before migration begins.
108+
109+
Pause if a starting gate fails. Diagnose it and ask the developer whether to
110+
fix it first, narrow scope, or record it as an accepted pre-existing failure.
111+
Never silently reclassify it as a migration regression or ignore it.
112+
113+
Exit only with a green baseline or explicit approval for each named
114+
pre-existing failure, plus green characterization tests.
115+
116+
## Stage 4: Classify and approve the target contract
117+
118+
Divide the scope into stable migration units. For each unit, record one target
119+
lifecycle using the values accepted by the installed manifest schema and one
120+
evidence classification. Use repository evidence and
121+
[references/assessment-and-contract.md](references/assessment-and-contract.md)
122+
to explain the choice.
123+
124+
The engine may identify risk but cannot choose lifecycle intent. `unresolved`
125+
is a stop state. Pause for the developer when either platform-shared behavior
126+
or producer-per-direct-subscription behavior is plausible, or when Subject
127+
semantics, cancellation, scheduler ordering, error behavior, interop, or a
128+
public behavior change is not proved.
129+
130+
Intentional divergences require a concrete old claim, proposed Next claim,
131+
user impact, evidence, and developer approval. Validate the manifest
132+
structurally, then run the installed readiness assessment. Do not proceed with
133+
a batch containing unresolved intent or required pending approval.
134+
135+
Exit only when the developer has approved every ambiguous choice and
136+
intentional divergence needed for the next batch.
137+
138+
## Stage 5: Plan and dry-run bounded engine changes
139+
140+
Inspect the installed capability registry and select only entries whose
141+
version, source form, arity, preconditions, and executable evidence match the
142+
approved unit. Do not infer support from a familiar name. Follow
143+
[references/engine-and-batches.md](references/engine-and-batches.md).
144+
When the batch contains RxJS 7 marble tests, also read
145+
[references/test-migration.md](references/test-migration.md).
146+
147+
Run `rxjs-migrate` without `--write` using explicit provenance and, when
148+
required, the approved `cold` or `platform` mode. Preserve the current test
149+
framework unless a supported adapter was separately selected. Capture the
150+
versioned JSON report, changed paths, structured diagnostics, and exit code.
151+
152+
Pause when a diagnostic requires review or refuses a transform, when output
153+
would escape authorized paths, when source does not match the capability
154+
evidence, or when batch size or semantic reach exceeds the reviewed scope.
155+
Never conceal unsupported segments inside a partially transformed pipeline.
156+
157+
Exit only after diagnostics and changed-file scope are reviewed and the
158+
developer has approved any newly broadened batch.
159+
160+
## Stage 6: Apply one small migration batch
161+
162+
Apply only the reviewed dry-run plan. Require an explicit write destination
163+
inside the authorized project and preserve source provenance. Do not overwrite
164+
existing output without specific approval. Review the resulting diff before
165+
additional edits.
166+
167+
Format through the project's normal tools. Ensure ordinary project-owned
168+
source and direct test declarations remain; do not leave dynamic generators,
169+
hidden case registries, or compatibility assertion layers in the result.
170+
171+
Immediately check parsing, the narrowest useful type boundary, and engine
172+
idempotence. Re-running the same transform must produce no new source change
173+
and stable diagnostics. If it does not, restore the affected batch to the
174+
reviewed starting point and report an engine defect.
175+
176+
Exit only when the batch parses, type-checks at its narrow boundary, is
177+
idempotent, and every diagnostic is resolved, carried forward, or escalated.
178+
179+
## Stage 7: Build, test, diagnose, and repair
180+
181+
Run focused characterization and migrated tests first, then the agreed project
182+
gates. Classify every failure as a migration defect, RxJS Next product gap,
183+
intentional divergence, environment/baseline issue, or still-unknown result.
184+
Use [references/verification-and-closeout.md](references/verification-and-closeout.md)
185+
for the repair rules.
186+
187+
Repair migration defects in a small batch and repeat the relevant gates. For a
188+
product gap, preserve the failing evidence and report it; do not disguise it
189+
with a local replacement. For an intentional divergence, change an expectation
190+
only after the manifest records approved new behavior and user impact.
191+
192+
Pause before any repair that changes public behavior, weakens evidence,
193+
expands writes, changes dependencies beyond the reviewed plan, needs external
194+
access, or introduces a compatibility layer.
195+
196+
Exit only when agreed gates pass or each remaining red result has a named,
197+
evidenced, explicitly accepted blocker.
198+
199+
## Stage 8: Close out and hand off
200+
201+
Update the contract manifest and report with exact source and target versions,
202+
engine version, capability-registry version, canonical Skill digest, baseline,
203+
units, diagnostics, divergences, final commands/results, and blockers. Validate
204+
the manifest with the installed schema and assess readiness separately.
205+
206+
Review [references/review-checklist.md](references/review-checklist.md). Report:
207+
208+
1. what behavior and lifecycle contract changed;
209+
2. what source and tests changed;
210+
3. the exact gates run and their results;
211+
4. migration defects repaired versus product gaps retained;
212+
5. approved divergences and environment limitations; and
213+
6. remaining blockers, owners, evidence, and acceptance.
214+
215+
Claim completion only when readiness is `ready`, or
216+
`ready-with-accepted-blockers` when the developer intentionally chose that
217+
outcome. Otherwise hand off the migration as incomplete with the next concrete
218+
decision or action.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# RxJS Next migration report
2+
3+
This report summarizes the machine-readable migration contract. The manifest
4+
validated by the installed `@rxjs/migrate` schema remains the authoritative
5+
structured decision and evidence record.
6+
7+
## Scope and authority
8+
9+
- Repository:
10+
- Source revision:
11+
- Migration boundary:
12+
- Authorized write paths:
13+
- Package manager:
14+
- Network policy:
15+
- Existing changes protected:
16+
- Developer/approver:
17+
18+
## Tool and dependency identity
19+
20+
| Item | Version or digest | Evidence |
21+
| ---------------------- | ----------------- | -------- |
22+
| Source RxJS | | |
23+
| Target RxJS Next | | |
24+
| `@rxjs/migrate` engine | | |
25+
| Capability registry | | |
26+
| Canonical Skill | | |
27+
| Contract schema | | |
28+
29+
## RxJS 7 baseline
30+
31+
| Check ID | Command | Environment | Exit | Result | Accepted pre-existing failure |
32+
| -------- | ------- | ----------- | ---: | ------ | ----------------------------- |
33+
34+
## Risk and coverage assessment
35+
36+
| Finding | Source locations | Lifecycle/behavior risk | Coverage disposition | Evidence or approval |
37+
| ------- | ---------------- | ----------------------- | -------------------- | -------------------- |
38+
39+
## Target contract units
40+
41+
| Unit ID | Source locations | RxJS 7 claim | Target lifecycle | Evidence classification | Approval | Evidence |
42+
| ------- | ---------------- | ------------ | ---------------- | ----------------------- | -------- | -------- |
43+
44+
## Migration batches
45+
46+
| Batch | Scope | Dry-run report | Diagnostics reviewed | Write approved by | Changed files |
47+
| ----- | ----- | -------------- | -------------------- | ----------------- | ------------- |
48+
49+
## Diagnostics
50+
51+
| Diagnostic ID | File/span | Disposition | Classification | Required action | Resolution or owner |
52+
| ------------- | --------- | ----------- | -------------- | --------------- | ------------------- |
53+
54+
## Intentional divergences
55+
56+
| Units | Previous claim | Approved Next claim | User impact | Evidence | Approver/time/rationale |
57+
| ----- | -------------- | ------------------- | ----------- | -------- | ----------------------- |
58+
59+
## Verification
60+
61+
| Check ID | Command | Environment | Exit | Result | Summary |
62+
| -------- | ------- | ----------- | ---: | ------ | ------- |
63+
64+
## Outcome classification
65+
66+
### Migration defects repaired
67+
68+
-
69+
70+
### RxJS Next product gaps
71+
72+
-
73+
74+
### Environment or baseline limitations
75+
76+
-
77+
78+
## Accepted blockers
79+
80+
| Owner | Affected units | Reason | Evidence | Prevented outcome | Acceptance |
81+
| ----- | -------------- | ------ | -------- | ----------------- | ---------- |
82+
83+
## Readiness and handoff
84+
85+
- Manifest schema validation:
86+
- Readiness assessment:
87+
- Remaining decisions:
88+
- Next action and owner:
89+
- Measured migration outcome and limitations:

0 commit comments

Comments
 (0)