@ryuenn3123/agentic-senior-core 5.8.24 → 5.8.25
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/hooks/post-edit-enforce.js +28 -0
- package/.agents/plugins/agentic-senior-core/hooks/pre-tool-dependency-gate.js +29 -0
- package/.agents/plugins/agentic-senior-core/plugin.json +1 -1
- package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +5 -0
- package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +1 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-adapter/SKILL.md +1 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-add-feature/SKILL.md +1 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +1 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-debt/SKILL.md +1 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-new-project/SKILL.md +1 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +1 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-reference/SKILL.md +1 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +1 -1
- package/.agents/rules/agentic-senior-core.md +7 -0
- package/AGENTS.md +5 -0
- package/README.md +9 -0
- package/gemini-extension.json +1 -1
- package/package.json +1 -1
- package/plugin.yaml +1 -1
|
@@ -36,6 +36,10 @@ const SOURCE_EXTENSIONS = new Set([
|
|
|
36
36
|
|
|
37
37
|
const LOC_DELTA_THRESHOLD = 30;
|
|
38
38
|
const NEW_FILE_LINE_THRESHOLD = 50;
|
|
39
|
+
const SESSION_DRIFT_THRESHOLD = 4;
|
|
40
|
+
|
|
41
|
+
// Module-level counter for Claude Code path (resets per process spawn)
|
|
42
|
+
let sourceEditCount = 0;
|
|
39
43
|
|
|
40
44
|
let inputBuffer = '';
|
|
41
45
|
process.stdin.setEncoding('utf8');
|
|
@@ -65,6 +69,8 @@ function handleAntigravityPostInvocation(data) {
|
|
|
65
69
|
const lines = fs.readFileSync(data.transcriptPath, 'utf8').split('\n').filter(Boolean);
|
|
66
70
|
const findings = [];
|
|
67
71
|
|
|
72
|
+
// Session drift check: count source file edits since initialNumSteps
|
|
73
|
+
let sourceEditsSinceStart = 0;
|
|
68
74
|
for (let i = 0; i < lines.length; i++) {
|
|
69
75
|
const step = JSON.parse(lines[i]);
|
|
70
76
|
if (step.step_index >= data.initialNumSteps && step.type === 'PLANNER_RESPONSE' && step.tool_calls) {
|
|
@@ -89,6 +95,10 @@ function handleAntigravityPostInvocation(data) {
|
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
if (toolName) {
|
|
98
|
+
const fp = toolInput.file_path || '';
|
|
99
|
+
const ext = path.extname(fp).slice(1);
|
|
100
|
+
if (SOURCE_EXTENSIONS.has(ext)) sourceEditsSinceStart++;
|
|
101
|
+
|
|
92
102
|
processSingleEdit(toolName, toolInput, function(nudge) {
|
|
93
103
|
findings.push(nudge);
|
|
94
104
|
}, true);
|
|
@@ -97,6 +107,13 @@ function handleAntigravityPostInvocation(data) {
|
|
|
97
107
|
}
|
|
98
108
|
}
|
|
99
109
|
|
|
110
|
+
// Inject drift nudge if 4+ source files modified this invocation
|
|
111
|
+
if (sourceEditsSinceStart >= SESSION_DRIFT_THRESHOLD) {
|
|
112
|
+
findings.push('[ASC Session Drift] ' + sourceEditsSinceStart + ' source file edits this invocation. '
|
|
113
|
+
+ 'Re-read the decision ladder before continuing: (1) Does this need to be built? '
|
|
114
|
+
+ '(2) Does the codebase already have this? (3) Stdlib/native? (4) Existing dependency?');
|
|
115
|
+
}
|
|
116
|
+
|
|
100
117
|
if (findings.length > 0) {
|
|
101
118
|
const injectSteps = findings.map(function(f) { return { ephemeralMessage: f }; });
|
|
102
119
|
process.stdout.write(JSON.stringify({ injectSteps: injectSteps }) + '\n');
|
|
@@ -113,6 +130,17 @@ function processSingleEdit(toolName, toolInput, emitFn, skipArray) {
|
|
|
113
130
|
if (!filePath) return;
|
|
114
131
|
const findings = [];
|
|
115
132
|
|
|
133
|
+
// Increment per-process counter for Claude Code drift detection
|
|
134
|
+
const ext = path.extname(filePath).slice(1);
|
|
135
|
+
if (SOURCE_EXTENSIONS.has(ext)) {
|
|
136
|
+
sourceEditCount++;
|
|
137
|
+
if (sourceEditCount === SESSION_DRIFT_THRESHOLD) {
|
|
138
|
+
findings.push('[ASC Session Drift] ' + SESSION_DRIFT_THRESHOLD + '+ source file edits this session. '
|
|
139
|
+
+ 'Re-read the decision ladder before continuing: (1) Does this need to be built? '
|
|
140
|
+
+ '(2) Does the codebase already have this? (3) Stdlib/native? (4) Existing dependency?');
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
116
144
|
if (filePath.endsWith('package.json')) {
|
|
117
145
|
checkDependencyAddition(toolName, toolInput, findings);
|
|
118
146
|
}
|
|
@@ -37,6 +37,29 @@ process.stdin.on('end', function () {
|
|
|
37
37
|
|
|
38
38
|
if (isTerminal) {
|
|
39
39
|
const command = toolInput.command || toolInput.CommandLine || toolInput.cmd || toolInput.commandLine || '';
|
|
40
|
+
|
|
41
|
+
// Hard-block git commit/push unless explicitly allowed
|
|
42
|
+
if (isGitCommitOrPush(command)) {
|
|
43
|
+
const reason = '[ASC Hard-Block] git commit/push detected. Never run git commit, git push, or git push --force unless the user explicitly requests it this turn.';
|
|
44
|
+
let output;
|
|
45
|
+
if (isAntigravity) {
|
|
46
|
+
output = { decision: "deny", reason: reason };
|
|
47
|
+
} else {
|
|
48
|
+
output = {
|
|
49
|
+
allow_tool: false,
|
|
50
|
+
deny_reason: reason,
|
|
51
|
+
hookSpecificOutput: {
|
|
52
|
+
hookEventName: 'PreToolUse',
|
|
53
|
+
permissionDecision: 'deny',
|
|
54
|
+
permissionDecisionReason: reason
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
process.stdout.write(JSON.stringify(output) + '\n');
|
|
59
|
+
process.exit(2);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
40
63
|
added = extractCommandDeps(command);
|
|
41
64
|
} else if (isFileEdit) {
|
|
42
65
|
const filePath = toolInput.file_path || toolInput.TargetFile || toolInput.path || toolInput.target_file || '';
|
|
@@ -100,6 +123,12 @@ process.stdin.on('end', function () {
|
|
|
100
123
|
process.exit(0);
|
|
101
124
|
});
|
|
102
125
|
|
|
126
|
+
function isGitCommitOrPush(command) {
|
|
127
|
+
// Match: git commit, git push, git push --force, git push -f
|
|
128
|
+
// Also match chained commands: git add . ; git commit, etc.
|
|
129
|
+
return /\bgit\s+(commit|push)\b/i.test(command);
|
|
130
|
+
}
|
|
131
|
+
|
|
103
132
|
function extractDeps(text, pattern) {
|
|
104
133
|
const matches = [];
|
|
105
134
|
let match;
|
|
@@ -35,6 +35,8 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
35
35
|
- Scope changes to what the task requires. Features, refactors, and abstractions beyond scope need explicit user confirmation.
|
|
36
36
|
- Design for current requirements. Defer speculative extensions until evidence shows near-term need.
|
|
37
37
|
- Delete code that carries no behavior, safety, or test value.
|
|
38
|
+
- When brevity and readability conflict, readability wins.
|
|
39
|
+
- Prefer named functions over closures/inline lambdas once logic exceeds a trivial expression.
|
|
38
40
|
|
|
39
41
|
## Architecture
|
|
40
42
|
|
|
@@ -42,6 +44,7 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
42
44
|
- No custom crypto, state management, or routing when standard libraries exist.
|
|
43
45
|
- Controllers handle protocol translation only. Business logic belongs in services.
|
|
44
46
|
- Default to modular monolith unless scale evidence demands microservices.
|
|
47
|
+
- Match existing project structure before introducing new folders. No new top-level directory without clear necessity.
|
|
45
48
|
- Direction changes require explicit user confirmation.
|
|
46
49
|
|
|
47
50
|
## Security (never skip)
|
|
@@ -66,6 +69,7 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
66
69
|
## Workflow
|
|
67
70
|
|
|
68
71
|
- Prefix ALL terminal commands with `ascx` to compress output and save tokens (e.g., `ascx <your_command>`).
|
|
72
|
+
- Never run `git commit`, `git push`, or `git push --force` unless the user explicitly requests it this turn.
|
|
69
73
|
|
|
70
74
|
Recognize the scenario and offer the matching command — user decides
|
|
71
75
|
whether to invoke it. Skip this for trivial edits.
|
|
@@ -82,3 +86,4 @@ Lead with what the developer needs to act: the command, file path, code change,
|
|
|
82
86
|
Format: direct statement, then evidence. Example — "Add `--strict` to tsconfig. Without it, nullable checks in `UserService.ts:42` are silently skipped."
|
|
83
87
|
|
|
84
88
|
Preserve: exact commands, file paths, line numbers, error messages, exit codes, validation status, assumptions, blockers, risks, and next actions.
|
|
89
|
+
- Before confirming a non-trivial plan, state at least one trade-off or alternative.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user says: "what are the rules", "coding guidelines", "best practices", "code quality standards", "how should I write this", "staff engineer approach", "senior developer rules", "what does ASC say about". Also trigger for any general request about coding standards, quality guidelines, or when the user asks the agent to follow senior/staff engineering practices.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Agentic Senior Core
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-adapter
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user says: "install ASC", "set up rules", "configure for Cursor", "add to Windsurf", "set up Copilot", "initialize plugin", "generate adapter", "install for my IDE", "set up Antigravity", "add to Kiro", "configure Roo". Also trigger for any request to install, configure, or initialize Agentic Senior Core rules or adapter files for an AI coding tool.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# ASC Adapter
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-add-feature
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user says: "add a feature", "build this endpoint", "implement this", "add this component", "extend this", "integrate this", "wire up", "add support for", "create a new route", "add a new page". Also trigger for any non-trivial addition to an existing codebase — new endpoints, UI components, services, or integrations.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Add Feature Workflow
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-audit
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user says: "audit this", "security check", "find vulnerabilities", "is this secure", "check for XSS", "check for SQL injection", "threat model", "penetration test", "OWASP check", "architecture review". Also trigger for any deep security audit, vulnerability scanning, or request to find structural anti-patterns in existing code.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Audit Skill
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-debt
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user says: "log this debt", "skip this for now", "defer this fix", "note this smell", "track this violation", "add to debt ledger", "we'll fix this later", "accept the shortcut". Also trigger when an ASC ladder nudge fires and the user accepts the shortcut rather than fixing it — log the deferred violation for later resolution.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Debt Ledger
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-new-project
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user says: "new project", "start from scratch", "scaffold this", "bootstrap", "create a new app", "init a project", "set up a new repo", "greenfield", "plan the architecture", "design the system". Also trigger for any request to create a new codebase, plan a new system architecture, or scaffold a new repository.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# New Project Workflow
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-refactor
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user says: "refactor this", "clean up this code", "improve this structure", "rewrite this", "extract this into", "reduce duplication", "apply DRY", "apply SOLID", "migrate this", "simplify this module", "split this file", "decompose this". Also trigger for any request to restructure, modernize, or improve code organization without changing behavior.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Refactor Skill
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-reference
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user is working on: unit tests, integration tests, REST APIs, GraphQL APIs, SQL queries, database migrations, React components, frontend layouts, Docker configs, CI/CD pipelines, Kubernetes manifests, or service resilience (retries, circuit breakers, rate limiting). Also trigger when the user says: "how should I test this", "design this API", "optimize this query", "set up Docker", "add retry logic".
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# ASC Domain Reference
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-review
|
|
3
3
|
description: >
|
|
4
|
-
|
|
4
|
+
Trigger this skill when the user says: "review this code", "check this PR", "what's wrong with this", "look at my changes", "critique this", "is this production-ready", "review my pull request", "find bugs", "check for issues". Also trigger for any request to evaluate code quality, analyze recent commits, or assess production risks in existing code.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Review Skill
|
|
@@ -35,6 +35,8 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
35
35
|
- Scope changes to what the task requires. Features, refactors, and abstractions beyond scope need explicit user confirmation.
|
|
36
36
|
- Design for current requirements. Defer speculative extensions until evidence shows near-term need.
|
|
37
37
|
- Delete code that carries no behavior, safety, or test value.
|
|
38
|
+
- When brevity and readability conflict, readability wins.
|
|
39
|
+
- Prefer named functions over closures/inline lambdas once logic exceeds a trivial expression.
|
|
38
40
|
|
|
39
41
|
## Architecture
|
|
40
42
|
|
|
@@ -42,6 +44,7 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
42
44
|
- No custom crypto, state management, or routing when standard libraries exist.
|
|
43
45
|
- Controllers handle protocol translation only. Business logic belongs in services.
|
|
44
46
|
- Default to modular monolith unless scale evidence demands microservices.
|
|
47
|
+
- Match existing project structure before introducing new folders. No new top-level directory without clear necessity.
|
|
45
48
|
- Direction changes require explicit user confirmation.
|
|
46
49
|
|
|
47
50
|
## Security (never skip)
|
|
@@ -65,6 +68,9 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
65
68
|
|
|
66
69
|
## Workflow
|
|
67
70
|
|
|
71
|
+
- Prefix ALL terminal commands with `ascx` to compress output and save tokens (e.g., `ascx <your_command>`).
|
|
72
|
+
- Never run `git commit`, `git push`, or `git push --force` unless the user explicitly requests it this turn.
|
|
73
|
+
|
|
68
74
|
Recognize the scenario and offer the matching command — user decides
|
|
69
75
|
whether to invoke it. Skip this for trivial edits.
|
|
70
76
|
|
|
@@ -80,3 +86,4 @@ Lead with what the developer needs to act: the command, file path, code change,
|
|
|
80
86
|
Format: direct statement, then evidence. Example — "Add `--strict` to tsconfig. Without it, nullable checks in `UserService.ts:42` are silently skipped."
|
|
81
87
|
|
|
82
88
|
Preserve: exact commands, file paths, line numbers, error messages, exit codes, validation status, assumptions, blockers, risks, and next actions.
|
|
89
|
+
- Before confirming a non-trivial plan, state at least one trade-off or alternative.
|
package/AGENTS.md
CHANGED
|
@@ -30,6 +30,8 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
30
30
|
- Scope changes to what the task requires. Features, refactors, and abstractions beyond scope need explicit user confirmation.
|
|
31
31
|
- Design for current requirements. Defer speculative extensions until evidence shows near-term need.
|
|
32
32
|
- Delete code that carries no behavior, safety, or test value.
|
|
33
|
+
- When brevity and readability conflict, readability wins.
|
|
34
|
+
- Prefer named functions over closures/inline lambdas once logic exceeds a trivial expression.
|
|
33
35
|
|
|
34
36
|
## Architecture
|
|
35
37
|
|
|
@@ -37,6 +39,7 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
37
39
|
- No custom crypto, state management, or routing when standard libraries exist.
|
|
38
40
|
- Controllers handle protocol translation only. Business logic belongs in services.
|
|
39
41
|
- Default to modular monolith unless scale evidence demands microservices.
|
|
42
|
+
- Match existing project structure before introducing new folders. No new top-level directory without clear necessity.
|
|
40
43
|
- Direction changes require explicit user confirmation.
|
|
41
44
|
|
|
42
45
|
## Security (never skip)
|
|
@@ -61,6 +64,7 @@ When you pick the minimal option at step 5 or 6, and it isn't obviously trivial:
|
|
|
61
64
|
## Workflow
|
|
62
65
|
|
|
63
66
|
- Prefix ALL terminal commands with `ascx` to compress output and save tokens (e.g., `ascx <your_command>`).
|
|
67
|
+
- Never run `git commit`, `git push`, or `git push --force` unless the user explicitly requests it this turn.
|
|
64
68
|
|
|
65
69
|
Recognize the scenario and offer the matching command — user decides
|
|
66
70
|
whether to invoke it. Skip this for trivial edits.
|
|
@@ -77,3 +81,4 @@ Lead with what the developer needs to act: the command, file path, code change,
|
|
|
77
81
|
Format: direct statement, then evidence. Example — "Add `--strict` to tsconfig. Without it, nullable checks in `UserService.ts:42` are silently skipped."
|
|
78
82
|
|
|
79
83
|
Preserve: exact commands, file paths, line numbers, error messages, exit codes, validation status, assumptions, blockers, risks, and next actions.
|
|
84
|
+
- Before confirming a non-trivial plan, state at least one trade-off or alternative.
|
package/README.md
CHANGED
|
@@ -13,6 +13,15 @@
|
|
|
13
13
|
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
|
+
## Project Status
|
|
17
|
+
|
|
18
|
+
| Component | Status | Notes |
|
|
19
|
+
|-----------|--------|-------|
|
|
20
|
+
| Rules & Skills (Instructional Layer) | Stable | Universal across 23+ AI tools |
|
|
21
|
+
| Hooks (Enforcement Layer) | Stable | Claude Code, Antigravity IDE, Copilot CLI, Cursor |
|
|
22
|
+
| `ascx` (Output Compression) | Beta | 7 adapters (git, npm, tsc, rg); unsupported commands pass through safely |
|
|
23
|
+
| CLI (`asc adapter`, `asc global`) | Stable | Install adapters for any supported host |
|
|
24
|
+
|
|
16
25
|
## How Skills & Hooks Work (Multi-Tier Architecture)
|
|
17
26
|
|
|
18
27
|
Agentic Senior Core operates on a two-tier architecture:
|
package/gemini-extension.json
CHANGED
package/package.json
CHANGED
package/plugin.yaml
CHANGED