Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ testing; it is not a user install path (see README).

## Current release posture

`VERSION` is `0.2.0`, the first stable release on npm (`0.2.0-dev` was the initial prerelease).
`VERSION` is `0.3.0`, which adds the Knowledge module; `0.2.0` was the first stable release on npm.
Fresh Claude/Codex/Copilot discovery checks are still to be recorded. Linux is the tested platform. The project is MIT;
`THIRD_PARTY_NOTICES.md` retains the notices for the skills attributed to Matt Pocock.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ bash agent-workflow-kit/module.sh update --target /path/to/my-project

## Project status

**Version `0.2.0`, published on npm as [`ants-kit`](https://www.npmjs.com/package/ants-kit).**
**Version `0.3.0`, published on npm as [`ants-kit`](https://www.npmjs.com/package/ants-kit).**

Local tests, GitHub CI and publication archive checks pass; Linux is the tested platform. Checks in
fresh Claude Code, Codex, and Copilot sessions are still to be recorded.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.0
0.3.0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ants-kit",
"version": "0.2.0",
"version": "0.3.0",
"description": "Modular task, memory and quality workflow for Claude Code, Codex and Copilot, installed into a single project directory.",
"license": "MIT",
"author": "Pierre Dillard",
Expand Down
7 changes: 4 additions & 3 deletions templates/project/.workflow/runtime/catalog.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,14 +108,15 @@ export function resolveModules(catalog, selected, installed = []) {
const ordered = [];
const visiting = new Set();
const visited = new Set();
function visit(moduleId, requiredVersion = '*') {
function visit(moduleId, requiredVersion = '*', requiredBy = null) {
const manifest = known.get(moduleId) ?? catalog.get(moduleId)?.manifest;
if (!manifest) throw new Error(`Missing module dependency: ${moduleId}`);
if (!manifest && requiredBy) throw new Error(`Missing module dependency: ${moduleId} (required by ${requiredBy})`);
if (!manifest) throw new Error(`Unknown module: ${moduleId} (not in the installed modules or available catalogs)`);
if (!satisfiesVersion(manifest.version, requiredVersion)) throw new Error(`Incompatible version: ${moduleId} requires ${requiredVersion}, found ${manifest.version}`);
if (visiting.has(moduleId)) throw new Error(`Module dependency cycle: ${moduleId}`);
if (visited.has(moduleId)) return;
visiting.add(moduleId);
for (const [dependency, version] of Object.entries(manifest.requires ?? {}).sort()) visit(dependency, version);
for (const [dependency, version] of Object.entries(manifest.requires ?? {}).sort()) visit(dependency, version, moduleId);
visiting.delete(moduleId);
visited.add(moduleId);
ordered.push(manifest);
Expand Down
9 changes: 5 additions & 4 deletions tests/modules.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ function command(executable, args, expectedSuccess = true, environment = {}) {

function fixture(context, configuration = '') {
const root = mkdtempSync(join(tmpdir(), 'workflow-module-test-'));
context.after(() => rmSync(root, { recursive: true, force: true }));
// Retries absorb a Git process still writing in a fixture repository when cleanup starts.
context.after(() => rmSync(root, { recursive: true, force: true, maxRetries: 5 }));
const project = join(root, 'project with spaces');
const user = join(root, 'user with spaces');
mkdirSync(project); mkdirSync(user);
Expand Down Expand Up @@ -287,7 +288,7 @@ test('module dependencies accept compatible versions of the same major and refus
});

for (const [label, overrides, expected] of [
['missing dependency', { requires: { missing: '*' } }, /Missing module dependency/],
['missing dependency', { requires: { missing: '*' } }, /Missing module dependency: missing \(required by /],
['incompatible dependency', { requires: { memory: '99.0.0' } }, /Incompatible version/],
['incompatible dependency major', { requires: { memory: '^99.0.0' } }, /Incompatible version/],
['unsupported dependency range', { requires: { memory: '~1.1.0' } }, /Invalid dependency/],
Expand Down Expand Up @@ -360,7 +361,7 @@ test('mid-add failure restores files, inventory, shared rules, directories and u

test('unknown selection and invalid configuration leave first install untouched', context => {
const setup = fixture(context); const before = snapshot(setup.project);
assert.match(install(setup, ['--modules', 'unknown'], false), /Missing module dependency/);
assert.match(install(setup, ['--modules', 'unknown'], false), /Unknown module: unknown \(not in the installed modules or available catalogs\)/);
assert.match(install(setup, ['--profile', 'unknown'], false), /Unknown profile/);
assert.deepEqual(snapshot(setup.project), before);
});
Expand Down Expand Up @@ -458,7 +459,7 @@ function updateFixture(context, extra = [], configuration = '') {
command('git', ['-C', source, 'init', '-q']);
command('git', ['-C', source, 'add', '.']);
command('git', ['-C', source, '-c', 'user.name=Workflow fixture', '-c', 'user.email=fixture@example.invalid',
'-c', 'commit.gpgsign=false', 'commit', '-qm', 'Fixture baseline']);
'-c', 'commit.gpgsign=false', '-c', 'gc.auto=0', '-c', 'maintenance.auto=false', 'commit', '-qm', 'Fixture baseline']);
const workflow = join(source, 'core/skills/project-workflow/SKILL.md');
writeFileSync(workflow, '---\nname: project-workflow\ndescription: Previous fixture router.\n---\n\nPrevious fixture route.\n');
command('bash', [join(source, 'install.sh'), '--target', setup.project, '--user-root', setup.user,
Expand Down
Loading