mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
Plan AA2.
Two slices:
1. Catalog drift fix. apps/daemon/src/plugins/atoms.ts had
nine atoms still tagged status='planned' even though their
daemon impls landed across §3.N1-N4 / §3.O2-O5 / §3.P1-P2 /
§3.Q2 / §3.S1. Promotes them to 'implemented' + adds the
missing 'build-test' entry that was shipped without a
matching catalog row. Net result: every atom in the catalog
is now status='implemented'.
Updated entries:
code-import planned \u2192 implemented
design-extract planned \u2192 implemented
figma-extract planned \u2192 implemented
token-map planned \u2192 implemented
rewrite-plan planned \u2192 implemented
patch-edit planned \u2192 implemented
diff-review planned \u2192 implemented
handoff planned \u2192 implemented
build-test (new) \u2192 implemented
2. `od atoms info <id>` CLI + matching daemon route. New
GET /api/atoms/:id returns the catalog row plus the bundled
SKILL.md body (when one exists at
plugins/_official/atoms/<id>/SKILL.md), so a user can read
what the atom does + the prompt fragment that drives it from
one CLI invocation.
CLI behaviour:
od atoms info code-import # human-formatted
od atoms info code-import --json # raw JSON
Daemon tests: 1716 \u2192 1728 (+12 cases on plugins-atoms-info:
9 atoms confirmed promoted to 'implemented', build-test
catalog presence + matching task-kind, zero remaining 'planned'
atoms invariant, every atom has a non-empty taskKinds[]).
Co-authored-by: Tom Huang <1043269994@qq.com>
42 lines
1.3 KiB
TypeScript
42 lines
1.3 KiB
TypeScript
// Plan §3.AA2 — atoms catalog promotion + atom info.
|
|
|
|
import { describe, expect, it } from 'vitest';
|
|
import { findAtom, FIRST_PARTY_ATOMS, isImplementedAtom } from '../src/plugins/atoms.js';
|
|
|
|
describe('atoms catalog — Phase 6/7/8 promotion', () => {
|
|
const promotedIds = [
|
|
'code-import',
|
|
'design-extract',
|
|
'figma-extract',
|
|
'token-map',
|
|
'rewrite-plan',
|
|
'patch-edit',
|
|
'build-test',
|
|
'diff-review',
|
|
'handoff',
|
|
];
|
|
|
|
it.each(promotedIds)('atom %s is now status=implemented', (id) => {
|
|
const atom = findAtom(id);
|
|
expect(atom).toBeDefined();
|
|
expect(atom?.status).toBe('implemented');
|
|
expect(isImplementedAtom(id)).toBe(true);
|
|
});
|
|
|
|
it("'build-test' is registered with the matching daemon impl", () => {
|
|
const atom = findAtom('build-test');
|
|
expect(atom?.label).toMatch(/Build/);
|
|
expect(atom?.taskKinds).toContain('code-migration');
|
|
});
|
|
|
|
it('the catalog has no remaining planned atoms (after the §3.AA2 promotion)', () => {
|
|
const planned = FIRST_PARTY_ATOMS.filter((a) => a.status === 'planned');
|
|
expect(planned.map((a) => a.id)).toEqual([]);
|
|
});
|
|
|
|
it('every atom in the catalog has a non-empty taskKinds[]', () => {
|
|
for (const atom of FIRST_PARTY_ATOMS) {
|
|
expect(atom.taskKinds.length).toBeGreaterThan(0);
|
|
}
|
|
});
|
|
});
|