@devel-solid/agentscli-hub 0.0.0-stage → 0.1.0
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.
- package/LICENSE +21 -0
- package/README.md +65 -2
- package/dist/assets/.agents/skills/agentscli-hub-edit-agents/SKILL.md +23 -0
- package/dist/assets/.agents/skills/agentscli-hub-edit-agents/scripts/THIRD_PARTY_LICENSES.txt +916 -0
- package/dist/assets/.agents/skills/agentscli-hub-edit-agents/scripts/support.mjs +16705 -0
- package/dist/assets/.agents/skills/agentscli-hub-edit-agents/scripts/validate.mjs +43 -0
- package/dist/assets/.agents/skills/agentscli-hub-publish/SKILL.md +25 -0
- package/dist/assets/.agents/skills/agentscli-hub-publish/references/publication.md +13 -0
- package/dist/assets/.agents/skills/agentscli-hub-publish/scripts/THIRD_PARTY_LICENSES.txt +916 -0
- package/dist/assets/.agents/skills/agentscli-hub-publish/scripts/release.mjs +551 -0
- package/dist/assets/.agents/skills/agentscli-hub-publish/scripts/support.mjs +16705 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-conventions/SKILL.md +23 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-conventions/scripts/THIRD_PARTY_LICENSES.txt +916 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-conventions/scripts/support.mjs +16705 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-conventions/scripts/validate.mjs +43 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-conventions/SKILL.md +23 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-conventions/scripts/THIRD_PARTY_LICENSES.txt +916 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-conventions/scripts/support.mjs +16705 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-conventions/scripts/validate.mjs +43 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-skills/SKILL.md +25 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-skills/references/resource-format.md +47 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-skills/scripts/THIRD_PARTY_LICENSES.txt +916 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-skills/scripts/support.mjs +16705 -0
- package/dist/assets/.agents/skills/agentscli-hub-write-shared-skills/scripts/validate.mjs +43 -0
- package/dist/assets/.gitattributes +4 -0
- package/dist/assets/AGENTS.md +23 -0
- package/dist/assets/README.md +13 -0
- package/dist/assets/agentscli-hub.yml +2 -0
- package/dist/assets/conventions/.gitkeep +0 -0
- package/dist/assets/docs/conventions/resource-authoring.md +13 -0
- package/dist/assets/gitignore.tpl +2 -0
- package/dist/assets/skills/.gitkeep +0 -0
- package/dist/cli.js +9 -0
- package/dist/runtime.js +610 -0
- package/package.json +37 -4
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module'; const require = __createRequire(import.meta.url);
|
|
2
|
+
|
|
3
|
+
// assets/templates/skills/agentscli-hub-write-shared-skills/scripts/validate.mjs
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { pathToFileURL } from "node:url";
|
|
6
|
+
import { inspectHub } from "./support.mjs";
|
|
7
|
+
function validate(root, options = {}) {
|
|
8
|
+
return inspectHub(root, { ...options, scope: "shared-skills" });
|
|
9
|
+
}
|
|
10
|
+
function main(args, { log = console.log, error = console.error } = {}) {
|
|
11
|
+
if (args.length !== 2 || args[0] !== "--repo-root" || !args[1]) {
|
|
12
|
+
error("Usage: validate.mjs --repo-root <hub>");
|
|
13
|
+
return 2;
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const result = validate(path.resolve(args[1]));
|
|
17
|
+
log(
|
|
18
|
+
JSON.stringify({
|
|
19
|
+
ok: true,
|
|
20
|
+
scope: "shared-skills",
|
|
21
|
+
conventions: result.conventions.size,
|
|
22
|
+
skills: result.skills.size
|
|
23
|
+
})
|
|
24
|
+
);
|
|
25
|
+
return 0;
|
|
26
|
+
} catch (cause) {
|
|
27
|
+
error(
|
|
28
|
+
JSON.stringify({
|
|
29
|
+
ok: false,
|
|
30
|
+
code: cause.code ?? "operation",
|
|
31
|
+
file: cause.file ?? "",
|
|
32
|
+
message: cause.message
|
|
33
|
+
})
|
|
34
|
+
);
|
|
35
|
+
return cause.code ? 2 : 3;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(path.resolve(process.argv[1])).href)
|
|
39
|
+
process.exitCode = main(process.argv.slice(2));
|
|
40
|
+
export {
|
|
41
|
+
main,
|
|
42
|
+
validate
|
|
43
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
## Project
|
|
4
|
+
|
|
5
|
+
This is an independent Git hub for explicitly selected conventions and skills. The manifest records the hub content version; native Git tags use `v<version>`.
|
|
6
|
+
|
|
7
|
+
## Workflows
|
|
8
|
+
|
|
9
|
+
- Use agentscli-hub-write-conventions for handwritten internal rules.
|
|
10
|
+
- Use agentscli-hub-edit-agents for this file.
|
|
11
|
+
- Use agentscli-hub-write-shared-conventions for shared convention templates.
|
|
12
|
+
- Use agentscli-hub-write-shared-skills for complete shared skill trees.
|
|
13
|
+
- Use agentscli-hub-publish when asked to publish hub changes. It assesses impact, derives the content version, and verifies native Git delivery.
|
|
14
|
+
|
|
15
|
+
Discover each skill through the available project skills and its activation description. Each has one responsibility and its own deterministic scripts. Run its included validation; do not rely on prose review for mechanically decidable rules.
|
|
16
|
+
|
|
17
|
+
## Conventions
|
|
18
|
+
|
|
19
|
+
Read [resource authoring](docs/conventions/resource-authoring.md) when maintaining hub content.
|
|
20
|
+
|
|
21
|
+
## Ownership
|
|
22
|
+
|
|
23
|
+
Only this file, `docs/conventions/`, `conventions/`, and `skills/` are authored content. The manifest version and Git policy are preserved state. The five operational skill directories and README are managed by `agentscli-hub apply`; edits there are disposable. Preserve unrelated content and staging. Do not execute shared skill code during inspection or publish without a publication request.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Resource hub
|
|
2
|
+
|
|
3
|
+
This independent Git repository shares explicitly selected conventions and complete skill trees. Use any native Git host, public or private. Configure the remote with native Git; no vendor service or npm publication is required.
|
|
4
|
+
|
|
5
|
+
Author internal rules in `docs/conventions/`, discovery in `AGENTS.md`, shared templates in `conventions/`, and shared skill trees in `skills/`. Each has its own operational authoring skill. Ask to publish hub changes to use agentscli-hub-publish: the agent assesses impact and the included helper selects and verifies the content release. Ordinary publication does not ask you to choose a version.
|
|
6
|
+
|
|
7
|
+
Shared conventions begin with YAML containing only `trigger`, followed by one H1 and self-contained Markdown. Their relative path without `.tpl.md` is the convention identity. Skills use standard `SKILL.md`; optional `metadata.requires: requires.yml` points to one sibling YAML document with explicit conventions and skills lists of id/source mappings. Shared dependencies use source hub. Neither conventions nor skills link directly to other resources; skills discover dependencies by identity.
|
|
8
|
+
|
|
9
|
+
The manifest starts with schemaVersion 1 and content version 1.0.0. Content tags use `v1.0.0`, independently of the CLI package version. Consumers pin one exact commit and select only the resources they need; all declared dependencies must also be explicitly selected.
|
|
10
|
+
|
|
11
|
+
Run `agentscli-hub apply <directory>` again to update the five managed operational skill trees and this README. Their edits are disposable and obsolete managed files are removed. Authored content, intentional authored deletions, manifest version, Git policy, remotes, refs, staging, and unrelated files are preserved. `--dry-run` previews the same plan without writes. An interrupted apply reports completed and pending effects; retry the same command.
|
|
12
|
+
|
|
13
|
+
An interrupted first creation can resume when native Git remains unborn, has no refs, staging or remotes, and the non-Git files are an exact subset of the initial scaffold. Changed, unrelated, or unsafe content requires explicit reconciliation. The manifest is written last; after identification, repeat apply always preserves authored deletions.
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Resource authoring
|
|
2
|
+
|
|
3
|
+
Use English for this hub's internal instructions. Keep every convention self-contained. A convention cannot declare requires or link to other conventions, skills, skill directories, or skill support files. A convention's filename matches its single H1's ASCII kebab-case slug. Shared convention templates have leading YAML containing only a nonempty string trigger and use the `.tpl.md` suffix.
|
|
4
|
+
|
|
5
|
+
Shared skills use standard SKILL.md frontmatter with a name matching their direct-child directory and a useful activation description. Optional dependency metadata contains the string requires.yml; the sibling native YAML document contains conventions and skills lists of id/source mappings. Shared dependencies use source hub and must all exist in this same revision. Each selection is explicit; dependencies never install implicitly.
|
|
6
|
+
|
|
7
|
+
Skills mention other resources by identity. They do not link to conventions, other skills, or foreign support paths. An agent discovers actual targets through project instructions and available skills. Links to a skill's own supporting files remain valid.
|
|
8
|
+
|
|
9
|
+
All mechanically decidable checks belong in deterministic scripts owned by the responsible skill. Semantic self-containment, activation, and impact still require review. Operational skills remain independent, with one responsibility and their complete support closure.
|
|
10
|
+
|
|
11
|
+
Use portable paths and regular files. Do not introduce symbolic links, hard-link aliases, submodules, case-folding collisions, or reserved product skill names. Keep opaque support files intact and preserve executable intent when needed. Inspection never executes shared code.
|
|
12
|
+
|
|
13
|
+
The hub content starts at 1.0.0, independently of the generating CLI version. Corrections and internal-only changes are patch; compatible resource additions are minor; incompatible rules, identity removal or rename, and new required dependencies are major. Use the highest impact, native Git credentials, scoped commits, immutable tags, and verified branch/tag delivery. Preserve unrelated work and staging.
|
|
File without changes
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFileSync } from 'node:fs';
|
|
3
|
+
import { runCli } from './runtime.js';
|
|
4
|
+
const metadata = JSON.parse(
|
|
5
|
+
readFileSync(new URL('../package.json', import.meta.url), 'utf8'),
|
|
6
|
+
);
|
|
7
|
+
process.exitCode = await runCli(process.argv.slice(2), {
|
|
8
|
+
version: metadata.version,
|
|
9
|
+
});
|