@codyswann/lisa 2.35.0 → 2.36.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/package.json CHANGED
@@ -82,7 +82,7 @@
82
82
  "lodash": ">=4.18.1"
83
83
  },
84
84
  "name": "@codyswann/lisa",
85
- "version": "2.35.0",
85
+ "version": "2.36.0",
86
86
  "description": "Claude Code governance framework that applies guardrails, guidance, and automated enforcement to projects",
87
87
  "main": "dist/index.js",
88
88
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Universal governance: agents, skills, commands, hooks, and rules for all projects.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "AWS CDK-specific plugin",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-cdk",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "AWS CDK-specific Lisa plugin.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Expo/React Native-specific skills, agents, rules, and MCP servers",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-expo",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Expo and React Native-specific skills, agents, rules, and MCP servers.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Harper/Fabric-specific rules for TypeScript component apps",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-harper-fabric",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Harper/Fabric-specific Lisa rules for TypeScript component apps.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "NestJS-specific skills (GraphQL, TypeORM) and hooks (migration write-protection)",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-nestjs",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "NestJS-specific skills and migration write-protection hooks.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.35.0",
3
+ "version": "2.36.0",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -18,32 +18,86 @@
18
18
  */
19
19
  import fs from "node:fs";
20
20
  import path from "node:path";
21
+ import { fileURLToPath } from "node:url";
21
22
 
22
- const [pluginDirArg, versionArg] = process.argv.slice(2);
23
- if (!pluginDirArg || !versionArg) {
24
- console.error(
25
- "Usage: generate-codex-plugin-artifacts.mjs <plugin-dir> <version>"
26
- );
27
- process.exit(1);
23
+ /**
24
+ * Parse the leading YAML frontmatter block of a SKILL.md file.
25
+ *
26
+ * The frontmatter is the simple `key: value` YAML between the first two `---`
27
+ * fences at the very top of the file (the shape every `plugins/*\/skills/*\/SKILL.md`
28
+ * uses). Values are read verbatim as strings (trimmed); nested structures and
29
+ * arrays are not interpreted because skill frontmatter does not use them.
30
+ *
31
+ * @param {string} skillMdPath Absolute or relative path to a SKILL.md file.
32
+ * @returns {{ name?: string, description?: string } & Record<string, string> | null}
33
+ * The parsed key/value pairs, or `null` (skip sentinel) when the file has no
34
+ * leading `---`-delimited frontmatter block. Pure: never writes.
35
+ */
36
+ export function parseSkillFrontmatter(skillMdPath) {
37
+ const raw = fs.readFileSync(skillMdPath, "utf8");
38
+ // Frontmatter must be the very first thing in the file. Normalize CRLF so a
39
+ // Windows-authored SKILL.md parses identically to a LF one.
40
+ const normalized = raw.replace(/\r\n/g, "\n");
41
+ if (!normalized.startsWith("---\n")) {
42
+ return null;
43
+ }
44
+ const closingIndex = normalized.indexOf("\n---", 3);
45
+ if (closingIndex === -1) {
46
+ return null;
47
+ }
48
+ const block = normalized.slice(4, closingIndex);
49
+ const frontmatter = {};
50
+ for (const line of block.split("\n")) {
51
+ const trimmed = line.trim();
52
+ if (trimmed === "" || trimmed.startsWith("#")) {
53
+ continue;
54
+ }
55
+ const separator = trimmed.indexOf(":");
56
+ if (separator === -1) {
57
+ continue;
58
+ }
59
+ const key = trimmed.slice(0, separator).trim();
60
+ if (key === "") {
61
+ continue;
62
+ }
63
+ const value = trimmed
64
+ .slice(separator + 1)
65
+ .trim()
66
+ .replace(/^["']|["']$/g, "");
67
+ frontmatter[key] = value;
68
+ }
69
+ return frontmatter;
28
70
  }
29
71
 
30
- const pluginDir = path.resolve(pluginDirArg);
31
- const claudeManifestPath = path.join(
32
- pluginDir,
33
- ".claude-plugin",
34
- "plugin.json"
35
- );
36
- if (!fs.existsSync(claudeManifestPath)) {
37
- process.exit(0);
38
- }
72
+ function main() {
73
+ const [pluginDirArg, versionArg] = process.argv.slice(2);
74
+ if (!pluginDirArg || !versionArg) {
75
+ console.error(
76
+ "Usage: generate-codex-plugin-artifacts.mjs <plugin-dir> <version>"
77
+ );
78
+ process.exit(1);
79
+ }
39
80
 
40
- const claudeManifest = JSON.parse(fs.readFileSync(claudeManifestPath, "utf8"));
41
- const pluginName = claudeManifest.name;
81
+ const pluginDir = path.resolve(pluginDirArg);
82
+ const claudeManifestPath = path.join(
83
+ pluginDir,
84
+ ".claude-plugin",
85
+ "plugin.json"
86
+ );
87
+ if (!fs.existsSync(claudeManifestPath)) {
88
+ process.exit(0);
89
+ }
42
90
 
43
- writeCodexManifest(pluginName, versionArg);
91
+ const claudeManifest = JSON.parse(
92
+ fs.readFileSync(claudeManifestPath, "utf8")
93
+ );
94
+ const pluginName = claudeManifest.name;
44
95
 
45
- function writeCodexManifest(pluginName, version) {
46
- const metadata = metadataFor(pluginName);
96
+ writeCodexManifest(pluginDir, claudeManifest, pluginName, versionArg);
97
+ }
98
+
99
+ function writeCodexManifest(pluginDir, claudeManifest, pluginName, version) {
100
+ const metadata = metadataFor(pluginName, claudeManifest);
47
101
  const manifest = {
48
102
  name: pluginName,
49
103
  version,
@@ -53,7 +107,7 @@ function writeCodexManifest(pluginName, version) {
53
107
  ...(claudeManifest.dependencies
54
108
  ? { dependencies: claudeManifest.dependencies }
55
109
  : {}),
56
- ...componentPointers(),
110
+ ...componentPointers(pluginDir),
57
111
  interface: {
58
112
  displayName: metadata.displayName,
59
113
  shortDescription: metadata.shortDescription,
@@ -73,7 +127,7 @@ function writeCodexManifest(pluginName, version) {
73
127
  );
74
128
  }
75
129
 
76
- function componentPointers() {
130
+ function componentPointers(pluginDir) {
77
131
  return {
78
132
  ...(fs.existsSync(path.join(pluginDir, "skills"))
79
133
  ? { skills: "./skills/" }
@@ -84,7 +138,7 @@ function componentPointers() {
84
138
  };
85
139
  }
86
140
 
87
- function metadataFor(pluginName) {
141
+ function metadataFor(pluginName, claudeManifest) {
88
142
  const map = {
89
143
  lisa: {
90
144
  displayName: "Lisa",
@@ -236,3 +290,9 @@ function metadataFor(pluginName) {
236
290
  }
237
291
  );
238
292
  }
293
+
294
+ // Run the generator only when invoked directly (e.g. via build-plugins.sh),
295
+ // not when this module is imported (e.g. by unit tests for the parser).
296
+ if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
297
+ main();
298
+ }