antigravity-ai-kit 2.1.0 → 3.0.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/.agent/README.md +4 -4
- package/.agent/agents/README.md +16 -12
- package/.agent/agents/architect.md +1 -0
- package/.agent/agents/backend-specialist.md +11 -0
- package/.agent/agents/code-reviewer.md +1 -0
- package/.agent/agents/database-architect.md +11 -0
- package/.agent/agents/devops-engineer.md +11 -0
- package/.agent/agents/e2e-runner.md +1 -0
- package/.agent/agents/explorer-agent.md +11 -0
- package/.agent/agents/frontend-specialist.md +11 -0
- package/.agent/agents/mobile-developer.md +11 -0
- package/.agent/agents/performance-optimizer.md +11 -0
- package/.agent/agents/planner.md +1 -0
- package/.agent/agents/refactor-cleaner.md +1 -0
- package/.agent/agents/reliability-engineer.md +11 -0
- package/.agent/agents/security-reviewer.md +1 -0
- package/.agent/agents/sprint-orchestrator.md +10 -0
- package/.agent/agents/tdd-guide.md +1 -0
- package/.agent/commands/code-review.md +1 -0
- package/.agent/commands/debug.md +1 -0
- package/.agent/commands/deploy.md +1 -0
- package/.agent/commands/help.md +252 -31
- package/.agent/commands/plan.md +1 -0
- package/.agent/commands/status.md +1 -0
- package/.agent/commands/tdd.md +1 -0
- package/.agent/contexts/brainstorm.md +26 -0
- package/.agent/contexts/debug.md +28 -0
- package/.agent/contexts/implement.md +29 -0
- package/.agent/contexts/review.md +27 -0
- package/.agent/contexts/ship.md +28 -0
- package/.agent/engine/identity.json +13 -0
- package/.agent/engine/loading-rules.json +23 -1
- package/.agent/engine/marketplace-index.json +29 -0
- package/.agent/engine/reliability-config.json +14 -0
- package/.agent/engine/sdlc-map.json +44 -0
- package/.agent/engine/workflow-state.json +28 -2
- package/.agent/hooks/hooks.json +27 -25
- package/.agent/manifest.json +12 -4
- package/.agent/rules.md +2 -1
- package/.agent/skills/README.md +10 -5
- package/.agent/skills/i18n-localization/SKILL.md +191 -0
- package/.agent/skills/mcp-integration/SKILL.md +224 -0
- package/.agent/skills/parallel-agents/SKILL.md +1 -1
- package/.agent/skills/shell-conventions/SKILL.md +92 -0
- package/.agent/skills/ui-ux-pro-max/SKILL.md +557 -0
- package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
- package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
- package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.agent/skills/ui-ux-pro-max/scripts/search.py +114 -0
- package/.agent/templates/adr-template.md +32 -0
- package/.agent/templates/bug-report.md +37 -0
- package/.agent/templates/feature-request.md +32 -0
- package/.agent/workflows/README.md +92 -78
- package/.agent/workflows/brainstorm.md +154 -100
- package/.agent/workflows/create.md +142 -75
- package/.agent/workflows/debug.md +157 -98
- package/.agent/workflows/deploy.md +195 -144
- package/.agent/workflows/enhance.md +157 -65
- package/.agent/workflows/orchestrate.md +171 -114
- package/.agent/workflows/plan.md +147 -72
- package/.agent/workflows/preview.md +140 -83
- package/.agent/workflows/quality-gate.md +196 -0
- package/.agent/workflows/retrospective.md +197 -0
- package/.agent/workflows/review.md +188 -0
- package/.agent/workflows/status.md +142 -91
- package/.agent/workflows/test.md +168 -95
- package/.agent/workflows/ui-ux-pro-max.md +181 -127
- package/README.md +215 -78
- package/bin/ag-kit.js +344 -10
- package/lib/agent-registry.js +214 -0
- package/lib/agent-reputation.js +351 -0
- package/lib/cli-commands.js +235 -0
- package/lib/conflict-detector.js +245 -0
- package/lib/engineering-manager.js +354 -0
- package/lib/error-budget.js +294 -0
- package/lib/hook-system.js +252 -0
- package/lib/identity.js +245 -0
- package/lib/loading-engine.js +208 -0
- package/lib/marketplace.js +298 -0
- package/lib/plugin-system.js +604 -0
- package/lib/security-scanner.js +309 -0
- package/lib/self-healing.js +434 -0
- package/lib/session-manager.js +261 -0
- package/lib/skill-sandbox.js +244 -0
- package/lib/task-governance.js +523 -0
- package/lib/task-model.js +317 -0
- package/lib/updater.js +201 -0
- package/lib/verify.js +240 -0
- package/lib/workflow-engine.js +353 -0
- package/lib/workflow-persistence.js +160 -0
- package/package.json +7 -3
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Antigravity AI Kit — Workflow Persistence
|
|
3
|
+
*
|
|
4
|
+
* Extends the workflow engine with checkpoint/resume capability.
|
|
5
|
+
* Workflow state survives across agent sessions via JSON file snapshots.
|
|
6
|
+
*
|
|
7
|
+
* @module lib/workflow-persistence
|
|
8
|
+
* @author Emre Dursun
|
|
9
|
+
* @since v3.0.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
'use strict';
|
|
13
|
+
|
|
14
|
+
const fs = require('fs');
|
|
15
|
+
const path = require('path');
|
|
16
|
+
const crypto = require('crypto');
|
|
17
|
+
const workflowEngine = require('./workflow-engine');
|
|
18
|
+
|
|
19
|
+
const AGENT_DIR = '.agent';
|
|
20
|
+
const ENGINE_DIR = 'engine';
|
|
21
|
+
const CHECKPOINTS_DIR = 'checkpoints';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Resolves the checkpoints directory path.
|
|
25
|
+
*
|
|
26
|
+
* @param {string} projectRoot - Root directory of the project
|
|
27
|
+
* @returns {string} Absolute path to checkpoints directory
|
|
28
|
+
*/
|
|
29
|
+
function resolveCheckpointsDir(projectRoot) {
|
|
30
|
+
return path.join(projectRoot, AGENT_DIR, ENGINE_DIR, CHECKPOINTS_DIR);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Creates a checkpoint of the current workflow state.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} projectRoot - Root directory of the project
|
|
37
|
+
* @param {string} [label] - Optional human-readable label
|
|
38
|
+
* @returns {{ checkpointId: string, filePath: string, timestamp: string }}
|
|
39
|
+
*/
|
|
40
|
+
function createCheckpoint(projectRoot, label) {
|
|
41
|
+
const { state } = workflowEngine.loadWorkflowState(projectRoot);
|
|
42
|
+
const checkpointsDir = resolveCheckpointsDir(projectRoot);
|
|
43
|
+
|
|
44
|
+
if (!fs.existsSync(checkpointsDir)) {
|
|
45
|
+
fs.mkdirSync(checkpointsDir, { recursive: true });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const timestamp = new Date().toISOString();
|
|
49
|
+
const checkpointId = crypto.randomUUID().slice(0, 8);
|
|
50
|
+
|
|
51
|
+
const checkpoint = {
|
|
52
|
+
id: checkpointId,
|
|
53
|
+
label: label || `Checkpoint at ${state.currentPhase}`,
|
|
54
|
+
timestamp,
|
|
55
|
+
phase: state.currentPhase,
|
|
56
|
+
state: JSON.parse(JSON.stringify(state)),
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const filePath = path.join(checkpointsDir, `${checkpointId}.json`);
|
|
60
|
+
fs.writeFileSync(filePath, JSON.stringify(checkpoint, null, 2) + '\n', 'utf-8');
|
|
61
|
+
|
|
62
|
+
return { checkpointId, filePath, timestamp };
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Lists all available checkpoints, sorted by timestamp (newest first).
|
|
67
|
+
*
|
|
68
|
+
* @param {string} projectRoot - Root directory of the project
|
|
69
|
+
* @returns {Array<{ id: string, label: string, phase: string, timestamp: string }>}
|
|
70
|
+
*/
|
|
71
|
+
function listCheckpoints(projectRoot) {
|
|
72
|
+
const checkpointsDir = resolveCheckpointsDir(projectRoot);
|
|
73
|
+
|
|
74
|
+
if (!fs.existsSync(checkpointsDir)) {
|
|
75
|
+
return [];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const files = fs.readdirSync(checkpointsDir).filter((f) => f.endsWith('.json'));
|
|
79
|
+
|
|
80
|
+
return files
|
|
81
|
+
.map((file) => {
|
|
82
|
+
try {
|
|
83
|
+
const data = JSON.parse(fs.readFileSync(path.join(checkpointsDir, file), 'utf-8'));
|
|
84
|
+
return { id: data.id, label: data.label, phase: data.phase, timestamp: data.timestamp };
|
|
85
|
+
} catch {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
})
|
|
89
|
+
.filter(Boolean)
|
|
90
|
+
.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Restores workflow state from a checkpoint.
|
|
95
|
+
*
|
|
96
|
+
* @param {string} projectRoot - Root directory of the project
|
|
97
|
+
* @param {string} checkpointId - ID of the checkpoint to restore
|
|
98
|
+
* @returns {{ success: boolean, restoredPhase: string }}
|
|
99
|
+
*/
|
|
100
|
+
function resumeFromCheckpoint(projectRoot, checkpointId) {
|
|
101
|
+
const checkpointsDir = resolveCheckpointsDir(projectRoot);
|
|
102
|
+
const filePath = path.join(checkpointsDir, `${checkpointId}.json`);
|
|
103
|
+
|
|
104
|
+
if (!fs.existsSync(filePath)) {
|
|
105
|
+
throw new Error(`Checkpoint not found: ${checkpointId}`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
const checkpoint = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
109
|
+
const statePath = path.join(projectRoot, AGENT_DIR, ENGINE_DIR, 'workflow-state.json');
|
|
110
|
+
const tempPath = `${statePath}.tmp`;
|
|
111
|
+
|
|
112
|
+
// Append restore event to history
|
|
113
|
+
checkpoint.state.history.push({
|
|
114
|
+
from: 'RESTORED',
|
|
115
|
+
to: checkpoint.state.currentPhase,
|
|
116
|
+
trigger: `Restored from checkpoint ${checkpointId}`,
|
|
117
|
+
timestamp: new Date().toISOString(),
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
fs.writeFileSync(tempPath, JSON.stringify(checkpoint.state, null, 2) + '\n', 'utf-8');
|
|
121
|
+
fs.renameSync(tempPath, statePath);
|
|
122
|
+
|
|
123
|
+
return { success: true, restoredPhase: checkpoint.state.currentPhase };
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Returns a rich summary of the current workflow state.
|
|
128
|
+
*
|
|
129
|
+
* @param {string} projectRoot - Root directory of the project
|
|
130
|
+
* @returns {object} Workflow summary with phase durations and checkpoint count
|
|
131
|
+
*/
|
|
132
|
+
function getWorkflowSummary(projectRoot) {
|
|
133
|
+
const { state } = workflowEngine.loadWorkflowState(projectRoot);
|
|
134
|
+
const checkpoints = listCheckpoints(projectRoot);
|
|
135
|
+
const history = state.history || [];
|
|
136
|
+
|
|
137
|
+
const phaseDurations = {};
|
|
138
|
+
for (const [phaseName, phaseData] of Object.entries(state.phases || {})) {
|
|
139
|
+
if (phaseData.startedAt && phaseData.completedAt) {
|
|
140
|
+
const duration = new Date(phaseData.completedAt).getTime() - new Date(phaseData.startedAt).getTime();
|
|
141
|
+
phaseDurations[phaseName] = Math.round(duration / 1000);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
return {
|
|
146
|
+
currentPhase: state.currentPhase,
|
|
147
|
+
startedAt: state.startedAt,
|
|
148
|
+
transitionCount: history.length,
|
|
149
|
+
checkpointCount: checkpoints.length,
|
|
150
|
+
phaseDurations,
|
|
151
|
+
lastTransition: history.length > 0 ? history[history.length - 1] : null,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
module.exports = {
|
|
156
|
+
createCheckpoint,
|
|
157
|
+
listCheckpoints,
|
|
158
|
+
resumeFromCheckpoint,
|
|
159
|
+
getWorkflowSummary,
|
|
160
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antigravity-ai-kit",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "🚀 Trust-Grade AI development framework —
|
|
3
|
+
"version": "3.0.1",
|
|
4
|
+
"description": "🚀 Trust-Grade AI development framework with a 21-module runtime engine — 19 Agents, 31 Skills, 31 Commands, 14 Workflows, 261 Tests. Workflow enforcement, task governance, agent reputation, self-healing, and skill marketplace.",
|
|
5
5
|
"main": "bin/ag-kit.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ag-kit": "./bin/ag-kit.js"
|
|
@@ -41,8 +41,12 @@
|
|
|
41
41
|
},
|
|
42
42
|
"files": [
|
|
43
43
|
"bin/",
|
|
44
|
+
"lib/",
|
|
44
45
|
".agent/",
|
|
45
46
|
"README.md",
|
|
46
47
|
"LICENSE"
|
|
47
|
-
]
|
|
48
|
+
],
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"vitest": "^4.1.0"
|
|
51
|
+
}
|
|
48
52
|
}
|