agentsys 5.6.4 → 5.8.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.
Files changed (40) hide show
  1. package/.claude-plugin/marketplace.json +30 -19
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.kiro/agents/exploration-agent.json +1 -1
  4. package/.kiro/agents/implementation-agent.json +1 -1
  5. package/.kiro/agents/map-validator.json +2 -2
  6. package/.kiro/agents/perf-orchestrator.json +1 -1
  7. package/.kiro/agents/planning-agent.json +1 -1
  8. package/.kiro/skills/perf-code-paths/SKILL.md +1 -1
  9. package/.kiro/skills/perf-theory-gatherer/SKILL.md +1 -1
  10. package/.kiro/skills/repo-intel/SKILL.md +63 -0
  11. package/AGENTS.md +10 -8
  12. package/CHANGELOG.md +37 -0
  13. package/README.md +152 -98
  14. package/lib/binary/version.js +1 -1
  15. package/lib/repo-map/converter.js +130 -0
  16. package/lib/repo-map/index.js +117 -74
  17. package/lib/repo-map/installer.js +38 -172
  18. package/lib/repo-map/updater.js +16 -474
  19. package/meta/skills/maintain-cross-platform/SKILL.md +7 -6
  20. package/package.json +3 -3
  21. package/scripts/fix-graduated-repos.js +2 -2
  22. package/scripts/generate-docs.js +22 -16
  23. package/scripts/graduate-plugin.js +1 -1
  24. package/scripts/plugins.txt +7 -1
  25. package/scripts/preflight.js +4 -4
  26. package/scripts/validate-cross-platform-docs.js +2 -2
  27. package/site/content.json +40 -23
  28. package/site/index.html +44 -12
  29. package/site/ux-spec.md +6 -6
  30. package/.kiro/skills/repo-mapping/SKILL.md +0 -83
  31. package/lib/repo-map/concurrency.js +0 -29
  32. package/lib/repo-map/queries/go.js +0 -27
  33. package/lib/repo-map/queries/index.js +0 -100
  34. package/lib/repo-map/queries/java.js +0 -38
  35. package/lib/repo-map/queries/javascript.js +0 -55
  36. package/lib/repo-map/queries/python.js +0 -24
  37. package/lib/repo-map/queries/rust.js +0 -73
  38. package/lib/repo-map/queries/typescript.js +0 -38
  39. package/lib/repo-map/runner.js +0 -1364
  40. package/lib/repo-map/usage-analyzer.js +0 -407
