@ethlete/agent-rules 0.1.0-next.4 → 0.1.0-next.6

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.
Files changed (76) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +192 -11
  3. package/content/git-hooks/post-checkout.sh +10 -0
  4. package/content/git-hooks/pre-push.sh +5 -0
  5. package/content/hooks/context-warning.py +259 -97
  6. package/content/skills/figma-export/SKILL.md +193 -0
  7. package/content/skills/figma-export/dump-figma-layers.py +83 -0
  8. package/content/skills/figma-export/dump-figma-svg.py +235 -0
  9. package/content/skills/figma-export/measure-template.mjs +87 -0
  10. package/content/skills/git-flow/SKILL.md +83 -0
  11. package/content/skills/handoff/SKILL.md +4 -0
  12. package/content/skills/query/SKILL.md +23 -13
  13. package/package.json +12 -1
  14. package/src/index.js +10 -5
  15. package/src/index.js.map +1 -1
  16. package/src/lib/config.d.ts +30 -2
  17. package/src/lib/config.js +20 -3
  18. package/src/lib/config.js.map +1 -1
  19. package/src/lib/git-flow/build.d.ts +35 -0
  20. package/src/lib/git-flow/build.js +24 -0
  21. package/src/lib/git-flow/build.js.map +1 -0
  22. package/src/lib/git-flow/config.d.ts +59 -0
  23. package/src/lib/git-flow/config.js +50 -0
  24. package/src/lib/git-flow/config.js.map +1 -0
  25. package/src/lib/git-flow/index.d.ts +5 -0
  26. package/src/lib/git-flow/index.js +9 -0
  27. package/src/lib/git-flow/index.js.map +1 -0
  28. package/src/lib/git-flow/parse.d.ts +49 -0
  29. package/src/lib/git-flow/parse.js +274 -0
  30. package/src/lib/git-flow/parse.js.map +1 -0
  31. package/src/lib/git-flow/start.d.ts +22 -0
  32. package/src/lib/git-flow/start.js +24 -0
  33. package/src/lib/git-flow/start.js.map +1 -0
  34. package/src/lib/git-flow/validate.d.ts +34 -0
  35. package/src/lib/git-flow/validate.js +72 -0
  36. package/src/lib/git-flow/validate.js.map +1 -0
  37. package/src/lib/git-flow-command.d.ts +4 -0
  38. package/src/lib/git-flow-command.js +157 -0
  39. package/src/lib/git-flow-command.js.map +1 -0
  40. package/src/lib/git-flow-repair.d.ts +17 -0
  41. package/src/lib/git-flow-repair.js +150 -0
  42. package/src/lib/git-flow-repair.js.map +1 -0
  43. package/src/lib/git-flow-start.d.ts +20 -0
  44. package/src/lib/git-flow-start.js +147 -0
  45. package/src/lib/git-flow-start.js.map +1 -0
  46. package/src/lib/git.d.ts +27 -0
  47. package/src/lib/git.js +49 -0
  48. package/src/lib/git.js.map +1 -0
  49. package/src/lib/gitlab.d.ts +35 -0
  50. package/src/lib/gitlab.js +98 -0
  51. package/src/lib/gitlab.js.map +1 -0
  52. package/src/lib/jira.d.ts +28 -0
  53. package/src/lib/jira.js +83 -0
  54. package/src/lib/jira.js.map +1 -0
  55. package/src/lib/owned-paths.js +19 -1
  56. package/src/lib/owned-paths.js.map +1 -1
  57. package/src/lib/plan.js +29 -5
  58. package/src/lib/plan.js.map +1 -1
  59. package/src/lib/prompt.d.ts +8 -0
  60. package/src/lib/prompt.js +27 -0
  61. package/src/lib/prompt.js.map +1 -0
  62. package/src/lib/render.d.ts +12 -1
  63. package/src/lib/render.js +23 -6
  64. package/src/lib/render.js.map +1 -1
  65. package/src/lib/targets/claude-hooks.d.ts +1 -23
  66. package/src/lib/targets/claude-hooks.js +15 -84
  67. package/src/lib/targets/claude-hooks.js.map +1 -1
  68. package/src/lib/targets/codex-hooks.d.ts +12 -0
  69. package/src/lib/targets/codex-hooks.js +33 -0
  70. package/src/lib/targets/codex-hooks.js.map +1 -0
  71. package/src/lib/targets/git-hooks.d.ts +25 -0
  72. package/src/lib/targets/git-hooks.js +70 -0
  73. package/src/lib/targets/git-hooks.js.map +1 -0
  74. package/src/lib/targets/hooks-shared.d.ts +38 -0
  75. package/src/lib/targets/hooks-shared.js +95 -0
  76. package/src/lib/targets/hooks-shared.js.map +1 -0
