@buba_71/levit 0.3.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/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # levit-kit
2
+
3
+ Hybrid starter kit for **Antigravity** projects
4
+ (template + CLI + agentic conventions)
5
+
6
+ ---
7
+
8
+ ## Table of contents
9
+
10
+ - [Why levit-kit exists](#why-levit-kit-exists)
11
+ - [What levit-kit does](#what-levit-kit-does)
12
+ - [What levit-kit does not do](#what-levit-kit-does-not-do)
13
+ - [How levit-kit is used](#how-levit-kit-is-used)
14
+ - [Where does the levit command come from](#where-does-the-levit-command-come-from)
15
+ - [Social Contract](#social-contract)
16
+ - [Nature of the project](#nature-of-the-project)
17
+ - [Status](#status)
18
+ - [Contributing](#contributing)
19
+ - [Guiding principle](#guiding-principle)
20
+
21
+ ---
22
+
23
+ ## Why levit-kit exists
24
+
25
+ Levit-kit provides a **clean, readable, and predictable starting point** for initiating projects with Google Antigravity.
26
+
27
+ It does not attempt to automate development, orchestrate agents, or generate business logic.
28
+
29
+ Its role is simple:
30
+ 👉 **install a clear framework in which humans and agents can work properly.**
31
+
32
+ ---
33
+
34
+ ## What levit-kit does
35
+
36
+ - Initializes a standardized project structure
37
+ - Installs explicit conventions
38
+ - Facilitates human and agent onboarding
39
+ - Reduces unnecessary variability between projects
40
+
41
+ ---
42
+
43
+ ## What levit-kit does not do
44
+
45
+ - It does not generate business logic
46
+ - It makes no functional decisions
47
+ - It does not execute or orchestrate agents
48
+ - It imposes no workflow
49
+ - It introduces no magic
50
+
51
+ These limits are intentional.
52
+
53
+ ---
54
+
55
+ ## How levit-kit is used
56
+
57
+ Levit-kit is used **once**, at the very beginning of a project.
58
+
59
+ ```bash
60
+ npx levit init my-project
61
+ ```
62
+
63
+ This command:
64
+ - creates a new project directory
65
+ - copies the default levit-kit template
66
+ - installs no dependency
67
+ - exits immediately
68
+
69
+ Levit-kit does not remain in the project after initialization.
70
+
71
+ ---
72
+
73
+ ## Where does the levit command come from?
74
+
75
+ The `levit` command is provided through the npm ecosystem.
76
+
77
+ Levit-kit is published as an npm package exposing a CLI binary named `levit`.
78
+ When running the command above, `npx`:
79
+
80
+ - downloads the package temporarily
81
+ - executes the `levit` CLI
82
+ - removes it after execution
83
+
84
+ Nothing is installed in the generated project.
85
+
86
+ ---
87
+
88
+ ## Social Contract
89
+
90
+ The behavior, boundaries, and evolution of levit-kit are defined in a foundational document:
91
+
92
+ 📄 **[SOCIAL_CONTRACT.md](./SOCIAL_CONTRACT.md)**
93
+
94
+ 👉 All technical decisions, issues, and contributions are evaluated against this contract.
95
+
96
+ ---
97
+
98
+ ## Nature of the project
99
+
100
+ Levit-kit is a **hybrid tool**:
101
+
102
+ - a project **template**
103
+ - an initialization **CLI**
104
+ - a set of **agentic conventions**
105
+
106
+ Each component remains deliberately simple and decoupled.
107
+
108
+ ---
109
+
110
+ ## Status
111
+
112
+ - Phase: foundation
113
+ - Stability: being defined
114
+ - Target audience: developers working with Antigravity
115
+
116
+ ---
117
+
118
+ ## Contributing
119
+
120
+ Before contributing, please read the social contract.
121
+
122
+ Contributions aiming to:
123
+ - simplify,
124
+ - clarify,
125
+ - stabilize
126
+
127
+ are welcome.
128
+
129
+ Contributions adding complexity, implicit automation, or decision-making logic will be rejected.
130
+
131
+ ---
132
+
133
+ ## Guiding principle
134
+
135
+ > Levit-kit does not make agents smarter.
136
+ > It makes projects more intelligible.
@@ -0,0 +1,123 @@
1
+ # levit-kit Social Contract
2
+
3
+ Version: 0.1
4
+ Status: Foundational
5
+ Scope: Non-negotiable
6
+
7
+ ---
8
+
9
+ ## 1. Purpose
10
+
11
+ Levit-kit exists to provide a **clean, readable, and predictable starting point** for Antigravity projects.
12
+
13
+ It does not aim to:
14
+ - artificially speed up development,
15
+ - replace human judgment,
16
+ - or hide the inherent complexity of agentic systems.
17
+
18
+ Its role is **structural**, not decision-making.
19
+
20
+ ---
21
+
22
+ ## 2. What levit-kit does
23
+
24
+ Levit-kit:
25
+
26
+ 1. Initializes a clear and stable project structure
27
+ 2. Provides explicit conventions
28
+ 3. Creates a framework understandable by both humans and agents
29
+ 4. Reduces unnecessary variability between projects
30
+ 5. Facilitates human and agent onboarding
31
+
32
+ Nothing more.
33
+
34
+ ---
35
+
36
+ ## 3. What levit-kit will never do
37
+
38
+ Levit-kit will never:
39
+
40
+ - generate business logic
41
+ - make functional decisions
42
+ - orchestrate agents
43
+ - execute workflows
44
+ - infer user intent
45
+ - perform automatic optimizations
46
+
47
+ These refusals are final.
48
+
49
+ ---
50
+
51
+ ## 4. Relationship with AI agents
52
+
53
+ Agents:
54
+
55
+ - are guests, never sovereign
56
+ - operate under explicit instructions
57
+ - work within clearly defined boundaries
58
+ - never modify foundations without human validation
59
+
60
+ Levit-kit is **agent-aware**, not agent-driven.
61
+
62
+ ---
63
+
64
+ ## 5. Relationship with the human user
65
+
66
+ The user:
67
+
68
+ - remains responsible for decisions
69
+ - understands what is installed
70
+ - can modify the project without breaking levit-kit
71
+ - is never locked into an imposed workflow
72
+
73
+ Levit-kit introduces **no hidden dependencies**.
74
+
75
+ ---
76
+
77
+ ## 6. Conventions over configuration
78
+
79
+ Levit-kit favors:
80
+
81
+ - a single structure
82
+ - few or no options
83
+ - explicit, opinionated decisions
84
+
85
+ Customization is possible **after initialization**, never during.
86
+
87
+ ---
88
+
89
+ ## 7. Project evolution
90
+
91
+ Levit-kit evolves according to these rules:
92
+
93
+ - few releases
94
+ - explicit changes
95
+ - compatibility over novelty
96
+ - no feature without structural justification
97
+
98
+ Any evolution must improve the **readability or stability** of generated projects.
99
+
100
+ ---
101
+
102
+ ## 8. Contributions
103
+
104
+ Contributions are welcome if they:
105
+
106
+ - simplify
107
+ - clarify
108
+ - reduce surface area
109
+ - reinforce coherence
110
+
111
+ Contributions introducing:
112
+ - magic
113
+ - opaque abstractions
114
+ - implicit behaviors
115
+
116
+ will be rejected, even if they appear useful.
117
+
118
+ ---
119
+
120
+ ## 9. Core principle
121
+
122
+ > Levit-kit does not aim to save time.
123
+ > It aims to prevent losing time later.
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const init_1 = require("../src/init");
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ function main() {
10
+ const args = process.argv.slice(2);
11
+ if (args.length !== 2 || args[0] !== "init") {
12
+ console.error("Usage: levit init <project-name>");
13
+ process.exit(1);
14
+ }
15
+ const projectName = args[1];
16
+ const targetPath = node_path_1.default.resolve(process.cwd(), projectName);
17
+ try {
18
+ (0, init_1.initProject)(projectName, targetPath);
19
+ }
20
+ catch (error) {
21
+ console.error(error instanceof Error ? error.message : "Unexpected error");
22
+ process.exit(1);
23
+ }
24
+ }
25
+ main();
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.initProject = initProject;
7
+ const node_fs_1 = __importDefault(require("node:fs"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ function getPackageRoot() {
10
+ // process.argv[1] points to the executed CLI file
11
+ // e.g. /path/to/levit-kit/dist/bin/cli.js
12
+ return node_path_1.default.resolve(node_path_1.default.dirname(process.argv[1]), "..", "..");
13
+ }
14
+ function initProject(projectName, targetPath) {
15
+ const packageRoot = getPackageRoot();
16
+ const templatePath = node_path_1.default.join(packageRoot, "templates", "default");
17
+ if (!projectName) {
18
+ throw new Error("Project name is required.");
19
+ }
20
+ if (node_fs_1.default.existsSync(targetPath)) {
21
+ throw new Error(`Directory "${projectName}" already exists.`);
22
+ }
23
+ if (!node_fs_1.default.existsSync(templatePath)) {
24
+ throw new Error(`Default template not found at ${templatePath}`);
25
+ }
26
+ node_fs_1.default.mkdirSync(targetPath, { recursive: true });
27
+ copyDirectory(templatePath, targetPath);
28
+ console.log("");
29
+ console.log("levit-kit v1.0");
30
+ console.log("");
31
+ console.log("✔ Project directory created");
32
+ console.log("✔ Template copied");
33
+ console.log("");
34
+ console.log(`Project "${projectName}" initialized successfully.`);
35
+ console.log("");
36
+ console.log("Next steps:");
37
+ console.log(" - Open the project");
38
+ console.log(" - Read SOCIAL_CONTRACT.md");
39
+ console.log(" - Start defining features");
40
+ }
41
+ function copyDirectory(source, target) {
42
+ const entries = node_fs_1.default.readdirSync(source, { withFileTypes: true });
43
+ for (const entry of entries) {
44
+ const sourcePath = node_path_1.default.join(source, entry.name);
45
+ const targetPath = node_path_1.default.join(target, entry.name);
46
+ if (entry.isDirectory()) {
47
+ node_fs_1.default.mkdirSync(targetPath, { recursive: true });
48
+ copyDirectory(sourcePath, targetPath);
49
+ }
50
+ else {
51
+ node_fs_1.default.copyFileSync(sourcePath, targetPath);
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const node_test_1 = __importDefault(require("node:test"));
7
+ const node_assert_1 = __importDefault(require("node:assert"));
8
+ const node_fs_1 = __importDefault(require("node:fs"));
9
+ const node_path_1 = __importDefault(require("node:path"));
10
+ const node_os_1 = __importDefault(require("node:os"));
11
+ const init_1 = require("../src/init");
12
+ function exists(p) {
13
+ return node_fs_1.default.existsSync(p);
14
+ }
15
+ (0, node_test_1.default)("levit init copies default template exactly", () => {
16
+ const tempDir = node_fs_1.default.mkdtempSync(node_path_1.default.join(node_os_1.default.tmpdir(), "levit-kit-test-"));
17
+ const projectName = "test-project";
18
+ const projectPath = node_path_1.default.join(tempDir, projectName);
19
+ (0, init_1.initProject)(projectName, projectPath);
20
+ // Core structure assertions
21
+ node_assert_1.default.ok(exists(projectPath), "Project directory should exist");
22
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "README.md")));
23
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "SOCIAL_CONTRACT.md")));
24
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "features")));
25
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "agents")));
26
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "roles")));
27
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "pipelines")));
28
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "docs")));
29
+ // Agent boundaries
30
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "agents", "AGENTS.md")), "Agent guidelines should exist");
31
+ // Feature contract
32
+ node_assert_1.default.ok(exists(node_path_1.default.join(projectPath, "features", "README.md")), "Feature README should exist");
33
+ });
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@buba_71/levit",
3
+ "version": "0.3.0",
4
+ "description": "Hybrid starter kit for Antigravity projects",
5
+ "author": "David BUBA",
6
+ "license": "MIT",
7
+ "publishConfig": {
8
+ "access": "public"
9
+ },
10
+ "bin": {
11
+ "levit": "dist/bin/cli.js"
12
+ },
13
+
14
+ "files": [
15
+ "dist",
16
+ "templates",
17
+ "SOCIAL_CONTRACT.md",
18
+ "README.md"
19
+ ],
20
+
21
+ "main": "dist/src/init.js",
22
+
23
+ "scripts": {
24
+ "build": "tsc",
25
+ "start": "node dist/bin/cli.js",
26
+ "test": "npm run build && node --test dist/tests"
27
+ },
28
+
29
+ "dependencies": {
30
+ "fs-extra": "^11.2.0"
31
+ },
32
+
33
+ "devDependencies": {
34
+ "@types/fs-extra": "^11.0.4",
35
+ "@types/node": "^20.11.0",
36
+ "typescript": "^5.3.0"
37
+ }
38
+ }
@@ -0,0 +1,16 @@
1
+ # Project Overview
2
+
3
+ This project was initialized with **levit-kit**.
4
+
5
+ Its purpose is to provide a **clear, predictable structure**
6
+ for working with humans and AI agents.
7
+
8
+ This repository:
9
+ - contains no business logic
10
+ - imposes no workflow
11
+ - makes no automated decisions
12
+
13
+ Start by reading:
14
+ - SOCIAL_CONTRACT.md
15
+ - agents/AGENTS.md
16
+ - features/README.md
@@ -0,0 +1,18 @@
1
+ # Project Social Contract
2
+
3
+ This project follows the levit-kit social contract.
4
+
5
+ ## Principles
6
+
7
+ - Humans remain responsible for decisions
8
+ - Agents are assistants, not decision-makers
9
+ - Structure is explicit
10
+ - Conventions are preferred over configuration
11
+
12
+ ## What this project does not do
13
+
14
+ - No hidden automation
15
+ - No implicit decisions
16
+ - No enforced workflow
17
+
18
+ This contract exists to preserve clarity over time.
@@ -0,0 +1,13 @@
1
+ # Agent Guidelines
2
+
3
+ Agents are allowed to:
4
+ - propose changes
5
+ - generate drafts
6
+ - refactor existing code with approval
7
+
8
+ Agents are not allowed to:
9
+ - modify foundational documents
10
+ - restructure the repository
11
+ - introduce implicit behavior
12
+
13
+ When unsure, agents must ask for human validation.
@@ -0,0 +1,9 @@
1
+ # Agent Boundaries
2
+
3
+ Agents must respect the following boundaries:
4
+
5
+ - Project structure is fixed
6
+ - Contracts must not be altered implicitly
7
+ - New conventions require human approval
8
+
9
+ Boundaries are explicit and enforced by humans.
@@ -0,0 +1,11 @@
1
+ # Architecture Notes
2
+
3
+ This document records architectural decisions.
4
+
5
+ Use it to:
6
+ - explain structural choices
7
+ - document trade-offs
8
+ - preserve context over time
9
+
10
+ Architecture evolves.
11
+ Documentation preserves intent.
@@ -0,0 +1,12 @@
1
+ # Features
2
+
3
+ A feature is a **contract**, not an implementation.
4
+
5
+ Each feature document should define:
6
+ - intent
7
+ - inputs
8
+ - outputs
9
+ - constraints
10
+
11
+ Features are discussed and validated here.
12
+ Implementation happens elsewhere.
@@ -0,0 +1,8 @@
1
+ # Pipelines
2
+
3
+ This directory is reserved for automation.
4
+
5
+ Add pipelines only when:
6
+ - the need is explicit
7
+ - the impact is understood
8
+ - the behavior is documented
@@ -0,0 +1,10 @@
1
+ # DevOps Role
2
+
3
+ This document defines DevOps responsibilities.
4
+
5
+ Use it to document:
6
+ - infrastructure assumptions
7
+ - deployment constraints
8
+ - operational requirements
9
+
10
+ Avoid premature tooling decisions.
@@ -0,0 +1,8 @@
1
+ # QA Role
2
+
3
+ This document defines quality responsibilities.
4
+
5
+ Use it to describe:
6
+ - quality standards
7
+ - testing expectations
8
+ - validation criteria
@@ -0,0 +1,8 @@
1
+ # Security Role
2
+
3
+ This document defines security expectations.
4
+
5
+ Use it to record:
6
+ - threat assumptions
7
+ - security constraints
8
+ - explicit security decisions