@@ -1,100 +0,0 @@
1
- /**
2
- * Language-specific query patterns for ast-grep
3
- *
4
- * @module lib/repo-map/queries
5
- */
6
-
7
- 'use strict';
8
-
9
- const path = require('path');
10
-
11
- const javascript = require('./javascript');
12
- const typescript = require('./typescript');
13
- const python = require('./python');
14
- const rust = require('./rust');
15
- const go = require('./go');
16
- const java = require('./java');
17
-
18
- /**
19
- * Get query patterns for a language
20
- * @param {string} language - Language name
21
- * @returns {Object|null}
22
- */
23
- function getQueriesForLanguage(language) {
24
- switch (language) {
25
- case 'javascript':
26
- case 'js':
27
- case 'node':
28
- return javascript;
29
- case 'typescript':
30
- case 'ts':
31
- return typescript;
32
- case 'python':
33
- case 'py':
34
- return python;
35
- case 'rust':
36
- return rust;
37
- case 'go':
38
- return go;
39
- case 'java':
40
- return java;
41
- default:
42
- return null;
43
- }
44
- }
45
-
46
- /**
47
- * Get base ast-grep language identifier
48
- * @param {string} language - Language name
49
- * @returns {string}
50
- */
51
- function getSgLanguage(language) {
52
- switch (language) {
53
- case 'javascript':
54
- case 'js':
55
- case 'node':
56
- return 'javascript';
57
- case 'typescript':
58
- case 'ts':
59
- return 'typescript';
60
- case 'python':
61
- case 'py':
62
- return 'python';
63
- case 'rust':
64
- return 'rust';
65
- case 'go':
66
- return 'go';
67
- case 'java':
68
- return 'java';
69
- default:
70
- return 'javascript';
71
- }
72
- }
73
-
74
- /**
75
- * Get ast-grep language identifier based on file extension
76
- * @param {string} filePath - File path
77
- * @param {string} language - Language name
78
- * @returns {string}
79
- */
80
- function getSgLanguageForFile(filePath, language) {
81
- const ext = path.extname(filePath).toLowerCase();
82
-
83
- if (language === 'javascript') {
84
- if (ext === '.jsx') return 'jsx';
85
- return 'javascript';
86
- }
87
-
88
- if (language === 'typescript') {
89
- if (ext === '.tsx') return 'tsx';
90
- return 'typescript';
91
- }
92
-
93
- return getSgLanguage(language);
94
- }
95
-
96
- module.exports = {
97
- getQueriesForLanguage,
98
- getSgLanguage,
99
- getSgLanguageForFile
100
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * Java query patterns for ast-grep
3
- */
4
-
5
- 'use strict';
6
-
7
- module.exports = {
8
- exports: [
9
- { pattern: 'public class $NAME { $$$ }', kind: 'class', nameVar: 'NAME' },
10
- { pattern: 'public interface $NAME { $$$ }', kind: 'class', nameVar: 'NAME' },
11
- { pattern: 'public enum $NAME { $$$ }', kind: 'class', nameVar: 'NAME' },
12
- { pattern: 'public record $NAME($$$) { $$$ }', kind: 'class', nameVar: 'NAME' },
13
- { pattern: 'public $RET $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
14
- { pattern: 'public static $RET $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
15
- { pattern: 'public $RET $NAME($$$);', kind: 'function', nameVar: 'NAME' }
16
- ],
17
- functions: [
18
- { pattern: 'public $RET $NAME($$$) { $$$ }', nameVar: 'NAME' },
19
- { pattern: 'public static $RET $NAME($$$) { $$$ }', nameVar: 'NAME' },
20
- { pattern: 'protected $RET $NAME($$$) { $$$ }', nameVar: 'NAME' },
21
- { pattern: 'private $RET $NAME($$$) { $$$ }', nameVar: 'NAME' }
22
- ],
23
- classes: [
24
- { pattern: 'class $NAME { $$$ }', nameVar: 'NAME' },
25
- { pattern: 'interface $NAME { $$$ }', nameVar: 'NAME' },
26
- { pattern: 'enum $NAME { $$$ }', nameVar: 'NAME' },
27
- { pattern: 'record $NAME($$$) { $$$ }', nameVar: 'NAME' }
28
- ],
29
- types: [],
30
- constants: [
31
- { pattern: 'public static final $TYPE $NAME = $$$;', nameVar: 'NAME' },
32
- { pattern: 'static final $TYPE $NAME = $$$;', nameVar: 'NAME' }
33
- ],
34
- imports: [
35
- { pattern: 'import $SOURCE;', sourceVar: 'SOURCE', kind: 'import' },
36
- { pattern: 'import static $SOURCE;', sourceVar: 'SOURCE', kind: 'import' }
37
- ]
38
- };
@@ -1,55 +0,0 @@
1
- /**
2
- * JavaScript query patterns for ast-grep
3
- */
4
-
5
- 'use strict';
6
-
7
- module.exports = {
8
- exports: [
9
- { pattern: 'export function $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
10
- { pattern: 'export async function $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
11
- { pattern: 'export class $NAME { $$$ }', kind: 'class', nameVar: 'NAME' },
12
- { pattern: 'export const $NAME = $$$', kind: 'constant', nameVar: 'NAME' },
13
- { pattern: 'export let $NAME = $$$', kind: 'variable', nameVar: 'NAME' },
14
- { pattern: 'export var $NAME = $$$', kind: 'variable', nameVar: 'NAME' },
15
- { pattern: 'export default function $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
16
- { pattern: 'export default class $NAME { $$$ }', kind: 'class', nameVar: 'NAME' },
17
- { pattern: 'export default function ($$$) { $$$ }', kind: 'function', fallbackName: 'default' },
18
- { pattern: 'export default class { $$$ }', kind: 'class', fallbackName: 'default' },
19
- { pattern: 'export default $NAME', kind: 'value', nameVar: 'NAME' },
20
- { pattern: 'export { $$$ }', kind: 'value', multi: 'exportList' },
21
- { pattern: 'export { $$$ } from $SOURCE', kind: 're-export', multi: 'exportList', sourceVar: 'SOURCE' },
22
- { pattern: 'export * from $SOURCE', kind: 're-export', fallbackName: '*', sourceVar: 'SOURCE' },
23
- { pattern: 'module.exports = $NAME', kind: 'value', nameVar: 'NAME' },
24
- { pattern: 'module.exports = { $$$ }', kind: 'value', multi: 'objectLiteral' },
25
- { pattern: 'exports.$NAME = $$$', kind: 'value', nameVar: 'NAME' }
26
- ],
27
- functions: [
28
- { pattern: 'function $NAME($$$) { $$$ }', nameVar: 'NAME' },
29
- { pattern: 'async function $NAME($$$) { $$$ }', nameVar: 'NAME' },
30
- { pattern: 'function* $NAME($$$) { $$$ }', nameVar: 'NAME' },
31
- { pattern: 'async function* $NAME($$$) { $$$ }', nameVar: 'NAME' },
32
- { pattern: 'const $NAME = ($$$) => $$$', nameVar: 'NAME' },
33
- { pattern: 'const $NAME = async ($$$) => $$$', nameVar: 'NAME' },
34
- { pattern: 'const $NAME = function ($$$) { $$$ }', nameVar: 'NAME' },
35
- { pattern: 'const $NAME = async function ($$$) { $$$ }', nameVar: 'NAME' },
36
- { pattern: 'let $NAME = ($$$) => $$$', nameVar: 'NAME' },
37
- { pattern: 'var $NAME = ($$$) => $$$', nameVar: 'NAME' }
38
- ],
39
- classes: [
40
- { pattern: 'class $NAME { $$$ }', nameVar: 'NAME' },
41
- { pattern: 'const $NAME = class { $$$ }', nameVar: 'NAME' },
42
- { pattern: 'const $NAME = class $CLASS { $$$ }', nameVar: 'NAME' }
43
- ],
44
- types: [],
45
- constants: [],
46
- imports: [
47
- { pattern: 'import $NAME from $SOURCE', sourceVar: 'SOURCE', kind: 'default' },
48
- { pattern: 'import * as $NAME from $SOURCE', sourceVar: 'SOURCE', kind: 'namespace' },
49
- { pattern: 'import { $$$ } from $SOURCE', sourceVar: 'SOURCE', kind: 'named' },
50
- { pattern: 'import $SOURCE', sourceVar: 'SOURCE', kind: 'side-effect' },
51
- { pattern: 'const $NAME = require($SOURCE)', sourceVar: 'SOURCE', kind: 'require' },
52
- { pattern: 'const { $$$ } = require($SOURCE)', sourceVar: 'SOURCE', kind: 'require' },
53
- { pattern: 'require($SOURCE)', sourceVar: 'SOURCE', kind: 'require' }
54
- ]
55
- };
@@ -1,24 +0,0 @@
1
- /**
2
- * Python query patterns for ast-grep
3
- */
4
-
5
- 'use strict';
6
-
7
- module.exports = {
8
- exports: [],
9
- functions: [
10
- { pattern: 'def $NAME($$$): $$$', nameVar: 'NAME' },
11
- { pattern: 'async def $NAME($$$): $$$', nameVar: 'NAME' }
12
- ],
13
- classes: [
14
- { pattern: 'class $NAME($$$): $$$', nameVar: 'NAME' },
15
- { pattern: 'class $NAME: $$$', nameVar: 'NAME' }
16
- ],
17
- types: [],
18
- constants: [],
19
- imports: [
20
- { pattern: 'import $SOURCE', sourceVar: 'SOURCE', kind: 'import', multiSource: true },
21
- { pattern: 'from $SOURCE import $NAME', sourceVar: 'SOURCE', kind: 'from' },
22
- { pattern: 'from $SOURCE import ($$$)', sourceVar: 'SOURCE', kind: 'from' }
23
- ]
24
- };
@@ -1,73 +0,0 @@
1
- /**
2
- * Rust query patterns for ast-grep
3
- */
4
-
5
- 'use strict';
6
-
7
- module.exports = {
8
- exports: [
9
- { pattern: 'pub fn $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
10
- { pattern: 'pub(crate) fn $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
11
- { pattern: 'pub(super) fn $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
12
- { pattern: 'pub(in $PATH) fn $NAME($$$) { $$$ }', kind: 'function', nameVar: 'NAME' },
13
- { pattern: 'pub struct $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
14
- { pattern: 'pub(crate) struct $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
15
- { pattern: 'pub(super) struct $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
16
- { pattern: 'pub(in $PATH) struct $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
17
- { pattern: 'pub enum $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
18
- { pattern: 'pub(crate) enum $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
19
- { pattern: 'pub(super) enum $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
20
- { pattern: 'pub(in $PATH) enum $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
21
- { pattern: 'pub trait $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
22
- { pattern: 'pub(crate) trait $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
23
- { pattern: 'pub(super) trait $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
24
- { pattern: 'pub(in $PATH) trait $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
25
- { pattern: 'pub type $NAME = $$$', kind: 'type', nameVar: 'NAME' },
26
- { pattern: 'pub(crate) type $NAME = $$$', kind: 'type', nameVar: 'NAME' },
27
- { pattern: 'pub(super) type $NAME = $$$', kind: 'type', nameVar: 'NAME' },
28
- { pattern: 'pub(in $PATH) type $NAME = $$$', kind: 'type', nameVar: 'NAME' },
29
- { pattern: 'pub const $NAME: $TYPE = $$$', kind: 'constant', nameVar: 'NAME' },
30
- { pattern: 'pub(crate) const $NAME: $TYPE = $$$', kind: 'constant', nameVar: 'NAME' },
31
- { pattern: 'pub(super) const $NAME: $TYPE = $$$', kind: 'constant', nameVar: 'NAME' },
32
- { pattern: 'pub(in $PATH) const $NAME: $TYPE = $$$', kind: 'constant', nameVar: 'NAME' },
33
- { pattern: 'pub static $NAME: $TYPE = $$$', kind: 'constant', nameVar: 'NAME' },
34
- { pattern: 'pub(crate) static $NAME: $TYPE = $$$', kind: 'constant', nameVar: 'NAME' },
35
- { pattern: 'pub(super) static $NAME: $TYPE = $$$', kind: 'constant', nameVar: 'NAME' },
36
- { pattern: 'pub(in $PATH) static $NAME: $TYPE = $$$', kind: 'constant', nameVar: 'NAME' },
37
- { pattern: 'pub mod $NAME { $$$ }', kind: 'module', nameVar: 'NAME' },
38
- { pattern: 'pub(crate) mod $NAME { $$$ }', kind: 'module', nameVar: 'NAME' },
39
- { pattern: 'pub(super) mod $NAME { $$$ }', kind: 'module', nameVar: 'NAME' },
40
- { pattern: 'pub(in $PATH) mod $NAME { $$$ }', kind: 'module', nameVar: 'NAME' },
41
- { pattern: 'pub mod $NAME;', kind: 'module', nameVar: 'NAME' }
42
- ],
43
- functions: [
44
- { pattern: 'fn $NAME($$$) { $$$ }', nameVar: 'NAME' },
45
- { pattern: 'async fn $NAME($$$) { $$$ }', nameVar: 'NAME' },
46
- { pattern: 'pub fn $NAME($$$) { $$$ }', nameVar: 'NAME' },
47
- { pattern: 'pub(crate) fn $NAME($$$) { $$$ }', nameVar: 'NAME' },
48
- { pattern: 'pub(super) fn $NAME($$$) { $$$ }', nameVar: 'NAME' },
49
- { pattern: 'pub(in $PATH) fn $NAME($$$) { $$$ }', nameVar: 'NAME' },
50
- { pattern: 'pub async fn $NAME($$$) { $$$ }', nameVar: 'NAME' },
51
- { pattern: 'pub(crate) async fn $NAME($$$) { $$$ }', nameVar: 'NAME' }
52
- ],
53
- classes: [],
54
- types: [
55
- { pattern: 'struct $NAME { $$$ }', nameVar: 'NAME' },
56
- { pattern: 'enum $NAME { $$$ }', nameVar: 'NAME' },
57
- { pattern: 'trait $NAME { $$$ }', nameVar: 'NAME' },
58
- { pattern: 'type $NAME = $$$', nameVar: 'NAME' },
59
- { pattern: 'pub struct $NAME { $$$ }', nameVar: 'NAME' },
60
- { pattern: 'pub enum $NAME { $$$ }', nameVar: 'NAME' },
61
- { pattern: 'pub trait $NAME { $$$ }', nameVar: 'NAME' },
62
- { pattern: 'pub type $NAME = $$$', nameVar: 'NAME' }
63
- ],
64
- constants: [
65
- { pattern: 'const $NAME: $TYPE = $$$', nameVar: 'NAME' },
66
- { pattern: 'static $NAME: $TYPE = $$$', nameVar: 'NAME' }
67
- ],
68
- imports: [
69
- { pattern: 'use $SOURCE;', sourceVar: 'SOURCE', kind: 'use' },
70
- { pattern: 'use $SOURCE::{ $$$ };', sourceVar: 'SOURCE', kind: 'use' },
71
- { pattern: 'use $SOURCE::*;', sourceVar: 'SOURCE', kind: 'use' }
72
- ]
73
- };
@@ -1,38 +0,0 @@
1
- /**
2
- * TypeScript query patterns for ast-grep
3
- */
4
-
5
- 'use strict';
6
-
7
- const javascript = require('./javascript');
8
-
9
- module.exports = {
10
- exports: [
11
- ...javascript.exports,
12
- { pattern: 'export interface $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
13
- { pattern: 'export type $NAME = $$$', kind: 'type', nameVar: 'NAME' },
14
- { pattern: 'export enum $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
15
- { pattern: 'export namespace $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
16
- { pattern: 'export const enum $NAME { $$$ }', kind: 'type', nameVar: 'NAME' },
17
- { pattern: 'export = $NAME', kind: 'value', nameVar: 'NAME' },
18
- { pattern: 'export as namespace $NAME', kind: 'namespace', nameVar: 'NAME' }
19
- ],
20
- functions: javascript.functions,
21
- classes: [
22
- ...javascript.classes,
23
- { pattern: 'abstract class $NAME { $$$ }', nameVar: 'NAME' }
24
- ],
25
- types: [
26
- { pattern: 'interface $NAME { $$$ }', nameVar: 'NAME' },
27
- { pattern: 'type $NAME = $$$', nameVar: 'NAME' },
28
- { pattern: 'enum $NAME { $$$ }', nameVar: 'NAME' },
29
- { pattern: 'namespace $NAME { $$$ }', nameVar: 'NAME' },
30
- { pattern: 'const enum $NAME { $$$ }', nameVar: 'NAME' }
31
- ],
32
- constants: javascript.constants,
33
- imports: [
34
- ...javascript.imports,
35
- { pattern: 'import type { $$$ } from $SOURCE', sourceVar: 'SOURCE', kind: 'type' },
36
- { pattern: 'import type $NAME from $SOURCE', sourceVar: 'SOURCE', kind: 'type' }
37
- ]
38
- };