konman 1.0.0__tar.gz

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.
konman-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,189 @@
1
+ Metadata-Version: 2.4
2
+ Name: konman
3
+ Version: 1.0.0
4
+ Summary: 🧠 konman: An automated, first-principles, LLM-agnostic codebase context engine.
5
+ Author-email: Your Name <your.email@example.com>
6
+ Project-URL: Homepage, https://github.com
7
+ Project-URL: Issues, https://github.com/issues
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Intended Audience :: Developers
10
+ Classifier: Topic :: Software Development :: Build Tools
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Requires-Python: >=3.10
16
+ Description-Content-Type: text/markdown
17
+ Requires-Dist: click>=8.0.0
18
+ Requires-Dist: pydantic>=2.0.0
19
+ Requires-Dist: ruamel.yaml>=0.17.0
20
+
21
+ # 🧠 konman (Context Manager) v1.0.0
22
+
23
+ An automated, first-principles, LLM-agnostic codebase context engine. **konman** decouples developer context from ephemeral chat sessions and anchors it directly inside your codebase as version-controlled data.
24
+
25
+ ---
26
+
27
+ ## 🎯 Core Philosophy
28
+
29
+ Standard AI-driven development tools lock your project's history inside localized chat interfaces or vendor ecosystems. When your API tokens expire or you switch models, the new assistant lacks the complete picture, often modifying code it shouldn't touch or re-proposing rejected options.
30
+
31
+ **konman** solves this by breaking context down into 6 fundamental dimensions:
32
+ 1. **Who**: The actor (Human or specific LLM) making the assertion.
33
+ 2. **What**: The changes made (Code modifications, symbols, diffs).
34
+ 3. **Where**: The scope of the adjustment (File paths, dependency graphs).
35
+ 4. **When**: The timeline anchor (Git commit history, session timestamps).
36
+ 5. **How**: The mechanism used (Build configs, testing assertions).
37
+ 6. **Why**: The human intent, constraints, and evaluated tradeoffs.
38
+
39
+ While *What, Where, When,* and *How* can easily be recovered by indexing raw code, the **Why** is completely lost once a session vanishes. **konman** dynamically captures the "Why" at the moment it is generated, standardizing it into an evaluation matrix:
40
+
41
+ \[\text{Object } (O) \xrightarrow{\text{satisfies}} \text{Requirement } (R) \text{ due to its verified Property } (P)\]
42
+
43
+ ---
44
+
45
+ ## 🚀 Quickstart & Global Installation
46
+
47
+ ### 1. Assemble the Package Dependencies
48
+ Ensure you have Python 3.10+ installed. Clone your workspace and install **konman** globally in editable mode using `pip`:
49
+
50
+ ```bash
51
+ cd conman_tool
52
+ pip install -e .
53
+ ```
54
+
55
+ Verify your global environment configuration setup by triggering the structured help display:
56
+ ```bash
57
+ konman --help
58
+ ```
59
+
60
+ ### 2. Scaffold a Codebase Repository
61
+ Navigate into your target software application codebase folder (e.g., `playce-api`) and initialize the context filesystem:
62
+ ```bash
63
+ cd /path/to/playce-api
64
+ konman init
65
+ ```
66
+ This deploys the underlying `.context/` data graph infrastructure:
67
+ * `requirements/`: `.yaml` files detailing hard structural limitations and developer preferences.
68
+ * `decisions/`: Architectural tradeoffs, chosen technologies, and rejected alternative options.
69
+ * `boundaries.yaml`: Protected codebase paths mapped to explicit verification criteria.
70
+ * `.raw/`: Gitignored temporary buffer cache where streaming logs are collected prior to model extraction.
71
+
72
+ ---
73
+
74
+ ## 🔌 Multi-Tool Setup & Integration Manual
75
+
76
+ **konman** is built to sit between you and your developer assistants. Instead of modifying tool core logic, running `konman setup [tool-name]` drops target-specific metadata adapters into your project directory. Every adapter explicitly directs its assistant to look up instructions from a centralized, auto-compiled index file named `AGENTS.md`.
77
+
78
+ ### 1. Antigravity Setup
79
+ Antigravity utilizes dynamic lifecycle event hooks and dynamic background JSON-RPC configurations.
80
+ * **Setup Command**:
81
+ ```bash
82
+ konman setup antigravity
83
+ ```
84
+ * **What it configures**:
85
+ Appends background server hooks directly to your system profile data (`~/.gemini/config/mcp_config.json`) and drops an event configuration module down at `.agents/hooks.json`.
86
+ * **Workflow**:
87
+ Every time you submit a prompt or close a chat panel shell inside Antigravity, the tool pipes background conversation logs straight to `.context/.raw/` silently using an insulated, fail-open background channel.
88
+
89
+ ### 2. VS Code Copilot Setup
90
+ VS Code Copilot blocks background lifecycle execution commands but natively queries structural instruction parameters.
91
+ * **Setup Command**:
92
+ ```bash
93
+ konman setup vsc-copilot
94
+ ```
95
+ * **What it configures**:
96
+ Creates a workspace routing directory at `.github/copilot-instructions.md`.
97
+ * **Workflow**:
98
+ Because Copilot restricts third-party process eavesdropping, use the continuous window cache scraping utility to pull past conversation prompts from your system log directory:
99
+ ```bash
100
+ konman tail
101
+ ```
102
+
103
+ ### 3. Cursor Setup
104
+ Cursor allows developers to enforce custom system guidelines over matching codebase directory modules.
105
+ * **Setup Command**:
106
+ ```bash
107
+ konman setup cursor
108
+ ```
109
+ * **What it configures**:
110
+ Generates a system override rule file at `.cursor/rules/konman-context.mdc`.
111
+ * **Workflow**:
112
+ The file is pre-configured with rules (`alwaysApply: true`, `globs: "*"`) that force the Cursor model to crawl `AGENTS.md` boundaries before proposing code modifications.
113
+
114
+ ### 4. Claude Code Setup
115
+ Claude Code looks up structural constraints from plain markdown files situated in the repository root path.
116
+ * **Setup Command**:
117
+ ```bash
118
+ konman setup claude-code
119
+ ```
120
+ * **What it configures**:
121
+ Creates a standard `CLAUDE.md` control file.
122
+ * **Workflow**:
123
+ It defines absolute constraints, instructing the Claude Code terminal runner to scan your active requirements schema before running build scripts or code rewrites.
124
+
125
+ ### 5. Codex Setup
126
+ Codex tracks state parameters across isolated session tracking layouts.
127
+ * **Setup Command**:
128
+ ```bash
129
+ konman setup codex
130
+ ```
131
+ * **What it configures**:
132
+ Deploys a standard workspace tracker layout at `.codex/`.
133
+
134
+ ### 6. Kiro Setup
135
+ Kiro relies on system steering inputs to orchestrate background model automation scripts.
136
+ * **Setup Command**:
137
+ ```bash
138
+ konman setup kiro
139
+ ```
140
+ * **What it configures**:
141
+ Deploys explicit semantic steering files to `.kiro/steering/context_steering.md`.
142
+
143
+ ---
144
+
145
+ ## 🛠️ Operational Command Reference
146
+
147
+ ### 🎯 Core Workspace Management Commands
148
+
149
+ | Command | Syntax / Usage | Operational Description |
150
+ | :--- | :--- | :--- |
151
+ | **`init`** | `konman init` | Scaffolds the standard `.context/` data graph layout inside a code repository. |
152
+ | **`setup`** | `konman setup [tool-choice]` | Deploys targeted workspace adapters (`antigravity`, `claude-code`, `codex`, `vsc-copilot`, `cursor`, `kiro`). |
153
+ | **`sync`** | `konman sync` | Traces dependencies, processes staleness propagation rules, and regenerates `AGENTS.md`. |
154
+ | **`state`** | `konman state` | Renders a terminal visualization tree detailing active requirements, recent choices, and untracked queues. |
155
+ | **`record`** | `konman record -t [type] -i [id]` | Launches an interactive console wizard to manually log a new `requirement`, `decision`, or `boundary`. |
156
+ | **`resolve`** | `konman resolve [id]` | Reconciles stale nodes flagged with `needs_review`, updating trade-off justifications and healing the graph. |
157
+ | **`check`** | `konman check` | Audits the graph database. Returns error code `1` if any node requires review. Used as a pre-commit block. |
158
+ | **`config`** | `konman config -k [key]` | Securely locks your developer LLM platform API key credentials to `~/.config/konman/config.json`. |
159
+ | **`setup-hooks`** | `konman setup-hooks` | Injects an automated verification shell script loop directly into your local `.git/hooks/pre-commit` workflow. |
160
+ | **`disable-hooks`** | `konman disable-hooks` | Safely tears down and decouples the konman validation script from your local Git pre-commit lifecycles. |
161
+
162
+ ### 🔌 Context Extraction & Lifecycle Pipelines
163
+
164
+ | Command | Syntax / Usage | Operational Description |
165
+ | :--- | :--- | :--- |
166
+ | **`tail`** | `konman tail` | Scrapes deeply nested Windows VS Code cache paths to pull your active Copilot transcript history. |
167
+ | **`mine`** | `konman mine -c [count]` | Parses your local Git commit history trail to extract structural reasoning clues from message text blocks. |
168
+ | **`extract`** | `konman extract` | Pipes collected logs from `.context/.raw/` into your LLM to automatically synthesize fresh `.yaml` nodes. |
169
+ | **`handoff`** | `konman handoff [from] [to]` | Packages context boundaries for a new model window and updates active adapters to point to the new tool. |
170
+
171
+ ---
172
+
173
+ ## 🔒 Enforcement Guardrails & Git Lifecycles
174
+
175
+ To guarantee that stale information or unconfirmed context models are caught before code is pushed to a remote server, embed **konman** directly into your repository's local Git workflow gates.
176
+
177
+ ### Activating the Protection Guardrail:
178
+ Run this command inside your target codebase application directory:
179
+ ```bash
180
+ konman setup-hooks
181
+ ```
182
+ This creates an automated shell script at `.git/hooks/pre-commit` that intercepts every `git commit` attempt to execute `konman check`. If an upstream requirement has been `superseded` or changed, all down-tree decisions automatically lock into a `needs_review` phase, and **konman blocks the commit sequence**. Run `konman resolve [id]` to input your updated tradeoffs and unblock the pipeline instantly.
183
+
184
+ ### Opting Out / Disabling the Guardrail:
185
+ If you need to lift the validation gates for temporary testing cycles, bypass the pre-commit checks, or remove **konman** from your automated lifecycle track, execute the decoupling unlinker:
186
+ ```bash
187
+ konman disable-hooks
188
+ ```
189
+ This safely inspects the pre-commit script file and destroys the execution hooks without risking damage to third-party tools or modifications to your untracked source directories.
konman-1.0.0/README.md ADDED
@@ -0,0 +1,169 @@
1
+ # 🧠 konman (Context Manager) v1.0.0
2
+
3
+ An automated, first-principles, LLM-agnostic codebase context engine. **konman** decouples developer context from ephemeral chat sessions and anchors it directly inside your codebase as version-controlled data.
4
+
5
+ ---
6
+
7
+ ## 🎯 Core Philosophy
8
+
9
+ Standard AI-driven development tools lock your project's history inside localized chat interfaces or vendor ecosystems. When your API tokens expire or you switch models, the new assistant lacks the complete picture, often modifying code it shouldn't touch or re-proposing rejected options.
10
+
11
+ **konman** solves this by breaking context down into 6 fundamental dimensions:
12
+ 1. **Who**: The actor (Human or specific LLM) making the assertion.
13
+ 2. **What**: The changes made (Code modifications, symbols, diffs).
14
+ 3. **Where**: The scope of the adjustment (File paths, dependency graphs).
15
+ 4. **When**: The timeline anchor (Git commit history, session timestamps).
16
+ 5. **How**: The mechanism used (Build configs, testing assertions).
17
+ 6. **Why**: The human intent, constraints, and evaluated tradeoffs.
18
+
19
+ While *What, Where, When,* and *How* can easily be recovered by indexing raw code, the **Why** is completely lost once a session vanishes. **konman** dynamically captures the "Why" at the moment it is generated, standardizing it into an evaluation matrix:
20
+
21
+ \[\text{Object } (O) \xrightarrow{\text{satisfies}} \text{Requirement } (R) \text{ due to its verified Property } (P)\]
22
+
23
+ ---
24
+
25
+ ## 🚀 Quickstart & Global Installation
26
+
27
+ ### 1. Assemble the Package Dependencies
28
+ Ensure you have Python 3.10+ installed. Clone your workspace and install **konman** globally in editable mode using `pip`:
29
+
30
+ ```bash
31
+ cd conman_tool
32
+ pip install -e .
33
+ ```
34
+
35
+ Verify your global environment configuration setup by triggering the structured help display:
36
+ ```bash
37
+ konman --help
38
+ ```
39
+
40
+ ### 2. Scaffold a Codebase Repository
41
+ Navigate into your target software application codebase folder (e.g., `playce-api`) and initialize the context filesystem:
42
+ ```bash
43
+ cd /path/to/playce-api
44
+ konman init
45
+ ```
46
+ This deploys the underlying `.context/` data graph infrastructure:
47
+ * `requirements/`: `.yaml` files detailing hard structural limitations and developer preferences.
48
+ * `decisions/`: Architectural tradeoffs, chosen technologies, and rejected alternative options.
49
+ * `boundaries.yaml`: Protected codebase paths mapped to explicit verification criteria.
50
+ * `.raw/`: Gitignored temporary buffer cache where streaming logs are collected prior to model extraction.
51
+
52
+ ---
53
+
54
+ ## 🔌 Multi-Tool Setup & Integration Manual
55
+
56
+ **konman** is built to sit between you and your developer assistants. Instead of modifying tool core logic, running `konman setup [tool-name]` drops target-specific metadata adapters into your project directory. Every adapter explicitly directs its assistant to look up instructions from a centralized, auto-compiled index file named `AGENTS.md`.
57
+
58
+ ### 1. Antigravity Setup
59
+ Antigravity utilizes dynamic lifecycle event hooks and dynamic background JSON-RPC configurations.
60
+ * **Setup Command**:
61
+ ```bash
62
+ konman setup antigravity
63
+ ```
64
+ * **What it configures**:
65
+ Appends background server hooks directly to your system profile data (`~/.gemini/config/mcp_config.json`) and drops an event configuration module down at `.agents/hooks.json`.
66
+ * **Workflow**:
67
+ Every time you submit a prompt or close a chat panel shell inside Antigravity, the tool pipes background conversation logs straight to `.context/.raw/` silently using an insulated, fail-open background channel.
68
+
69
+ ### 2. VS Code Copilot Setup
70
+ VS Code Copilot blocks background lifecycle execution commands but natively queries structural instruction parameters.
71
+ * **Setup Command**:
72
+ ```bash
73
+ konman setup vsc-copilot
74
+ ```
75
+ * **What it configures**:
76
+ Creates a workspace routing directory at `.github/copilot-instructions.md`.
77
+ * **Workflow**:
78
+ Because Copilot restricts third-party process eavesdropping, use the continuous window cache scraping utility to pull past conversation prompts from your system log directory:
79
+ ```bash
80
+ konman tail
81
+ ```
82
+
83
+ ### 3. Cursor Setup
84
+ Cursor allows developers to enforce custom system guidelines over matching codebase directory modules.
85
+ * **Setup Command**:
86
+ ```bash
87
+ konman setup cursor
88
+ ```
89
+ * **What it configures**:
90
+ Generates a system override rule file at `.cursor/rules/konman-context.mdc`.
91
+ * **Workflow**:
92
+ The file is pre-configured with rules (`alwaysApply: true`, `globs: "*"`) that force the Cursor model to crawl `AGENTS.md` boundaries before proposing code modifications.
93
+
94
+ ### 4. Claude Code Setup
95
+ Claude Code looks up structural constraints from plain markdown files situated in the repository root path.
96
+ * **Setup Command**:
97
+ ```bash
98
+ konman setup claude-code
99
+ ```
100
+ * **What it configures**:
101
+ Creates a standard `CLAUDE.md` control file.
102
+ * **Workflow**:
103
+ It defines absolute constraints, instructing the Claude Code terminal runner to scan your active requirements schema before running build scripts or code rewrites.
104
+
105
+ ### 5. Codex Setup
106
+ Codex tracks state parameters across isolated session tracking layouts.
107
+ * **Setup Command**:
108
+ ```bash
109
+ konman setup codex
110
+ ```
111
+ * **What it configures**:
112
+ Deploys a standard workspace tracker layout at `.codex/`.
113
+
114
+ ### 6. Kiro Setup
115
+ Kiro relies on system steering inputs to orchestrate background model automation scripts.
116
+ * **Setup Command**:
117
+ ```bash
118
+ konman setup kiro
119
+ ```
120
+ * **What it configures**:
121
+ Deploys explicit semantic steering files to `.kiro/steering/context_steering.md`.
122
+
123
+ ---
124
+
125
+ ## 🛠️ Operational Command Reference
126
+
127
+ ### 🎯 Core Workspace Management Commands
128
+
129
+ | Command | Syntax / Usage | Operational Description |
130
+ | :--- | :--- | :--- |
131
+ | **`init`** | `konman init` | Scaffolds the standard `.context/` data graph layout inside a code repository. |
132
+ | **`setup`** | `konman setup [tool-choice]` | Deploys targeted workspace adapters (`antigravity`, `claude-code`, `codex`, `vsc-copilot`, `cursor`, `kiro`). |
133
+ | **`sync`** | `konman sync` | Traces dependencies, processes staleness propagation rules, and regenerates `AGENTS.md`. |
134
+ | **`state`** | `konman state` | Renders a terminal visualization tree detailing active requirements, recent choices, and untracked queues. |
135
+ | **`record`** | `konman record -t [type] -i [id]` | Launches an interactive console wizard to manually log a new `requirement`, `decision`, or `boundary`. |
136
+ | **`resolve`** | `konman resolve [id]` | Reconciles stale nodes flagged with `needs_review`, updating trade-off justifications and healing the graph. |
137
+ | **`check`** | `konman check` | Audits the graph database. Returns error code `1` if any node requires review. Used as a pre-commit block. |
138
+ | **`config`** | `konman config -k [key]` | Securely locks your developer LLM platform API key credentials to `~/.config/konman/config.json`. |
139
+ | **`setup-hooks`** | `konman setup-hooks` | Injects an automated verification shell script loop directly into your local `.git/hooks/pre-commit` workflow. |
140
+ | **`disable-hooks`** | `konman disable-hooks` | Safely tears down and decouples the konman validation script from your local Git pre-commit lifecycles. |
141
+
142
+ ### 🔌 Context Extraction & Lifecycle Pipelines
143
+
144
+ | Command | Syntax / Usage | Operational Description |
145
+ | :--- | :--- | :--- |
146
+ | **`tail`** | `konman tail` | Scrapes deeply nested Windows VS Code cache paths to pull your active Copilot transcript history. |
147
+ | **`mine`** | `konman mine -c [count]` | Parses your local Git commit history trail to extract structural reasoning clues from message text blocks. |
148
+ | **`extract`** | `konman extract` | Pipes collected logs from `.context/.raw/` into your LLM to automatically synthesize fresh `.yaml` nodes. |
149
+ | **`handoff`** | `konman handoff [from] [to]` | Packages context boundaries for a new model window and updates active adapters to point to the new tool. |
150
+
151
+ ---
152
+
153
+ ## 🔒 Enforcement Guardrails & Git Lifecycles
154
+
155
+ To guarantee that stale information or unconfirmed context models are caught before code is pushed to a remote server, embed **konman** directly into your repository's local Git workflow gates.
156
+
157
+ ### Activating the Protection Guardrail:
158
+ Run this command inside your target codebase application directory:
159
+ ```bash
160
+ konman setup-hooks
161
+ ```
162
+ This creates an automated shell script at `.git/hooks/pre-commit` that intercepts every `git commit` attempt to execute `konman check`. If an upstream requirement has been `superseded` or changed, all down-tree decisions automatically lock into a `needs_review` phase, and **konman blocks the commit sequence**. Run `konman resolve [id]` to input your updated tradeoffs and unblock the pipeline instantly.
163
+
164
+ ### Opting Out / Disabling the Guardrail:
165
+ If you need to lift the validation gates for temporary testing cycles, bypass the pre-commit checks, or remove **konman** from your automated lifecycle track, execute the decoupling unlinker:
166
+ ```bash
167
+ konman disable-hooks
168
+ ```
169
+ This safely inspects the pre-commit script file and destroys the execution hooks without risking damage to third-party tools or modifications to your untracked source directories.
@@ -0,0 +1,34 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "konman"
7
+ version = "1.0.0"
8
+ authors = [
9
+ { name = "Your Name", email = "your.email@example.com" }
10
+ ]
11
+ description = "🧠 konman: An automated, first-principles, LLM-agnostic codebase context engine."
12
+ readme = "README.md"
13
+ requires-python = ">=3.10"
14
+ classifiers = [
15
+ "Development Status :: 5 - Production/Stable",
16
+ "Intended Audience :: Developers",
17
+ "Topic :: Software Development :: Build Tools",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3.10",
20
+ "Programming Language :: Python :: 3.11",
21
+ "Programming Language :: Python :: 3.12",
22
+ ]
23
+ dependencies = [
24
+ "click>=8.0.0",
25
+ "pydantic>=2.0.0",
26
+ "ruamel.yaml>=0.17.0"
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com"
31
+ Issues = "https://github.com/issues"
32
+
33
+ [project.scripts]
34
+ konman = "konman.cli:main"
konman-1.0.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
konman-1.0.0/setup.py ADDED
@@ -0,0 +1,19 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="konman",
5
+ version="1.0.0",
6
+ package_dir={"": "src"},
7
+ packages=find_packages(where="src"),
8
+ install_package_data=True,
9
+ install_requires=[
10
+ "click>=8.0.0",
11
+ "pydantic>=2.0.0",
12
+ "ruamel.yaml>=0.17.0",
13
+ ],
14
+ entry_points={
15
+ "console_scripts": [
16
+ "konman=konman.cli:main",
17
+ ],
18
+ },
19
+ )
@@ -0,0 +1,2 @@
1
+ # conman: The LLM-Agnostic Context Manager Engine
2
+ __version__ = "1.0.0"