@@ -0,0 +1,25 @@
1
+ import { EmittedFile } from './shared';
2
+ export declare const HUSKY_DIR = ".husky";
3
+ export declare const START_MARKER = "# ethlete:git-flow:start";
4
+ export declare const END_MARKER = "# ethlete:git-flow:end";
5
+ /**
6
+ * Git hooks a repo can opt into via the config's `gitHooks` array. Like the agent hooks these never
7
+ * default: a generated block that can reject a developer's push is a higher-stakes artifact than a
8
+ * markdown one, so a repo asks for it.
9
+ */
10
+ export declare const KNOWN_GIT_HOOKS: Record<string, {
11
+ file: string;
12
+ }>;
13
+ export declare const assertKnownGitHooks: (hooks: string[]) => void;
14
+ export declare const huskyHookPath: (name: string) => string;
15
+ /**
16
+ * Appends the check to whatever the repo already has in `.husky/<name>`, between markers — those
17
+ * files routinely hold a git-lfs hook that must keep running and must keep reading stdin first,
18
+ * which is why the appended block never consumes it.
19
+ */
20
+ export declare const emitGitHooks: (options: {
21
+ gitHooks: string[];
22
+ version: string;
23
+ huskyExists: boolean;
24
+ existing: Record<string, string>;
25
+ }) => EmittedFile[];
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emitGitHooks = exports.huskyHookPath = exports.assertKnownGitHooks = exports.KNOWN_GIT_HOOKS = exports.END_MARKER = exports.START_MARKER = exports.HUSKY_DIR = void 0;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ const load_content_1 = require("../load-content");
7
+ const render_1 = require("../render");
8
+ exports.HUSKY_DIR = '.husky';
9
+ exports.START_MARKER = '# ethlete:git-flow:start';
10
+ exports.END_MARKER = '# ethlete:git-flow:end';
11
+ /**
12
+ * Git hooks a repo can opt into via the config's `gitHooks` array. Like the agent hooks these never
13
+ * default: a generated block that can reject a developer's push is a higher-stakes artifact than a
14
+ * markdown one, so a repo asks for it.
15
+ */
16
+ exports.KNOWN_GIT_HOOKS = {
17
+ 'pre-push': { file: 'pre-push.sh' },
18
+ 'post-checkout': { file: 'post-checkout.sh' },
19
+ };
20
+ const assertKnownGitHooks = (hooks) => {
21
+ const unknown = hooks.filter((name) => !(name in exports.KNOWN_GIT_HOOKS));
22
+ if (unknown.length > 0) {
23
+ throw new Error(`Unknown git hook(s): ${unknown.join(', ')}. Known git hooks: ${Object.keys(exports.KNOWN_GIT_HOOKS).join(', ')}.`);
24
+ }
25
+ };
26
+ exports.assertKnownGitHooks = assertKnownGitHooks;
27
+ const huskyHookPath = (name) => `${exports.HUSKY_DIR}/${name}`;
28
+ exports.huskyHookPath = huskyHookPath;
29
+ const SHEBANG = '#!/bin/sh\n';
30
+ const block = (options) => {
31
+ const { file, version } = options;
32
+ const body = (0, fs_1.readFileSync)((0, path_1.join)((0, load_content_1.resolveContentRoot)(), 'git-hooks', file), 'utf8');
33
+ return [
34
+ `# Generated by @ethlete/agent-rules v${version} — DO NOT EDIT between the markers. Run \`npx ethlete-agents sync\`.`,
35
+ '# Set ETHLETE_GIT_FLOW_SKIP=1 to silence it on this machine.',
36
+ body.trimEnd(),
37
+ ].join('\n');
38
+ };
39
+ /**
40
+ * Appends the check to whatever the repo already has in `.husky/<name>`, between markers — those
41
+ * files routinely hold a git-lfs hook that must keep running and must keep reading stdin first,
42
+ * which is why the appended block never consumes it.
43
+ */
44
+ const emitGitHooks = (options) => {
45
+ const { gitHooks, version, huskyExists, existing } = options;
46
+ if (!huskyExists)
47
+ return [];
48
+ return Object.entries(exports.KNOWN_GIT_HOOKS).flatMap(([name, definition]) => {
49
+ var _a;
50
+ const path = (0, exports.huskyHookPath)(name);
51
+ const current = (_a = existing[name]) !== null && _a !== void 0 ? _a : '';
52
+ if (!gitHooks.includes(name)) {
53
+ const stripped = (0, render_1.removeMarkedBlock)({ existing: current, startMarker: exports.START_MARKER, endMarker: exports.END_MARKER });
54
+ return stripped === current ? [] : [{ path, contents: stripped.trim().length > 0 ? stripped : SHEBANG }];
55
+ }
56
+ return [
57
+ {
58
+ path,
59
+ contents: (0, render_1.replaceMarkedBlock)({
60
+ existing: current.trim().length > 0 ? current : SHEBANG,
61
+ block: block({ file: definition.file, version }),
62
+ startMarker: exports.START_MARKER,
63
+ endMarker: exports.END_MARKER,
64
+ }),
65
+ },
66
+ ];
67
+ });
68
+ };
69
+ exports.emitGitHooks = emitGitHooks;
70
+ //# sourceMappingURL=git-hooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-hooks.js","sourceRoot":"","sources":["../../../../../../libs/agent-rules/src/lib/targets/git-hooks.ts"],"names":[],"mappings":";;;AAAA,2BAAkC;AAClC,+BAA4B;AAC5B,kDAAqD;AACrD,sCAAkE;AAGrD,QAAA,SAAS,GAAG,QAAQ,CAAC;AAErB,QAAA,YAAY,GAAG,0BAA0B,CAAC;AAC1C,QAAA,UAAU,GAAG,wBAAwB,CAAC;AAEnD;;;;GAIG;AACU,QAAA,eAAe,GAAqC;IAC/D,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE;IACnC,eAAe,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE;CAC9C,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,KAAe,EAAE,EAAE;IACrD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,uBAAe,CAAC,CAAC,CAAC;IAEnE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CACb,wBAAwB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,sBAAsB,MAAM,CAAC,IAAI,CAAC,uBAAe,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAC3G,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AARW,QAAA,mBAAmB,uBAQ9B;AAEK,MAAM,aAAa,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,GAAG,iBAAS,IAAI,IAAI,EAAE,CAAC;AAAzD,QAAA,aAAa,iBAA4C;AAEtE,MAAM,OAAO,GAAG,aAAa,CAAC;AAE9B,MAAM,KAAK,GAAG,CAAC,OAA0C,EAAE,EAAE;IAC3D,MAAM,EA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QAED,OAAO;YACL;gBACE,IAAI;gBACJ,QAAQ,EAAE,IAAA,2BAAkB,EAAC;oBAC3B,QAAQ,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;oBACvD,KAAK,EAAE,KAAK,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC;oBAChD,WAAW,EAAE,oBAAY;oBACzB,SAAS,EAAE,kBAAU;iBACtB,CAAC;aACH;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAhCW,QAAA,YAAY,gBAgCvB"}
@@ -0,0 +1,38 @@
1
+ import { EmittedFile } from './shared';
2
+ type HookDefinition = {
3
+ event: string;
4
+ file: string;
5
+ timeout: number;
6
+ };
7
+ /**
8
+ * Hooks a repo can opt into via the config's `hooks` array. Hooks run arbitrary commands on the
9
+ * developer's machine, so unlike rules and skills they are never emitted by default.
10
+ */
11
+ export declare const KNOWN_HOOKS: Record<string, HookDefinition>;
12
+ export declare const assertKnownHooks: (hooks: string[]) => void;
13
+ /**
14
+ * Rewrites the generated entries declaratively: every entry whose command points into the
15
+ * agent's `hooks/ethlete/` directory is dropped and the currently enabled hooks are re-added, so
16
+ * disabling a hook in the config also unregisters it. Everything else in the file is untouched.
17
+ */
18
+ export declare const mergeHookSettings: (options: {
19
+ existing: string;
20
+ hooks: string[];
21
+ hooksDir: string;
22
+ commandFor: (file: string) => string;
23
+ }) => string;
24
+ export declare const emitHookScripts: (options: {
25
+ hooks: string[];
26
+ hooksDir: string;
27
+ version: string;
28
+ }) => EmittedFile[];
29
+ /** Only planned when the parsed content actually changes; an unparseable file is left alone. */
30
+ export declare const emitHookSettings: (options: {
31
+ path: string;
32
+ existing: string;
33
+ hooks: string[];
34
+ hooksDir: string;
35
+ commandFor: (file: string) => string;
36
+ createWhenEmpty: boolean;
37
+ }) => EmittedFile[];
38
+ export {};
@@ -0,0 +1,95 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.emitHookSettings = exports.emitHookScripts = exports.mergeHookSettings = exports.assertKnownHooks = exports.KNOWN_HOOKS = void 0;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ const load_content_1 = require("../load-content");
7
+ /**
8
+ * Hooks a repo can opt into via the config's `hooks` array. Hooks run arbitrary commands on the
9
+ * developer's machine, so unlike rules and skills they are never emitted by default.
10
+ */
11
+ exports.KNOWN_HOOKS = {
12
+ 'context-warning': { event: 'UserPromptSubmit', file: 'context-warning.py', timeout: 10 },
13
+ };
14
+ const assertKnownHooks = (hooks) => {
15
+ const unknown = hooks.filter((name) => !(name in exports.KNOWN_HOOKS));
16
+ if (unknown.length > 0) {
17
+ throw new Error(`Unknown hook(s): ${unknown.join(', ')}. Known hooks: ${Object.keys(exports.KNOWN_HOOKS).join(', ')}.`);
18
+ }
19
+ };
20
+ exports.assertKnownHooks = assertKnownHooks;
21
+ /** `#` comment instead of the HTML banner, placed after the shebang so the file stays runnable. */
22
+ const withBanner = (raw, version) => {
23
+ var _a;
24
+ const banner = `# Generated by @ethlete/agent-rules v${version} — DO NOT EDIT. Run \`npx ethlete-agents sync\`.`;
25
+ const lines = raw.split('\n');
26
+ if ((_a = lines[0]) === null || _a === void 0 ? void 0 : _a.startsWith('#!'))
27
+ return [lines[0], banner, ...lines.slice(1)].join('\n');
28
+ return `${banner}\n${raw}`;
29
+ };
30
+ /**
31
+ * Rewrites the generated entries declaratively: every entry whose command points into the
32
+ * agent's `hooks/ethlete/` directory is dropped and the currently enabled hooks are re-added, so
33
+ * disabling a hook in the config also unregisters it. Everything else in the file is untouched.
34
+ */
35
+ const mergeHookSettings = (options) => {
36
+ var _a, _b;
37
+ const { existing, hooks, hooksDir, commandFor } = options;
38
+ const settings = JSON.parse(existing.trim() || '{}');
39
+ const events = Object.assign({}, ((_a = settings.hooks) !== null && _a !== void 0 ? _a : {}));
40
+ for (const [event, groups] of Object.entries(events)) {
41
+ const kept = groups
42
+ .map((group) => {
43
+ var _a;
44
+ return (Object.assign(Object.assign({}, group), { hooks: ((_a = group.hooks) !== null && _a !== void 0 ? _a : []).filter((hook) => { var _a; return !((_a = hook.command) !== null && _a !== void 0 ? _a : '').includes(hooksDir); }) }));
45
+ })
46
+ .filter((group) => group.hooks.length > 0);
47
+ if (kept.length > 0)
48
+ events[event] = kept;
49
+ else
50
+ delete events[event];
51
+ }
52
+ for (const name of hooks) {
53
+ const definition = exports.KNOWN_HOOKS[name];
54
+ if (!definition)
55
+ continue;
56
+ events[definition.event] = [
57
+ ...((_b = events[definition.event]) !== null && _b !== void 0 ? _b : []),
58
+ { hooks: [{ type: 'command', command: commandFor(definition.file), timeout: definition.timeout }] },
59
+ ];
60
+ }
61
+ if (Object.keys(events).length > 0)
62
+ settings.hooks = events;
63
+ else
64
+ delete settings.hooks;
65
+ return `${JSON.stringify(settings, null, 2)}\n`;
66
+ };
67
+ exports.mergeHookSettings = mergeHookSettings;
68
+ const emitHookScripts = (options) => {
69
+ const { hooks, hooksDir, version } = options;
70
+ return hooks.flatMap((name) => {
71
+ const definition = exports.KNOWN_HOOKS[name];
72
+ if (!definition)
73
+ return [];
74
+ const raw = (0, fs_1.readFileSync)((0, path_1.join)((0, load_content_1.resolveContentRoot)(), 'hooks', definition.file), 'utf8');
75
+ return [{ path: `${hooksDir}/${definition.file}`, contents: withBanner(raw, version) }];
76
+ });
77
+ };
78
+ exports.emitHookScripts = emitHookScripts;
79
+ /** Only planned when the parsed content actually changes; an unparseable file is left alone. */
80
+ const emitHookSettings = (options) => {
81
+ const { path, existing, hooks, hooksDir, commandFor, createWhenEmpty } = options;
82
+ if (existing.trim().length === 0 && hooks.length === 0 && !createWhenEmpty)
83
+ return [];
84
+ try {
85
+ const merged = (0, exports.mergeHookSettings)({ existing, hooks, hooksDir, commandFor });
86
+ if (JSON.stringify(JSON.parse(existing.trim() || '{}')) === JSON.stringify(JSON.parse(merged)))
87
+ return [];
88
+ return [{ path, contents: merged }];
89
+ }
90
+ catch (_a) {
91
+ return [];
92
+ }
93
+ };
94
+ exports.emitHookSettings = emitHookSettings;
95
+ //# sourceMappingURL=hooks-shared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks-shared.js","sourceRoot":"","sources":["../../../../../../libs/agent-rules/src/lib/targets/hooks-shared.ts"],"names":[],"mappings":";;;AAAA,2BAAkC;AAClC,+BAA4B;AAC5B,kDAAqD;AAKrD;;;GAGG;AACU,QAAA,WAAW,GAAmC;IACzD,iBAAiB,EAAE,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,EAAE,EAAE;CAC1F,CAAC;AAEK,MAAM,gBAAgB,GAAG,CAAC,KAAe,EAAE,EAAE;IAClD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,mBAAW,CAAC,CAAC,CAAC;IAE/D,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,oBAAoB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,MAAM,CAAC,IAAI,CAAC,mBAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAClH,CAAC;AACH,CAAC,CAAC;AANW,QAAA,gBAAgB,oBAM3B;AAEF,mGAAmG;AACnG,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,OAAe,EAAE,EAAE;;IAClD,MAAM,MAAM,GAAG,wCAAwC,OAAO,kDAAkD,CAAC;IACjH,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAE9B,IAAI,MAAA,KAAK,CAAC,CAAC,CAAC,0CAAE,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAA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