supered 0.1.3

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.
@@ -0,0 +1,137 @@
1
+ import { access, readFile, readdir } from "node:fs/promises";
2
+ import { join, relative } from "node:path";
3
+
4
+ export const SKILL_ORDER = [
5
+ "using-supered",
6
+ "shape-the-task",
7
+ "make-a-map",
8
+ "build-in-slices",
9
+ "trace-the-fault",
10
+ "prove-the-change",
11
+ "ship-the-work"
12
+ ];
13
+
14
+ async function readJson(path) {
15
+ return JSON.parse(await readFile(path, "utf8"));
16
+ }
17
+
18
+ function parseSkill(path, contents) {
19
+ const frontmatter = contents.match(/^---\n([\s\S]*?)\n---\n([\s\S]*)$/);
20
+ if (!frontmatter) {
21
+ return {
22
+ path,
23
+ name: "",
24
+ description: "",
25
+ body: contents
26
+ };
27
+ }
28
+
29
+ const metadata = Object.fromEntries(
30
+ frontmatter[1]
31
+ .split("\n")
32
+ .map((line) => line.match(/^([A-Za-z0-9_-]+):\s*"?([^"]*)"?$/))
33
+ .filter(Boolean)
34
+ .map((match) => [match[1], match[2]])
35
+ );
36
+
37
+ return {
38
+ path,
39
+ name: metadata.name ?? "",
40
+ description: metadata.description ?? "",
41
+ body: frontmatter[2]
42
+ };
43
+ }
44
+
45
+ export async function listSkills(root = process.cwd()) {
46
+ const skillsDir = join(root, "skills");
47
+ const entries = await readdir(skillsDir, { withFileTypes: true });
48
+ const skills = await Promise.all(
49
+ entries
50
+ .filter((entry) => entry.isDirectory())
51
+ .map(async (entry) => {
52
+ const path = join(skillsDir, entry.name, "SKILL.md");
53
+ return parseSkill(path, await readFile(path, "utf8"));
54
+ })
55
+ );
56
+
57
+ return skills.sort((left, right) => {
58
+ const leftIndex = SKILL_ORDER.indexOf(left.name);
59
+ const rightIndex = SKILL_ORDER.indexOf(right.name);
60
+ return leftIndex - rightIndex;
61
+ });
62
+ }
63
+
64
+ export async function collectManifest(root = process.cwd()) {
65
+ return {
66
+ package: await readJson(join(root, "package.json")),
67
+ codexPlugin: await readJson(join(root, ".codex-plugin", "plugin.json")),
68
+ claudePlugin: await readJson(join(root, ".claude-plugin", "plugin.json")),
69
+ cursorPlugin: await readJson(join(root, ".cursor-plugin", "plugin.json")),
70
+ geminiExtension: await readJson(join(root, "gemini-extension.json"))
71
+ };
72
+ }
73
+
74
+ export async function validateProject(root = process.cwd()) {
75
+ const errors = [];
76
+ const checked = ["package.json"];
77
+ const manifest = await collectManifest(root);
78
+ checked.push(".codex-plugin/plugin.json");
79
+ checked.push(".claude-plugin/plugin.json");
80
+ checked.push(".cursor-plugin/plugin.json");
81
+ checked.push("gemini-extension.json");
82
+
83
+ if (manifest.package.name !== "supered") {
84
+ errors.push("package.json name must be supered");
85
+ }
86
+
87
+ if (manifest.codexPlugin.name !== "supered") {
88
+ errors.push(".codex-plugin/plugin.json name must be supered");
89
+ }
90
+
91
+ if (manifest.codexPlugin.interface?.displayName !== "Supered") {
92
+ errors.push("Codex plugin displayName must be Supered");
93
+ }
94
+
95
+ if (manifest.codexPlugin.skills !== "./skills/") {
96
+ errors.push("Codex plugin skills path must be ./skills/");
97
+ }
98
+
99
+ const logoPath = manifest.codexPlugin.interface?.logo?.replace(/^\.\//, "");
100
+ if (logoPath) {
101
+ checked.push(logoPath);
102
+ try {
103
+ await access(join(root, logoPath));
104
+ } catch {
105
+ errors.push(`Missing logo file: ${logoPath}`);
106
+ }
107
+ } else {
108
+ errors.push("Codex plugin interface.logo is required");
109
+ }
110
+
111
+ const skills = await listSkills(root);
112
+ for (const skill of skills) {
113
+ checked.push(relative(root, skill.path));
114
+ if (!skill.name) {
115
+ errors.push(`${relative(root, skill.path)} is missing a name`);
116
+ }
117
+ if (!skill.description) {
118
+ errors.push(`${relative(root, skill.path)} is missing a description`);
119
+ }
120
+ if (!/^# /m.test(skill.body)) {
121
+ errors.push(`${relative(root, skill.path)} is missing an H1`);
122
+ }
123
+ }
124
+
125
+ const skillNames = skills.map((skill) => skill.name);
126
+ for (const expected of SKILL_ORDER) {
127
+ if (!skillNames.includes(expected)) {
128
+ errors.push(`Missing skill: ${expected}`);
129
+ }
130
+ }
131
+
132
+ return {
133
+ errors,
134
+ checked,
135
+ skills
136
+ };
137
+ }
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "supered",
3
+ "version": "0.1.3",
4
+ "description": "A compact agent workflow kit for clarifying, building, verifying, and shipping software changes.",
5
+ "type": "module",
6
+ "homepage": "https://fhajjej-ship-it.github.io/Supered/",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/fhajjej-ship-it/Supered.git"
10
+ },
11
+ "bugs": {
12
+ "url": "https://github.com/fhajjej-ship-it/Supered/issues"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "bin": {
18
+ "supered": "bin/supered.mjs"
19
+ },
20
+ "scripts": {
21
+ "test": "node --test",
22
+ "validate": "node ./bin/supered.mjs validate",
23
+ "skills": "node ./bin/supered.mjs skills",
24
+ "smoke-install": "node ./scripts/smoke-install.mjs",
25
+ "verify-site": "node ./scripts/verify-site.mjs",
26
+ "verify-package": "node ./scripts/verify-npm-package.mjs",
27
+ "prepublishOnly": "npm test && npm run validate && npm run smoke-install && npm run verify-package"
28
+ },
29
+ "files": [
30
+ ".claude-plugin/",
31
+ ".codex-plugin/",
32
+ ".cursor-plugin/",
33
+ ".opencode/",
34
+ "1.svg",
35
+ "assets/",
36
+ "bin/",
37
+ "docs/",
38
+ "gemini-extension.json",
39
+ "install.sh",
40
+ "lib/",
41
+ "skills/",
42
+ "README.md",
43
+ "LICENSE"
44
+ ],
45
+ "keywords": [
46
+ "agent",
47
+ "coding-agents",
48
+ "skills",
49
+ "planning",
50
+ "verification",
51
+ "workflow"
52
+ ],
53
+ "engines": {
54
+ "node": ">=18"
55
+ },
56
+ "license": "MIT",
57
+ "devDependencies": {
58
+ "playwright": "^1.60.0"
59
+ }
60
+ }
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: build-in-slices
3
+ description: Use when implementing features or repository changes that should be built incrementally and verified as they land.
4
+ ---
5
+
6
+ # Build In Slices
7
+
8
+ Build one meaningful slice at a time. Each slice should make the repo more complete without hiding unfinished work behind broad claims.
9
+
10
+ ## Steps
11
+
12
+ 1. Start with the smallest test or validator that can catch drift.
13
+ 2. Run it and observe the failure when practical.
14
+ 3. Implement the slice.
15
+ 4. Re-run the relevant check.
16
+ 5. Continue only after the evidence matches the claim.
17
+
18
+ ## Slice Examples
19
+
20
+ - Add manifest tests before writing manifest code.
21
+ - Add CLI behavior before expanding documentation.
22
+ - Add one skill file, validate it, then add the next.
23
+ - Update docs only after the product surface is real.
24
+
25
+ ## Evidence
26
+
27
+ Every slice should leave behind a file diff and a command result that explains what changed.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: make-a-map
3
+ description: Use when an approved task needs a small execution plan with concrete files, checks, and handoff points.
4
+ ---
5
+
6
+ # Make A Map
7
+
8
+ Turn an approved brief into a short implementation map. Prefer a handful of crisp steps over a sprawling plan.
9
+
10
+ ## Steps
11
+
12
+ 1. Inspect the repo before planning.
13
+ 2. Identify the files that must change.
14
+ 3. Split work into slices that can be verified independently.
15
+ 4. Put the highest-risk slice first.
16
+ 5. Name the exact verification commands.
17
+
18
+ ## Plan Rules
19
+
20
+ - One active step at a time.
21
+ - No ornamental refactors.
22
+ - Keep tasks scoped to the user's request.
23
+ - Update the map as facts change.
24
+
25
+ ## Evidence
26
+
27
+ A good map names the next command, the next file, and the reason the step matters.
@@ -0,0 +1,27 @@
1
+ ---
2
+ name: prove-the-change
3
+ description: Use before claiming work is complete, tests pass, a bug is fixed, or a public handoff is ready.
4
+ ---
5
+
6
+ # Prove The Change
7
+
8
+ Claims need evidence. Run fresh verification close to the final answer.
9
+
10
+ ## Steps
11
+
12
+ 1. List the claims you are about to make.
13
+ 2. Pick the command or inspection that proves each claim.
14
+ 3. Run the checks.
15
+ 4. Read the output and note failures honestly.
16
+ 5. Report only what the evidence supports.
17
+
18
+ ## Common Proof
19
+
20
+ - `npm test` for JavaScript packages.
21
+ - `npm run validate` for Supered bundle integrity.
22
+ - `git status --short` for clean or expected working tree state.
23
+ - A browser or screenshot check for visible UI work.
24
+
25
+ ## Evidence
26
+
27
+ The final response should include the checks run and the result.
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: shape-the-task
3
+ description: Use when the user has a rough idea and the agent needs to turn it into a short, buildable brief before implementation.
4
+ ---
5
+
6
+ # Shape The Task
7
+
8
+ Shape the work before building. The goal is a brief that is small enough to act on and concrete enough to test.
9
+
10
+ ## Steps
11
+
12
+ 1. Name the product or change.
13
+ 2. Write the target user and the job they need done.
14
+ 3. List the smallest useful feature set.
15
+ 4. Note constraints, exclusions, and risk.
16
+ 5. Confirm the implementation surface: files, package, repo, app, or deployment.
17
+
18
+ ## Brief Format
19
+
20
+ Use this shape when helpful:
21
+
22
+ ```text
23
+ Outcome:
24
+ Audience:
25
+ Must include:
26
+ Can skip:
27
+ Evidence:
28
+ ```
29
+
30
+ ## Evidence
31
+
32
+ Before moving to implementation, the agent should be able to explain what will be built, what will not be built, and how success will be checked.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: ship-the-work
3
+ description: Use when preparing local work for GitHub: staging, committing, pushing, creating a repository, or handing off a public link.
4
+ ---
5
+
6
+ # Ship The Work
7
+
8
+ Shipping is the last implementation slice. Treat it with the same care as code.
9
+
10
+ ## Steps
11
+
12
+ 1. Inspect `git status --short`.
13
+ 2. Review the changed files for accidental scope.
14
+ 3. Run the relevant verification commands.
15
+ 4. Stage only intended files.
16
+ 5. Commit with a short, specific message.
17
+ 6. Push to the intended public repository.
18
+ 7. Report the branch, commit, repository URL, and checks.
19
+
20
+ ## Guardrails
21
+
22
+ - Do not stage unrelated user changes silently.
23
+ - Do not push secrets, local credentials, or generated noise.
24
+ - Do not call a repo public until GitHub confirms visibility.
25
+
26
+ ## Evidence
27
+
28
+ The handoff should include a GitHub URL and the exact validation that ran before the push.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: trace-the-fault
3
+ description: Use when debugging broken behavior, failing tests, confusing output, or deployment failures with an unknown cause.
4
+ ---
5
+
6
+ # Trace The Fault
7
+
8
+ Debug from symptom to cause. Do not patch randomly.
9
+
10
+ ## Steps
11
+
12
+ 1. Reproduce the symptom.
13
+ 2. State what changed, what stayed the same, and what is unknown.
14
+ 3. Add the smallest observation that distinguishes likely causes.
15
+ 4. Follow the evidence to the responsible boundary.
16
+ 5. Fix the cause and keep the reproduction as a check when possible.
17
+
18
+ ## Guardrails
19
+
20
+ - Do not make multiple unrelated fixes at once.
21
+ - Do not explain a failure before reproducing it.
22
+ - Do not delete evidence until the fix is verified.
23
+
24
+ ## Evidence
25
+
26
+ Completion requires the original symptom to be checked again after the fix.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: using-supered
3
+ description: Use when starting a Supered-guided coding session or when choosing which Supered workflow fits the user's request.
4
+ ---
5
+
6
+ # Using Supered
7
+
8
+ Supered keeps agent work small, explicit, and verifiable. Start here when a request could benefit from a workflow instead of immediate code.
9
+
10
+ ## When To Use
11
+
12
+ Use this skill for new features, bug fixes, code cleanup, public repo preparation, or any request where the agent needs to decide how much process is helpful.
13
+
14
+ ## Steps
15
+
16
+ 1. Identify the user's desired outcome in one sentence.
17
+ 2. Pick the narrowest matching Supered skill.
18
+ 3. State the skill choice briefly before doing the work.
19
+ 4. Keep progress visible with short updates.
20
+ 5. Finish with evidence, not vibes.
21
+
22
+ ## Skill Map
23
+
24
+ - `shape-the-task`: rough idea, unclear scope, or multiple possible products.
25
+ - `make-a-map`: approved direction that needs an execution plan.
26
+ - `build-in-slices`: implementation work that should stay incremental.
27
+ - `trace-the-fault`: broken behavior with an unknown cause.
28
+ - `prove-the-change`: completion, test, or deployment claims.
29
+ - `ship-the-work`: commit, push, release, or public GitHub handoff.