@dailephd/my-dev-kit-lab 0.3.3 → 0.3.4
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/README.md +10 -9
- package/dist/src/audits/core/collectSourceFacts.js +21 -10
- package/package.json +1 -1
- package/tests/fixtures/audits/mixed-language/mixed-docs-claims/README.md +16 -0
- package/tests/fixtures/audits/mixed-language/mixed-docs-claims/build.gradle.kts +4 -0
- package/tests/fixtures/audits/mixed-language/mixed-docs-claims/src/main/java/com/example/Widget.java +7 -0
- package/tests/fixtures/audits/mixed-language/mixed-docs-claims/src/main/kotlin/com/example/Gadget.kt +7 -0
- package/tests/fixtures/audits/mixed-language/mixed-generated-vendor/README.md +10 -0
- package/tests/fixtures/audits/mixed-language/mixed-generated-vendor/build/Main.class +1 -0
- package/tests/fixtures/audits/mixed-language/mixed-generated-vendor/dist/index.js +1 -0
- package/tests/fixtures/audits/mixed-language/mixed-generated-vendor/generated/schema.ts +1 -0
- package/tests/fixtures/audits/mixed-language/mixed-generated-vendor/src/index.ts +3 -0
- package/tests/fixtures/audits/mixed-language/mixed-generated-vendor/vendor/lib.py +2 -0
- package/tests/fixtures/audits/mixed-language/mixed-java-kotlin/README.md +10 -0
- package/tests/fixtures/audits/mixed-language/mixed-java-kotlin/build.gradle.kts +8 -0
- package/tests/fixtures/audits/mixed-language/mixed-java-kotlin/settings.gradle.kts +1 -0
- package/tests/fixtures/audits/mixed-language/mixed-java-kotlin/src/main/java/com/example/FooService.java +7 -0
- package/tests/fixtures/audits/mixed-language/mixed-java-kotlin/src/main/kotlin/com/example/BarService.kt +7 -0
- package/tests/fixtures/audits/mixed-language/mixed-java-kotlin/src/test/java/com/example/FooServiceTest.java +8 -0
- package/tests/fixtures/audits/mixed-language/mixed-java-kotlin/src/test/kotlin/com/example/BarServiceTest.kt +8 -0
- package/tests/fixtures/audits/mixed-language/mixed-python-ts/README.md +8 -0
- package/tests/fixtures/audits/mixed-language/mixed-python-ts/src/app.py +7 -0
- package/tests/fixtures/audits/mixed-language/mixed-python-ts/src/index.ts +3 -0
- package/tests/fixtures/audits/mixed-language/mixed-python-ts/tests/test_app.py +5 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-js/README.md +7 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-js/src/helper.js +5 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-js/src/index.ts +3 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-js/tests/index.sample.ts +5 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-python-jvm/README.md +10 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-python-jvm/build.gradle.kts +4 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-python-jvm/pytests/test_app.py +5 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-python-jvm/src/app.py +2 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-python-jvm/src/helper.js +5 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-python-jvm/src/index.ts +3 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-python-jvm/src/main/java/com/example/Multiplier.java +7 -0
- package/tests/fixtures/audits/mixed-language/mixed-ts-python-jvm/src/main/kotlin/com/example/Divider.kt +7 -0
package/README.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
my-dev-kit-lab is the experiment, evidence, reporting, security-validation, and audit companion for my-dev-kit. It runs reproducible experiments that test whether my-dev-kit's graph-guided retrieval helps coding-agent workflows, collects metrics, renders reports, generates plots, captures screenshots, builds gallery outputs, performs automated CLI/package security validation, and runs the generic audit framework.
|
|
4
4
|
|
|
5
|
-
The current published baseline is `v0.3.
|
|
5
|
+
The current published baseline is `v0.3.3`. `v0.3.0` introduced the generic audit framework and the first implemented code-rot detector family; `v0.3.1` added the language-aware code-rot substrate plus TypeScript/JavaScript support; `v0.3.2` added Python-aware code-rot support and a first security-validation audit adapter; `v0.3.3` adds Java/Kotlin source-facts support and JVM-aware code-rot detector integration. The generic experiment-plugin framework was introduced in `v0.2.0`. The first plugin is `context-strategy-comparison`, which preserves the existing raw-full-file vs my-dev-kit-guided workflow through the plugin runner.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
`v0.3.3` is the previously published npm baseline. Java/Kotlin support is conservative static analysis only: dependency-free scanners, static Gradle/Maven metadata detection, and no compiler, classpath, Gradle, Maven, Android, or target-test execution. `v0.3.4` is release-prepared in this repository: package metadata has been bumped to `0.3.4`, adding mixed-language stability coverage, repeated-run report hardening, cross-platform/path normalization tests, CRLF/LF stability checks, and final documentation reconciliation. `v0.3.4` is not yet published to npm, not tagged, and no GitHub release has been created — local Windows validation has passed and a latest-Node cross-platform workflow is configured for ubuntu/macos/windows, but a fresh remote multi-OS run should be verified during publication.
|
|
8
8
|
|
|
9
9
|
my-dev-kit is most useful when the repository is larger than the task. It helps coding agents work with large codebases through reusable structural indexing, graph-guided retrieval, targeted source slices, and auditable context selection. Results are scoped evidence; the project does not claim that my-dev-kit always saves tokens.
|
|
10
10
|
|
|
@@ -35,8 +35,9 @@ my-dev-kit is most useful when the repository is larger than the task. It helps
|
|
|
35
35
|
- Plugin-aware JSON and HTML reports with plugin, target, variant, metric, artifact, warning, skip, and failure metadata
|
|
36
36
|
- Security validation framework: dependency audit, package tarball inspection, CLI adversarial tests, static scans (CodeQL/Semgrep), bounded fuzz smoke, attack-scenario checks, and structured verdict/report output — runnable against any local project via `security:validate --target <path>`. `security:validate` remains the standalone, focused security-validation command; it is not replaced by the audit adapter below.
|
|
37
37
|
- Generic audit framework, current published baseline: `npm run audit` runs heuristic, conservative code-rot detectors and writes text/JSON reports under `reports/audits/code-rot/` by default. `code-rot` and `security` are the currently implemented audit types (`--types code-rot`, `--types security`, or combined `--types code-rot,security`); `quality`, `project`, and `all` audit types are planned and fail cleanly instead of running. `npm run audit` supports `--target`, `--types`, and other flags — see [docs/COMMANDS.md](docs/COMMANDS.md). Audit does not modify target files and does not auto-fix issues.
|
|
38
|
-
- Language-aware code-rot support, current
|
|
39
|
-
- Security-validation audit adapter, current
|
|
38
|
+
- Language-aware code-rot support, current published package state: normalized language/file-role inventory, a source-facts model and collector, TypeScript/JavaScript, Python, Java, and Kotlin analyzers, and conservative detector integrations for `dead-code-candidate`, `duplicate-implementation-candidate`, `test-rot`, and `docs-code-mismatch`. Python project metadata remains a top-level audit report field. Java/Kotlin support adds static JVM project metadata detection for Gradle/Maven/source-set shape and conservative source-facts evidence, but no compiler parsing, type resolution, classpath resolution, Gradle/Maven execution, Android validation, or target-project test execution. No `SourceFacts` schema change or new audit command was added for `v0.3.3`.
|
|
39
|
+
- Security-validation audit adapter, current published package state: `npm run audit -- --types security` runs security validation through the shared audit/report surface by calling the same `runSecurityValidation()` internals `security:validate` uses, maps security findings into audit-issue-shaped entries, and adds a `securitySummary` field (verdict, check counts, finding counts, and links to the original `reports/security/*.txt`/`*.json` report) to audit JSON/text reports. `npm run audit -- --types code-rot,security` runs both audit types together. The original `security:validate` command and its `reports/security/` output are unchanged.
|
|
40
|
+
- `v0.3.4` implementation state (release-prepared, not yet published): mixed-language fixture corpus, source-facts invariants, full-registry mixed-language detector stability tests, repeated-run audit report determinism checks, cross-platform/path normalization hardening, CRLF/LF parsing stability coverage, and final documentation reconciliation. Package metadata is bumped to `0.3.4`; it is not yet tagged or published.
|
|
40
41
|
|
|
41
42
|
---
|
|
42
43
|
|
|
@@ -207,14 +208,14 @@ See [docs/METRICS.md](docs/METRICS.md) for full metric definitions.
|
|
|
207
208
|
|
|
208
209
|
## Current baseline release positioning
|
|
209
210
|
|
|
210
|
-
my-dev-kit-lab is at a working baseline. The raw-vs-indexed experiment pipeline is fully implemented and produces reproducible artifacts. Real-agent campaign support exists for Codex and Claude. The
|
|
211
|
+
my-dev-kit-lab is at a working baseline. The raw-vs-indexed experiment pipeline is fully implemented and produces reproducible artifacts. Real-agent campaign support exists for Codex and Claude. The previously published npm baseline is `v0.3.3`, which added Java/Kotlin analyzers, JVM metadata detection, Java/Kotlin detector support, and Java/Kotlin/Gradle/Maven docs-code-mismatch checks on top of the published `v0.3.2` baseline.
|
|
211
212
|
|
|
212
|
-
|
|
213
|
+
`v0.3.4` is release-prepared in this repository: package metadata has been bumped to `0.3.4`. It hardens the existing language-aware audit path with mixed-language fixture coverage, detector and report determinism checks, cross-platform/path normalization coverage, CRLF/LF stability coverage, and documentation reconciliation. It does not add a new command. It is not yet published, not tagged, and no GitHub release has been created.
|
|
213
214
|
|
|
214
|
-
Planned roadmap direction after the published baseline:
|
|
215
|
+
Planned roadmap direction after the previously published baseline:
|
|
215
216
|
|
|
216
|
-
- `v0.3.3`: Java/Kotlin code-rot support (
|
|
217
|
-
- `v0.3.4`: cross-language stability for the language-aware code-rot track
|
|
217
|
+
- `v0.3.3`: Java/Kotlin code-rot support (published)
|
|
218
|
+
- `v0.3.4`: cross-language stability for the language-aware code-rot track (release-prepared in this checkout; not yet published)
|
|
218
219
|
- `v0.4.0` through `v0.4.2`: Android automated security validation, including an Android-specific extension of the security audit adapter
|
|
219
220
|
- manual pentest: post-v1 / version TBD
|
|
220
221
|
|
|
@@ -41,17 +41,18 @@ export async function collectSourceFacts(targetRoot, inventory, registry = DEFAU
|
|
|
41
41
|
// filtering preserves that order, so no re-sort is needed here.
|
|
42
42
|
const eligible = inventory.files.filter((entry) => ANALYZABLE_ROLES.has(entry.role));
|
|
43
43
|
for (const entry of eligible) {
|
|
44
|
+
const relativePath = normalizeRelativePath(entry.relativePath);
|
|
44
45
|
const analyzer = selectLanguageAnalyzer(registry, entry.language, entry.extension);
|
|
45
46
|
if (!analyzer) {
|
|
46
|
-
files.push(buildFallbackFacts(entry));
|
|
47
|
+
files.push(buildFallbackFacts(entry, relativePath));
|
|
47
48
|
continue;
|
|
48
49
|
}
|
|
49
|
-
const absolutePath =
|
|
50
|
+
const absolutePath = resolveInventoryFilePath(resolvedRoot, relativePath);
|
|
50
51
|
try {
|
|
51
52
|
const content = fs.readFileSync(absolutePath, "utf8");
|
|
52
53
|
const facts = await analyzer.analyzeFile({
|
|
53
54
|
targetRoot: resolvedRoot,
|
|
54
|
-
relativePath
|
|
55
|
+
relativePath,
|
|
55
56
|
absolutePath,
|
|
56
57
|
content,
|
|
57
58
|
inventoryEntry: entry,
|
|
@@ -65,13 +66,13 @@ export async function collectSourceFacts(targetRoot, inventory, registry = DEFAU
|
|
|
65
66
|
const diagnostic = {
|
|
66
67
|
severity: "error",
|
|
67
68
|
code: "analyzer-error",
|
|
68
|
-
message: `Analyzer "${analyzer.id}" failed on "${
|
|
69
|
-
path:
|
|
69
|
+
message: `Analyzer "${analyzer.id}" failed on "${relativePath}": ${message}`,
|
|
70
|
+
path: relativePath,
|
|
70
71
|
analyzerId: analyzer.id,
|
|
71
72
|
};
|
|
72
73
|
analyzerDiagnostics.push(diagnostic);
|
|
73
74
|
files.push({
|
|
74
|
-
relativePath
|
|
75
|
+
relativePath,
|
|
75
76
|
language: entry.language,
|
|
76
77
|
role: entry.role,
|
|
77
78
|
parseStatus: "parse-error",
|
|
@@ -94,7 +95,7 @@ export async function collectSourceFacts(targetRoot, inventory, registry = DEFAU
|
|
|
94
95
|
warnings,
|
|
95
96
|
};
|
|
96
97
|
}
|
|
97
|
-
function buildFallbackFacts(entry) {
|
|
98
|
+
function buildFallbackFacts(entry, relativePath) {
|
|
98
99
|
const known = KNOWN_LANGUAGES.has(entry.language);
|
|
99
100
|
const parseStatus = known ? "file-level-only" : "unsupported";
|
|
100
101
|
const diagnostic = known
|
|
@@ -102,18 +103,18 @@ function buildFallbackFacts(entry) {
|
|
|
102
103
|
severity: "info",
|
|
103
104
|
code: "no-analyzer-registered",
|
|
104
105
|
message: `No language analyzer is registered for "${entry.language}" yet; only inventory-level facts are available.`,
|
|
105
|
-
path:
|
|
106
|
+
path: relativePath,
|
|
106
107
|
analyzerId: null,
|
|
107
108
|
}
|
|
108
109
|
: {
|
|
109
110
|
severity: "info",
|
|
110
111
|
code: "unsupported-language",
|
|
111
112
|
message: `Language "${entry.language}" is not supported for source-fact extraction.`,
|
|
112
|
-
path:
|
|
113
|
+
path: relativePath,
|
|
113
114
|
analyzerId: null,
|
|
114
115
|
};
|
|
115
116
|
return {
|
|
116
|
-
relativePath
|
|
117
|
+
relativePath,
|
|
117
118
|
language: entry.language,
|
|
118
119
|
role: entry.role,
|
|
119
120
|
parseStatus,
|
|
@@ -126,6 +127,16 @@ function buildFallbackFacts(entry) {
|
|
|
126
127
|
diagnostics: [diagnostic],
|
|
127
128
|
};
|
|
128
129
|
}
|
|
130
|
+
function normalizeRelativePath(relativePath) {
|
|
131
|
+
const normalized = path.posix.normalize(relativePath.replace(/\\/g, "/"));
|
|
132
|
+
if (normalized === ".")
|
|
133
|
+
return "";
|
|
134
|
+
return normalized.replace(/^\/+/, "").replace(/^\.\//, "");
|
|
135
|
+
}
|
|
136
|
+
function resolveInventoryFilePath(root, relativePath) {
|
|
137
|
+
const parts = relativePath.split("/").filter((part) => part.length > 0);
|
|
138
|
+
return parts.length === 0 ? root : path.resolve(root, ...parts);
|
|
139
|
+
}
|
|
129
140
|
function countByLanguage(files) {
|
|
130
141
|
const counts = Object.fromEntries(NORMALIZED_LANGUAGES.map((l) => [l, 0]));
|
|
131
142
|
for (const file of files) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# mixed-docs-claims fixture
|
|
2
|
+
|
|
3
|
+
Current: this fixture ships `com.example.Widget` (Java) and `com.example.Gadget`
|
|
4
|
+
(Kotlin), matching the classes actually present under `src/main/java` and
|
|
5
|
+
`src/main/kotlin` -- these are current, accurate claims about this fixture's
|
|
6
|
+
own source.
|
|
7
|
+
|
|
8
|
+
Planned (not yet implemented): Android-specific validation of this project's
|
|
9
|
+
JVM sources is planned for a later `v0.4.x` release track.
|
|
10
|
+
|
|
11
|
+
Out of scope: this fixture's `build.gradle.kts` is never executed by Gradle,
|
|
12
|
+
and `pom.xml`-style Maven execution is not performed against this project --
|
|
13
|
+
static classification only.
|
|
14
|
+
|
|
15
|
+
Future (not yet implemented): a combined `quality`, `project`, or `all`
|
|
16
|
+
audit type covering this fixture does not exist yet.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# mixed-generated-vendor fixture
|
|
2
|
+
|
|
3
|
+
Current: a single real source file (`src/index.ts`) alongside
|
|
4
|
+
`generated/schema.ts`, `dist/index.js`, `build/Main.class`, and
|
|
5
|
+
`vendor/lib.py` -- files that live under path segments the existing
|
|
6
|
+
`projectInventory.ts` policy already classifies as generated/build-output/
|
|
7
|
+
vendor. Used to prove those files do not pollute source-facts collection
|
|
8
|
+
(role stays generated/build-output/vendor, not source/test) and are excluded
|
|
9
|
+
from `SourceFactsSnapshot.files` the same way `sourceFacts.test.ts`'s
|
|
10
|
+
existing vendor/generated test already proves for a single language.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
binary-placeholder
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = { identity: (v) => v };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type GeneratedSchema = { id: string };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# mixed-java-kotlin fixture
|
|
2
|
+
|
|
3
|
+
Current: a conventional Gradle Kotlin DSL JVM project layout with one Java
|
|
4
|
+
class (`src/main/java/com/example/FooService.java`), one Kotlin class
|
|
5
|
+
(`src/main/kotlin/com/example/BarService.kt`), and matching test classes
|
|
6
|
+
under `src/test/java` and `src/test/kotlin`. `build.gradle.kts` and
|
|
7
|
+
`settings.gradle.kts` are present to prove Gradle Kotlin DSL build scripts
|
|
8
|
+
are classified as config, not Kotlin source. Used to prove Java and Kotlin
|
|
9
|
+
source facts coexist in one JVM-style project without disrupting each
|
|
10
|
+
other's declarations or role classification.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rootProject.name = "mixed-java-kotlin-fixture"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# mixed-python-ts fixture
|
|
2
|
+
|
|
3
|
+
Current: a Python module (`src/app.py`) and a TypeScript module
|
|
4
|
+
(`src/index.ts`) that both declare an equivalent `add` function/declaration,
|
|
5
|
+
plus one Python test file. Used to prove Python and TypeScript source facts
|
|
6
|
+
coexist without schema or ordering drift, and that a duplicate-name
|
|
7
|
+
declaration across languages is not merged into a single cross-language
|
|
8
|
+
candidate.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# mixed-ts-js fixture
|
|
2
|
+
|
|
3
|
+
Current: a minimal TypeScript entrypoint (`src/index.ts`) calling a plain
|
|
4
|
+
JavaScript helper (`src/helper.js`), with one test file. Used by
|
|
5
|
+
`tests/audits/mixedLanguageSourceFacts.test.ts` to prove TypeScript and
|
|
6
|
+
JavaScript files coexist in a single source-facts collection without schema
|
|
7
|
+
or ordering drift.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# mixed-ts-python-jvm fixture
|
|
2
|
+
|
|
3
|
+
Current: TypeScript, JavaScript, Python, Java, and Kotlin source files
|
|
4
|
+
coexisting in one target, plus a `build.gradle.kts` JVM metadata file. Used
|
|
5
|
+
to prove all currently-supported language families (v0.3.3 baseline) can be
|
|
6
|
+
collected together without crashing, without cross-language schema drift,
|
|
7
|
+
and without one analyzer's output disturbing another's.
|
|
8
|
+
|
|
9
|
+
Planned (not implemented): Android-specific source-set validation and
|
|
10
|
+
manual pentest coverage are out of scope for this fixture and for v0.3.4.
|