@chiralkit/kits 0.1.0-alpha.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 xHadal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,15 @@
1
+ # @chiralkit/kits
2
+
3
+ Kit aggregator for the chiralkit monorepo. Exports the canonical list of kit names (`ui`, `agents`, `cli`, `workspace`, `generator`, `training`), the `pairs.json` source-of-truth for the three ring-2 enantiomeric pairs (`ui↔agents`, `cli↔workspace`, `generator↔training`), and helpers for discovering per-kit source files (`ROADMAP.md`, `BACKLOG.md`) inside a chiralkit workspace.
4
+
5
+ Primarily an internal dependency of `@chiralkit/cli`; published so the CLI's `workspace:*` reference resolves against npm at consume-time.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ pnpm add @chiralkit/kits
11
+ ```
12
+
13
+ ## Status
14
+
15
+ `0.1.0-alpha.0` — first published version. `resolveKitsRoot()` currently returns the package's install directory; for consumer projects that run PM ceremonies over their own `kits/` folder, the resolution strategy will migrate to config-driven in `0.x`. See the main repo: https://github.com/xHadal/chiralkit
@@ -0,0 +1,9 @@
1
+ export declare const KIT_NAMES: readonly ["ui", "agents", "cli", "workspace", "generator", "training"];
2
+ export type KitName = (typeof KIT_NAMES)[number];
3
+ export declare function resolveKitsRoot(): string;
4
+ export interface KitSource {
5
+ name: KitName;
6
+ roadmapPath: string | null;
7
+ backlogPath: string | null;
8
+ }
9
+ export declare function discoverKitSources(kitsRoot: string): Promise<KitSource[]>;
package/dist/index.js ADDED
@@ -0,0 +1,32 @@
1
+ import { createRequire } from "node:module";
2
+ import { access } from "node:fs/promises";
3
+ import { constants } from "node:fs";
4
+ import { dirname, join } from "node:path";
5
+ export const KIT_NAMES = ["ui", "agents", "cli", "workspace", "generator", "training"];
6
+ export function resolveKitsRoot() {
7
+ const req = createRequire(import.meta.url);
8
+ return dirname(req.resolve("@chiralkit/kits/package.json"));
9
+ }
10
+ async function exists(path) {
11
+ try {
12
+ await access(path, constants.R_OK);
13
+ return true;
14
+ }
15
+ catch {
16
+ return false;
17
+ }
18
+ }
19
+ export async function discoverKitSources(kitsRoot) {
20
+ const out = [];
21
+ for (const name of KIT_NAMES) {
22
+ const roadmap = join(kitsRoot, name, "ROADMAP.md");
23
+ const backlog = join(kitsRoot, name, "BACKLOG.md");
24
+ out.push({
25
+ name,
26
+ roadmapPath: (await exists(roadmap)) ? roadmap : null,
27
+ backlogPath: (await exists(backlog)) ? backlog : null,
28
+ });
29
+ }
30
+ return out;
31
+ }
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,MA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,CAAC,CAAC;IACL,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@chiralkit/kits",
3
+ "version": "0.1.0-alpha.0",
4
+ "license": "MIT",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ },
13
+ "./pairs.json": "./pairs.json",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "pairs.json"
19
+ ],
20
+ "devDependencies": {
21
+ "@types/node": "^22.10.1",
22
+ "typescript": "^5.8.3"
23
+ },
24
+ "publishConfig": {
25
+ "access": "public"
26
+ },
27
+ "scripts": {
28
+ "build": "tsc -p tsconfig.json",
29
+ "clean": "rm -rf dist",
30
+ "pretest": "pnpm run build",
31
+ "test": "node --test 'src/**/*.test.ts'"
32
+ }
33
+ }
package/pairs.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "$comment": "Fuente de verdad de los pares enantioméricos de kits en la espiral productos (ring 2). Cada par pasa el test de 3 partes: estructura compartida, superficie mirrored en un axis, función opuesta. Ver docs/superpowers/specs/ para el detalle de chirality y products spiral.",
3
+ "version": 1,
4
+ "pairs": [
5
+ {
6
+ "a": "ui",
7
+ "b": "agents",
8
+ "chiral_axis": "consumer",
9
+ "shared_structure": "Ambos son type del registry con mismo envelope, mismo spec.json shape, mismo distribution flow via `ck add`.",
10
+ "mirrored_surface": "React/HTML/CSS/Web Components ↔ prompts/skills/rules/tools",
11
+ "opposed_function": "Renderizar para humano ↔ ejecutar para LLM"
12
+ },
13
+ {
14
+ "a": "cli",
15
+ "b": "workspace",
16
+ "chiral_axis": "modality",
17
+ "shared_structure": "Ambos son operator-surfaces sobre el registry — leen y escriben los mismos módulos.",
18
+ "mirrored_surface": "Texto imperativo (comandos, flags) ↔ visual declarativo (paneles, clicks)",
19
+ "opposed_function": "Escribir un comando ↔ clickear un estado"
20
+ },
21
+ {
22
+ "a": "generator",
23
+ "b": "training",
24
+ "chiral_axis": "lifecycle_direction",
25
+ "shared_structure": "Ambos consumen/emiten traces del uso de módulos y comparten el response parser.",
26
+ "mirrored_surface": "Prompt → módulo nuevo ↔ Traces → módulo mejor",
27
+ "opposed_function": "Crear módulos desde spec ↔ refinar módulos desde uso"
28
+ }
29
+ ]
30
+ }