@ryuenn3123/agentic-senior-core 3.0.16 → 3.0.19
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/.agent-context/prompts/bootstrap-design.md +31 -4
- package/.agent-context/rules/frontend-architecture.md +26 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +1 -1
- package/.gemini/instructions.md +7 -1
- package/.github/copilot-instructions.md +7 -1
- package/.instructions.md +3 -0
- package/.windsurfrules +1 -1
- package/AGENTS.md +13 -1
- package/lib/cli/commands/init.mjs +2 -2
- package/lib/cli/memory-continuity.mjs +2 -1
- package/lib/cli/project-scaffolder/constants.mjs +1 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +523 -171
- package/lib/cli/project-scaffolder/prompt-builders.mjs +38 -15
- package/lib/cli/project-scaffolder/storage.mjs +0 -2
- package/package.json +2 -2
- package/scripts/documentation-boundary-audit.mjs +5 -2
- package/scripts/frontend-usability-audit.mjs +34 -0
- package/scripts/mcp-server/constants.mjs +60 -0
- package/scripts/mcp-server/tool-registry.mjs +149 -0
- package/scripts/mcp-server/tools.mjs +446 -0
- package/scripts/mcp-server.mjs +23 -661
- package/scripts/release-gate/audit-checks.mjs +426 -0
- package/scripts/release-gate/constants.mjs +53 -0
- package/scripts/release-gate/runtime.mjs +63 -0
- package/scripts/release-gate/static-checks.mjs +182 -0
- package/scripts/release-gate.mjs +12 -771
- package/scripts/sync-thin-adapters.mjs +24 -0
- package/scripts/ui-design-judge/constants.mjs +24 -0
- package/scripts/ui-design-judge/design-execution-summary.mjs +233 -0
- package/scripts/ui-design-judge/git-input.mjs +131 -0
- package/scripts/ui-design-judge/prompting.mjs +73 -0
- package/scripts/ui-design-judge/providers.mjs +102 -0
- package/scripts/ui-design-judge/reporting.mjs +181 -0
- package/scripts/ui-design-judge/rubric-calibration.mjs +211 -0
- package/scripts/ui-design-judge/rubric-goldset.json +188 -0
- package/scripts/ui-design-judge.mjs +130 -441
- package/scripts/ui-rubric-calibration.mjs +35 -0
- package/scripts/validate/config.mjs +98 -0
|
@@ -98,12 +98,10 @@ export function buildDesignBootstrapPrompt({
|
|
|
98
98
|
discoveryAnswers,
|
|
99
99
|
initContext,
|
|
100
100
|
docsLanguage,
|
|
101
|
-
architectureRecommendation,
|
|
102
101
|
}) {
|
|
103
102
|
const designIntentSeed = buildDesignIntentSeed({
|
|
104
103
|
discoveryAnswers,
|
|
105
104
|
initContext,
|
|
106
|
-
architectureRecommendation,
|
|
107
105
|
});
|
|
108
106
|
|
|
109
107
|
return [
|
|
@@ -133,9 +131,10 @@ export function buildDesignBootstrapPrompt({
|
|
|
133
131
|
'8. Responsive Strategy and Cross-Viewport Adaptation Matrix',
|
|
134
132
|
'9. Motion and Interaction Principles',
|
|
135
133
|
'10. Component Language and Morphology (cards, forms, nav, states)',
|
|
136
|
-
'11.
|
|
137
|
-
'12.
|
|
138
|
-
'13.
|
|
134
|
+
'11. Context Hygiene and Approved Reference Boundaries',
|
|
135
|
+
'12. Accessibility Non-Negotiables',
|
|
136
|
+
'13. Anti-Patterns to Avoid',
|
|
137
|
+
'14. Implementation Notes for Future UI Tasks',
|
|
139
138
|
'',
|
|
140
139
|
'## Required design-intent.json Fields',
|
|
141
140
|
'1. mode',
|
|
@@ -151,11 +150,17 @@ export function buildDesignBootstrapPrompt({
|
|
|
151
150
|
'11. crossViewportAdaptation',
|
|
152
151
|
'12. motionSystem',
|
|
153
152
|
'13. componentMorphology',
|
|
154
|
-
'14.
|
|
155
|
-
'15.
|
|
156
|
-
'16.
|
|
157
|
-
'17.
|
|
158
|
-
'18.
|
|
153
|
+
'14. accessibilityPolicy',
|
|
154
|
+
'15. designExecutionPolicy',
|
|
155
|
+
'16. designExecutionHandoff',
|
|
156
|
+
'17. reviewRubric',
|
|
157
|
+
'18. contextHygiene',
|
|
158
|
+
'19. experiencePrinciples',
|
|
159
|
+
'20. forbiddenPatterns',
|
|
160
|
+
'21. validationHints',
|
|
161
|
+
'22. requiredDesignSections',
|
|
162
|
+
'23. implementation',
|
|
163
|
+
'24. repoEvidence when onboarding or detector evidence exists',
|
|
159
164
|
'',
|
|
160
165
|
'## Hard Rules',
|
|
161
166
|
'1. No copy-paste from external style guides.',
|
|
@@ -169,8 +174,19 @@ export function buildDesignBootstrapPrompt({
|
|
|
169
174
|
'9. Responsive guidance must include layout mutation rules for mobile, tablet, and desktop. Shrinking the desktop layout is not enough.',
|
|
170
175
|
'10. Motion can be bold, cinematic, or highly expressive when it improves memorability, hierarchy, feedback, or product confidence. Optimize it instead of flattening it. Only reject motion when it harms clarity, accessibility, or runtime performance.',
|
|
171
176
|
'11. Define component morphology across interaction states and viewports so cards, forms, nav, and feedback surfaces adapt coherently instead of only resizing.',
|
|
172
|
-
'
|
|
173
|
-
'
|
|
177
|
+
'12. Keep UI-only requests context-isolated. Load frontend design rules first and do not eagerly load backend-only rules unless the task explicitly crosses those boundaries.',
|
|
178
|
+
'13. Treat WCAG 2.2 AA as the hard accessibility floor. Use APCA only as advisory perceptual tuning, never as a reason to waive a WCAG failure.',
|
|
179
|
+
'14. Accessibility planning must explicitly cover focus visibility, focus appearance, target size, accessible authentication, keyboard access, and dynamic status/state access.',
|
|
180
|
+
'15. Structured design execution must stay representation-first. Define a surface plan, component graph, content-priority map, viewport mutation plan, and interaction-state matrix before relying on semantic review.',
|
|
181
|
+
'16. design-intent.json must carry an explicit structured handoff, not just policy flags. The handoff should make surface plans, component relationships, task flow, and signature moves executable before coding starts.',
|
|
182
|
+
'17. Do not depend on screenshot capture, browser automation, or image diff artifacts as the default path. The contract must be strong enough to guide precise UI from repo evidence, component logic, and user intent alone.',
|
|
183
|
+
'18. Semantic review should judge contract fidelity, distinctiveness, hierarchy, state behavior, and viewport mutation directly from the contract and changed UI code.',
|
|
184
|
+
'19. Treat prior website memory, unrelated project aesthetics, and remembered screenshots as tainted context unless the user explicitly approves continuity.',
|
|
185
|
+
'20. Design continuity is opt-in. If no approved continuity exists, synthesize from the current repo evidence, current brief, and current project docs only.',
|
|
186
|
+
'21. Make at least one memorable visual bet so the resulting system is recognizable and not template-neutral.',
|
|
187
|
+
'22. Define a stable review rubric for distinctiveness, contract fidelity, visual consistency, heuristic UX quality, and motion discipline.',
|
|
188
|
+
'23. Genericity findings must name the actual drift signal. Do not label something generic without explaining the anti-pattern or rubric dimension.',
|
|
189
|
+
'24. Separate taste from failure. Bold direction is allowed when it still follows the contract, serves the product, and stays accessible.',
|
|
174
190
|
'',
|
|
175
191
|
'## Project Inputs',
|
|
176
192
|
`- Project name: ${discoveryAnswers.projectName}`,
|
|
@@ -181,7 +197,7 @@ export function buildDesignBootstrapPrompt({
|
|
|
181
197
|
`- Blueprint: ${toTitleCase(initContext.blueprintFileName)}`,
|
|
182
198
|
'',
|
|
183
199
|
'## Seed Machine Contract',
|
|
184
|
-
'Refine this seed instead of discarding it. Keep the
|
|
200
|
+
'Refine this scaffold seed instead of discarding it. Keep the structural fields that are already valid, but replace placeholder expressive direction with project-specific reasoning grounded in repo evidence and the active brief.',
|
|
185
201
|
'```json',
|
|
186
202
|
designIntentSeed.trim(),
|
|
187
203
|
'```',
|
|
@@ -189,8 +205,15 @@ export function buildDesignBootstrapPrompt({
|
|
|
189
205
|
'## Required Execution',
|
|
190
206
|
'1. Create or update docs/DESIGN.md with complete content.',
|
|
191
207
|
'2. Create or update docs/design-intent.json with machine-readable design intent.',
|
|
192
|
-
'3.
|
|
193
|
-
'4.
|
|
208
|
+
'3. Keep both files synchronized: the markdown explains the rationale and the JSON captures the machine-readable contract.',
|
|
209
|
+
'4. Encode accessibility as a split policy: WCAG 2.2 AA hard floor, APCA advisory readability tuning, and explicit hard-vs-advisory checks.',
|
|
210
|
+
'5. Encode structured design execution as policy: representation strategy, surface plan, component graph, content-priority map, viewport mutation plan, interaction-state matrix, semantic review focus, and structured handoff requirements.',
|
|
211
|
+
'6. Encode an explicit structured handoff inside docs/design-intent.json: surface plan, component graph, content-priority map, viewport mutation plan, interaction-state matrix, task-flow narrative, and signature move rationale.',
|
|
212
|
+
'7. Encode a stable review rubric: required dimensions, genericity signals, valid bold signals, and reporting rules that separate taste from real failure.',
|
|
213
|
+
'8. Make the handoff executable without screenshot dependency. The contract should still guide high-precision UI generation from repo evidence and changed code alone.',
|
|
214
|
+
'9. Preserve repoEvidence.designEvidenceSummary when onboarding or detector evidence exists instead of discarding it.',
|
|
215
|
+
'10. Ensure both files stay project-specific, dynamic, and practical for implementation and review.',
|
|
216
|
+
'11. After the contract exists, use it as a first-class source for future UI tasks.',
|
|
194
217
|
'',
|
|
195
218
|
].join('\n');
|
|
196
219
|
}
|
|
@@ -66,7 +66,6 @@ export async function generateProjectDocumentation(
|
|
|
66
66
|
discoveryAnswers,
|
|
67
67
|
initContext: synthesisContext,
|
|
68
68
|
docsLanguage: normalizedDocsLanguage,
|
|
69
|
-
architectureRecommendation,
|
|
70
69
|
});
|
|
71
70
|
await fs.writeFile(path.join(promptsDirectoryPath, designPromptFileName), designPromptContent, 'utf8');
|
|
72
71
|
generatedPromptFileNames.push(designPromptFileName);
|
|
@@ -75,7 +74,6 @@ export async function generateProjectDocumentation(
|
|
|
75
74
|
const designIntentSeedContent = buildDesignIntentSeed({
|
|
76
75
|
discoveryAnswers,
|
|
77
76
|
initContext: synthesisContext,
|
|
78
|
-
architectureRecommendation,
|
|
79
77
|
});
|
|
80
78
|
await fs.writeFile(path.join(docsDirectoryPath, designIntentSeedFileName), designIntentSeedContent, 'utf8');
|
|
81
79
|
materializedFileNames.push(designIntentSeedFileName);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryuenn3123/agentic-senior-core",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Force your AI Agent to code like a Staff Engineer, not a Junior.",
|
|
6
6
|
"bin": {
|
|
@@ -66,6 +66,6 @@
|
|
|
66
66
|
"report:docs-quality-drift": "node ./scripts/docs-quality-drift-report.mjs",
|
|
67
67
|
"report:governance-weekly": "node ./scripts/governance-weekly-report.mjs",
|
|
68
68
|
"validate": "node ./scripts/validate.mjs",
|
|
69
|
-
"test": "node --test ./tests/cli-smoke.test.mjs ./tests/mcp-server.test.mjs ./tests/llm-judge.test.mjs ./tests/enterprise-ops.test.mjs"
|
|
69
|
+
"test": "node --test ./tests/cli-smoke.test.mjs ./tests/mcp-server.test.mjs ./tests/llm-judge.test.mjs ./tests/ui-rubric-calibration.test.mjs ./tests/enterprise-ops.test.mjs"
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -53,7 +53,10 @@ const BOUNDARY_RULES = [
|
|
|
53
53
|
],
|
|
54
54
|
trigger(filePath) {
|
|
55
55
|
return !isDocumentationFilePath(filePath)
|
|
56
|
-
&&
|
|
56
|
+
&& (
|
|
57
|
+
/(api|openapi|controller|route|endpoint)/i.test(filePath)
|
|
58
|
+
|| /api[-_/]?contract/i.test(filePath)
|
|
59
|
+
);
|
|
57
60
|
},
|
|
58
61
|
docsMatcher(filePath) {
|
|
59
62
|
return filePath === '.agent-context/rules/api-docs.md'
|
|
@@ -285,4 +288,4 @@ function runDocumentationBoundaryAudit() {
|
|
|
285
288
|
process.exit(reportPayload.passed ? 0 : 1);
|
|
286
289
|
}
|
|
287
290
|
|
|
288
|
-
runDocumentationBoundaryAudit();
|
|
291
|
+
runDocumentationBoundaryAudit();
|
|
@@ -23,6 +23,9 @@ const REQUIRED_FILES = [
|
|
|
23
23
|
'.instructions.md',
|
|
24
24
|
'.agent-context/prompts/bootstrap-design.md',
|
|
25
25
|
'scripts/ui-design-judge.mjs',
|
|
26
|
+
'scripts/ui-rubric-calibration.mjs',
|
|
27
|
+
'scripts/ui-design-judge/rubric-calibration.mjs',
|
|
28
|
+
'scripts/ui-design-judge/rubric-goldset.json',
|
|
26
29
|
'.agent-context/rules/frontend-architecture.md',
|
|
27
30
|
'.agent-context/review-checklists/pr-checklist.md',
|
|
28
31
|
'.agent-context/review-checklists/architecture-review.md',
|
|
@@ -54,6 +57,14 @@ const REQUIRED_FRONTEND_RULE_SNIPPETS = [
|
|
|
54
57
|
'UI scope trigger signals',
|
|
55
58
|
'visual intent, interaction quality, and conversion clarity',
|
|
56
59
|
'template-only repetitive outputs',
|
|
60
|
+
'Context Hygiene and Reference Boundaries (Mandatory)',
|
|
61
|
+
'Accessibility Split (Mandatory)',
|
|
62
|
+
'Design continuity is opt-in.',
|
|
63
|
+
'repo evidence wins',
|
|
64
|
+
'WCAG 2.2 AA as the hard compliance floor',
|
|
65
|
+
'APCA as an advisory readability model',
|
|
66
|
+
'Structured Design Execution Boundaries (Mandatory)',
|
|
67
|
+
'UI review must stay representation-first.',
|
|
57
68
|
'UI Consistency Guardrails (Mandatory)',
|
|
58
69
|
'Content language must stay consistent per screen and flow unless user requests multilingual output.',
|
|
59
70
|
'Text color must remain contrast-safe against its background; no color collisions.',
|
|
@@ -69,6 +80,16 @@ const REQUIRED_BOOTSTRAP_DESIGN_SNIPPETS = [
|
|
|
69
80
|
'crossViewportAdaptation.mutationRules.mobile/tablet/desktop',
|
|
70
81
|
'motionSystem',
|
|
71
82
|
'componentMorphology',
|
|
83
|
+
'accessibilityPolicy',
|
|
84
|
+
'designExecutionPolicy',
|
|
85
|
+
'designExecutionHandoff',
|
|
86
|
+
'reviewRubric',
|
|
87
|
+
'contextHygiene',
|
|
88
|
+
'Design continuity is opt-in.',
|
|
89
|
+
'WCAG 2.2 AA as the blocking baseline',
|
|
90
|
+
'APCA only as advisory perceptual tuning',
|
|
91
|
+
'Structured design execution must stay representation-first',
|
|
92
|
+
'structured handoff',
|
|
72
93
|
];
|
|
73
94
|
|
|
74
95
|
const REQUIRED_UI_DESIGN_JUDGE_SNIPPETS = [
|
|
@@ -77,6 +98,14 @@ const REQUIRED_UI_DESIGN_JUDGE_SNIPPETS = [
|
|
|
77
98
|
'Runs only in advisory mode for this repository workflow.',
|
|
78
99
|
'Do not reward generic SaaS defaults or popular template patterns.',
|
|
79
100
|
'UI design judge only evaluates changed UI surfaces.',
|
|
101
|
+
'Structured design execution summary was supplied to semantic review.',
|
|
102
|
+
'designExecutionSignalCount',
|
|
103
|
+
'designExecutionPolicy',
|
|
104
|
+
'designExecutionHandoff',
|
|
105
|
+
'reviewRubric',
|
|
106
|
+
'genericityStatus',
|
|
107
|
+
'handoffReady',
|
|
108
|
+
'calibratedStatus',
|
|
80
109
|
];
|
|
81
110
|
|
|
82
111
|
const REQUIRED_INSTRUCTIONS_SNIPPETS = [
|
|
@@ -84,6 +113,11 @@ const REQUIRED_INSTRUCTIONS_SNIPPETS = [
|
|
|
84
113
|
'bootstrap-design.md',
|
|
85
114
|
'frontend-architecture.md',
|
|
86
115
|
'do not eagerly load unrelated backend-only rules',
|
|
116
|
+
'valid style context',
|
|
117
|
+
'explicitly approved reference systems',
|
|
118
|
+
'WCAG 2.2 AA as the hard compliance floor',
|
|
119
|
+
'APCA as advisory perceptual tuning only',
|
|
120
|
+
'Do not require screenshot capture as a baseline dependency',
|
|
87
121
|
];
|
|
88
122
|
|
|
89
123
|
const REQUIRED_DESIGN_EVIDENCE_SNIPPETS = [
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
4
|
+
import { dirname, resolve } from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
|
|
7
|
+
const SCRIPT_FILE_PATH = fileURLToPath(import.meta.url);
|
|
8
|
+
export const REPOSITORY_ROOT = resolve(dirname(SCRIPT_FILE_PATH), '..', '..');
|
|
9
|
+
export const STATE_DIRECTORY = resolve(REPOSITORY_ROOT, '.agent-context', 'state');
|
|
10
|
+
export const DEFAULT_PROTOCOL_VERSION = '2024-11-05';
|
|
11
|
+
export const DEFAULT_FETCH_TIMEOUT_MS = 15000;
|
|
12
|
+
export const DEFAULT_FETCH_MAX_CHARS = 6000;
|
|
13
|
+
export const MAX_FETCH_MAX_CHARS = 20000;
|
|
14
|
+
export const DEFAULT_TREND_WINDOW_DAYS = 90;
|
|
15
|
+
export const MAX_TREND_PACKAGES = 10;
|
|
16
|
+
export const FALLBACK_PACKAGE_VERSION = '0.0.0-local';
|
|
17
|
+
|
|
18
|
+
function resolvePackageVersion() {
|
|
19
|
+
try {
|
|
20
|
+
const parsedPackageManifest = JSON.parse(
|
|
21
|
+
readFileSync(resolve(REPOSITORY_ROOT, 'package.json'), 'utf8')
|
|
22
|
+
);
|
|
23
|
+
const rawVersion = typeof parsedPackageManifest?.version === 'string'
|
|
24
|
+
? parsedPackageManifest.version.trim()
|
|
25
|
+
: '';
|
|
26
|
+
|
|
27
|
+
return rawVersion || FALLBACK_PACKAGE_VERSION;
|
|
28
|
+
} catch {
|
|
29
|
+
return FALLBACK_PACKAGE_VERSION;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const PACKAGE_VERSION = resolvePackageVersion();
|
|
34
|
+
|
|
35
|
+
export const TEST_SUITE_ARGS = {
|
|
36
|
+
full: ['--test', './tests/cli-smoke.test.mjs', './tests/mcp-server.test.mjs', './tests/llm-judge.test.mjs', './tests/enterprise-ops.test.mjs'],
|
|
37
|
+
cli: ['--test', './tests/cli-smoke.test.mjs'],
|
|
38
|
+
enterprise: ['--test', './tests/enterprise-ops.test.mjs'],
|
|
39
|
+
'llm-judge': ['--test', './tests/llm-judge.test.mjs'],
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const INTERNAL_SCRIPT_PATHS = {
|
|
43
|
+
validate: resolve(REPOSITORY_ROOT, 'scripts', 'validate.mjs'),
|
|
44
|
+
release_gate: resolve(REPOSITORY_ROOT, 'scripts', 'release-gate.mjs'),
|
|
45
|
+
forbidden_content_check: resolve(REPOSITORY_ROOT, 'scripts', 'forbidden-content-check.mjs'),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
function getAvailableTestSuites() {
|
|
49
|
+
return Object.entries(TEST_SUITE_ARGS)
|
|
50
|
+
.filter(([, commandArguments]) => (
|
|
51
|
+
Array.isArray(commandArguments)
|
|
52
|
+
&& commandArguments.length > 1
|
|
53
|
+
&& commandArguments
|
|
54
|
+
.slice(1)
|
|
55
|
+
.every((relativeTestPath) => existsSync(resolve(REPOSITORY_ROOT, relativeTestPath)))
|
|
56
|
+
))
|
|
57
|
+
.map(([suiteName]) => suiteName);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export const AVAILABLE_TEST_SUITES = getAvailableTestSuites();
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import { existsSync } from 'node:fs';
|
|
4
|
+
import { AVAILABLE_TEST_SUITES, INTERNAL_SCRIPT_PATHS } from './constants.mjs';
|
|
5
|
+
|
|
6
|
+
export function buildToolDefinitions() {
|
|
7
|
+
const toolDefinitions = [];
|
|
8
|
+
|
|
9
|
+
if (existsSync(INTERNAL_SCRIPT_PATHS.validate)) {
|
|
10
|
+
toolDefinitions.push({
|
|
11
|
+
name: 'validate',
|
|
12
|
+
description: 'Run repository validation checks.',
|
|
13
|
+
inputSchema: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {},
|
|
16
|
+
additionalProperties: false,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (AVAILABLE_TEST_SUITES.length > 0) {
|
|
22
|
+
toolDefinitions.push({
|
|
23
|
+
name: 'test',
|
|
24
|
+
description: 'Run test suites (full or targeted).',
|
|
25
|
+
inputSchema: {
|
|
26
|
+
type: 'object',
|
|
27
|
+
properties: {
|
|
28
|
+
suite: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
enum: AVAILABLE_TEST_SUITES,
|
|
31
|
+
description: 'Target test suite. Defaults to the first available suite.',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (existsSync(INTERNAL_SCRIPT_PATHS.release_gate)) {
|
|
40
|
+
toolDefinitions.push({
|
|
41
|
+
name: 'release_gate',
|
|
42
|
+
description: 'Run release gate checks.',
|
|
43
|
+
inputSchema: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
properties: {},
|
|
46
|
+
additionalProperties: false,
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (existsSync(INTERNAL_SCRIPT_PATHS.forbidden_content_check)) {
|
|
52
|
+
toolDefinitions.push({
|
|
53
|
+
name: 'forbidden_content_check',
|
|
54
|
+
description: 'Run forbidden content scan used by publish gate.',
|
|
55
|
+
inputSchema: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {},
|
|
58
|
+
additionalProperties: false,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
toolDefinitions.push(
|
|
64
|
+
{
|
|
65
|
+
name: 'research_fetch',
|
|
66
|
+
description: 'Fetch external documentation/news content and return query-focused excerpts with citation metadata.',
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
url: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Absolute HTTP/HTTPS URL to fetch.',
|
|
73
|
+
},
|
|
74
|
+
query: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
description: 'Optional search query used to extract focused excerpts.',
|
|
77
|
+
},
|
|
78
|
+
maxChars: {
|
|
79
|
+
type: 'integer',
|
|
80
|
+
description: 'Maximum characters to return when query is not provided (default 6000, max 20000).',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
required: ['url'],
|
|
84
|
+
additionalProperties: false,
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'trend_snapshot',
|
|
89
|
+
description: 'Generate ecosystem trend snapshot from npm registry metadata with source timestamps.',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
packages: {
|
|
94
|
+
type: 'array',
|
|
95
|
+
items: { type: 'string' },
|
|
96
|
+
description: 'Package names to inspect (max 10).',
|
|
97
|
+
},
|
|
98
|
+
windowDays: {
|
|
99
|
+
type: 'integer',
|
|
100
|
+
description: 'Release activity window in days (default 90).',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
required: ['packages'],
|
|
104
|
+
additionalProperties: false,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'state_read',
|
|
109
|
+
description: 'Read a file from .agent-context/state for cross-session continuity.',
|
|
110
|
+
inputSchema: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
properties: {
|
|
113
|
+
path: {
|
|
114
|
+
type: 'string',
|
|
115
|
+
description: 'Path relative to .agent-context/state (for example memory-continuity-benchmark.json).',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
required: ['path'],
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'state_write',
|
|
124
|
+
description: 'Write a file under .agent-context/state for cross-session continuity updates.',
|
|
125
|
+
inputSchema: {
|
|
126
|
+
type: 'object',
|
|
127
|
+
properties: {
|
|
128
|
+
path: {
|
|
129
|
+
type: 'string',
|
|
130
|
+
description: 'Path relative to .agent-context/state.',
|
|
131
|
+
},
|
|
132
|
+
content: {
|
|
133
|
+
type: 'string',
|
|
134
|
+
description: 'UTF-8 content to write.',
|
|
135
|
+
},
|
|
136
|
+
mode: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
enum: ['overwrite', 'append'],
|
|
139
|
+
description: 'Write mode. Defaults to overwrite.',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
required: ['path', 'content'],
|
|
143
|
+
additionalProperties: false,
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
);
|
|
147
|
+
|
|
148
|
+
return toolDefinitions;
|
|
149
|
+
}
|