@ryuenn3123/agentic-senior-core 4.4.0 → 5.2.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/.agents/plugins/agentic-senior-core/plugin.json +3 -0
- package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +131 -0
- package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +16 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +28 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +35 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +54 -0
- package/.agents/rules/agentic-senior-core.md +131 -0
- package/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.clinerules/agentic-senior-core.md +94 -0
- package/.codex-plugin/plugin.json +24 -0
- package/.cursor/rules/agentic-senior-core.mdc +99 -0
- package/.devin-plugin/plugin.json +13 -0
- package/.github/copilot-instructions.md +94 -0
- package/.github/plugin/marketplace.json +20 -0
- package/.github/plugin/plugin.json +16 -0
- package/.kiro/steering/agentic-senior-core.md +94 -0
- package/.openclaw/skills/asc/SKILL.md +23 -0
- package/.openclaw/skills/asc-audit/SKILL.md +28 -0
- package/.openclaw/skills/asc-review/SKILL.md +54 -0
- package/.opencode/plugins/agentic-senior-core.mjs +31 -0
- package/.windsurf/rules/agentic-senior-core.md +94 -0
- package/AGENTS.md +126 -127
- package/CONTRIBUTING.md +93 -63
- package/README.md +190 -110
- package/__init__.py +61 -0
- package/bin/agentic-senior-core.js +42 -41
- package/commands/asc-audit.md +1 -0
- package/commands/asc-audit.toml +2 -0
- package/commands/asc-help.md +9 -0
- package/commands/asc-help.toml +2 -0
- package/commands/asc-refactor.md +1 -0
- package/commands/asc-refactor.toml +2 -0
- package/commands/asc-review.md +1 -0
- package/commands/asc-review.toml +2 -0
- package/gemini-extension.json +10 -0
- package/hooks/copilot-hooks.json +21 -0
- package/hooks/hooks.json +31 -0
- package/hooks/session-start.js +36 -0
- package/hooks/subagent-start.js +38 -0
- package/lib/cli/commands/adapter.mjs +109 -0
- package/lib/cli/commands/clean.mjs +63 -0
- package/lib/cli/commands/status.mjs +94 -0
- package/package.json +43 -60
- package/plugin.yaml +16 -0
- package/scripts/uninstall.js +38 -0
- package/skills/asc/SKILL.md +16 -0
- package/skills/asc-audit/SKILL.md +28 -0
- package/skills/asc-refactor/SKILL.md +35 -0
- package/skills/asc-review/SKILL.md +54 -0
- package/.agent-context/policies/llm-judge-threshold.json +0 -29
- package/.agent-context/prompts/bootstrap-design.md +0 -63
- package/.agent-context/prompts/compact-natural-mode.md +0 -100
- package/.agent-context/prompts/init-project.md +0 -60
- package/.agent-context/prompts/refactor.md +0 -38
- package/.agent-context/prompts/review-code.md +0 -31
- package/.agent-context/review-checklists/architecture-review.md +0 -57
- package/.agent-context/review-checklists/pr-checklist.md +0 -134
- package/.agent-context/rules/api-docs.md +0 -24
- package/.agent-context/rules/api-versioning.md +0 -16
- package/.agent-context/rules/architecture.md +0 -38
- package/.agent-context/rules/background-jobs.md +0 -17
- package/.agent-context/rules/config-and-flags.md +0 -16
- package/.agent-context/rules/database-design.md +0 -18
- package/.agent-context/rules/docker-runtime.md +0 -17
- package/.agent-context/rules/error-handling.md +0 -16
- package/.agent-context/rules/event-driven.md +0 -16
- package/.agent-context/rules/frontend-architecture.md +0 -54
- package/.agent-context/rules/microservices.md +0 -16
- package/.agent-context/rules/migrations.md +0 -16
- package/.agent-context/rules/observability.md +0 -16
- package/.agent-context/rules/performance.md +0 -16
- package/.agent-context/rules/realtime.md +0 -16
- package/.agent-context/rules/resilience.md +0 -18
- package/.agent-context/rules/security.md +0 -18
- package/.agent-context/rules/testing.md +0 -16
- package/.agent-context/state/README.md +0 -25
- package/.agent-context/state/architecture-map.md +0 -40
- package/.agent-context/state/benchmark-comparison-schema.json +0 -181
- package/.agent-context/state/benchmark-reproducibility.json +0 -87
- package/.agent-context/state/benchmark-thresholds.json +0 -10
- package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
- package/.agent-context/state/dependency-map.md +0 -41
- package/.agent-context/state/memory-adapter-contract.json +0 -52
- package/.agent-context/state/memory-schema-v1.json +0 -88
- package/GEMINI.md +0 -1
- package/benchmarks/README.md +0 -60
- package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
- package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
- package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
- package/lib/cli/adaptive-context/catalog.mjs +0 -394
- package/lib/cli/adaptive-context/file-signals.mjs +0 -100
- package/lib/cli/adaptive-context/implications.mjs +0 -44
- package/lib/cli/adaptive-context.mjs +0 -151
- package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
- package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
- package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
- package/lib/cli/backup.mjs +0 -210
- package/lib/cli/commands/context.mjs +0 -140
- package/lib/cli/commands/init/project-context.mjs +0 -60
- package/lib/cli/commands/init/runtime-environment.mjs +0 -59
- package/lib/cli/commands/init/setup-decisions.mjs +0 -83
- package/lib/cli/commands/init.mjs +0 -654
- package/lib/cli/commands/launch.mjs +0 -76
- package/lib/cli/commands/optimize.mjs +0 -284
- package/lib/cli/commands/rollback.mjs +0 -64
- package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
- package/lib/cli/commands/upgrade.mjs +0 -451
- package/lib/cli/compiler.mjs +0 -187
- package/lib/cli/constants.mjs +0 -136
- package/lib/cli/detector/constants.mjs +0 -135
- package/lib/cli/detector/design-evidence/collector.mjs +0 -256
- package/lib/cli/detector/design-evidence/constants.mjs +0 -39
- package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
- package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
- package/lib/cli/detector/design-evidence/summary.mjs +0 -109
- package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
- package/lib/cli/detector/design-evidence.mjs +0 -25
- package/lib/cli/detector/stack-detection.mjs +0 -243
- package/lib/cli/detector/ui-signals.mjs +0 -150
- package/lib/cli/detector/workspace-scan.mjs +0 -177
- package/lib/cli/detector.mjs +0 -23
- package/lib/cli/init-detection-flow.mjs +0 -48
- package/lib/cli/init-options.mjs +0 -237
- package/lib/cli/init-selection.mjs +0 -29
- package/lib/cli/memory-continuity.mjs +0 -537
- package/lib/cli/preflight.mjs +0 -76
- package/lib/cli/project-scaffolder/constants.mjs +0 -69
- package/lib/cli/project-scaffolder/discovery.mjs +0 -272
- package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
- package/lib/cli/project-scaffolder/storage.mjs +0 -144
- package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
- package/lib/cli/project-scaffolder.mjs +0 -29
- package/lib/cli/rollback.mjs +0 -66
- package/lib/cli/token-optimization.mjs +0 -401
- package/lib/cli/utils/filesystem.mjs +0 -81
- package/lib/cli/utils/managed-surface.mjs +0 -280
- package/lib/cli/utils/prompting.mjs +0 -44
- package/lib/cli/utils.mjs +0 -479
- package/mcp.json +0 -134
- package/scripts/adaptive-context/fixtures.mjs +0 -183
- package/scripts/adaptive-context-benchmark.mjs +0 -9
- package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
- package/scripts/benchmark-evidence-bundle.mjs +0 -645
- package/scripts/benchmark-gate.mjs +0 -121
- package/scripts/benchmark-intelligence.mjs +0 -33
- package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
- package/scripts/build-release-benchmark-bundle.mjs +0 -202
- package/scripts/bump-version.mjs +0 -103
- package/scripts/clean-local-artifacts.mjs +0 -78
- package/scripts/compact-natural-mode-benchmark.mjs +0 -9
- package/scripts/context-triggered-audit.mjs +0 -391
- package/scripts/detection-benchmark.mjs +0 -127
- package/scripts/docs-quality-drift-report.mjs +0 -358
- package/scripts/documentation-boundary-audit.mjs +0 -305
- package/scripts/explain-on-demand-audit.mjs +0 -427
- package/scripts/forbidden-content-check.mjs +0 -123
- package/scripts/frontend-usability-audit.mjs +0 -243
- package/scripts/generate-sbom.mjs +0 -61
- package/scripts/governance-weekly-report.mjs +0 -466
- package/scripts/llm-judge/checklist-loader.mjs +0 -45
- package/scripts/llm-judge/constants.mjs +0 -66
- package/scripts/llm-judge/diff-collection.mjs +0 -74
- package/scripts/llm-judge/prompting.mjs +0 -78
- package/scripts/llm-judge/providers.mjs +0 -111
- package/scripts/llm-judge/verdict.mjs +0 -134
- package/scripts/llm-judge.mjs +0 -200
- package/scripts/memory-continuity-benchmark.mjs +0 -322
- package/scripts/quality-trend-report.mjs +0 -289
- package/scripts/release-gate/audit-checks.mjs +0 -441
- package/scripts/release-gate/constants.mjs +0 -53
- package/scripts/release-gate/runtime.mjs +0 -63
- package/scripts/release-gate/static-checks.mjs +0 -182
- package/scripts/release-gate.mjs +0 -42
- package/scripts/rules-guardian-audit.mjs +0 -580
- package/scripts/single-source-lazy-loading-audit.mjs +0 -449
- package/scripts/sync-thin-adapters.mjs +0 -72
- package/scripts/token-optimization-benchmark.mjs +0 -252
- package/scripts/ui-design-judge/constants.mjs +0 -13
- package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
- package/scripts/ui-design-judge/git-input.mjs +0 -134
- package/scripts/ui-design-judge/prompting.mjs +0 -52
- package/scripts/ui-design-judge/providers.mjs +0 -102
- package/scripts/ui-design-judge/reporting.mjs +0 -183
- package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
- package/scripts/ui-design-judge/rubric-goldset.json +0 -188
- package/scripts/ui-design-judge.mjs +0 -319
- package/scripts/ui-rubric-calibration.mjs +0 -35
- package/scripts/validate/audits/cache-layer-contract.mjs +0 -230
- package/scripts/validate/audits/caching-scope-hygiene.mjs +0 -235
- package/scripts/validate/audits/file-size.mjs +0 -158
- package/scripts/validate/audits/reflection-citations.mjs +0 -130
- package/scripts/validate/audits/release-bundle.mjs +0 -135
- package/scripts/validate/audits/rule-id-uniqueness.mjs +0 -278
- package/scripts/validate/config.mjs +0 -501
- package/scripts/validate/coverage-checks.mjs +0 -446
- package/scripts/validate/file-structure.mjs +0 -158
- package/scripts/validate/markdown-content.mjs +0 -109
- package/scripts/validate/project-metadata.mjs +0 -166
- package/scripts/validate/utils.mjs +0 -52
- package/scripts/validate.mjs +0 -267
package/hooks/hooks.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "startup|resume|clear|compact",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/session-start.js\"; exit 0",
|
|
10
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\session-start.js\" }",
|
|
11
|
+
"timeout": 5,
|
|
12
|
+
"statusMessage": "Loading ASC rules..."
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"SubagentStart": [
|
|
18
|
+
{
|
|
19
|
+
"hooks": [
|
|
20
|
+
{
|
|
21
|
+
"type": "command",
|
|
22
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/subagent-start.js\"; exit 0",
|
|
23
|
+
"commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\subagent-start.js\" }",
|
|
24
|
+
"timeout": 5,
|
|
25
|
+
"statusMessage": "Loading ASC rules..."
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Agentic Senior Core — SessionStart hook
|
|
3
|
+
// Injects universal coding rules on every session start.
|
|
4
|
+
// Supports Claude Code, Codex CLI, and GitHub Copilot CLI.
|
|
5
|
+
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || path.resolve(__dirname, '..');
|
|
10
|
+
const isCopilot = Boolean(process.env.COPILOT_PLUGIN_DATA);
|
|
11
|
+
const isCodex = !isCopilot && Boolean(process.env.PLUGIN_DATA);
|
|
12
|
+
|
|
13
|
+
let content;
|
|
14
|
+
try {
|
|
15
|
+
content = fs.readFileSync(path.join(pluginRoot, 'AGENTS.md'), 'utf8');
|
|
16
|
+
} catch (e) {
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
if (isCopilot) {
|
|
22
|
+
process.stdout.write(JSON.stringify({ additionalContext: content }));
|
|
23
|
+
} else if (isCodex) {
|
|
24
|
+
process.stdout.write(JSON.stringify({
|
|
25
|
+
systemMessage: 'ASC:ACTIVE',
|
|
26
|
+
hookSpecificOutput: {
|
|
27
|
+
hookEventName: 'SessionStart',
|
|
28
|
+
additionalContext: content,
|
|
29
|
+
},
|
|
30
|
+
}));
|
|
31
|
+
} else {
|
|
32
|
+
process.stdout.write(content);
|
|
33
|
+
}
|
|
34
|
+
} catch (e) {
|
|
35
|
+
// Silent fail — stdout closed/EPIPE at hook exit must not surface as a hook failure
|
|
36
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Agentic Senior Core — SubagentStart hook
|
|
3
|
+
// SessionStart context is parent-thread only and never reaches subagents.
|
|
4
|
+
// This injects the same ruleset into each subagent.
|
|
5
|
+
|
|
6
|
+
const fs = require('fs');
|
|
7
|
+
const path = require('path');
|
|
8
|
+
|
|
9
|
+
const pluginRoot = process.env.CLAUDE_PLUGIN_ROOT || path.resolve(__dirname, '..');
|
|
10
|
+
const isCopilot = Boolean(process.env.COPILOT_PLUGIN_DATA);
|
|
11
|
+
const isCodex = !isCopilot && Boolean(process.env.PLUGIN_DATA);
|
|
12
|
+
|
|
13
|
+
let content;
|
|
14
|
+
try {
|
|
15
|
+
content = fs.readFileSync(path.join(pluginRoot, 'AGENTS.md'), 'utf8');
|
|
16
|
+
} catch (e) {
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
if (isCodex) {
|
|
22
|
+
process.stdout.write(JSON.stringify({
|
|
23
|
+
hookSpecificOutput: {
|
|
24
|
+
hookEventName: 'SubagentStart',
|
|
25
|
+
additionalContext: content,
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
28
|
+
} else {
|
|
29
|
+
process.stdout.write(JSON.stringify({
|
|
30
|
+
hookSpecificOutput: {
|
|
31
|
+
hookEventName: 'SubagentStart',
|
|
32
|
+
additionalContext: content,
|
|
33
|
+
},
|
|
34
|
+
}));
|
|
35
|
+
}
|
|
36
|
+
} catch (e) {
|
|
37
|
+
// Silent fail
|
|
38
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const currentFilePath = fileURLToPath(import.meta.url);
|
|
6
|
+
const currentDirectoryPath = path.dirname(currentFilePath);
|
|
7
|
+
const REPOSITORY_ROOT = path.resolve(currentDirectoryPath, '..', '..', '..');
|
|
8
|
+
|
|
9
|
+
const ADAPTER_TARGETS = {
|
|
10
|
+
cursor: {
|
|
11
|
+
label: 'Cursor',
|
|
12
|
+
targetPath: '.cursor/rules/agentic-senior-core.mdc',
|
|
13
|
+
sourcePath: '.cursor/rules/agentic-senior-core.mdc',
|
|
14
|
+
},
|
|
15
|
+
windsurf: {
|
|
16
|
+
label: 'Windsurf',
|
|
17
|
+
targetPath: '.windsurf/rules/agentic-senior-core.md',
|
|
18
|
+
sourcePath: '.windsurf/rules/agentic-senior-core.md',
|
|
19
|
+
},
|
|
20
|
+
cline: {
|
|
21
|
+
label: 'Cline',
|
|
22
|
+
targetPath: '.clinerules/agentic-senior-core.md',
|
|
23
|
+
sourcePath: '.clinerules/agentic-senior-core.md',
|
|
24
|
+
},
|
|
25
|
+
copilot: {
|
|
26
|
+
label: 'GitHub Copilot',
|
|
27
|
+
targetPath: '.github/copilot-instructions.md',
|
|
28
|
+
sourcePath: '.github/copilot-instructions.md',
|
|
29
|
+
},
|
|
30
|
+
kiro: {
|
|
31
|
+
label: 'Kiro',
|
|
32
|
+
targetPath: '.kiro/steering/agentic-senior-core.md',
|
|
33
|
+
sourcePath: '.kiro/steering/agentic-senior-core.md',
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
async function pathExists(filePath) {
|
|
38
|
+
try {
|
|
39
|
+
await fs.access(filePath);
|
|
40
|
+
return true;
|
|
41
|
+
} catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
async function generateAdapter(targetDirectory, adapterKey) {
|
|
47
|
+
const adapter = ADAPTER_TARGETS[adapterKey];
|
|
48
|
+
if (!adapter) {
|
|
49
|
+
console.error(`Unknown adapter: ${adapterKey}. Available: ${Object.keys(ADAPTER_TARGETS).join(', ')}`);
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const sourcePath = path.join(REPOSITORY_ROOT, adapter.sourcePath);
|
|
54
|
+
const targetPath = path.join(targetDirectory, adapter.targetPath);
|
|
55
|
+
const targetDir = path.dirname(targetPath);
|
|
56
|
+
|
|
57
|
+
if (!(await pathExists(sourcePath))) {
|
|
58
|
+
console.error(`Adapter source not found: ${sourcePath}`);
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
await fs.mkdir(targetDir, { recursive: true });
|
|
63
|
+
await fs.copyFile(sourcePath, targetPath);
|
|
64
|
+
console.log(` ${adapter.label}: ${adapter.targetPath} ... OK`);
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export async function runAdapterCommand(commandArguments) {
|
|
69
|
+
const targetDirectory = process.cwd();
|
|
70
|
+
const requestedAdapters = [];
|
|
71
|
+
|
|
72
|
+
for (const argument of commandArguments) {
|
|
73
|
+
if (argument === '--all') {
|
|
74
|
+
requestedAdapters.push(...Object.keys(ADAPTER_TARGETS));
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const adapterKey = argument.replace(/^--/, '');
|
|
79
|
+
if (ADAPTER_TARGETS[adapterKey]) {
|
|
80
|
+
requestedAdapters.push(adapterKey);
|
|
81
|
+
} else if (argument.startsWith('--')) {
|
|
82
|
+
console.error(`Unknown option: ${argument}`);
|
|
83
|
+
console.log(`Available adapters: ${Object.keys(ADAPTER_TARGETS).map(k => `--${k}`).join(', ')}, --all`);
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (requestedAdapters.length === 0) {
|
|
89
|
+
console.log('Agentic Senior Core -- Adapter Generator\n');
|
|
90
|
+
console.log('Usage: asc adapter [--cursor] [--windsurf] [--cline] [--copilot] [--kiro] [--all]\n');
|
|
91
|
+
console.log('Generates instruction-tier adapter files for IDEs without plugin support.');
|
|
92
|
+
console.log('Each adapter is a single file containing the universal coding rules.\n');
|
|
93
|
+
console.log('Available adapters:');
|
|
94
|
+
for (const [key, adapter] of Object.entries(ADAPTER_TARGETS)) {
|
|
95
|
+
console.log(` --${key.padEnd(10)} ${adapter.label.padEnd(20)} -> ${adapter.targetPath}`);
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
console.log('Agentic Senior Core -- Generating adapters\n');
|
|
101
|
+
|
|
102
|
+
let successCount = 0;
|
|
103
|
+
for (const adapterKey of requestedAdapters) {
|
|
104
|
+
const success = await generateAdapter(targetDirectory, adapterKey);
|
|
105
|
+
if (success) successCount++;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
console.log(`\n${successCount}/${requestedAdapters.length} adapter(s) generated.`);
|
|
109
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
|
|
4
|
+
const V4_ARTIFACTS = [
|
|
5
|
+
'.agent-context',
|
|
6
|
+
'AGENTS.md',
|
|
7
|
+
'CLAUDE.md',
|
|
8
|
+
'GEMINI.md',
|
|
9
|
+
'STAGE-CHECKPOINT.md',
|
|
10
|
+
'mcp.json',
|
|
11
|
+
'validate_output.txt',
|
|
12
|
+
'release-gate-report.json',
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
async function pathExists(filePath) {
|
|
16
|
+
try {
|
|
17
|
+
await fs.access(filePath);
|
|
18
|
+
return true;
|
|
19
|
+
} catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export async function runCleanCommand(commandArguments) {
|
|
25
|
+
const targetDirectory = process.cwd();
|
|
26
|
+
const dryRun = commandArguments.includes('--dry-run');
|
|
27
|
+
|
|
28
|
+
console.log('Agentic Senior Core -- Clean v4 artifacts\n');
|
|
29
|
+
console.log(`Target: ${targetDirectory}`);
|
|
30
|
+
if (dryRun) console.log('Mode: dry-run (no files will be deleted)\n');
|
|
31
|
+
else console.log('');
|
|
32
|
+
|
|
33
|
+
let found = 0;
|
|
34
|
+
let removed = 0;
|
|
35
|
+
|
|
36
|
+
for (const artifact of V4_ARTIFACTS) {
|
|
37
|
+
const fullPath = path.join(targetDirectory, artifact);
|
|
38
|
+
if (!(await pathExists(fullPath))) continue;
|
|
39
|
+
|
|
40
|
+
found++;
|
|
41
|
+
const stat = await fs.stat(fullPath);
|
|
42
|
+
const label = stat.isDirectory() ? `${artifact}/` : artifact;
|
|
43
|
+
|
|
44
|
+
if (dryRun) {
|
|
45
|
+
console.log(` would remove: ${label}`);
|
|
46
|
+
} else {
|
|
47
|
+
await fs.rm(fullPath, { recursive: true, force: true });
|
|
48
|
+
console.log(` removed: ${label}`);
|
|
49
|
+
removed++;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (found === 0) {
|
|
54
|
+
console.log('No v4 artifacts found. This project is clean.');
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (dryRun) {
|
|
59
|
+
console.log(`\n${found} artifact(s) found. Run without --dry-run to remove.`);
|
|
60
|
+
} else {
|
|
61
|
+
console.log(`\n${removed} artifact(s) removed.`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import fs from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import os from 'node:os';
|
|
4
|
+
|
|
5
|
+
const HOME = os.homedir();
|
|
6
|
+
|
|
7
|
+
const IDE_CHECKS = [
|
|
8
|
+
{
|
|
9
|
+
name: 'Claude Code',
|
|
10
|
+
type: 'plugin',
|
|
11
|
+
checkPaths: [
|
|
12
|
+
path.join(HOME, '.claude'),
|
|
13
|
+
],
|
|
14
|
+
installHint: '/plugin marketplace add fatidaprilian/Agentic-Senior-Core',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'Codex CLI',
|
|
18
|
+
type: 'plugin',
|
|
19
|
+
checkPaths: [
|
|
20
|
+
path.join(HOME, '.codex'),
|
|
21
|
+
],
|
|
22
|
+
installHint: 'codex plugins install agentic-senior-core',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'Gemini CLI',
|
|
26
|
+
type: 'plugin',
|
|
27
|
+
checkPaths: [
|
|
28
|
+
path.join(HOME, '.gemini'),
|
|
29
|
+
],
|
|
30
|
+
installHint: 'Auto-detected via gemini-extension.json',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'Cursor',
|
|
34
|
+
type: 'adapter',
|
|
35
|
+
checkPaths: [
|
|
36
|
+
path.join(HOME, '.cursor'),
|
|
37
|
+
path.join(HOME, 'AppData', 'Roaming', 'Cursor'),
|
|
38
|
+
path.join(HOME, '.config', 'Cursor'),
|
|
39
|
+
],
|
|
40
|
+
installHint: 'asc adapter --cursor',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Windsurf',
|
|
44
|
+
type: 'adapter',
|
|
45
|
+
checkPaths: [
|
|
46
|
+
path.join(HOME, '.codeium'),
|
|
47
|
+
path.join(HOME, '.windsurf'),
|
|
48
|
+
],
|
|
49
|
+
installHint: 'asc adapter --windsurf',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'Cline',
|
|
53
|
+
type: 'adapter',
|
|
54
|
+
checkPaths: [
|
|
55
|
+
path.join(HOME, 'Documents', 'Cline'),
|
|
56
|
+
path.join(HOME, '.cline'),
|
|
57
|
+
],
|
|
58
|
+
installHint: 'asc adapter --cline',
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
async function pathExists(filePath) {
|
|
63
|
+
try {
|
|
64
|
+
await fs.access(filePath);
|
|
65
|
+
return true;
|
|
66
|
+
} catch {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export async function runStatusCommand() {
|
|
72
|
+
console.log('Agentic Senior Core -- IDE Status\n');
|
|
73
|
+
|
|
74
|
+
for (const ide of IDE_CHECKS) {
|
|
75
|
+
let detected = false;
|
|
76
|
+
for (const checkPath of ide.checkPaths) {
|
|
77
|
+
if (await pathExists(checkPath)) {
|
|
78
|
+
detected = true;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const icon = detected ? '[x]' : '[ ]';
|
|
84
|
+
const support = ide.type === 'plugin' ? '(plugin)' : '(adapter)';
|
|
85
|
+
console.log(` ${icon} ${ide.name.padEnd(15)} ${support.padEnd(10)} ${detected ? 'detected' : 'not found'}`);
|
|
86
|
+
|
|
87
|
+
if (detected) {
|
|
88
|
+
console.log(` Install: ${ide.installHint}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
console.log('\nPlugin hosts get always-on rules via SessionStart hook.');
|
|
93
|
+
console.log('Adapter hosts need one file per project via "asc adapter".');
|
|
94
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryuenn3123/agentic-senior-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Universal AI coding rules. Write code like a staff engineer, not a junior.",
|
|
6
6
|
"bin": {
|
|
7
7
|
"asc": "bin/agentic-senior-core.js",
|
|
8
8
|
"agentic-senior-core": "bin/agentic-senior-core.js",
|
|
@@ -10,27 +10,34 @@
|
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"bin/",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"lib/",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
".
|
|
19
|
-
".
|
|
20
|
-
".
|
|
21
|
-
".
|
|
22
|
-
".
|
|
23
|
-
".
|
|
24
|
-
".
|
|
25
|
-
".
|
|
26
|
-
".
|
|
27
|
-
".
|
|
28
|
-
".
|
|
29
|
-
".
|
|
13
|
+
"lib/cli/commands/adapter.mjs",
|
|
14
|
+
"lib/cli/commands/clean.mjs",
|
|
15
|
+
"lib/cli/commands/status.mjs",
|
|
16
|
+
"lib/cli/commands/mcp.mjs",
|
|
17
|
+
"lib/cli/ascx/",
|
|
18
|
+
".claude-plugin/",
|
|
19
|
+
".codex-plugin/",
|
|
20
|
+
".devin-plugin/",
|
|
21
|
+
".github/plugin/",
|
|
22
|
+
".github/copilot-instructions.md",
|
|
23
|
+
".agents/",
|
|
24
|
+
".openclaw/",
|
|
25
|
+
".opencode/",
|
|
26
|
+
".cursor/rules/",
|
|
27
|
+
".windsurf/rules/",
|
|
28
|
+
".clinerules/",
|
|
29
|
+
".kiro/steering/",
|
|
30
|
+
"gemini-extension.json",
|
|
31
|
+
"plugin.yaml",
|
|
32
|
+
"__init__.py",
|
|
33
|
+
"commands/",
|
|
34
|
+
"hooks/",
|
|
35
|
+
"skills/",
|
|
36
|
+
"scripts/mcp-server.mjs",
|
|
37
|
+
"scripts/mcp-server/",
|
|
38
|
+
"scripts/uninstall.js",
|
|
30
39
|
"AGENTS.md",
|
|
31
40
|
"CLAUDE.md",
|
|
32
|
-
"GEMINI.md",
|
|
33
|
-
"mcp.json",
|
|
34
41
|
"README.md",
|
|
35
42
|
"LICENSE",
|
|
36
43
|
"CONTRIBUTING.md"
|
|
@@ -44,51 +51,27 @@
|
|
|
44
51
|
"keywords": [
|
|
45
52
|
"ai",
|
|
46
53
|
"coding-standards",
|
|
47
|
-
"
|
|
54
|
+
"claude-code",
|
|
55
|
+
"codex",
|
|
56
|
+
"cursor",
|
|
48
57
|
"windsurf",
|
|
49
58
|
"copilot",
|
|
50
|
-
"
|
|
59
|
+
"cline",
|
|
60
|
+
"kiro",
|
|
61
|
+
"gemini",
|
|
62
|
+
"devin",
|
|
63
|
+
"hermes",
|
|
64
|
+
"opencode",
|
|
65
|
+
"openclaw",
|
|
66
|
+
"plugin",
|
|
67
|
+
"universal",
|
|
51
68
|
"clean-code",
|
|
52
69
|
"engineering-standards",
|
|
70
|
+
"security",
|
|
71
|
+
"architecture",
|
|
53
72
|
"agentic"
|
|
54
73
|
],
|
|
55
74
|
"scripts": {
|
|
56
|
-
"
|
|
57
|
-
"audit:frontend-usability": "node ./scripts/frontend-usability-audit.mjs",
|
|
58
|
-
"audit:documentation-boundary": "node ./scripts/documentation-boundary-audit.mjs",
|
|
59
|
-
"audit:context-triggered": "node ./scripts/context-triggered-audit.mjs",
|
|
60
|
-
"audit:rules-guardian": "node ./scripts/rules-guardian-audit.mjs",
|
|
61
|
-
"audit:explain-on-demand": "node ./scripts/explain-on-demand-audit.mjs",
|
|
62
|
-
"audit:single-source-lazy-loading": "node ./scripts/single-source-lazy-loading-audit.mjs",
|
|
63
|
-
"build:release-bundle": "node ./scripts/build-release-benchmark-bundle.mjs",
|
|
64
|
-
"sync:adapters": "node ./scripts/sync-thin-adapters.mjs",
|
|
65
|
-
"check:adapters": "node ./scripts/sync-thin-adapters.mjs --check",
|
|
66
|
-
"gate:release": "node ./scripts/release-gate.mjs && node ./scripts/forbidden-content-check.mjs",
|
|
67
|
-
"prepublishOnly": "npm run gate:release",
|
|
68
|
-
"sbom:generate": "node ./scripts/generate-sbom.mjs",
|
|
69
|
-
"benchmark:detection": "node ./scripts/detection-benchmark.mjs",
|
|
70
|
-
"benchmark:token": "node ./scripts/token-optimization-benchmark.mjs",
|
|
71
|
-
"benchmark:adaptive-context": "node ./scripts/adaptive-context-benchmark.mjs",
|
|
72
|
-
"benchmark:ascx": "node ./scripts/ascx-runtime-token-saver-benchmark.mjs",
|
|
73
|
-
"benchmark:compact-natural": "node ./scripts/compact-natural-mode-benchmark.mjs",
|
|
74
|
-
"benchmark:bundle": "node ./scripts/benchmark-evidence-bundle.mjs",
|
|
75
|
-
"benchmark:writer-judge": "node ./scripts/benchmark-writer-judge-matrix.mjs",
|
|
76
|
-
"benchmark:gate": "node ./scripts/benchmark-gate.mjs",
|
|
77
|
-
"benchmark:intelligence": "node ./scripts/benchmark-intelligence.mjs",
|
|
78
|
-
"benchmark:continuity": "node ./scripts/memory-continuity-benchmark.mjs",
|
|
79
|
-
"benchmark:cache-phase-2": "node ./benchmarks/token-usage/run-cache-simulation.mjs",
|
|
80
|
-
"benchmark:anti-halu": "node ./benchmarks/anti-halu/run-benchmark.mjs",
|
|
81
|
-
"report:quality-trend": "node ./scripts/quality-trend-report.mjs",
|
|
82
|
-
"report:docs-quality-drift": "node ./scripts/docs-quality-drift-report.mjs",
|
|
83
|
-
"report:governance-weekly": "node ./scripts/governance-weekly-report.mjs",
|
|
84
|
-
"clean:local": "node ./scripts/clean-local-artifacts.mjs",
|
|
85
|
-
"validate": "node ./scripts/validate.mjs",
|
|
86
|
-
"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/operations.test.mjs ./tests/knowledge-injection.test.mjs ./tests/audit-caching-scope-hygiene.test.mjs ./tests/research-dossier-migration.test.mjs ./tests/adaptive-context.test.mjs ./tests/ascx-runtime-token-saver.test.mjs ./tests/compact-natural-mode.test.mjs ./benchmarks/token-usage/lib/token-counter.test.mjs ./benchmarks/token-usage/lib/provider-cache-matrix.test.mjs ./benchmarks/token-usage/lib/cache-layer-contract.test.mjs ./benchmarks/token-usage/lib/cache-economics.test.mjs"
|
|
87
|
-
},
|
|
88
|
-
"devDependencies": {
|
|
89
|
-
"@anthropic-ai/sdk": "^0.96.0",
|
|
90
|
-
"@google/genai": "^2.3.0",
|
|
91
|
-
"tiktoken": "^1.0.22",
|
|
92
|
-
"yaml": "^2.9.0"
|
|
75
|
+
"test": "node --test ./tests/adapter.test.mjs"
|
|
93
76
|
}
|
|
94
77
|
}
|
package/plugin.yaml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: agentic-senior-core
|
|
2
|
+
version: 5.1.0
|
|
3
|
+
description: Universal AI coding rules. Write code like a staff engineer.
|
|
4
|
+
author: fatidaprilian
|
|
5
|
+
provides_hooks:
|
|
6
|
+
- pre_llm_call
|
|
7
|
+
provides_commands:
|
|
8
|
+
- asc-refactor
|
|
9
|
+
- asc-review
|
|
10
|
+
- asc-audit
|
|
11
|
+
- asc-help
|
|
12
|
+
provides_skills:
|
|
13
|
+
- asc
|
|
14
|
+
- asc-refactor
|
|
15
|
+
- asc-review
|
|
16
|
+
- asc-audit
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Uninstall cleanup script.
|
|
4
|
+
* Run this BEFORE removing the plugin from the host, since the host
|
|
5
|
+
* removal deletes the plugin directory (including this script).
|
|
6
|
+
*
|
|
7
|
+
* Cleans up:
|
|
8
|
+
* - Optional config at ~/.config/agentic-senior-core/
|
|
9
|
+
* - StatusLine entries in ~/.claude/settings.json (if any were added)
|
|
10
|
+
*/
|
|
11
|
+
import fs from 'node:fs/promises';
|
|
12
|
+
import path from 'node:path';
|
|
13
|
+
import os from 'node:os';
|
|
14
|
+
|
|
15
|
+
const HOME = os.homedir();
|
|
16
|
+
|
|
17
|
+
async function pathExists(filePath) {
|
|
18
|
+
try {
|
|
19
|
+
await fs.access(filePath);
|
|
20
|
+
return true;
|
|
21
|
+
} catch {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
async function main() {
|
|
27
|
+
const configDir = path.join(HOME, '.config', 'agentic-senior-core');
|
|
28
|
+
if (await pathExists(configDir)) {
|
|
29
|
+
await fs.rm(configDir, { recursive: true, force: true });
|
|
30
|
+
console.log(`Removed config directory: ${configDir}`);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
console.log('Cleanup complete. You can now remove the plugin from your IDE.');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
main().catch((error) => {
|
|
37
|
+
console.error('Uninstall cleanup failed:', error.message);
|
|
38
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Agentic Senior Core
|
|
2
|
+
|
|
3
|
+
Universal AI coding rules. Write code like a staff engineer.
|
|
4
|
+
|
|
5
|
+
## Available Commands
|
|
6
|
+
|
|
7
|
+
- `/asc-refactor` -- Structured refactoring workflow with pre-checks and validation
|
|
8
|
+
- `/asc-review` -- Production-risk code review with severity-ordered findings
|
|
9
|
+
- `/asc-audit` -- Security and architecture audit
|
|
10
|
+
- `/asc-help` -- Show this help
|
|
11
|
+
|
|
12
|
+
## What It Does
|
|
13
|
+
|
|
14
|
+
Loads universal engineering rules on every session: code quality, architecture, security, error handling, testing, API design, database, frontend, infrastructure, resilience, and async patterns.
|
|
15
|
+
|
|
16
|
+
Rules apply to any project, stack, language, or framework. No per-project configuration needed.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Audit Skill
|
|
2
|
+
|
|
3
|
+
Security and architecture audit. Deeper than review, focused on finding vulnerabilities and structural anti-patterns.
|
|
4
|
+
|
|
5
|
+
## Audit Scope
|
|
6
|
+
|
|
7
|
+
1. **Trust boundaries**: Every point where external input enters the system. Validate that inputs are sanitized, normalized, and rejected when invalid.
|
|
8
|
+
2. **Authentication and authorization**: Verify auth checks exist on every endpoint. Check for resource-level authorization, not just identity.
|
|
9
|
+
3. **Data handling**: Secrets in code or logs, PII exposure, unsafe deserialization, SQL injection, command injection.
|
|
10
|
+
4. **Architecture boundaries**: Business logic in transport layer, shared databases between services, circular dependencies, internal model leakage through public APIs.
|
|
11
|
+
5. **Dependency health**: Known vulnerabilities, unmaintained packages, excessive dependency surface.
|
|
12
|
+
6. **Error exposure**: Stack traces, internal paths, or implementation details exposed to clients.
|
|
13
|
+
|
|
14
|
+
## For Every Finding
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
Severity: critical | high | medium | low
|
|
18
|
+
Class: vulnerability class (e.g., SQL Injection, Broken Access Control)
|
|
19
|
+
Location: file:line
|
|
20
|
+
Impact: who or what is affected
|
|
21
|
+
Evidence: exact code, behavior, or command output
|
|
22
|
+
Remediation: specific fix direction
|
|
23
|
+
Validation: how to prove it is fixed
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Output
|
|
27
|
+
|
|
28
|
+
Findings ordered by severity. If no findings, state that explicitly and describe audit coverage.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Refactor Skill
|
|
2
|
+
|
|
3
|
+
Structured refactoring workflow. Preserves existing behavior while improving structure.
|
|
4
|
+
|
|
5
|
+
## Before Editing
|
|
6
|
+
|
|
7
|
+
1. Read the target code and understand existing patterns.
|
|
8
|
+
2. Identify the smallest relevant scope for the refactor.
|
|
9
|
+
3. If the change touches UI, check accessibility and responsive behavior.
|
|
10
|
+
4. If the change touches dependencies, verify current official docs.
|
|
11
|
+
|
|
12
|
+
## Refactor Rules
|
|
13
|
+
|
|
14
|
+
- Improve clarity, boundaries, naming, validation, error handling, and tests.
|
|
15
|
+
- Prioritize maintainability over compressed one-liners.
|
|
16
|
+
- Keep the main flow traceable. Use early returns where they reduce nesting.
|
|
17
|
+
- Do not introduce abstractions before the repeated pattern is real.
|
|
18
|
+
- Split large files when the split makes the flow easier to understand.
|
|
19
|
+
- Remove code that does not carry behavior, safety, clarity, maintainability, or test value.
|
|
20
|
+
- Prefer the shorter implementation only when it keeps the same guarantees.
|
|
21
|
+
- Run a final simplification pass before completion.
|
|
22
|
+
- Update tests and docs whenever behavior contracts, public APIs, data shape, or UI contracts change.
|
|
23
|
+
|
|
24
|
+
## For Every Change, Explain
|
|
25
|
+
|
|
26
|
+
- What risk or friction existed.
|
|
27
|
+
- What changed.
|
|
28
|
+
- Why the new shape is safer or easier to maintain.
|
|
29
|
+
|
|
30
|
+
## Validation
|
|
31
|
+
|
|
32
|
+
- Existing behavior is preserved unless the user approved a change.
|
|
33
|
+
- Edge cases, empty states, error paths, and rollback paths are handled.
|
|
34
|
+
- Public contracts remain stable or are versioned.
|
|
35
|
+
- Tests pass.
|