@vyuhlabs/dxkit 1.5.1 → 1.6.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/CHANGELOG.md +264 -0
- package/README.md +265 -352
- package/THIRD_PARTY_NOTICES.md +40 -0
- package/dist/analyzers/developer/detailed.d.ts +26 -0
- package/dist/analyzers/developer/detailed.d.ts.map +1 -0
- package/dist/analyzers/developer/detailed.js +193 -0
- package/dist/analyzers/developer/detailed.js.map +1 -0
- package/dist/analyzers/developer/gather.d.ts +11 -0
- package/dist/analyzers/developer/gather.d.ts.map +1 -0
- package/dist/analyzers/developer/gather.js +167 -0
- package/dist/analyzers/developer/gather.js.map +1 -0
- package/dist/analyzers/developer/index.d.ts +8 -0
- package/dist/analyzers/developer/index.d.ts.map +1 -0
- package/dist/analyzers/developer/index.js +168 -0
- package/dist/analyzers/developer/index.js.map +1 -0
- package/dist/analyzers/developer/types.d.ts +49 -0
- package/dist/analyzers/developer/types.d.ts.map +1 -0
- package/dist/analyzers/developer/types.js +6 -0
- package/dist/analyzers/developer/types.js.map +1 -0
- package/dist/analyzers/docs/shallow.d.ts +9 -0
- package/dist/analyzers/docs/shallow.d.ts.map +1 -0
- package/dist/analyzers/docs/shallow.js +8 -0
- package/dist/analyzers/docs/shallow.js.map +1 -0
- package/dist/analyzers/dx/shallow.d.ts +9 -0
- package/dist/analyzers/dx/shallow.d.ts.map +1 -0
- package/dist/analyzers/dx/shallow.js +8 -0
- package/dist/analyzers/dx/shallow.js.map +1 -0
- package/dist/analyzers/evidence.d.ts +36 -0
- package/dist/analyzers/evidence.d.ts.map +1 -0
- package/dist/analyzers/evidence.js +3 -0
- package/dist/analyzers/evidence.js.map +1 -0
- package/dist/analyzers/health/actions.d.ts +10 -0
- package/dist/analyzers/health/actions.d.ts.map +1 -0
- package/dist/analyzers/health/actions.js +284 -0
- package/dist/analyzers/health/actions.js.map +1 -0
- package/dist/analyzers/health/detailed.d.ts +26 -0
- package/dist/analyzers/health/detailed.d.ts.map +1 -0
- package/dist/analyzers/health/detailed.js +147 -0
- package/dist/analyzers/health/detailed.js.map +1 -0
- package/dist/analyzers/health.d.ts +22 -0
- package/dist/analyzers/health.d.ts.map +1 -0
- package/dist/analyzers/health.js +270 -0
- package/dist/analyzers/health.js.map +1 -0
- package/dist/analyzers/index.d.ts +3 -0
- package/dist/analyzers/index.d.ts.map +1 -0
- package/dist/analyzers/index.js +6 -0
- package/dist/analyzers/index.js.map +1 -0
- package/dist/analyzers/maintainability/shallow.d.ts +9 -0
- package/dist/analyzers/maintainability/shallow.d.ts.map +1 -0
- package/dist/analyzers/maintainability/shallow.js +8 -0
- package/dist/analyzers/maintainability/shallow.js.map +1 -0
- package/dist/analyzers/quality/actions.d.ts +5 -0
- package/dist/analyzers/quality/actions.d.ts.map +1 -0
- package/dist/analyzers/quality/actions.js +158 -0
- package/dist/analyzers/quality/actions.js.map +1 -0
- package/dist/analyzers/quality/detailed.d.ts +17 -0
- package/dist/analyzers/quality/detailed.d.ts.map +1 -0
- package/dist/analyzers/quality/detailed.js +122 -0
- package/dist/analyzers/quality/detailed.js.map +1 -0
- package/dist/analyzers/quality/gather.d.ts +38 -0
- package/dist/analyzers/quality/gather.d.ts.map +1 -0
- package/dist/analyzers/quality/gather.js +279 -0
- package/dist/analyzers/quality/gather.js.map +1 -0
- package/dist/analyzers/quality/index.d.ts +12 -0
- package/dist/analyzers/quality/index.d.ts.map +1 -0
- package/dist/analyzers/quality/index.js +281 -0
- package/dist/analyzers/quality/index.js.map +1 -0
- package/dist/analyzers/quality/shallow.d.ts +9 -0
- package/dist/analyzers/quality/shallow.d.ts.map +1 -0
- package/dist/analyzers/quality/shallow.js +8 -0
- package/dist/analyzers/quality/shallow.js.map +1 -0
- package/dist/analyzers/quality/types.d.ts +66 -0
- package/dist/analyzers/quality/types.d.ts.map +1 -0
- package/dist/analyzers/quality/types.js +3 -0
- package/dist/analyzers/quality/types.js.map +1 -0
- package/dist/analyzers/remediation.d.ts +42 -0
- package/dist/analyzers/remediation.d.ts.map +1 -0
- package/dist/analyzers/remediation.js +28 -0
- package/dist/analyzers/remediation.js.map +1 -0
- package/dist/analyzers/scoring.d.ts +32 -0
- package/dist/analyzers/scoring.d.ts.map +1 -0
- package/dist/analyzers/scoring.js +410 -0
- package/dist/analyzers/scoring.js.map +1 -0
- package/dist/analyzers/security/actions.d.ts +7 -0
- package/dist/analyzers/security/actions.d.ts.map +1 -0
- package/dist/analyzers/security/actions.js +104 -0
- package/dist/analyzers/security/actions.js.map +1 -0
- package/dist/analyzers/security/detailed.d.ts +14 -0
- package/dist/analyzers/security/detailed.d.ts.map +1 -0
- package/dist/analyzers/security/detailed.js +124 -0
- package/dist/analyzers/security/detailed.js.map +1 -0
- package/dist/analyzers/security/gather.d.ts +12 -0
- package/dist/analyzers/security/gather.d.ts.map +1 -0
- package/dist/analyzers/security/gather.js +195 -0
- package/dist/analyzers/security/gather.js.map +1 -0
- package/dist/analyzers/security/index.d.ts +8 -0
- package/dist/analyzers/security/index.d.ts.map +1 -0
- package/dist/analyzers/security/index.js +173 -0
- package/dist/analyzers/security/index.js.map +1 -0
- package/dist/analyzers/security/scoring.d.ts +29 -0
- package/dist/analyzers/security/scoring.d.ts.map +1 -0
- package/dist/analyzers/security/scoring.js +40 -0
- package/dist/analyzers/security/scoring.js.map +1 -0
- package/dist/analyzers/security/shallow.d.ts +10 -0
- package/dist/analyzers/security/shallow.d.ts.map +1 -0
- package/dist/analyzers/security/shallow.js +8 -0
- package/dist/analyzers/security/shallow.js.map +1 -0
- package/dist/analyzers/security/types.d.ts +43 -0
- package/dist/analyzers/security/types.d.ts.map +1 -0
- package/dist/analyzers/security/types.js +6 -0
- package/dist/analyzers/security/types.js.map +1 -0
- package/dist/analyzers/tests/actions.d.ts +6 -0
- package/dist/analyzers/tests/actions.d.ts.map +1 -0
- package/dist/analyzers/tests/actions.js +80 -0
- package/dist/analyzers/tests/actions.js.map +1 -0
- package/dist/analyzers/tests/detailed.d.ts +14 -0
- package/dist/analyzers/tests/detailed.d.ts.map +1 -0
- package/dist/analyzers/tests/detailed.js +121 -0
- package/dist/analyzers/tests/detailed.js.map +1 -0
- package/dist/analyzers/tests/gather.d.ts +5 -0
- package/dist/analyzers/tests/gather.d.ts.map +1 -0
- package/dist/analyzers/tests/gather.js +270 -0
- package/dist/analyzers/tests/gather.js.map +1 -0
- package/dist/analyzers/tests/import-graph.d.ts +48 -0
- package/dist/analyzers/tests/import-graph.d.ts.map +1 -0
- package/dist/analyzers/tests/import-graph.js +231 -0
- package/dist/analyzers/tests/import-graph.js.map +1 -0
- package/dist/analyzers/tests/index.d.ts +8 -0
- package/dist/analyzers/tests/index.d.ts.map +1 -0
- package/dist/analyzers/tests/index.js +247 -0
- package/dist/analyzers/tests/index.js.map +1 -0
- package/dist/analyzers/tests/scoring.d.ts +27 -0
- package/dist/analyzers/tests/scoring.d.ts.map +1 -0
- package/dist/analyzers/tests/scoring.js +38 -0
- package/dist/analyzers/tests/scoring.js.map +1 -0
- package/dist/analyzers/tests/shallow.d.ts +9 -0
- package/dist/analyzers/tests/shallow.d.ts.map +1 -0
- package/dist/analyzers/tests/shallow.js +8 -0
- package/dist/analyzers/tests/shallow.js.map +1 -0
- package/dist/analyzers/tests/types.d.ts +49 -0
- package/dist/analyzers/tests/types.d.ts.map +1 -0
- package/dist/analyzers/tests/types.js +6 -0
- package/dist/analyzers/tests/types.js.map +1 -0
- package/dist/analyzers/tools/cloc.d.ts +8 -0
- package/dist/analyzers/tools/cloc.d.ts.map +1 -0
- package/dist/analyzers/tools/cloc.js +49 -0
- package/dist/analyzers/tools/cloc.js.map +1 -0
- package/dist/analyzers/tools/coverage.d.ts +59 -0
- package/dist/analyzers/tools/coverage.d.ts.map +1 -0
- package/dist/analyzers/tools/coverage.js +280 -0
- package/dist/analyzers/tools/coverage.js.map +1 -0
- package/dist/analyzers/tools/cvss-v4-lookup.d.ts +10 -0
- package/dist/analyzers/tools/cvss-v4-lookup.d.ts.map +1 -0
- package/dist/analyzers/tools/cvss-v4-lookup.js +284 -0
- package/dist/analyzers/tools/cvss-v4-lookup.js.map +1 -0
- package/dist/analyzers/tools/cvss-v4.d.ts +24 -0
- package/dist/analyzers/tools/cvss-v4.d.ts.map +1 -0
- package/dist/analyzers/tools/cvss-v4.js +362 -0
- package/dist/analyzers/tools/cvss-v4.js.map +1 -0
- package/dist/analyzers/tools/default-exclusions.gitignore +56 -0
- package/dist/analyzers/tools/exclusions.d.ts +70 -0
- package/dist/analyzers/tools/exclusions.d.ts.map +1 -0
- package/dist/analyzers/tools/exclusions.js +250 -0
- package/dist/analyzers/tools/exclusions.js.map +1 -0
- package/dist/analyzers/tools/generic.d.ts +4 -0
- package/dist/analyzers/tools/generic.d.ts.map +1 -0
- package/dist/analyzers/tools/generic.js +198 -0
- package/dist/analyzers/tools/generic.js.map +1 -0
- package/dist/analyzers/tools/gitleaks.d.ts +8 -0
- package/dist/analyzers/tools/gitleaks.d.ts.map +1 -0
- package/dist/analyzers/tools/gitleaks.js +58 -0
- package/dist/analyzers/tools/gitleaks.js.map +1 -0
- package/dist/analyzers/tools/graphify.d.ts +4 -0
- package/dist/analyzers/tools/graphify.d.ts.map +1 -0
- package/dist/analyzers/tools/graphify.js +222 -0
- package/dist/analyzers/tools/graphify.js.map +1 -0
- package/dist/analyzers/tools/osv.d.ts +51 -0
- package/dist/analyzers/tools/osv.d.ts.map +1 -0
- package/dist/analyzers/tools/osv.js +188 -0
- package/dist/analyzers/tools/osv.js.map +1 -0
- package/dist/analyzers/tools/parallel.d.ts +8 -0
- package/dist/analyzers/tools/parallel.d.ts.map +1 -0
- package/dist/analyzers/tools/parallel.js +195 -0
- package/dist/analyzers/tools/parallel.js.map +1 -0
- package/dist/analyzers/tools/runner.d.ts +13 -0
- package/dist/analyzers/tools/runner.d.ts.map +1 -0
- package/dist/analyzers/tools/runner.js +109 -0
- package/dist/analyzers/tools/runner.js.map +1 -0
- package/dist/analyzers/tools/suppressions.d.ts +55 -0
- package/dist/analyzers/tools/suppressions.d.ts.map +1 -0
- package/dist/analyzers/tools/suppressions.js +203 -0
- package/dist/analyzers/tools/suppressions.js.map +1 -0
- package/dist/analyzers/tools/timing.d.ts +9 -0
- package/dist/analyzers/tools/timing.d.ts.map +1 -0
- package/dist/analyzers/tools/timing.js +29 -0
- package/dist/analyzers/tools/timing.js.map +1 -0
- package/dist/analyzers/tools/tool-registry.d.ts +86 -0
- package/dist/analyzers/tools/tool-registry.d.ts.map +1 -0
- package/dist/analyzers/tools/tool-registry.js +705 -0
- package/dist/analyzers/tools/tool-registry.js.map +1 -0
- package/dist/analyzers/types.d.ts +125 -0
- package/dist/analyzers/types.d.ts.map +1 -0
- package/dist/analyzers/types.js +11 -0
- package/dist/analyzers/types.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +405 -0
- package/dist/cli.js.map +1 -1
- package/dist/detect.d.ts.map +1 -1
- package/dist/detect.js +24 -15
- package/dist/detect.js.map +1 -1
- package/dist/languages/csharp.d.ts +5 -0
- package/dist/languages/csharp.d.ts.map +1 -0
- package/dist/languages/csharp.js +265 -0
- package/dist/languages/csharp.js.map +1 -0
- package/dist/languages/go.d.ts +11 -0
- package/dist/languages/go.d.ts.map +1 -0
- package/dist/languages/go.js +321 -0
- package/dist/languages/go.js.map +1 -0
- package/dist/languages/index.d.ts +6 -0
- package/dist/languages/index.d.ts.map +1 -0
- package/dist/languages/index.js +18 -0
- package/dist/languages/index.js.map +1 -0
- package/dist/languages/python.d.ts +3 -0
- package/dist/languages/python.d.ts.map +1 -0
- package/dist/languages/python.js +284 -0
- package/dist/languages/python.js.map +1 -0
- package/dist/languages/rust.d.ts +17 -0
- package/dist/languages/rust.d.ts.map +1 -0
- package/dist/languages/rust.js +333 -0
- package/dist/languages/rust.js.map +1 -0
- package/dist/languages/types.d.ts +38 -0
- package/dist/languages/types.d.ts.map +1 -0
- package/dist/languages/types.js +3 -0
- package/dist/languages/types.js.map +1 -0
- package/dist/languages/typescript.d.ts +15 -0
- package/dist/languages/typescript.d.ts.map +1 -0
- package/dist/languages/typescript.js +353 -0
- package/dist/languages/typescript.js.map +1 -0
- package/dist/logger.d.ts +1 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +25 -12
- package/dist/logger.js.map +1 -1
- package/dist/project-yaml.d.ts.map +1 -1
- package/dist/project-yaml.js +1 -0
- package/dist/project-yaml.js.map +1 -1
- package/dist/tools-cli.d.ts +2 -0
- package/dist/tools-cli.d.ts.map +1 -0
- package/dist/tools-cli.js +231 -0
- package/dist/tools-cli.js.map +1 -0
- package/dist/types.d.ts +10 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +6 -2
- package/templates/.claude/commands/dev-report.md +34 -4
- package/templates/.claude/commands/health.md +45 -2
- package/templates/.claude/commands/quality.md.template +38 -15
- package/templates/.claude/commands/test-gaps.md +36 -2
- package/templates/.claude/commands/vulnerabilities.md +36 -2
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This project embeds code and data from third-party open-source projects, listed below with their licenses.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## FIRST CVSS v4 Calculator
|
|
8
|
+
|
|
9
|
+
`src/analyzers/tools/cvss-v4-lookup.ts` (macrovector → base-score lookup table) and the scoring algorithm shape in `src/analyzers/tools/cvss-v4.ts` are derived from the official FIRST CVSS v4.0 reference implementation:
|
|
10
|
+
|
|
11
|
+
- **Source:** https://github.com/FIRSTdotorg/cvss-v4-calculator
|
|
12
|
+
- **License:** BSD-2-Clause
|
|
13
|
+
- **Copyright:** © 2023 FIRST.ORG, Inc., Red Hat, and contributors
|
|
14
|
+
|
|
15
|
+
### License text
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Copyright (c) 2023 FIRST.ORG, Inc., Red Hat, and contributors
|
|
19
|
+
|
|
20
|
+
Redistribution and use in source and binary forms, with or without
|
|
21
|
+
modification, are permitted provided that the following conditions are met:
|
|
22
|
+
|
|
23
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
24
|
+
list of conditions and the following disclaimer.
|
|
25
|
+
|
|
26
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
27
|
+
this list of conditions and the following disclaimer in the documentation
|
|
28
|
+
and/or other materials provided with the distribution.
|
|
29
|
+
|
|
30
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
31
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
32
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
33
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
34
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
35
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
36
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
37
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
38
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
39
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
40
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detailed developer activity report.
|
|
3
|
+
*
|
|
4
|
+
* Observational — there is no score to simulate here (dev-report is about
|
|
5
|
+
* what happened, not what to fix). The detailed report is a richer inventory
|
|
6
|
+
* + flagged observations that agents can turn into recommendations.
|
|
7
|
+
*/
|
|
8
|
+
import { DevReport } from './types';
|
|
9
|
+
export interface DevObservation {
|
|
10
|
+
id: string;
|
|
11
|
+
severity: 'info' | 'warn' | 'action';
|
|
12
|
+
title: string;
|
|
13
|
+
rationale: string;
|
|
14
|
+
/** Optional context values rendered inline (keep primitives only). */
|
|
15
|
+
context?: Record<string, string | number | boolean>;
|
|
16
|
+
}
|
|
17
|
+
export interface DevDetailedReport extends DevReport {
|
|
18
|
+
schemaVersion: string;
|
|
19
|
+
vagueCommitExamples: string[];
|
|
20
|
+
observations: DevObservation[];
|
|
21
|
+
}
|
|
22
|
+
/** Derive observations from the report + sample data. */
|
|
23
|
+
export declare function buildObservations(report: DevReport): DevObservation[];
|
|
24
|
+
export declare function buildDevDetailed(report: DevReport, vagueCommitExamples?: string[]): DevDetailedReport;
|
|
25
|
+
export declare function formatDevDetailedMarkdown(detailed: DevDetailedReport, elapsed: string): string;
|
|
26
|
+
//# sourceMappingURL=detailed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detailed.d.ts","sourceRoot":"","sources":["../../../src/analyzers/developer/detailed.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B,YAAY,EAAE,cAAc,EAAE,CAAC;CAChC;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,EAAE,CA6ErE;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,SAAS,EACjB,mBAAmB,GAAE,MAAM,EAAO,GACjC,iBAAiB,CAOnB;AAED,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAyH9F"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildObservations = buildObservations;
|
|
4
|
+
exports.buildDevDetailed = buildDevDetailed;
|
|
5
|
+
exports.formatDevDetailedMarkdown = formatDevDetailedMarkdown;
|
|
6
|
+
/** Derive observations from the report + sample data. */
|
|
7
|
+
function buildObservations(report) {
|
|
8
|
+
const obs = [];
|
|
9
|
+
const q = report.commitQuality;
|
|
10
|
+
const s = report.summary;
|
|
11
|
+
if (q.total > 0 && q.conventionalPercent < 20) {
|
|
12
|
+
obs.push({
|
|
13
|
+
id: 'dev.low-conventional-commits',
|
|
14
|
+
severity: 'action',
|
|
15
|
+
title: `Low conventional-commit adoption (${q.conventionalPercent}%)`,
|
|
16
|
+
rationale: 'Conventional commits (feat:, fix:, etc.) enable automated changelogs and clearer history. Adoption below 20% suggests no enforcement.',
|
|
17
|
+
context: { conventionalPercent: q.conventionalPercent, total: q.total },
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
if (q.total > 0 && q.vague / q.total > 0.3) {
|
|
21
|
+
obs.push({
|
|
22
|
+
id: 'dev.vague-commit-messages',
|
|
23
|
+
severity: 'warn',
|
|
24
|
+
title: `${q.vague} vague commit messages (${Math.round((q.vague / q.total) * 100)}%)`,
|
|
25
|
+
rationale: 'Single-word or placeholder messages ("update", "fix", "wip") make git history unreadable. Enforce minimum message length in a commit-msg hook.',
|
|
26
|
+
context: { vague: q.vague, total: q.total },
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
if (s.mergeRatio > 0.3) {
|
|
30
|
+
obs.push({
|
|
31
|
+
id: 'dev.high-merge-ratio',
|
|
32
|
+
severity: 'warn',
|
|
33
|
+
title: `Merge commits are ${Math.round(s.mergeRatio * 100)}% of all commits`,
|
|
34
|
+
rationale: 'A high merge ratio indicates branch-heavy workflow. Rebase-on-merge or squash-merge keeps history linear and easier to bisect.',
|
|
35
|
+
context: { mergeRatio: s.mergeRatio },
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if (report.contributors.length > 0 && report.contributors.length <= 2) {
|
|
39
|
+
obs.push({
|
|
40
|
+
id: 'dev.bus-factor-risk',
|
|
41
|
+
severity: 'warn',
|
|
42
|
+
title: `Only ${report.contributors.length} active contributor${report.contributors.length === 1 ? '' : 's'} in period`,
|
|
43
|
+
rationale: 'Low bus factor — knowledge is concentrated. Consider pair programming, code review rotation, or onboarding.',
|
|
44
|
+
context: { contributors: report.contributors.length },
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
if (report.hotFiles.length > 0) {
|
|
48
|
+
const hottest = report.hotFiles[0];
|
|
49
|
+
if (hottest.changes >= 20) {
|
|
50
|
+
obs.push({
|
|
51
|
+
id: 'dev.churn-hotspot',
|
|
52
|
+
severity: 'info',
|
|
53
|
+
title: `Churn hotspot: \`${hottest.path}\` (${hottest.changes} changes)`,
|
|
54
|
+
rationale: 'Frequently-changed files often need refactoring — or are simply high-activity. Cross-reference with quality report for god files or duplication.',
|
|
55
|
+
context: { path: hottest.path, changes: hottest.changes },
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (report.velocity.length >= 2) {
|
|
60
|
+
const recent = report.velocity.slice(-4);
|
|
61
|
+
const avgRecent = recent.reduce((s, v) => s + v.commits, 0) / recent.length;
|
|
62
|
+
const overall = report.velocity.reduce((s, v) => s + v.commits, 0) / report.velocity.length;
|
|
63
|
+
if (avgRecent < overall * 0.5) {
|
|
64
|
+
obs.push({
|
|
65
|
+
id: 'dev.velocity-drop',
|
|
66
|
+
severity: 'info',
|
|
67
|
+
title: `Velocity dropped in last ${recent.length} weeks (${avgRecent.toFixed(1)}/wk vs ${overall.toFixed(1)} avg)`,
|
|
68
|
+
rationale: 'A sustained drop could mean shipping elsewhere, team transition, or blocked work. Worth confirming with the team.',
|
|
69
|
+
context: {
|
|
70
|
+
avgRecent: Number(avgRecent.toFixed(1)),
|
|
71
|
+
avgOverall: Number(overall.toFixed(1)),
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return obs;
|
|
77
|
+
}
|
|
78
|
+
function buildDevDetailed(report, vagueCommitExamples = []) {
|
|
79
|
+
return {
|
|
80
|
+
...report,
|
|
81
|
+
schemaVersion: '10c.1',
|
|
82
|
+
vagueCommitExamples,
|
|
83
|
+
observations: buildObservations(report),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function formatDevDetailedMarkdown(detailed, elapsed) {
|
|
87
|
+
const L = [];
|
|
88
|
+
const s = detailed.summary;
|
|
89
|
+
const q = detailed.commitQuality;
|
|
90
|
+
L.push('# Developer Activity — Detailed');
|
|
91
|
+
L.push('');
|
|
92
|
+
L.push(`**Date:** ${detailed.analyzedAt.slice(0, 10)}`);
|
|
93
|
+
L.push(`**Period:** ${detailed.period.since} to ${detailed.period.until}`);
|
|
94
|
+
L.push(`**Repository:** ${detailed.repo}`);
|
|
95
|
+
L.push(`**Branch:** ${detailed.branch} (${detailed.commitSha})`);
|
|
96
|
+
L.push(`**Schema version:** ${detailed.schemaVersion}`);
|
|
97
|
+
L.push('');
|
|
98
|
+
L.push('---');
|
|
99
|
+
L.push('');
|
|
100
|
+
// Observations — actionable signals
|
|
101
|
+
L.push('## Observations');
|
|
102
|
+
L.push('');
|
|
103
|
+
if (detailed.observations.length === 0) {
|
|
104
|
+
L.push('No notable signals detected.');
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
L.push('| Severity | Observation |');
|
|
108
|
+
L.push('|----------|-------------|');
|
|
109
|
+
for (const o of detailed.observations) {
|
|
110
|
+
L.push(`| ${o.severity.toUpperCase()} | ${o.title} |`);
|
|
111
|
+
}
|
|
112
|
+
L.push('');
|
|
113
|
+
for (const o of detailed.observations) {
|
|
114
|
+
L.push(`### ${o.title}`);
|
|
115
|
+
L.push(`- **ID:** \`${o.id}\``);
|
|
116
|
+
L.push(`- **Severity:** ${o.severity}`);
|
|
117
|
+
L.push(`- **Why:** ${o.rationale}`);
|
|
118
|
+
L.push('');
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
L.push('---');
|
|
122
|
+
L.push('');
|
|
123
|
+
// Summary
|
|
124
|
+
L.push('## Summary');
|
|
125
|
+
L.push('');
|
|
126
|
+
L.push(`**${s.totalCommits} commits** (${s.nonMergeCommits} non-merge, ${s.mergeCommits} merge) from **${s.contributors} contributors**.`);
|
|
127
|
+
L.push(`**Merge ratio:** ${(s.mergeRatio * 100).toFixed(1)}%`);
|
|
128
|
+
L.push(`**Conventional commits:** ${q.conventionalPercent}% of non-merge commits.`);
|
|
129
|
+
L.push('');
|
|
130
|
+
L.push('---');
|
|
131
|
+
L.push('');
|
|
132
|
+
// All contributors
|
|
133
|
+
L.push('## All Contributors');
|
|
134
|
+
L.push('');
|
|
135
|
+
L.push('| Rank | Developer | Commits | Merges | +Lines | -Lines | Net |');
|
|
136
|
+
L.push('|------|-----------|--------:|-------:|-------:|-------:|-----|');
|
|
137
|
+
detailed.contributors.forEach((c, i) => {
|
|
138
|
+
L.push(`| ${i + 1} | ${c.name} | ${c.commits} | ${c.mergeCommits} | +${c.linesAdded.toLocaleString()} | -${c.linesRemoved.toLocaleString()} | ${c.netChange >= 0 ? '+' : ''}${c.netChange.toLocaleString()} |`);
|
|
139
|
+
});
|
|
140
|
+
L.push('');
|
|
141
|
+
L.push('---');
|
|
142
|
+
L.push('');
|
|
143
|
+
// Commit quality breakdown
|
|
144
|
+
L.push('## Commit Message Quality');
|
|
145
|
+
L.push('');
|
|
146
|
+
L.push('| Type | Count | % |');
|
|
147
|
+
L.push('|------|------:|---|');
|
|
148
|
+
L.push(`| Conventional | ${q.conventional} | ${q.conventionalPercent}% |`);
|
|
149
|
+
L.push(`| Descriptive | ${q.descriptive} | ${q.total > 0 ? ((q.descriptive / q.total) * 100).toFixed(1) : 0}% |`);
|
|
150
|
+
L.push(`| Vague | ${q.vague} | ${q.total > 0 ? ((q.vague / q.total) * 100).toFixed(1) : 0}% |`);
|
|
151
|
+
L.push('');
|
|
152
|
+
if (detailed.vagueCommitExamples.length > 0) {
|
|
153
|
+
L.push('### Sample vague commits');
|
|
154
|
+
L.push('');
|
|
155
|
+
for (const msg of detailed.vagueCommitExamples) {
|
|
156
|
+
L.push(`- \`${msg}\``);
|
|
157
|
+
}
|
|
158
|
+
L.push('');
|
|
159
|
+
}
|
|
160
|
+
L.push('---');
|
|
161
|
+
L.push('');
|
|
162
|
+
// All hot files
|
|
163
|
+
L.push('## Hot Files (Most Changed)');
|
|
164
|
+
L.push('');
|
|
165
|
+
L.push('| File | Changes |');
|
|
166
|
+
L.push('|------|--------:|');
|
|
167
|
+
for (const f of detailed.hotFiles) {
|
|
168
|
+
L.push(`| \`${f.path}\` | ${f.changes} |`);
|
|
169
|
+
}
|
|
170
|
+
L.push('');
|
|
171
|
+
L.push('---');
|
|
172
|
+
L.push('');
|
|
173
|
+
// Velocity
|
|
174
|
+
L.push('## Weekly Velocity');
|
|
175
|
+
L.push('');
|
|
176
|
+
if (detailed.velocity.length > 0) {
|
|
177
|
+
L.push('| Week | Commits | Bar |');
|
|
178
|
+
L.push('|------|--------:|-----|');
|
|
179
|
+
for (const v of detailed.velocity) {
|
|
180
|
+
const bar = '█'.repeat(Math.min(Math.round(v.commits / 2), 30));
|
|
181
|
+
L.push(`| ${v.week} | ${v.commits} | ${bar} |`);
|
|
182
|
+
}
|
|
183
|
+
L.push('');
|
|
184
|
+
}
|
|
185
|
+
L.push('---');
|
|
186
|
+
L.push('');
|
|
187
|
+
L.push(`**Tools used:** ${detailed.toolsUsed.join(', ')}`);
|
|
188
|
+
L.push(`**Analysis time:** ${elapsed}s`);
|
|
189
|
+
L.push('');
|
|
190
|
+
L.push('*Generated by [VyuhLabs DXKit](https://www.npmjs.com/package/@vyuhlabs/dxkit) — detailed mode*');
|
|
191
|
+
return L.join('\n');
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=detailed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detailed.js","sourceRoot":"","sources":["../../../src/analyzers/developer/detailed.ts"],"names":[],"mappings":";;AAyBA,8CA6EC;AAED,4CAUC;AAED,8DAyHC;AArND,yDAAyD;AACzD,SAAgB,iBAAiB,CAAC,MAAiB;IACjD,MAAM,GAAG,GAAqB,EAAE,CAAC;IACjC,MAAM,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC;IAC/B,MAAM,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;IAEzB,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC,mBAAmB,GAAG,EAAE,EAAE,CAAC;QAC9C,GAAG,CAAC,IAAI,CAAC;YACP,EAAE,EAAE,8BAA8B;YAClC,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,qCAAqC,CAAC,CAAC,mBAAmB,IAAI;YACrE,SAAS,EACP,uIAAuI;YACzI,OAAO,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAC,mBAAmB,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE;SACxE,CAAC,CAAC;IACL,CAAC;IACD,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC;QAC3C,GAAG,CAAC,IAAI,CAAC;YACP,EAAE,EAAE,2BAA2B;YAC/B,QAAQ,EAAE,MAAM;YAChB,KAAK,EAAE,GAAG,CAAC,CAAC,KAAK,2BAA2B,IAAI,CAAC,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AC,EAAE,EAAE,CAAC,CAAC,CAAC;YAChE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,OAAO,MAAM,GAAG,IAAI,CAAC,CAAC;QAClD,CAAC;QACD,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACb,CAAC;IACD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACd,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEX,CAAC,CAAC,IAAI,CAAC,mBAAmB,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC3D,CAAC,CAAC,IAAI,CAAC,sBAAsB,OAAO,GAAG,CAAC,CAAC;IACzC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACX,CAAC,CAAC,IAAI,CACJ,gGAAgG,CACjG,CAAC;IACF,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ContributorStats, HotFile, CommitQuality, WeeklyVelocity } from './types';
|
|
2
|
+
export declare function gatherContributors(cwd: string, since: string): ContributorStats[];
|
|
3
|
+
export declare function gatherCommitQuality(cwd: string, since: string): CommitQuality;
|
|
4
|
+
export declare function gatherHotFiles(cwd: string, since: string, top?: number): HotFile[];
|
|
5
|
+
export declare function gatherVelocity(cwd: string, since: string): WeeklyVelocity[];
|
|
6
|
+
export declare function gatherVagueCommitExamples(cwd: string, since: string, limit?: number): string[];
|
|
7
|
+
export declare function gatherSummary(cwd: string, since: string): {
|
|
8
|
+
totalCommits: number;
|
|
9
|
+
mergeCommits: number;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=gather.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gather.d.ts","sourceRoot":"","sources":["../../../src/analyzers/developer/gather.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAInF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAoFjF;AAQD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,CA8B7E;AAID,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,OAAO,EAAE,CAgB9E;AAID,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoB3E;AAMD,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,MAAM,EAAE,CAgB1F;AAID,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAQhD"}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gatherContributors = gatherContributors;
|
|
4
|
+
exports.gatherCommitQuality = gatherCommitQuality;
|
|
5
|
+
exports.gatherHotFiles = gatherHotFiles;
|
|
6
|
+
exports.gatherVelocity = gatherVelocity;
|
|
7
|
+
exports.gatherVagueCommitExamples = gatherVagueCommitExamples;
|
|
8
|
+
exports.gatherSummary = gatherSummary;
|
|
9
|
+
/**
|
|
10
|
+
* Developer activity gathering — all git-based, no external tools.
|
|
11
|
+
*
|
|
12
|
+
* Tool: git (log, shortlog, blame)
|
|
13
|
+
*/
|
|
14
|
+
const runner_1 = require("../tools/runner");
|
|
15
|
+
// ─── Contributors ───────────────────────────────────────────────────────────
|
|
16
|
+
function gatherContributors(cwd, since) {
|
|
17
|
+
// Get commit count per author
|
|
18
|
+
const shortlog = (0, runner_1.run)(`git shortlog -sn --no-merges --since='${since}' HEAD 2>/dev/null`, cwd, 30000);
|
|
19
|
+
if (!shortlog)
|
|
20
|
+
return [];
|
|
21
|
+
const contributors = new Map();
|
|
22
|
+
for (const line of shortlog.split('\n').filter((l) => l.trim())) {
|
|
23
|
+
const match = line.trim().match(/^(\d+)\s+(.+)$/);
|
|
24
|
+
if (match) {
|
|
25
|
+
contributors.set(match[2], {
|
|
26
|
+
name: match[2],
|
|
27
|
+
commits: parseInt(match[1]),
|
|
28
|
+
linesAdded: 0,
|
|
29
|
+
linesRemoved: 0,
|
|
30
|
+
netChange: 0,
|
|
31
|
+
mergeCommits: 0,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Get lines added/removed per author via numstat
|
|
36
|
+
const numstat = (0, runner_1.run)(`git log --numstat --format='AUTHOR:%aN' --since='${since}' --no-merges HEAD 2>/dev/null`, cwd, 60000);
|
|
37
|
+
if (numstat) {
|
|
38
|
+
let currentAuthor = '';
|
|
39
|
+
for (const line of numstat.split('\n')) {
|
|
40
|
+
if (line.startsWith('AUTHOR:')) {
|
|
41
|
+
currentAuthor = line.replace('AUTHOR:', '');
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const m = line.match(/^(\d+)\s+(\d+)\s+/);
|
|
45
|
+
if (m && currentAuthor) {
|
|
46
|
+
const stats = contributors.get(currentAuthor);
|
|
47
|
+
if (stats) {
|
|
48
|
+
stats.linesAdded += parseInt(m[1]);
|
|
49
|
+
stats.linesRemoved += parseInt(m[2]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
// Get merge commit count per author
|
|
56
|
+
const mergeLog = (0, runner_1.run)(`git log --format='%aN' --merges --since='${since}' HEAD 2>/dev/null`, cwd, 30000);
|
|
57
|
+
if (mergeLog) {
|
|
58
|
+
for (const name of mergeLog.split('\n').filter((l) => l.trim())) {
|
|
59
|
+
const stats = contributors.get(name);
|
|
60
|
+
if (stats) {
|
|
61
|
+
stats.mergeCommits++;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// Merge-only contributor
|
|
65
|
+
contributors.set(name, {
|
|
66
|
+
name,
|
|
67
|
+
commits: 0,
|
|
68
|
+
linesAdded: 0,
|
|
69
|
+
linesRemoved: 0,
|
|
70
|
+
netChange: 0,
|
|
71
|
+
mergeCommits: 1,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
// Compute net change
|
|
77
|
+
for (const stats of contributors.values()) {
|
|
78
|
+
stats.netChange = stats.linesAdded - stats.linesRemoved;
|
|
79
|
+
}
|
|
80
|
+
// Sort by total commits (non-merge + merge) descending
|
|
81
|
+
return Array.from(contributors.values()).sort((a, b) => b.commits + b.mergeCommits - (a.commits + a.mergeCommits));
|
|
82
|
+
}
|
|
83
|
+
// ─── Commit quality ─────────────────────────────────────────────────────────
|
|
84
|
+
const CONVENTIONAL_RE = /^(feat|fix|chore|docs|style|refactor|perf|test|ci|build|revert)(\(.+\))?!?:/i;
|
|
85
|
+
const VAGUE_RE = /^(update|fix|change|wip|tmp|test|minor|misc|stuff|cleanup|tweaks?)$/i;
|
|
86
|
+
function gatherCommitQuality(cwd, since) {
|
|
87
|
+
const messages = (0, runner_1.run)(`git log --format='%s' --no-merges --since='${since}' HEAD 2>/dev/null`, cwd, 30000);
|
|
88
|
+
if (!messages)
|
|
89
|
+
return { conventional: 0, descriptive: 0, vague: 0, total: 0, conventionalPercent: 0 };
|
|
90
|
+
const lines = messages.split('\n').filter((l) => l.trim());
|
|
91
|
+
let conventional = 0;
|
|
92
|
+
let vague = 0;
|
|
93
|
+
for (const msg of lines) {
|
|
94
|
+
if (CONVENTIONAL_RE.test(msg.trim())) {
|
|
95
|
+
conventional++;
|
|
96
|
+
}
|
|
97
|
+
else if (VAGUE_RE.test(msg.trim()) || msg.trim().split(/\s+/).length <= 2) {
|
|
98
|
+
vague++;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const total = lines.length;
|
|
102
|
+
const descriptive = total - conventional - vague;
|
|
103
|
+
return {
|
|
104
|
+
conventional,
|
|
105
|
+
descriptive,
|
|
106
|
+
vague,
|
|
107
|
+
total,
|
|
108
|
+
conventionalPercent: total > 0 ? Math.round((conventional / total) * 1000) / 10 : 0,
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
// ─── Hot files ──────────────────────────────────────────────────────────────
|
|
112
|
+
function gatherHotFiles(cwd, since, top = 15) {
|
|
113
|
+
const raw = (0, runner_1.run)(`git log --name-only --format='' --since='${since}' --no-merges HEAD 2>/dev/null | sort | uniq -c | sort -rn | head -${top}`, cwd, 30000);
|
|
114
|
+
if (!raw)
|
|
115
|
+
return [];
|
|
116
|
+
return raw
|
|
117
|
+
.split('\n')
|
|
118
|
+
.filter((l) => l.trim())
|
|
119
|
+
.map((line) => {
|
|
120
|
+
const m = line.trim().match(/^(\d+)\s+(.+)$/);
|
|
121
|
+
return m ? { path: m[2], changes: parseInt(m[1]) } : null;
|
|
122
|
+
})
|
|
123
|
+
.filter((x) => x !== null && !x.path.includes('package-lock'));
|
|
124
|
+
}
|
|
125
|
+
// ─── Weekly velocity ────────────────────────────────────────────────────────
|
|
126
|
+
function gatherVelocity(cwd, since) {
|
|
127
|
+
const raw = (0, runner_1.run)(`git log --format='%aI' --since='${since}' HEAD 2>/dev/null`, cwd, 30000);
|
|
128
|
+
if (!raw)
|
|
129
|
+
return [];
|
|
130
|
+
const weekCounts = new Map();
|
|
131
|
+
for (const dateStr of raw.split('\n').filter((l) => l.trim())) {
|
|
132
|
+
const date = new Date(dateStr);
|
|
133
|
+
// ISO week: YYYY-Www
|
|
134
|
+
const year = date.getFullYear();
|
|
135
|
+
const jan1 = new Date(year, 0, 1);
|
|
136
|
+
const weekNum = Math.ceil(((date.getTime() - jan1.getTime()) / 86400000 + jan1.getDay() + 1) / 7);
|
|
137
|
+
const week = `${year}-W${String(weekNum).padStart(2, '0')}`;
|
|
138
|
+
weekCounts.set(week, (weekCounts.get(week) || 0) + 1);
|
|
139
|
+
}
|
|
140
|
+
return Array.from(weekCounts.entries())
|
|
141
|
+
.map(([week, commits]) => ({ week, commits }))
|
|
142
|
+
.sort((a, b) => a.week.localeCompare(b.week));
|
|
143
|
+
}
|
|
144
|
+
// ─── Vague commit examples (for detailed report) ──────────────────────────
|
|
145
|
+
const VAGUE_RE_EXPORT = /^(update|fix|change|wip|tmp|test|minor|misc|stuff|cleanup|tweaks?)$/i;
|
|
146
|
+
function gatherVagueCommitExamples(cwd, since, limit = 15) {
|
|
147
|
+
const messages = (0, runner_1.run)(`git log --format='%s' --no-merges --since='${since}' HEAD 2>/dev/null`, cwd, 30000);
|
|
148
|
+
if (!messages)
|
|
149
|
+
return [];
|
|
150
|
+
const vague = [];
|
|
151
|
+
for (const msg of messages.split('\n').filter((l) => l.trim())) {
|
|
152
|
+
const trimmed = msg.trim();
|
|
153
|
+
if (VAGUE_RE_EXPORT.test(trimmed) || trimmed.split(/\s+/).length <= 2) {
|
|
154
|
+
vague.push(trimmed);
|
|
155
|
+
if (vague.length >= limit)
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return vague;
|
|
160
|
+
}
|
|
161
|
+
// ─── Summary counts ─────────────────────────────────────────────────────────
|
|
162
|
+
function gatherSummary(cwd, since) {
|
|
163
|
+
const total = parseInt((0, runner_1.run)(`git rev-list --count --since='${since}' HEAD 2>/dev/null`, cwd) || '0');
|
|
164
|
+
const merges = parseInt((0, runner_1.run)(`git rev-list --count --merges --since='${since}' HEAD 2>/dev/null`, cwd) || '0');
|
|
165
|
+
return { totalCommits: total, mergeCommits: merges };
|
|
166
|
+
}
|
|
167
|
+
//# sourceMappingURL=gather.js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ACpB,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK;gBAAE,MAAM;QACnC,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+EAA+E;AAE/E,SAAgB,aAAa,CAC3B,GAAW,EACX,KAAa;IAEb,MAAM,KAAK,GAAG,QAAQ,CACpB,IAAA,YAAG,EAAC,iCAAiC,KAAK,oBAAoB,EAAE,GAAG,CAAC,IAAI,GAAG,CAC5E,CAAC;IACF,MAAM,MAAM,GAAG,QAAQ,CACrB,IAAA,YAAG,EAAC,0CAA0C,KAAK,oBAAoB,EAAE,GAAG,CAAC,IAAI,GAAG,CACrF,CAAC;IACF,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DevReport } from './types';
|
|
2
|
+
export type { DevReport, ContributorStats, HotFile, CommitQuality, WeeklyVelocity } from './types';
|
|
3
|
+
export interface AnalyzeDevActivityOptions {
|
|
4
|
+
verbose?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function analyzeDevActivity(repoPath: string, since?: string, options?: AnalyzeDevActivityOptions): DevReport;
|
|
7
|
+
export declare function formatDevReport(report: DevReport, elapsed: string): string;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/analyzers/developer/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,YAAY,EAAE,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAEnG,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,MAAM,EAChB,KAAK,CAAC,EAAE,MAAM,EACd,OAAO,GAAE,yBAA8B,GACtC,SAAS,CA0CX;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAyG1E"}
|