javi-forge 1.6.0 → 1.6.1
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/dist/commands/analyze.d.ts +1 -1
- package/dist/commands/analyze.js +15 -15
- package/dist/commands/atlassian-mcp.d.ts +42 -0
- package/dist/commands/atlassian-mcp.js +98 -0
- package/dist/commands/ci.d.ts +3 -3
- package/dist/commands/ci.js +185 -147
- package/dist/commands/crash-recovery.d.ts +34 -0
- package/dist/commands/crash-recovery.js +123 -0
- package/dist/commands/doctor.d.ts +2 -2
- package/dist/commands/doctor.js +113 -61
- package/dist/commands/harness-audit.d.ts +35 -0
- package/dist/commands/harness-audit.js +277 -0
- package/dist/commands/init.d.ts +1 -1
- package/dist/commands/init.js +384 -141
- package/dist/commands/llmstxt.d.ts +1 -1
- package/dist/commands/llmstxt.js +36 -34
- package/dist/commands/parallel-batch.d.ts +42 -0
- package/dist/commands/parallel-batch.js +90 -0
- package/dist/commands/plugin.d.ts +10 -1
- package/dist/commands/plugin.js +92 -47
- package/dist/commands/secret-scanner.d.ts +30 -0
- package/dist/commands/secret-scanner.js +272 -0
- package/dist/commands/security-analysis.d.ts +74 -0
- package/dist/commands/security-analysis.js +487 -0
- package/dist/commands/security.d.ts +11 -5
- package/dist/commands/security.js +216 -76
- package/dist/commands/skill-scanner.d.ts +63 -0
- package/dist/commands/skill-scanner.js +383 -0
- package/dist/commands/skills.d.ts +62 -5
- package/dist/commands/skills.js +439 -54
- package/dist/commands/supply-chain.d.ts +23 -0
- package/dist/commands/supply-chain.js +126 -0
- package/dist/commands/tdd-pipeline.d.ts +17 -0
- package/dist/commands/tdd-pipeline.js +144 -0
- package/dist/commands/tdd.d.ts +1 -1
- package/dist/commands/tdd.js +21 -18
- package/dist/commands/team-presets.d.ts +53 -0
- package/dist/commands/team-presets.js +201 -0
- package/dist/commands/workflow.d.ts +23 -0
- package/dist/commands/workflow.js +114 -0
- package/dist/constants.d.ts +15 -1
- package/dist/constants.js +161 -122
- package/dist/index.js +308 -98
- package/dist/lib/agent-skills.d.ts +36 -1
- package/dist/lib/agent-skills.js +168 -19
- package/dist/lib/auto-skill-install.d.ts +37 -0
- package/dist/lib/auto-skill-install.js +92 -0
- package/dist/lib/auto-wire.d.ts +20 -0
- package/dist/lib/auto-wire.js +240 -0
- package/dist/lib/claudemd.d.ts +13 -1
- package/dist/lib/claudemd.js +174 -24
- package/dist/lib/codex-export.d.ts +1 -1
- package/dist/lib/codex-export.js +29 -31
- package/dist/lib/common.d.ts +1 -1
- package/dist/lib/common.js +52 -44
- package/dist/lib/context.d.ts +17 -2
- package/dist/lib/context.js +142 -13
- package/dist/lib/docker.d.ts +1 -1
- package/dist/lib/docker.js +141 -112
- package/dist/lib/frontmatter.d.ts +1 -1
- package/dist/lib/frontmatter.js +29 -15
- package/dist/lib/plugin.d.ts +9 -3
- package/dist/lib/plugin.js +128 -69
- package/dist/lib/skill-publish.d.ts +40 -0
- package/dist/lib/skill-publish.js +146 -0
- package/dist/lib/stack-detector.d.ts +38 -0
- package/dist/lib/stack-detector.js +207 -0
- package/dist/lib/template.d.ts +16 -1
- package/dist/lib/template.js +46 -17
- package/dist/lib/workflow/discovery.d.ts +19 -0
- package/dist/lib/workflow/discovery.js +68 -0
- package/dist/lib/workflow/index.d.ts +5 -0
- package/dist/lib/workflow/index.js +5 -0
- package/dist/lib/workflow/parser.d.ts +16 -0
- package/dist/lib/workflow/parser.js +198 -0
- package/dist/lib/workflow/renderer.d.ts +9 -0
- package/dist/lib/workflow/renderer.js +152 -0
- package/dist/lib/workflow/validator.d.ts +10 -0
- package/dist/lib/workflow/validator.js +189 -0
- package/dist/tasks/index.d.ts +4 -0
- package/dist/tasks/index.js +4 -0
- package/dist/tasks/scaffold-tasks.d.ts +3 -0
- package/dist/tasks/scaffold-tasks.js +14 -0
- package/dist/tasks/task-id.d.ts +30 -0
- package/dist/tasks/task-id.js +55 -0
- package/dist/tasks/task-tracker.d.ts +15 -0
- package/dist/tasks/task-tracker.js +81 -0
- package/dist/types/index.d.ts +134 -6
- package/dist/types/index.js +11 -1
- package/dist/ui/AnalyzeUI.d.ts +1 -1
- package/dist/ui/AnalyzeUI.js +38 -39
- package/dist/ui/App.d.ts +5 -3
- package/dist/ui/App.js +86 -46
- package/dist/ui/AutoSkills.d.ts +9 -0
- package/dist/ui/AutoSkills.js +124 -0
- package/dist/ui/CI.d.ts +2 -2
- package/dist/ui/CI.js +24 -26
- package/dist/ui/CIContext.d.ts +1 -1
- package/dist/ui/CIContext.js +3 -2
- package/dist/ui/CISelector.d.ts +2 -2
- package/dist/ui/CISelector.js +23 -15
- package/dist/ui/Doctor.d.ts +1 -1
- package/dist/ui/Doctor.js +35 -29
- package/dist/ui/Header.d.ts +1 -1
- package/dist/ui/Header.js +14 -14
- package/dist/ui/HookProfileSelector.d.ts +9 -0
- package/dist/ui/HookProfileSelector.js +54 -0
- package/dist/ui/LlmsTxt.d.ts +1 -1
- package/dist/ui/LlmsTxt.js +31 -22
- package/dist/ui/MemorySelector.d.ts +2 -2
- package/dist/ui/MemorySelector.js +28 -16
- package/dist/ui/NameInput.d.ts +1 -1
- package/dist/ui/NameInput.js +21 -21
- package/dist/ui/OptionSelector.d.ts +6 -2
- package/dist/ui/OptionSelector.js +83 -32
- package/dist/ui/Plugin.d.ts +4 -3
- package/dist/ui/Plugin.js +78 -35
- package/dist/ui/Progress.d.ts +3 -3
- package/dist/ui/Progress.js +23 -22
- package/dist/ui/Skills.d.ts +2 -2
- package/dist/ui/Skills.js +61 -32
- package/dist/ui/StackSelector.d.ts +2 -2
- package/dist/ui/StackSelector.js +26 -16
- package/dist/ui/Summary.d.ts +3 -3
- package/dist/ui/Summary.js +60 -50
- package/dist/ui/Welcome.d.ts +1 -1
- package/dist/ui/Welcome.js +15 -16
- package/dist/ui/theme.d.ts +1 -1
- package/dist/ui/theme.js +6 -6
- package/package.json +9 -6
- package/templates/common/atlassian/mcp-atlassian-snippet.json +16 -0
- package/templates/common/repoforge/mcp-repoforge-snippet.json +11 -0
- package/templates/common/repoforge/repoforge.yaml +34 -0
- package/templates/github/deploy-docker-zero-downtime.yml +140 -0
- package/templates/github/repoforge-graph.yml +45 -0
- package/templates/gitlab/deploy-docker-zero-downtime.yml +57 -0
- package/templates/local-ai/.env.example +17 -0
- package/templates/local-ai/docker-compose.yml +95 -0
- package/templates/security-hooks/claude-settings-security.json +30 -0
- package/templates/security-hooks/commit-msg-signing +29 -0
- package/templates/security-hooks/pre-commit-permissions +74 -0
- package/templates/security-hooks/pre-commit-secrets +74 -0
- package/templates/security-hooks/pre-push-branch-protection +62 -0
- package/templates/security-hooks/pre-push-deps +83 -0
- package/templates/security-hooks/pre-push-signing +67 -0
- package/templates/woodpecker/deploy-docker-zero-downtime.yml +50 -0
- package/templates/workflows/ci-pipeline.dot +15 -0
- package/templates/workflows/feature-flow.dot +21 -0
- package/templates/workflows/release.dot +16 -0
- package/dist/__integration__/helpers.d.ts +0 -20
- package/dist/__integration__/helpers.d.ts.map +0 -1
- package/dist/__integration__/helpers.js +0 -31
- package/dist/__integration__/helpers.js.map +0 -1
- package/dist/commands/analyze.d.ts.map +0 -1
- package/dist/commands/analyze.js.map +0 -1
- package/dist/commands/ci.d.ts.map +0 -1
- package/dist/commands/ci.js.map +0 -1
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/llmstxt.d.ts.map +0 -1
- package/dist/commands/llmstxt.js.map +0 -1
- package/dist/commands/plugin.d.ts.map +0 -1
- package/dist/commands/plugin.js.map +0 -1
- package/dist/commands/security.d.ts.map +0 -1
- package/dist/commands/security.js.map +0 -1
- package/dist/commands/skills.d.ts.map +0 -1
- package/dist/commands/skills.js.map +0 -1
- package/dist/commands/tdd.d.ts.map +0 -1
- package/dist/commands/tdd.js.map +0 -1
- package/dist/constants.d.ts.map +0 -1
- package/dist/constants.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/agent-skills.d.ts.map +0 -1
- package/dist/lib/agent-skills.js.map +0 -1
- package/dist/lib/claudemd.d.ts.map +0 -1
- package/dist/lib/claudemd.js.map +0 -1
- package/dist/lib/codex-export.d.ts.map +0 -1
- package/dist/lib/codex-export.js.map +0 -1
- package/dist/lib/common.d.ts.map +0 -1
- package/dist/lib/common.js.map +0 -1
- package/dist/lib/context.d.ts.map +0 -1
- package/dist/lib/context.js.map +0 -1
- package/dist/lib/docker.d.ts.map +0 -1
- package/dist/lib/docker.js.map +0 -1
- package/dist/lib/frontmatter.d.ts.map +0 -1
- package/dist/lib/frontmatter.js.map +0 -1
- package/dist/lib/plugin.d.ts.map +0 -1
- package/dist/lib/plugin.js.map +0 -1
- package/dist/lib/template.d.ts.map +0 -1
- package/dist/lib/template.js.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js.map +0 -1
- package/dist/ui/AnalyzeUI.d.ts.map +0 -1
- package/dist/ui/AnalyzeUI.js.map +0 -1
- package/dist/ui/App.d.ts.map +0 -1
- package/dist/ui/App.js.map +0 -1
- package/dist/ui/CI.d.ts.map +0 -1
- package/dist/ui/CI.js.map +0 -1
- package/dist/ui/CIContext.d.ts.map +0 -1
- package/dist/ui/CIContext.js.map +0 -1
- package/dist/ui/CISelector.d.ts.map +0 -1
- package/dist/ui/CISelector.js.map +0 -1
- package/dist/ui/Doctor.d.ts.map +0 -1
- package/dist/ui/Doctor.js.map +0 -1
- package/dist/ui/Header.d.ts.map +0 -1
- package/dist/ui/Header.js.map +0 -1
- package/dist/ui/LlmsTxt.d.ts.map +0 -1
- package/dist/ui/LlmsTxt.js.map +0 -1
- package/dist/ui/MemorySelector.d.ts.map +0 -1
- package/dist/ui/MemorySelector.js.map +0 -1
- package/dist/ui/NameInput.d.ts.map +0 -1
- package/dist/ui/NameInput.js.map +0 -1
- package/dist/ui/OptionSelector.d.ts.map +0 -1
- package/dist/ui/OptionSelector.js.map +0 -1
- package/dist/ui/Plugin.d.ts.map +0 -1
- package/dist/ui/Plugin.js.map +0 -1
- package/dist/ui/Progress.d.ts.map +0 -1
- package/dist/ui/Progress.js.map +0 -1
- package/dist/ui/Skills.d.ts.map +0 -1
- package/dist/ui/Skills.js.map +0 -1
- package/dist/ui/StackSelector.d.ts.map +0 -1
- package/dist/ui/StackSelector.js.map +0 -1
- package/dist/ui/Summary.d.ts.map +0 -1
- package/dist/ui/Summary.js.map +0 -1
- package/dist/ui/Welcome.d.ts.map +0 -1
- package/dist/ui/Welcome.js.map +0 -1
- package/dist/ui/theme.d.ts.map +0 -1
- package/dist/ui/theme.js.map +0 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import fs from "fs-extra";
|
|
2
|
+
import { discoverWorkflows, getAvailableChecks, listBuiltinTemplates, loadBuiltinTemplate, parseDot, parseMermaid, renderAscii, validateWorkflow, } from "../lib/workflow/index.js";
|
|
3
|
+
function report(onStep, id, label, status, detail) {
|
|
4
|
+
onStep({ id, label, status, detail });
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Resolve a workflow graph from either a file path or a built-in template name.
|
|
8
|
+
*/
|
|
9
|
+
async function resolveGraph(target, projectDir, template, onStep) {
|
|
10
|
+
// Option 1: Built-in template
|
|
11
|
+
if (template) {
|
|
12
|
+
report(onStep, "resolve", `Loading template: ${template}`, "running");
|
|
13
|
+
const tpl = await loadBuiltinTemplate(template);
|
|
14
|
+
if (!tpl) {
|
|
15
|
+
report(onStep, "resolve", `Loading template: ${template}`, "error", `Template "${template}" not found`);
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
const parser = tpl.format === "dot" ? parseDot : parseMermaid;
|
|
19
|
+
const graph = parser(tpl.content, template);
|
|
20
|
+
report(onStep, "resolve", `Loading template: ${template}`, "done", `${graph.nodes.length} nodes, ${graph.edges.length} edges`);
|
|
21
|
+
return graph;
|
|
22
|
+
}
|
|
23
|
+
// Option 2: Explicit file path
|
|
24
|
+
if (target) {
|
|
25
|
+
report(onStep, "resolve", `Loading workflow: ${target}`, "running");
|
|
26
|
+
if (!(await fs.pathExists(target))) {
|
|
27
|
+
report(onStep, "resolve", `Loading workflow: ${target}`, "error", "File not found");
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const content = await fs.readFile(target, "utf-8");
|
|
31
|
+
const isDot = target.endsWith(".dot");
|
|
32
|
+
const parser = isDot ? parseDot : parseMermaid;
|
|
33
|
+
const name = target
|
|
34
|
+
.split("/")
|
|
35
|
+
.pop()
|
|
36
|
+
?.replace(/\.\w+$/, "") ?? "workflow";
|
|
37
|
+
const graph = parser(content, name);
|
|
38
|
+
report(onStep, "resolve", `Loading workflow: ${target}`, "done", `${graph.nodes.length} nodes, ${graph.edges.length} edges`);
|
|
39
|
+
return graph;
|
|
40
|
+
}
|
|
41
|
+
// Option 3: Auto-discover first workflow in project
|
|
42
|
+
report(onStep, "resolve", "Discovering workflows", "running");
|
|
43
|
+
const discovered = await discoverWorkflows(projectDir);
|
|
44
|
+
if (discovered.length === 0) {
|
|
45
|
+
report(onStep, "resolve", "Discovering workflows", "error", "No workflows found in .javi-forge/workflows/");
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
const first = discovered[0];
|
|
49
|
+
const content = await fs.readFile(first.path, "utf-8");
|
|
50
|
+
const parser = first.format === "dot" ? parseDot : parseMermaid;
|
|
51
|
+
const graph = parser(content, first.name);
|
|
52
|
+
report(onStep, "resolve", "Discovering workflows", "done", `Using ${first.name} (${graph.nodes.length} nodes)`);
|
|
53
|
+
return graph;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Show a workflow graph as ASCII art.
|
|
57
|
+
*/
|
|
58
|
+
export async function runWorkflowShow(projectDir, onStep, options = {}) {
|
|
59
|
+
const graph = await resolveGraph(options.target, projectDir, options.template, onStep);
|
|
60
|
+
if (!graph)
|
|
61
|
+
return null;
|
|
62
|
+
report(onStep, "render", "Rendering graph", "running");
|
|
63
|
+
const ascii = renderAscii(graph);
|
|
64
|
+
report(onStep, "render", "Rendering graph", "done");
|
|
65
|
+
return ascii;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Validate a project against a workflow graph.
|
|
69
|
+
*/
|
|
70
|
+
export async function runWorkflowValidate(projectDir, onStep, options = {}) {
|
|
71
|
+
const graph = await resolveGraph(options.target, projectDir, options.template, onStep);
|
|
72
|
+
if (!graph)
|
|
73
|
+
return null;
|
|
74
|
+
report(onStep, "validate", "Validating workflow", "running");
|
|
75
|
+
const results = await validateWorkflow(graph, projectDir);
|
|
76
|
+
report(onStep, "validate", "Validating workflow", "done");
|
|
77
|
+
const ascii = renderAscii(graph, results);
|
|
78
|
+
return ascii;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* List available workflows (project + built-in templates).
|
|
82
|
+
*/
|
|
83
|
+
export async function runWorkflowList(projectDir, onStep) {
|
|
84
|
+
report(onStep, "list", "Listing workflows", "running");
|
|
85
|
+
const project = await discoverWorkflows(projectDir);
|
|
86
|
+
const builtin = await listBuiltinTemplates();
|
|
87
|
+
const checks = getAvailableChecks();
|
|
88
|
+
const lines = [];
|
|
89
|
+
if (project.length > 0) {
|
|
90
|
+
lines.push("Project workflows (.javi-forge/workflows/):");
|
|
91
|
+
for (const w of project) {
|
|
92
|
+
lines.push(` - ${w.name} (${w.format})`);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
lines.push("No project workflows found.");
|
|
97
|
+
lines.push(" Create .javi-forge/workflows/*.dot or *.mermaid");
|
|
98
|
+
}
|
|
99
|
+
lines.push("");
|
|
100
|
+
if (builtin.length > 0) {
|
|
101
|
+
lines.push("Built-in templates (use --template <name>):");
|
|
102
|
+
for (const t of builtin) {
|
|
103
|
+
lines.push(` - ${t.name} (${t.format})`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
lines.push("");
|
|
107
|
+
lines.push("Available validation checks:");
|
|
108
|
+
for (const c of checks) {
|
|
109
|
+
lines.push(` - ${c}`);
|
|
110
|
+
}
|
|
111
|
+
report(onStep, "list", "Listing workflows", "done");
|
|
112
|
+
return lines.join("\n");
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=workflow.js.map
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { HookProfile, StackClaudeMdEntry, StackContextEntry } from "./types/index.js";
|
|
2
2
|
/** Root of the javi-forge package (one level up from dist/) */
|
|
3
3
|
export declare const FORGE_ROOT: string;
|
|
4
4
|
/** Templates directory */
|
|
@@ -9,6 +9,10 @@ export declare const MODULES_DIR: string;
|
|
|
9
9
|
export declare const WORKFLOWS_DIR: string;
|
|
10
10
|
/** CI-local directory */
|
|
11
11
|
export declare const CI_LOCAL_DIR: string;
|
|
12
|
+
/** Security hooks template directory */
|
|
13
|
+
export declare const SECURITY_HOOKS_DIR: string;
|
|
14
|
+
/** Local AI stack template directory */
|
|
15
|
+
export declare const LOCAL_AI_TEMPLATE_DIR: string;
|
|
12
16
|
/** Dependabot fragment directory */
|
|
13
17
|
export declare const DEPENDABOT_FRAGMENTS_DIR: string;
|
|
14
18
|
/** Plugins directory (installed plugins) */
|
|
@@ -27,6 +31,16 @@ export declare const STACK_DEPENDABOT_MAP: Record<string, string[]>;
|
|
|
27
31
|
export declare const STACK_CLAUDEMD_MAP: Record<string, StackClaudeMdEntry>;
|
|
28
32
|
/** Stack-to-context template mapping */
|
|
29
33
|
export declare const STACK_CONTEXT_MAP: Record<string, StackContextEntry>;
|
|
34
|
+
/** Deploy template filename mapping (per CI provider) */
|
|
35
|
+
export declare const DEPLOY_TEMPLATE_MAP: Record<string, string>;
|
|
36
|
+
/** Deploy destination path mapping (per CI provider) */
|
|
37
|
+
export declare const DEPLOY_DESTINATION_MAP: Record<string, string>;
|
|
38
|
+
/** Hook reliability profile definitions */
|
|
39
|
+
export declare const HOOK_PROFILES: Record<HookProfile, {
|
|
40
|
+
label: string;
|
|
41
|
+
description: string;
|
|
42
|
+
hooks: string[];
|
|
43
|
+
}>;
|
|
30
44
|
/** Stack-to-CI template filename mapping */
|
|
31
45
|
export declare const STACK_CI_MAP: Record<string, Record<string, string>>;
|
|
32
46
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
|
@@ -1,193 +1,232 @@
|
|
|
1
|
-
import path from
|
|
2
|
-
import { fileURLToPath } from
|
|
1
|
+
import path from "path";
|
|
2
|
+
import { fileURLToPath } from "url";
|
|
3
3
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
4
4
|
/** Root of the javi-forge package (one level up from dist/) */
|
|
5
|
-
export const FORGE_ROOT = path.resolve(__dirname,
|
|
5
|
+
export const FORGE_ROOT = path.resolve(__dirname, "..");
|
|
6
6
|
/** Templates directory */
|
|
7
|
-
export const TEMPLATES_DIR = path.join(FORGE_ROOT,
|
|
7
|
+
export const TEMPLATES_DIR = path.join(FORGE_ROOT, "templates");
|
|
8
8
|
/** Modules directory */
|
|
9
|
-
export const MODULES_DIR = path.join(FORGE_ROOT,
|
|
9
|
+
export const MODULES_DIR = path.join(FORGE_ROOT, "modules");
|
|
10
10
|
/** Workflows directory */
|
|
11
|
-
export const WORKFLOWS_DIR = path.join(FORGE_ROOT,
|
|
11
|
+
export const WORKFLOWS_DIR = path.join(FORGE_ROOT, "workflows");
|
|
12
12
|
/** CI-local directory */
|
|
13
|
-
export const CI_LOCAL_DIR = path.join(FORGE_ROOT,
|
|
13
|
+
export const CI_LOCAL_DIR = path.join(FORGE_ROOT, "ci-local");
|
|
14
|
+
/** Security hooks template directory */
|
|
15
|
+
export const SECURITY_HOOKS_DIR = path.join(TEMPLATES_DIR, "security-hooks");
|
|
16
|
+
/** Local AI stack template directory */
|
|
17
|
+
export const LOCAL_AI_TEMPLATE_DIR = path.join(TEMPLATES_DIR, "local-ai");
|
|
14
18
|
/** Dependabot fragment directory */
|
|
15
|
-
export const DEPENDABOT_FRAGMENTS_DIR = path.join(TEMPLATES_DIR,
|
|
19
|
+
export const DEPENDABOT_FRAGMENTS_DIR = path.join(TEMPLATES_DIR, "common", "dependabot");
|
|
16
20
|
/** Plugins directory (installed plugins) */
|
|
17
|
-
export const PLUGINS_DIR = path.join(FORGE_ROOT,
|
|
21
|
+
export const PLUGINS_DIR = path.join(FORGE_ROOT, "plugins");
|
|
18
22
|
/** Plugin registry URL */
|
|
19
|
-
export const PLUGIN_REGISTRY_URL =
|
|
23
|
+
export const PLUGIN_REGISTRY_URL = "https://raw.githubusercontent.com/JNZader/javi-forge-registry/main/registry.json";
|
|
20
24
|
/** Plugin manifest filename */
|
|
21
|
-
export const PLUGIN_MANIFEST_FILE =
|
|
25
|
+
export const PLUGIN_MANIFEST_FILE = "plugin.json";
|
|
22
26
|
/** Valid plugin asset directories */
|
|
23
|
-
export const PLUGIN_ASSET_DIRS = [
|
|
27
|
+
export const PLUGIN_ASSET_DIRS = [
|
|
28
|
+
"skills",
|
|
29
|
+
"commands",
|
|
30
|
+
"hooks",
|
|
31
|
+
"agents",
|
|
32
|
+
];
|
|
24
33
|
/** Agent Skills spec manifest filename */
|
|
25
|
-
export const AGENT_SKILLS_MANIFEST_FILE =
|
|
34
|
+
export const AGENT_SKILLS_MANIFEST_FILE = "skills.json";
|
|
26
35
|
/** Stack-to-dependabot fragment mapping */
|
|
27
36
|
export const STACK_DEPENDABOT_MAP = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
node: ["npm"],
|
|
38
|
+
python: ["pip"],
|
|
39
|
+
go: ["gomod"],
|
|
40
|
+
rust: ["cargo"],
|
|
41
|
+
"java-gradle": ["gradle"],
|
|
42
|
+
"java-maven": ["maven"],
|
|
43
|
+
elixir: [],
|
|
35
44
|
};
|
|
36
45
|
/** Stack-to-CLAUDE.md metadata mapping */
|
|
37
46
|
export const STACK_CLAUDEMD_MAP = {
|
|
38
47
|
node: {
|
|
39
|
-
skills: [
|
|
40
|
-
conventions:
|
|
41
|
-
testFramework:
|
|
48
|
+
skills: ["typescript", "react-19", "tailwind-4"],
|
|
49
|
+
conventions: "TypeScript strict, ESM modules, functional components",
|
|
50
|
+
testFramework: "vitest",
|
|
42
51
|
},
|
|
43
52
|
python: {
|
|
44
|
-
skills: [
|
|
45
|
-
conventions:
|
|
46
|
-
testFramework:
|
|
53
|
+
skills: ["pytest", "django-drf"],
|
|
54
|
+
conventions: "PEP 8, type hints, ruff linting",
|
|
55
|
+
testFramework: "pytest",
|
|
47
56
|
},
|
|
48
57
|
go: {
|
|
49
58
|
skills: [],
|
|
50
|
-
conventions:
|
|
51
|
-
testFramework:
|
|
59
|
+
conventions: "gofmt, golangci-lint, table-driven tests",
|
|
60
|
+
testFramework: "go test",
|
|
52
61
|
},
|
|
53
62
|
rust: {
|
|
54
63
|
skills: [],
|
|
55
|
-
conventions:
|
|
56
|
-
testFramework:
|
|
64
|
+
conventions: "cargo fmt, clippy, edition 2021+",
|
|
65
|
+
testFramework: "cargo test",
|
|
57
66
|
},
|
|
58
|
-
|
|
67
|
+
"java-gradle": {
|
|
59
68
|
skills: [],
|
|
60
|
-
conventions:
|
|
61
|
-
testFramework:
|
|
69
|
+
conventions: "Gradle Kotlin DSL, JUnit 5, Checkstyle",
|
|
70
|
+
testFramework: "JUnit 5",
|
|
62
71
|
},
|
|
63
|
-
|
|
72
|
+
"java-maven": {
|
|
64
73
|
skills: [],
|
|
65
|
-
conventions:
|
|
66
|
-
testFramework:
|
|
74
|
+
conventions: "Maven standard layout, JUnit 5, Checkstyle",
|
|
75
|
+
testFramework: "JUnit 5",
|
|
67
76
|
},
|
|
68
77
|
elixir: {
|
|
69
78
|
skills: [],
|
|
70
|
-
conventions:
|
|
71
|
-
testFramework:
|
|
79
|
+
conventions: "mix format, Credo, OTP conventions",
|
|
80
|
+
testFramework: "ExUnit",
|
|
72
81
|
},
|
|
73
82
|
default: {
|
|
74
83
|
skills: [],
|
|
75
|
-
conventions:
|
|
76
|
-
testFramework:
|
|
84
|
+
conventions: "Follow language-specific best practices",
|
|
85
|
+
testFramework: "project default",
|
|
77
86
|
},
|
|
78
87
|
};
|
|
79
88
|
/** Stack-to-context template mapping */
|
|
80
89
|
export const STACK_CONTEXT_MAP = {
|
|
81
90
|
node: {
|
|
82
91
|
tree: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
].join(
|
|
89
|
-
conventions:
|
|
90
|
-
entryPoint:
|
|
92
|
+
"src/ — source code",
|
|
93
|
+
" index.ts — entry point",
|
|
94
|
+
"tests/ — test suites",
|
|
95
|
+
"package.json — dependencies & scripts",
|
|
96
|
+
"tsconfig.json — TypeScript config",
|
|
97
|
+
].join("\n"),
|
|
98
|
+
conventions: "TypeScript strict, ESM modules, vitest for testing",
|
|
99
|
+
entryPoint: "src/index.ts",
|
|
91
100
|
},
|
|
92
101
|
python: {
|
|
93
102
|
tree: [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
].join(
|
|
99
|
-
conventions:
|
|
100
|
-
entryPoint:
|
|
103
|
+
"src/ — source packages",
|
|
104
|
+
" __init__.py — package root",
|
|
105
|
+
"tests/ — pytest suites",
|
|
106
|
+
"pyproject.toml — project config",
|
|
107
|
+
].join("\n"),
|
|
108
|
+
conventions: "PEP 8, type hints, pytest, ruff for linting",
|
|
109
|
+
entryPoint: "src/__init__.py",
|
|
101
110
|
},
|
|
102
111
|
go: {
|
|
103
112
|
tree: [
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
].join(
|
|
110
|
-
conventions:
|
|
111
|
-
entryPoint:
|
|
113
|
+
"cmd/ — CLI entry points",
|
|
114
|
+
"internal/ — private packages",
|
|
115
|
+
"pkg/ — public packages",
|
|
116
|
+
"go.mod — module definition",
|
|
117
|
+
"go.sum — dependency checksums",
|
|
118
|
+
].join("\n"),
|
|
119
|
+
conventions: "gofmt, golangci-lint, table-driven tests",
|
|
120
|
+
entryPoint: "cmd/main.go",
|
|
112
121
|
},
|
|
113
122
|
rust: {
|
|
114
123
|
tree: [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
].join(
|
|
121
|
-
conventions:
|
|
122
|
-
entryPoint:
|
|
123
|
-
},
|
|
124
|
-
|
|
124
|
+
"src/ — source code",
|
|
125
|
+
" main.rs — entry point",
|
|
126
|
+
" lib.rs — library root",
|
|
127
|
+
"tests/ — integration tests",
|
|
128
|
+
"Cargo.toml — manifest & dependencies",
|
|
129
|
+
].join("\n"),
|
|
130
|
+
conventions: "cargo fmt, clippy lints, edition 2021+",
|
|
131
|
+
entryPoint: "src/main.rs",
|
|
132
|
+
},
|
|
133
|
+
"java-gradle": {
|
|
125
134
|
tree: [
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
].join(
|
|
132
|
-
conventions:
|
|
133
|
-
entryPoint:
|
|
134
|
-
},
|
|
135
|
-
|
|
135
|
+
"src/main/java/ — application source",
|
|
136
|
+
"src/test/java/ — test source",
|
|
137
|
+
"src/main/resources/ — config & assets",
|
|
138
|
+
"build.gradle.kts — Gradle build script",
|
|
139
|
+
"settings.gradle.kts — project settings",
|
|
140
|
+
].join("\n"),
|
|
141
|
+
conventions: "Gradle Kotlin DSL, JUnit 5, Checkstyle",
|
|
142
|
+
entryPoint: "src/main/java/Main.java",
|
|
143
|
+
},
|
|
144
|
+
"java-maven": {
|
|
136
145
|
tree: [
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
].join(
|
|
142
|
-
conventions:
|
|
143
|
-
entryPoint:
|
|
146
|
+
"src/main/java/ — application source",
|
|
147
|
+
"src/test/java/ — test source",
|
|
148
|
+
"src/main/resources/ — config & assets",
|
|
149
|
+
"pom.xml — Maven POM",
|
|
150
|
+
].join("\n"),
|
|
151
|
+
conventions: "Maven standard layout, JUnit 5, Checkstyle",
|
|
152
|
+
entryPoint: "src/main/java/Main.java",
|
|
144
153
|
},
|
|
145
154
|
elixir: {
|
|
146
155
|
tree: [
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
].join(
|
|
153
|
-
conventions:
|
|
154
|
-
entryPoint:
|
|
156
|
+
"lib/ — application source",
|
|
157
|
+
" application.ex — OTP application",
|
|
158
|
+
"test/ — ExUnit tests",
|
|
159
|
+
"config/ — runtime config",
|
|
160
|
+
"mix.exs — project definition",
|
|
161
|
+
].join("\n"),
|
|
162
|
+
conventions: "mix format, Credo, ExUnit, OTP conventions",
|
|
163
|
+
entryPoint: "lib/application.ex",
|
|
155
164
|
},
|
|
156
165
|
default: {
|
|
157
166
|
tree: [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
].join(
|
|
162
|
-
conventions:
|
|
163
|
-
entryPoint:
|
|
167
|
+
"src/ — source code",
|
|
168
|
+
"tests/ — test suites",
|
|
169
|
+
"README.md — project documentation",
|
|
170
|
+
].join("\n"),
|
|
171
|
+
conventions: "Follow language-specific best practices",
|
|
172
|
+
entryPoint: "src/index",
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
/** Deploy template filename mapping (per CI provider) */
|
|
176
|
+
export const DEPLOY_TEMPLATE_MAP = {
|
|
177
|
+
github: "deploy-docker-zero-downtime.yml",
|
|
178
|
+
gitlab: "deploy-docker-zero-downtime.yml",
|
|
179
|
+
woodpecker: "deploy-docker-zero-downtime.yml",
|
|
180
|
+
};
|
|
181
|
+
/** Deploy destination path mapping (per CI provider) */
|
|
182
|
+
export const DEPLOY_DESTINATION_MAP = {
|
|
183
|
+
github: ".github/workflows/deploy.yml",
|
|
184
|
+
gitlab: ".gitlab-ci-deploy.yml",
|
|
185
|
+
woodpecker: ".woodpecker/deploy.yml",
|
|
186
|
+
};
|
|
187
|
+
/** Hook reliability profile definitions */
|
|
188
|
+
export const HOOK_PROFILES = {
|
|
189
|
+
minimal: {
|
|
190
|
+
label: "Minimal",
|
|
191
|
+
description: "pre-commit only: lint + format check",
|
|
192
|
+
hooks: ["pre-commit"],
|
|
193
|
+
},
|
|
194
|
+
standard: {
|
|
195
|
+
label: "Standard",
|
|
196
|
+
description: "pre-commit + pre-push + CI gate check",
|
|
197
|
+
hooks: ["pre-commit", "pre-push", "ci-gate"],
|
|
198
|
+
},
|
|
199
|
+
strict: {
|
|
200
|
+
label: "Strict",
|
|
201
|
+
description: "all standard + commit-msg validation + security scan on every push",
|
|
202
|
+
hooks: ["pre-commit", "pre-push", "ci-gate", "commit-msg", "security-scan"],
|
|
164
203
|
},
|
|
165
204
|
};
|
|
166
205
|
/** Stack-to-CI template filename mapping */
|
|
167
206
|
export const STACK_CI_MAP = {
|
|
168
207
|
github: {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
208
|
+
node: "ci-node.yml",
|
|
209
|
+
python: "ci-python.yml",
|
|
210
|
+
go: "ci-go.yml",
|
|
211
|
+
rust: "ci-rust.yml",
|
|
212
|
+
"java-gradle": "ci-java.yml",
|
|
213
|
+
"java-maven": "ci-java.yml",
|
|
175
214
|
},
|
|
176
215
|
gitlab: {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
216
|
+
node: "gitlab-ci-node.yml",
|
|
217
|
+
python: "gitlab-ci-python.yml",
|
|
218
|
+
go: "gitlab-ci-go.yml",
|
|
219
|
+
rust: "gitlab-ci-rust.yml",
|
|
220
|
+
"java-gradle": "gitlab-ci-java.yml",
|
|
221
|
+
"java-maven": "gitlab-ci-java.yml",
|
|
183
222
|
},
|
|
184
223
|
woodpecker: {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
224
|
+
node: "woodpecker-node.yml",
|
|
225
|
+
python: "woodpecker-python.yml",
|
|
226
|
+
go: "woodpecker-go.yml",
|
|
227
|
+
rust: "woodpecker-rust.yml",
|
|
228
|
+
"java-gradle": "woodpecker-java.yml",
|
|
229
|
+
"java-maven": "woodpecker-java.yml",
|
|
191
230
|
},
|
|
192
231
|
};
|
|
193
232
|
//# sourceMappingURL=constants.js.map
|