ai-kit-python 1.4.2__py3-none-any.whl
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.
- ai_kit_python-1.4.2.dist-info/METADATA +132 -0
- ai_kit_python-1.4.2.dist-info/RECORD +278 -0
- ai_kit_python-1.4.2.dist-info/WHEEL +5 -0
- ai_kit_python-1.4.2.dist-info/entry_points.txt +2 -0
- ai_kit_python-1.4.2.dist-info/licenses/LICENSE +21 -0
- ai_kit_python-1.4.2.dist-info/licenses/template/ai-kit/vendor/security-audit/LICENSE +21 -0
- ai_kit_python-1.4.2.dist-info/licenses/template/ai-kit/vendor/strix/LICENSE +201 -0
- ai_kit_python-1.4.2.dist-info/top_level.txt +1 -0
- aikit/.agents/skills/go-work/SKILL.md +8 -0
- aikit/.agents/skills/laravel-work/SKILL.md +8 -0
- aikit/.agents/skills/moodle-work/SKILL.md +8 -0
- aikit/.agents/skills/project-continuity/SKILL.md +34 -0
- aikit/.agents/skills/python-work/SKILL.md +8 -0
- aikit/.dockerignore +90 -0
- aikit/.gitattributes +3 -0
- aikit/.github/workflows/check-kit.yml +70 -0
- aikit/.github/workflows/publish-pypi.yml +108 -0
- aikit/.gitignore +60 -0
- aikit/BOOTSTRAP_PROMPT.md +18 -0
- aikit/CHANGELOG.md +85 -0
- aikit/CLAUDE.md +3 -0
- aikit/CONTRIBUTING.md +46 -0
- aikit/Dockerfile +44 -0
- aikit/KIMI.md +3 -0
- aikit/LICENSE +21 -0
- aikit/MANIFEST.in +22 -0
- aikit/MANUS.md +3 -0
- aikit/Makefile +70 -0
- aikit/README.md +1161 -0
- aikit/SECURITY.md +8 -0
- aikit/SKILL.md +105 -0
- aikit/VERSION +1 -0
- aikit/__init__.py +1 -0
- aikit/ai-kit/ADAPTERS.md +5 -0
- aikit/ai-kit/CONTAINERS.md +5 -0
- aikit/ai-kit/ENGINEERING.md +5 -0
- aikit/ai-kit/INTENT.md +5 -0
- aikit/ai-kit/MODELS.md +5 -0
- aikit/ai-kit/SKILLS.md +5 -0
- aikit/ai-kit/stacks/GO.md +5 -0
- aikit/ai-kit/stacks/LARAVEL.md +5 -0
- aikit/ai-kit/stacks/MOODLE.md +5 -0
- aikit/ai-kit/stacks/PYTHON.md +5 -0
- aikit/aikit_cli.py +59 -0
- aikit/deploy/k8s/install-preview-job.yaml +56 -0
- aikit/docker/build-requirements.txt +4 -0
- aikit/docker/check_version.py +29 -0
- aikit/docker/pypi-requirements.txt +3 -0
- aikit/docs/ADAPTER_PATH_FIX.md +23 -0
- aikit/docs/BENCHMARK.md +106 -0
- aikit/docs/CONTEXT7.md +33 -0
- aikit/docs/DECISIONS.md +22 -0
- aikit/docs/DEVELOPMENT_PLAN.md +16 -0
- aikit/docs/DIALOGUE_MEMORY.md +70 -0
- aikit/docs/DOCKER.md +74 -0
- aikit/docs/DOCKER_HUB_OVERVIEW.md +311 -0
- aikit/docs/EVALUATION.md +30 -0
- aikit/docs/IMPLEMENTATION.md +134 -0
- aikit/docs/MANUS_REVIEW.md +46 -0
- aikit/docs/PYPI.md +87 -0
- aikit/docs/PYPI_DESCRIPTION.md +103 -0
- aikit/docs/SECURITY_AUDIT.md +26 -0
- aikit/docs/STRIX.md +28 -0
- aikit/docs/V0_5_0.md +27 -0
- aikit/docs/V0_6_4.md +25 -0
- aikit/docs/V1_4_0.md +73 -0
- aikit/docs/V1_4_1.md +55 -0
- aikit/docs/V1_4_2.md +33 -0
- aikit/docs/WEB_DESIGN.md +72 -0
- aikit/docs/WINDOWS_CI_FIX.md +39 -0
- aikit/docs/adr/0000-template.md +24 -0
- aikit/docs/adr/0001-adaptive-model-routing.md +30 -0
- aikit/docs/adr/0002-template-separation.md +24 -0
- aikit/docs/adr/0003-agent-registry-and-router.md +24 -0
- aikit/docs/adr/0004-onboarding-and-project-facts.md +24 -0
- aikit/docs/adr/0005-client-settings-ownership.md +30 -0
- aikit/docs/adr/0006-routing-evidence-and-local-measurements.md +26 -0
- aikit/docs/adr/0007-generated-client-configuration-and-presets.md +34 -0
- aikit/docs/adr/0008-unified-cli-and-fact-drift.md +20 -0
- aikit/docs/adr/0009-provider-review-doctor-fix-and-ci-self-install.md +20 -0
- aikit/docs/adr/0010-metrics-analysis-and-gemini-verification.md +20 -0
- aikit/docs/adr/0011-evidence-lifecycle-and-evaluation.md +20 -0
- aikit/docs/adr/0012-measurement-led-routing.md +31 -0
- aikit/docs/adr/0013-docker-cli-image.md +24 -0
- aikit/docs/adr/0014-local-dialogue-memory.md +22 -0
- aikit/docs/history/original-bundle-checks.md +11 -0
- aikit/docs/history/v0.1-changelog.txt +37 -0
- aikit/docs/history/v0.10-changelog.md +12 -0
- aikit/docs/history/v0.2-changelog.md +35 -0
- aikit/docs/history/v0.3-changelog.md +25 -0
- aikit/docs/history/v0.4-changelog.md +31 -0
- aikit/docs/history/v0.5-changelog.md +14 -0
- aikit/docs/history/v0.6.4-changelog.md +12 -0
- aikit/docs/history/v0.6.5-v0.9-changelog.md +35 -0
- aikit/docs/history/v1.1.0-changelog.md +12 -0
- aikit/docs/history/v1.2.0-changelog.md +11 -0
- aikit/docs/history/verification-before-measurements.md +53 -0
- aikit/integrations/CONVENTIONS.md +3 -0
- aikit/integrations/README.md +7 -0
- aikit/integrations/agents.json +136 -0
- aikit/integrations/ai-kit-check.yml +66 -0
- aikit/integrations/ai-kit-cline.md +4 -0
- aikit/integrations/ai-kit-roo.md +4 -0
- aikit/integrations/ai-kit-windsurf.md +4 -0
- aikit/integrations/ai-kit.mdc +6 -0
- aikit/integrations/claude-settings.data-ask.json +23 -0
- aikit/integrations/claude-settings.git-ask.json +10 -0
- aikit/integrations/copilot-instructions.md +3 -0
- aikit/integrations/security-audit.json +135 -0
- aikit/integrations/strix.json +69 -0
- aikit/pyproject.toml +60 -0
- aikit/scripts/__init__.py +1 -0
- aikit/scripts/adapters.py +184 -0
- aikit/scripts/adaptive.py +167 -0
- aikit/scripts/adr.py +61 -0
- aikit/scripts/benchmark.py +543 -0
- aikit/scripts/changelog.py +55 -0
- aikit/scripts/check_distribution.py +178 -0
- aikit/scripts/check_kit.py +406 -0
- aikit/scripts/context.py +184 -0
- aikit/scripts/docker_test_usage.py +55 -0
- aikit/scripts/doctor.py +313 -0
- aikit/scripts/evaluate.py +125 -0
- aikit/scripts/install.py +1584 -0
- aikit/scripts/learning.py +260 -0
- aikit/scripts/memory.py +344 -0
- aikit/scripts/memory_import.py +177 -0
- aikit/scripts/memory_store.py +125 -0
- aikit/scripts/metrics.py +351 -0
- aikit/scripts/router.py +399 -0
- aikit/template/.agents/hooks/session-start.md +3 -0
- aikit/template/.agents/hooks/session-start.sh +21 -0
- aikit/template/.agents/skills/ai-kit-bootstrap/SKILL.md +14 -0
- aikit/template/.agents/skills/ai-kit-review/SKILL.md +11 -0
- aikit/template/.agents/skills/ai-kit-sync-context/SKILL.md +12 -0
- aikit/template/.agents/skills/context7-docs/SKILL.md +11 -0
- aikit/template/.agents/skills/design-extract/SKILL.md +9 -0
- aikit/template/.agents/skills/dotnet-work/SKILL.md +9 -0
- aikit/template/.agents/skills/filament-work/SKILL.md +9 -0
- aikit/template/.agents/skills/frontend-work/SKILL.md +9 -0
- aikit/template/.agents/skills/go-work/SKILL.md +9 -0
- aikit/template/.agents/skills/infra-work/SKILL.md +9 -0
- aikit/template/.agents/skills/java-work/SKILL.md +9 -0
- aikit/template/.agents/skills/laravel-blade-ui/SKILL.md +9 -0
- aikit/template/.agents/skills/laravel-work/SKILL.md +10 -0
- aikit/template/.agents/skills/library-work/SKILL.md +9 -0
- aikit/template/.agents/skills/moodle-work/SKILL.md +9 -0
- aikit/template/.agents/skills/php-work/SKILL.md +9 -0
- aikit/template/.agents/skills/project-continuity/SKILL.md +21 -0
- aikit/template/.agents/skills/python-work/SKILL.md +9 -0
- aikit/template/.agents/skills/rust-work/SKILL.md +9 -0
- aikit/template/.agents/skills/security-audit/SKILL.md +16 -0
- aikit/template/.agents/skills/security-audit/agents/openai.yaml +2 -0
- aikit/template/.agents/skills/strix/SKILL.md +16 -0
- aikit/template/.agents/skills/strix/agents/openai.yaml +2 -0
- aikit/template/.agents/skills/ui-review/SKILL.md +9 -0
- aikit/template/.agents/skills/web-design/SKILL.md +9 -0
- aikit/template/AGENTS.md +16 -0
- aikit/template/CHANGELOG.md +6 -0
- aikit/template/CLAUDE.md +5 -0
- aikit/template/GEMINI.md +4 -0
- aikit/template/KIMI.md +4 -0
- aikit/template/MANUS.md +4 -0
- aikit/template/PROJECT_CONTEXT.md +35 -0
- aikit/template/README.md +6 -0
- aikit/template/WIKI.md +37 -0
- aikit/template/ai-kit/ADAPTERS.md +100 -0
- aikit/template/ai-kit/BOOTSTRAP.md +15 -0
- aikit/template/ai-kit/CONTAINERS.md +63 -0
- aikit/template/ai-kit/CONTEXT7.md +96 -0
- aikit/template/ai-kit/CORE.md +23 -0
- aikit/template/ai-kit/ENGINEERING.md +34 -0
- aikit/template/ai-kit/MCP.md +17 -0
- aikit/template/ai-kit/METRICS.md +83 -0
- aikit/template/ai-kit/SECURITY-AUDIT.md +21 -0
- aikit/template/ai-kit/SECURITY.md +34 -0
- aikit/template/ai-kit/SKILLS.md +37 -0
- aikit/template/ai-kit/STRIX.md +44 -0
- aikit/template/ai-kit/UPSTREAM.md +38 -0
- aikit/template/ai-kit/WEB-DESIGN.md +37 -0
- aikit/template/ai-kit/profiles/OWNER.md +19 -0
- aikit/template/ai-kit/project.json +14 -0
- aikit/template/ai-kit/router/POLICY.md +79 -0
- aikit/template/ai-kit/router/providers/anthropic.json +44 -0
- aikit/template/ai-kit/router/providers/anthropic.md +14 -0
- aikit/template/ai-kit/router/providers/gemini.json +13 -0
- aikit/template/ai-kit/router/providers/gemini.md +10 -0
- aikit/template/ai-kit/router/providers/kimi.json +26 -0
- aikit/template/ai-kit/router/providers/kimi.md +13 -0
- aikit/template/ai-kit/router/providers/local.json +18 -0
- aikit/template/ai-kit/router/providers/local.md +10 -0
- aikit/template/ai-kit/router/providers/openai.json +48 -0
- aikit/template/ai-kit/router/providers/openai.md +14 -0
- aikit/template/ai-kit/router/routing.json +11 -0
- aikit/template/ai-kit/router/selection.json +14 -0
- aikit/template/ai-kit/settings.json +11 -0
- aikit/template/ai-kit/stacks/DOTNET.md +13 -0
- aikit/template/ai-kit/stacks/FILAMENT.md +18 -0
- aikit/template/ai-kit/stacks/FRONTEND.md +9 -0
- aikit/template/ai-kit/stacks/GO.md +19 -0
- aikit/template/ai-kit/stacks/INFRA.md +12 -0
- aikit/template/ai-kit/stacks/JAVA.md +13 -0
- aikit/template/ai-kit/stacks/LARAVEL.md +15 -0
- aikit/template/ai-kit/stacks/LIBRARY.md +9 -0
- aikit/template/ai-kit/stacks/MOODLE.md +12 -0
- aikit/template/ai-kit/stacks/PHP.md +11 -0
- aikit/template/ai-kit/stacks/PYTHON.md +11 -0
- aikit/template/ai-kit/stacks/RUST.md +18 -0
- aikit/template/ai-kit/vendor/security-audit/AI-AND-LLM.md +83 -0
- aikit/template/ai-kit/vendor/security-audit/ATTACK-CLASSES.md +130 -0
- aikit/template/ai-kit/vendor/security-audit/CLIENT-SIDE.md +83 -0
- aikit/template/ai-kit/vendor/security-audit/CLOUD-AND-DEPLOYMENT.md +86 -0
- aikit/template/ai-kit/vendor/security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -0
- aikit/template/ai-kit/vendor/security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -0
- aikit/template/ai-kit/vendor/security-audit/HUNTING.md +251 -0
- aikit/template/ai-kit/vendor/security-audit/LICENSE +21 -0
- aikit/template/ai-kit/vendor/security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -0
- aikit/template/ai-kit/vendor/security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -0
- aikit/template/ai-kit/vendor/security-audit/RECONNAISSANCE.md +156 -0
- aikit/template/ai-kit/vendor/security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -0
- aikit/template/ai-kit/vendor/security-audit/SKILL.md +192 -0
- aikit/template/ai-kit/vendor/security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -0
- aikit/template/ai-kit/vendor/security-audit/VALIDATION-AND-REPORTING.md +186 -0
- aikit/template/ai-kit/vendor/security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -0
- aikit/template/ai-kit/vendor/security-audit/report-schema.json +461 -0
- aikit/template/ai-kit/vendor/security-audit/validate-coverage-ledger.cjs +872 -0
- aikit/template/ai-kit/vendor/security-audit/validate-coverage-ledger.test.cjs +740 -0
- aikit/template/ai-kit/vendor/security-audit/validate-findings.cjs +773 -0
- aikit/template/ai-kit/vendor/security-audit/validate-findings.test.cjs +652 -0
- aikit/template/ai-kit/vendor/strix/LICENSE +201 -0
- aikit/template/ai-kit/vendor/strix/api-security-testing/SKILL.md +61 -0
- aikit/template/ai-kit/vendor/strix/application-security-testing/SKILL.md +66 -0
- aikit/template/ai-kit/vendor/strix/ci-security-scanning-with-strix/SKILL.md +149 -0
- aikit/template/ai-kit/vendor/strix/find-security-vulnerabilities-in-code/SKILL.md +62 -0
- aikit/template/ai-kit/vendor/strix/fix-security-vulnerabilities-with-strix/SKILL.md +77 -0
- aikit/template/ai-kit/vendor/strix/managed-pentesting-with-strix/SKILL.md +321 -0
- aikit/template/ai-kit/vendor/strix/owasp-top-10-testing/SKILL.md +64 -0
- aikit/template/ai-kit/vendor/strix/penetration-testing-with-strix/SKILL.md +162 -0
- aikit/template/ai-kit/vendor/strix/web-app-penetration-testing/SKILL.md +54 -0
- aikit/template/ai-kit/web-design/LARAVEL.md +51 -0
- aikit/template/ai-kit/web-design/LIBRARIES.md +39 -0
- aikit/template/ai-kit/web-design/REVIEW.md +37 -0
- aikit/template/ai-kit/web-design/TOOLS.md +43 -0
- aikit/template/docs/DECISIONS.md +7 -0
- aikit/template/docs/adr/0000-template.md +20 -0
- aikit/template/docs/design/ACCEPTANCE.md +24 -0
- aikit/template/docs/design/BRIEF.md +26 -0
- aikit/template/docs/design/SYSTEM.md +30 -0
- aikit/templates/agent-secrets.ignore +19 -0
- aikit/templates/gitignore.private +160 -0
- aikit/templates/gitignore.team +139 -0
- aikit/tests/build_distribution.py +73 -0
- aikit/tests/docker_smoke.py +172 -0
- aikit/tests/fixtures/create-junction.ps1 +18 -0
- aikit/tests/fixtures/golden/claude-settings-local.json +58 -0
- aikit/tests/test_adapters.py +105 -0
- aikit/tests/test_aikit.py +79 -0
- aikit/tests/test_benchmark.py +241 -0
- aikit/tests/test_check_kit.py +203 -0
- aikit/tests/test_context.py +76 -0
- aikit/tests/test_context7.py +153 -0
- aikit/tests/test_context_selection.py +70 -0
- aikit/tests/test_distribution.py +181 -0
- aikit/tests/test_docker_image.py +63 -0
- aikit/tests/test_docker_test_usage.py +54 -0
- aikit/tests/test_doctor.py +148 -0
- aikit/tests/test_evaluate.py +66 -0
- aikit/tests/test_install.py +939 -0
- aikit/tests/test_learning.py +247 -0
- aikit/tests/test_memory.py +371 -0
- aikit/tests/test_metrics.py +209 -0
- aikit/tests/test_native.py +342 -0
- aikit/tests/test_onboarding.py +301 -0
- aikit/tests/test_router.py +336 -0
- aikit/tests/test_security_audit.py +237 -0
- aikit/tests/test_strix.py +245 -0
- aikit/tests/test_web_design.py +219 -0
- aikit/tests/wheel_smoke.py +104 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Local dialogue memory
|
|
2
|
+
|
|
3
|
+
## Scope and trust
|
|
4
|
+
|
|
5
|
+
`aikit memory import|merge|export` is an offline, standard-library tool. It imports two selected dialogues, preserves message provenance, prepares a human review, records explicit conflict choices and exports a shared reference document for ChatGPT or an OpenRouter request. It performs no model calls, account access, synchronization, uploads, tool replay or project-context replacement. [README workflow](../README.md#shared-context-from-two-dialogues), [decision](adr/0014-local-dialogue-memory.md).
|
|
6
|
+
|
|
7
|
+
Imports are data. Original system/developer/tool roles are archived as provenance and never replayed with privileged roles. Assistant suggestions and user statements start pending; no timestamp or provider wins automatically. Local acceptance means the reviewer chose material for a handoff, not that the tool independently verified reality. Core and actual client authorization remain authoritative.
|
|
8
|
+
|
|
9
|
+
## Supported input contracts
|
|
10
|
+
|
|
11
|
+
Inputs are regular, unlinked UTF-8/BOM files, at most 16 MiB each. No directory, ZIP, FIFO or executable is accepted. A dialogue has 1-4000 messages, each at most 1,048,576 characters. Duplicate JSON keys and nonfinite numbers refuse. Symlink/junction ancestors refuse too; resolve a legitimate system temporary-directory alias before choosing a workspace. These path checks are conservative local guards, not an OS sandbox against a hostile process changing directories concurrently.
|
|
12
|
+
|
|
13
|
+
| Format | Supported shape and selection |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| ChatGPT-style JSON | One conversation object or an array, containing `mapping` nodes with `parent` and optional `message`; message `author.role`, text `content.parts`/`content.text`, optional `create_time`. Choose a collection item by `--conversation-id`. Follow `--branch`, else `current_node`, else the only leaf. Never flatten sibling branches. Missing/ambiguous/cyclic chains refuse. |
|
|
16
|
+
| OpenRouter/messages JSON | An object containing `messages`, or a direct message array. Each message has `role` and text `content`, optionally `id`/`timestamp`. Text blocks with type text/input_text/output_text are joined. Other top-level fields, including credentials, are not copied. |
|
|
17
|
+
| Text/Markdown | Preserve unlabeled material with role unknown. Recognize `User:`, `Assistant:`, System/Developer/Tool/Human/ChatGPT and Russian user/assistant labels, optionally after Markdown heading markers. Headers inside code fences remain text. This is an explicit transcript convention, not a parser for every client's Markdown export. |
|
|
18
|
+
|
|
19
|
+
Auto format uses the `.json` suffix; otherwise text. Override with `--format chatgpt|messages|text`. A JSON collection needs exactly one selected conversation. Original IDs/timestamps remain provenance; input bytes are represented by SHA-256, not copied wholesale. Normalization is not a byte-for-byte transcript archive. Nontext parts and tool calls are counted as omitted; attachments, images, audio, original tools and hidden state are not reconstructed. Review the omissions before using an export. Use a text transcript if an unsupported client export shape refuses.
|
|
20
|
+
|
|
21
|
+
ChatGPT mapping compatibility is a bounded importer contract exercised with synthetic fixtures, not a guarantee for every account/export revision. The official [ChatGPT projects documentation](https://learn.chatgpt.com/docs/projects) supports using uploaded/shared project sources but does not establish this mapping schema. The [OpenRouter API](https://openrouter.ai/docs/api/api-reference/chat/create-a-chat-completion) documents the messages request shape. Source check: 2026-10-15; no actual account export or live API was accessed.
|
|
22
|
+
|
|
23
|
+
## Workspace and immutable records
|
|
24
|
+
|
|
25
|
+
Use a new private directory, for example `TARGET/ai-kit/.memory/session-01`, or a private path outside repositories. An existing nonempty unmarked directory refuses. Every command previews by default; `--apply` writes only local files. Commands print counts, identifiers and relative artifact paths, never dialogue bodies. Read errors are sanitized rather than echoing input text. Imported content can still contain secrets: the tool does not claim to identify/redact them. Review the outgoing documents yourself.
|
|
26
|
+
|
|
27
|
+
New POSIX directories/files use 0700/0600; Windows uses inherited ACLs. Current private/team install policies, root source ignores and Docker/package exclusions protect `ai-kit/.memory/`. Upgrade the installed ignore policy before storing data in an older team project. Arbitrary other workspace paths need their own privacy/ignore configuration. Git ignores are not access control. Installer upgrades preserve workspace bytes and never manage their content as template files.
|
|
28
|
+
|
|
29
|
+
| Path under workspace | Purpose |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| workspace.json | Schema/ownership marker |
|
|
32
|
+
| imports/NAME.json | Normalized immutable source; source name is a lowercase portable identifier |
|
|
33
|
+
| merges/SHA256.json | Immutable merge plus exact input hashes and full review |
|
|
34
|
+
| reviews/SHA256.json | Initial review worksheet; copy before editing |
|
|
35
|
+
| exports/SHA256/chatgpt[-draft].md | Markdown reference document for a ChatGPT chat or Project |
|
|
36
|
+
| exports/SHA256/openrouter[-draft].json | Request fragment containing one user message with the same document |
|
|
37
|
+
|
|
38
|
+
Identical reruns write nothing. Different bytes under an existing source name/artifact refuse; choose a new name/workspace. Existing files are never replaced, including files created after planning. Hard-linked output artifacts refuse. Before export, source hashes, merge identity and recomputed review result must match. There is no mutable latest pointer: pass the full merge ID, so an old export cannot silently become a new decision. Files are exclusively created and flushed; a terminated multi-file operation can leave completed artifacts or a partial file. Inspect incomplete work and use a fresh workspace when necessary; no automatic rollback or overwrite recovery is claimed.
|
|
39
|
+
|
|
40
|
+
## Review and conflict rules
|
|
41
|
+
|
|
42
|
+
Candidate extraction recognizes simple `key: value` / `key = value` lines outside fences, optionally prefixed Fact/Decision/Constraint/Task/Question. Keys normalize Unicode case and whitespace; values compare exactly. Unmatched prose/code stays pending notes. Original system/developer/tool material stays notes. At most 8000 candidates are generated. There is no semantic model: paraphrases, synonyms, negation and aliases in free prose require explicit review. A lack of keyed conflicts does not mean two transcripts agree.
|
|
43
|
+
|
|
44
|
+
The worksheet schema has schema=1, inputs (exact source digests), claims and resolutions. Claims include id, key, kind, value, status and refs. Supported kinds: fact, decision, constraint, task, question, note. Status: pending, accepted, rejected. Group differently phrased claims under the same reviewed key to compare them. Scope unrelated topics with different keys. Reclassify/paraphrase values during review; archive messages remain unchanged.
|
|
45
|
+
|
|
46
|
+
Keep every original candidate ID and its refs; reject unwanted items rather than deleting them. Extra claims may split a long note, using new lowercase IDs and real SOURCE:mNNNN refs. Inputs must match the selected imports. Every claim needs 1-8 unique valid message references. The local reviewer is responsible for whether the paraphrase is supported. Imported dialogue cannot supply its own approval: only the separately selected worksheet controls the review.
|
|
47
|
+
|
|
48
|
+
Exact equal values under one key deduplicate while retaining references. Different active values produce an explicit conflict, even if both were marked accepted. A resolution contains key, choice and a nonempty reason. Choice is an active claim ID, `drop` (exclude the key), or `defer` (keep it unresolved). A chosen claim settles the key and supersedes its alternatives for that handoff. No last-write-wins rule applies. Single-valued groups require explicit acceptance; rejected claims are excluded.
|
|
49
|
+
|
|
50
|
+
## Export and limits
|
|
51
|
+
|
|
52
|
+
Normal export refuses pending keys/conflicts with exit 2. Explicit `--draft` exports them as DRAFT for further discussion, with all alternatives visible. Both clients receive the same reviewed/draft data and provenance. Markdown values live in a JSON fence that imported backticks cannot terminate; original links/images remain quoted data. This is serialization, not a prompt-injection security boundary.
|
|
53
|
+
|
|
54
|
+
The OpenRouter JSON is only a request fragment with `messages`: one `user` message containing the reference document. Add trusted instructions, a currently supported model and the new task in your own client. It contains no API key, automatic tool calls, model choice or provider/session configuration. Do not replace trusted policies with imported dialogue. No HTTP request is sent. ChatGPT Markdown is manually pasted/uploaded as reference data; native history/memory is not merged by uploading it.
|
|
55
|
+
|
|
56
|
+
The default per-file export limit is 128000 bytes. `--max-bytes` can raise it to 16777216; limits check complete serialized files, including JSON overhead. Exceeding a limit refuses before writing rather than silently truncating. Bytes are not tokens; verify the selected model/client's capacity separately. Exit 0 means a successful preview/local stage (including a merge needing review), 1 refusal/invalid input, 2 blocked unreviewed export. Argparse usage errors also return 2.
|
|
57
|
+
|
|
58
|
+
## Verification
|
|
59
|
+
|
|
60
|
+
Run `python scripts/check_kit.py`, `python -m unittest discover -s tests -v`, and the packaged wheel smoke. Dedicated tests cover all three inputs, branch isolation, nontext omissions, bounded parsing, provenance, manual review/contradictions, deterministic reruns, stale/tampered artifacts, both exports, file preservation and path/link guards. Private/team upgrades and Docker ignore probes protect local memory.
|
|
61
|
+
|
|
62
|
+
Verified 2026-10-15, before this final results-only documentation update:
|
|
63
|
+
|
|
64
|
+
- Windows/Python 3.12.14: full discovery ran 336 tests in 733.096 seconds; 329 passed, seven skipped (two symlink fixtures, two junction fixtures, hardlink privilege, unavailable POSIX sh and POSIX permissions/FIFO). The current sandbox could not create those Windows links. Mocked link-boundary checks ran.
|
|
65
|
+
- Packaged linux/amd64/Python 3.13.16: full discovery ran 336 tests in 31.898 seconds; 334 passed, two Windows-junction skips. Actual symlink/hardlink, POSIX modes and FIFO refusal ran under a non-root, offline, read-only image. Docker client/server 29.8.2 used desktop-linux; the local ai-kit:memory-test build was not published.
|
|
66
|
+
- Offline fresh-venv Windows wheel smoke exercised imports, merge and both draft exports from the installed console command. A second isolated build with synthetic private memory proved it was absent from the wheel. Docker's real ignore-engine probe excluded synthetic memory; the existing image runtime/preservation/signal smoke also passed.
|
|
67
|
+
- The README PowerShell flow ran with synthetic native ChatGPT mapping and messages JSON, identified one conflict, accepted a reasoned choice and produced both reviewed exports. Python 3.10 grammar, source language/links/budgets and relocated v1.1.0 history preservation passed. Full native Python 3.10 and macOS/hosted CI were not run here.
|
|
68
|
+
- Test containers were removed and no test Docker volumes were created. Shared build-cache ownership/bytes could not be isolated; no cache/volume pruning was performed. Source files, account histories and actual application state were not changed by these fixtures.
|
|
69
|
+
|
|
70
|
+
Actual account-export variants, native ChatGPT upload/activation, OpenRouter execution, live model calls and automatic synchronization remain separate checks. Local review does not establish semantic correctness of an actual user's imported claims.
|
aikit/docs/DOCKER.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# AI-KIT CLI image
|
|
2
|
+
|
|
3
|
+
## Role and boundary
|
|
4
|
+
|
|
5
|
+
The root [Dockerfile](../Dockerfile) packages the existing Python CLI as a one-shot Linux workload. It does not run an agent, model adapter, HTTP service or security scanner. [README usage](../README.md#run-ai-kit-with-docker) covers build, mounts, commands and updates; canonical container policy remains [CONTAINERS](../template/ai-kit/CONTAINERS.md). [ADR 0013](adr/0013-docker-cli-image.md) records the role and tradeoffs.
|
|
6
|
+
|
|
7
|
+
The wheel is installed at build time, including templates, pinned security resources, optional skills, docs and tests. Runtime uses no checkout mount or package installation. `/workspace` is an application bind mount, outside the reference distribution; `/tmp` is explicitly writable temporary storage. No Docker socket, host credentials, privileged mode or anonymous volume is required. Git supports project evidence/visibility checks; external framework tools and reviewed benchmark workers are outside this image.
|
|
8
|
+
|
|
9
|
+
Root AGENTS.md, PROJECT_CONTEXT.md and WIKI.md stay local and are excluded from wheel/context; template counterparts remain packaged. See [maintenance](../CONTRIBUTING.md#local-maintainer-files).
|
|
10
|
+
|
|
11
|
+
The entrypoint is exec-form `aikit`, default command `--help`, default UID/GID `10001:10001`, and stop signal SIGTERM. Callers use `--init`, a read-only root, dropped capabilities and no-new-privileges. Ordinary reports can disable networking and mount the project read-only. Installation requires an intentional writable project mount and `--apply`. Existing installer defaults, preservation and conflicts are unchanged. Mid-apply interruption is not an atomic rollback guarantee; inspect, run doctor and preview again.
|
|
12
|
+
|
|
13
|
+
## Build inputs
|
|
14
|
+
|
|
15
|
+
Verified 2026-10-14 against the [official Python image manifest](https://github.com/docker-library/official-images/blob/master/library/python), the Docker registry and PyPI release metadata:
|
|
16
|
+
|
|
17
|
+
| Input | Pin |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| Python base | `python:3.13.16-slim-bookworm` |
|
|
20
|
+
| Multiarchitecture image index | `sha256:a1165e272e578941b84abc79e4ab38a0305cd12803a5c4247979ac7655f4d641` |
|
|
21
|
+
| Observed linux/amd64 manifest | `sha256:f040863673aea2570c3ff6a5c3fb4c673a016cbc5375005ad145915922b6b78a` |
|
|
22
|
+
| Build-only setuptools | 84.0.0 |
|
|
23
|
+
| Build-only wheel | 0.48.0 |
|
|
24
|
+
| Build-only packaging | 26.3 |
|
|
25
|
+
|
|
26
|
+
[build-requirements.txt](../docker/build-requirements.txt) records exact wheel SHA-256 hashes; pip verifies them with `--require-hashes`. The builder produces a no-runtime-dependency wheel without isolated dependency resolution. Runtime installation uses `--no-index --no-deps`. Git and its Debian dependencies resolve at build time; the base/tool pins do not promise byte-identical rebuilds. A distributable release must record its own resulting immutable image identity. Registry publication requires explicit authorization and remote verification.
|
|
27
|
+
|
|
28
|
+
`AIKIT_VERSION` must match [VERSION](../VERSION); [the guard](../docker/check_version.py) refuses missing/mismatched labels before building. Tags remain mutable. Follow the [release checklist](../CONTRIBUTING.md#docker-hub-releases) to update the [Overview](DOCKER_HUB_OVERVIEW.md) for every image release. [v1.4.1](V1_4_1.md) records publication; the results below retain their original versions.
|
|
29
|
+
|
|
30
|
+
The [.dockerignore](../.dockerignore) is a closed allowlist with later sensitive/cache exclusions. Unknown root files are excluded. Included source directories still require review: a filename denylist cannot detect arbitrary credentials embedded in allowed source. Synthetic context tests verify actual Docker ignore behavior, including hidden source skill directories, without reading personal credentials. The `context-audit` scratch stage is a test export target, never the runtime image. Package-data and MANIFEST include image resources so the installed wheel can pass kit validation.
|
|
31
|
+
|
|
32
|
+
## Change impact and image refresh
|
|
33
|
+
|
|
34
|
+
Assess image impact on every maintenance task, including changes outside Dockerfile. Canonical policy: [image freshness](../template/ai-kit/CONTAINERS.md#image-freshness).
|
|
35
|
+
|
|
36
|
+
- Rebuild when CLI/scripts, installed templates/skills, ignore policies, integration resources, defaults or runtime dependencies change. Inspect Dockerfile COPY steps, `.dockerignore`, wheel package-data and MANIFEST: changing a source file is ineffective if packaging omits it. VERSION, build tools, base image, entrypoint and runtime-contract changes also require rebuilding and relevant checks.
|
|
37
|
+
- Descriptive README/maintainer edits or publication receipts may retain the prepared image when runtime behavior and installed guidance stay unchanged; record that its bundled documentation is an earlier snapshot. Changes only in a mounted application or private dialogue workspace do not update the kit distribution and normally need no kit rebuild.
|
|
38
|
+
- Build from final sources as `ai-kit:dev`, passing the current VERSION through AIKIT_VERSION. Keep the published `tigusigalpa/ai-kit:1.4.0` identity intact. Use normal cache invalidation; editing Dockerfile or disabling all cache is unnecessary for ordinary source changes.
|
|
39
|
+
- Run kit validation, affected behavior tests and `python tests/docker_smoke.py ai-kit:dev --context .`; compare the changed packaged resources with source. Follow the verification procedure below for scope, preflight and cleanup. Keep artifact binaries and per-run identity/results outside the source checkout. Record a reason when no rebuild is needed; report runtime checks that could not run.
|
|
40
|
+
- Local refresh does not refresh Docker Hub. Publish only under explicit authorization for the intended tag; an earlier one-time release push does not authorize future replacements. A requested release version must agree across VERSION, wheel and image label. Verify the remote digest/configuration after an authorized push.
|
|
41
|
+
|
|
42
|
+
## Verification procedure
|
|
43
|
+
|
|
44
|
+
1. Read the selected Docker context and both client/server versions; distinguish permissions from a stopped daemon. Build locally with the value from VERSION and record the tested architecture.
|
|
45
|
+
2. Run `python scripts/check_kit.py` and `python -m unittest discover -s tests -v` after packaging/checker changes. Keep wheel output in an isolated source copy so tests cannot copy locked build artifacts.
|
|
46
|
+
3. Build `docker build --build-arg AIKIT_VERSION=<value> --tag ai-kit:<value> .` and run `python tests/docker_smoke.py ai-kit:<value> --context .`. An optional `--builder NAME` scopes the synthetic context export to a dedicated builder.
|
|
47
|
+
4. Check a missing/mismatched version build refuses. Inspect image user, labels, entrypoint and architecture; exercise the packaged wheel without host sources.
|
|
48
|
+
5. Validate the [Job](../deploy/k8s/install-preview-job.yaml) against the target Kubernetes schema. Cluster dry-run and startup require a separately verified cluster context and existing PVC. No cluster deployment is part of image integration.
|
|
49
|
+
6. Inspect the project test resource inventory after successful or failed runs. Measure owned volumes/cache without double-counting builder storage. Remove only eligible disposable resources when the canonical combined size is strictly above 10,000,000,000 bytes; a shared builder's records require ownership evidence. Never use unscoped system/volume/builder pruning.
|
|
50
|
+
|
|
51
|
+
[docker_smoke.py](../tests/docker_smoke.py) checks non-root execution, matching version/label, no service/anonymous-volume contract, offline read-only help/route/check, a project path with spaces, read-only preview and refusal, installation of all four opt-in modules, preserved project/client documents, doctor, design context selection, stable rerun and SIGTERM in interactive preview. It removes only its own labeled temporary signal container; ordinary commands use `--rm`. It creates no Docker volumes. Linux callers forward a non-root host UID/GID for bind ownership; Windows uses the image default. Unit tests cover the version guard and safe command construction without requiring Docker.
|
|
52
|
+
|
|
53
|
+
The new `Docker CLI` CI job builds and smoke-tests locally on Ubuntu. Existing validation/wheel check names are unchanged. Hosted execution and branch-protection changes need their own evidence/authorization.
|
|
54
|
+
|
|
55
|
+
## Kubernetes contract
|
|
56
|
+
|
|
57
|
+
The supplied batch/v1 Job is a read-only preview, not an apply operation: `install /workspace --agent codex`. `backoffLimit: 0` avoids retrying a one-shot operation automatically. It has a 300-second deadline, 30-second termination grace, non-root UID/GID, RuntimeDefault seccomp, dropped capabilities, no privilege escalation, no service-account token and read-only root. It reads an existing PVC and writes temporary files to a bounded emptyDir. It has no Service or artificial probe.
|
|
58
|
+
|
|
59
|
+
`ai-kit:local`/Never requires that local image on the selected nodes. Use a reviewed registry digest/pull policy for other environments. Storage must be readable by UID 10001; no ownership mutation or fsGroup policy is assumed. CPU 100m/1 and memory 128Mi/512Mi are initial estimates, to be measured for the actual project. Add configuration, authentication or network controls only when the selected command needs them.
|
|
60
|
+
|
|
61
|
+
## Verification results
|
|
62
|
+
|
|
63
|
+
Current release labeling, tagged image and package checks: [v1.4.1](V1_4_1.md#verification). The initial integration results below retain their original date and version.
|
|
64
|
+
|
|
65
|
+
Verified locally on 2026-10-14:
|
|
66
|
+
|
|
67
|
+
- Docker Desktop 4.95.0 (242831), client/server 29.8.2, selected `desktop-linux` daemon, BuildKit v0.33.1. Built and smoke-tested `ai-kit:1.3.0` on linux/amd64. Runtime Python 3.13.16, Git 2.39.5 and AI-KIT 1.3.0 matched the declared image identity; default UID/GID was 10001:10001. Missing and mismatched version builds refused at the guard.
|
|
68
|
+
- Actual container smoke passed with network disabled, read-only root, temporary storage and a Windows bind mount containing spaces: preview, read-only apply refusal, all four extras with Codex/Claude entries, preserved README/MCP bytes, doctor, design context and stable rerun. Docker's ignore engine included hidden source skills and excluded synthetic secret/private files. Interactive preview received SIGTERM and exited 143 without a forced kill. Alternate UID/GID 1002:1003 installed and checked a project on temporary storage with matching created-file ownership.
|
|
69
|
+
- Full Windows/Python 3.12.14 discovery: 309 tests in 575.738 seconds, 307 passed and two skips (symlink privilege and unavailable POSIX sh). Both junction tests ran. Full packaged Linux/Python 3.13.16 discovery under a non-root, offline, read-only container: 309 tests in 29.096 seconds, 307 passed and two Windows-junction skips. These runs preceded the final result/ADR documentation; final packaging and kit/image checks follow that documentation update.
|
|
70
|
+
- Windows wheel built in an isolated source copy without network dependency resolution; offline fresh-venv smoke passed, including all opt-in modules and packaged Docker resources. Added Python files parsed with Python 3.10 grammar. Kit validation and diff review were clean.
|
|
71
|
+
- Job YAML passed strict field/type validation against the official [Kubernetes v1.35.0 OpenAPI schema](https://github.com/kubernetes/kubernetes/blob/v1.35.0/api/openapi-spec/swagger.json), with local preview/security assertions. Download SHA-256: `483500149ee52ce5753d75f5639101d985bb4f5e902cc05b1ba7627465d62446`. This is static schema coverage, not admission or storage/startup acceptance.
|
|
72
|
+
- Test containers were removed; no test Docker volumes were created. The shared `desktop-linux` builder and existing volumes contain unrelated resources, so project cache bytes/ownership could not be isolated. No cache/volume prune was performed. The local CLI image is retained; per-run inventory is kept in the task report.
|
|
73
|
+
|
|
74
|
+
Registry publication, hosted CI, macOS execution, other image architectures and Kubernetes server dry-run/deployment were not run. Native AI client activation, model calls, real benchmarks, framework/browser acceptance and security scans remain separate work.
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
# AI-KIT
|
|
2
|
+
|
|
3
|
+
**Give your AI coding agents persistent project context, reusable skills and a consistent engineering workflow.**
|
|
4
|
+
|
|
5
|
+
AI-KIT installs portable project instructions, stack profiles, client configuration and optional skills into your repository. It helps coding agents understand your project, preserve decisions, follow your conventions and verify their work.
|
|
6
|
+
|
|
7
|
+
The Docker image packages the installer and CLI helpers with Python, Git, templates and integration resources. You can use AI-KIT without installing Python on your host.
|
|
8
|
+
|
|
9
|
+
**Current image:** `tigusigalpa/ai-kit:1.4.1`
|
|
10
|
+
|
|
11
|
+
**Published platform:** `linux/amd64`
|
|
12
|
+
|
|
13
|
+
**Source:** [github.com/tigusigalpa/ai-kit](https://github.com/tigusigalpa/ai-kit)
|
|
14
|
+
|
|
15
|
+
## What AI-KIT provides
|
|
16
|
+
|
|
17
|
+
| Capability | Description |
|
|
18
|
+
| --- | --- |
|
|
19
|
+
| **Persistent project context** | Project facts, module maps, commands, decisions and continuity instructions that agents can reuse across chats. |
|
|
20
|
+
| **Configuration for 11 AI clients** | Adapters for Codex, Claude Code, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, Roo, Aider, Kimi and Manus. Discovery and activation depend on the selected client. |
|
|
21
|
+
| **Stack-specific guidance** | Profiles for Go, PHP, Laravel, Filament, Moodle, Python, frontend, libraries, Rust, .NET, Java and Terraform/Helm. |
|
|
22
|
+
| **Preview-first installation** | Review proposed changes before writing. Existing project documents and local modifications follow preservation and conflict rules. |
|
|
23
|
+
| **Engineering workflows** | Plan, implement, test, review and document, supported by bootstrap, review and context synchronization skills. |
|
|
24
|
+
| **Optional Web Design** | Reference analysis, project briefs, visual systems, stack-aware implementation guidance and UI acceptance criteria, including a Laravel Blade route. |
|
|
25
|
+
| **Optional security workflows** | Pinned Cloudflare security-audit references and Strix workflow skills, installed explicitly and invoked on request. |
|
|
26
|
+
| **Optional Context7 guidance** | Version-aware documentation lookup workflows, with client connection setup handled separately. |
|
|
27
|
+
| **Shared dialogue context** | Local conversation imports, source references, contradiction review and exports for ChatGPT and OpenRouter. |
|
|
28
|
+
| **Routing and evaluation helpers** | Model-routing recommendations, context selection, local metrics and benchmark scaffolding. Actual model execution requires a separately configured runtime. |
|
|
29
|
+
| **Docker and Kubernetes guidance** | Container security, lifecycle, image freshness and deployment instructions, plus a Kubernetes installation-preview Job example. |
|
|
30
|
+
|
|
31
|
+
AI-KIT installs instructions and supporting tools. Your coding client performs the development work.
|
|
32
|
+
|
|
33
|
+
## What changed in v1.4.1
|
|
34
|
+
|
|
35
|
+
### Docker image freshness
|
|
36
|
+
|
|
37
|
+
Installed project instructions now ask agents to assess Docker impact whenever the project has images.
|
|
38
|
+
|
|
39
|
+
When changes affect an image, the workflow calls for updating build inputs where needed, rebuilding the image and checking its actual behavior. This covers packaged code, instructions, templates, defaults and dependencies.
|
|
40
|
+
|
|
41
|
+
These are maintenance instructions; rebuilding and publishing still happen through the project's tools and authorization rules.
|
|
42
|
+
|
|
43
|
+
### Local maintainer files excluded
|
|
44
|
+
|
|
45
|
+
The following root AI-KIT maintainer documents are excluded from the Docker build context and Python distributions:
|
|
46
|
+
|
|
47
|
+
- `AGENTS.md`
|
|
48
|
+
- `PROJECT_CONTEXT.md`
|
|
49
|
+
- `WIKI.md`
|
|
50
|
+
|
|
51
|
+
Their **application template counterparts remain included** and can still be installed into your projects.
|
|
52
|
+
|
|
53
|
+
Public maintenance documentation now starts at `CONTRIBUTING.md`. Validation supports clean distributions without the optional local maintainer documents.
|
|
54
|
+
|
|
55
|
+
### Packaging and upgrade verification
|
|
56
|
+
|
|
57
|
+
The release includes regression coverage for package exclusions, template preservation and public links.
|
|
58
|
+
|
|
59
|
+
Verification included:
|
|
60
|
+
|
|
61
|
+
- 339 packaged Linux tests: **337 passed, two Windows-specific skips**.
|
|
62
|
+
- Nine Windows CLI tests.
|
|
63
|
+
- Actual Docker smoke tests, including offline execution, read-only behavior, installation, preservation, stable reruns and SIGTERM.
|
|
64
|
+
- Offline wheel installation into a clean environment.
|
|
65
|
+
- Upgrade fixtures from 1.4.0 in private and team modes.
|
|
66
|
+
|
|
67
|
+
## Pull and check the image
|
|
68
|
+
|
|
69
|
+
Docker must be running with Linux-container support.
|
|
70
|
+
|
|
71
|
+
```sh
|
|
72
|
+
docker pull tigusigalpa/ai-kit:1.4.1
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Check the CLI help:
|
|
76
|
+
|
|
77
|
+
```sh
|
|
78
|
+
docker run --rm --init --network none --read-only \
|
|
79
|
+
--cap-drop ALL \
|
|
80
|
+
--security-opt no-new-privileges \
|
|
81
|
+
--tmpfs /tmp:rw,nosuid,nodev,size=256m \
|
|
82
|
+
tigusigalpa/ai-kit:1.4.1 --help
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Arguments after the image name go directly to `aikit`. Running the image without arguments displays CLI help.
|
|
86
|
+
|
|
87
|
+
The commands below disable runtime networking. Pulling the image still requires registry access.
|
|
88
|
+
|
|
89
|
+
## Install into a project: Linux or Bash
|
|
90
|
+
|
|
91
|
+
Choose an existing application directory. Run as an ordinary host user so the forwarded UID/GID is non-root.
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
app_path="$(cd /absolute/path/to/my-app && pwd)"
|
|
95
|
+
image="tigusigalpa/ai-kit:1.4.1"
|
|
96
|
+
|
|
97
|
+
runtime=(
|
|
98
|
+
--rm --init
|
|
99
|
+
--network none
|
|
100
|
+
--read-only
|
|
101
|
+
--cap-drop ALL
|
|
102
|
+
--security-opt no-new-privileges
|
|
103
|
+
--tmpfs /tmp:rw,nosuid,nodev,size=256m
|
|
104
|
+
--user "$(id -u):$(id -g)"
|
|
105
|
+
)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Preview the installation with a read-only project mount:
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
docker run "${runtime[@]}" \
|
|
112
|
+
--mount "type=bind,source=$app_path,target=/workspace,readonly" \
|
|
113
|
+
"$image" install /workspace --agent codex
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
After reviewing the preview, apply using a writable project mount:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
docker run "${runtime[@]}" \
|
|
120
|
+
--mount "type=bind,source=$app_path,target=/workspace" \
|
|
121
|
+
"$image" install /workspace --agent codex --apply --check
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Check the installed project later:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
docker run "${runtime[@]}" \
|
|
128
|
+
--mount "type=bind,source=$app_path,target=/workspace,readonly" \
|
|
129
|
+
"$image" doctor /workspace
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Files written into `/workspace` persist in the mounted host directory after the container exits.
|
|
133
|
+
|
|
134
|
+
## Install into a project: Windows PowerShell
|
|
135
|
+
|
|
136
|
+
Use an existing application folder accessible to Docker Desktop.
|
|
137
|
+
|
|
138
|
+
```powershell
|
|
139
|
+
$appPath = (Resolve-Path -LiteralPath 'C:\Projects\my-app').Path
|
|
140
|
+
$image = 'tigusigalpa/ai-kit:1.4.1'
|
|
141
|
+
|
|
142
|
+
$runtime = @(
|
|
143
|
+
'--rm', '--init',
|
|
144
|
+
'--network', 'none',
|
|
145
|
+
'--read-only',
|
|
146
|
+
'--cap-drop', 'ALL',
|
|
147
|
+
'--security-opt', 'no-new-privileges',
|
|
148
|
+
'--tmpfs', '/tmp:rw,nosuid,nodev,size=256m'
|
|
149
|
+
)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Preview:
|
|
153
|
+
|
|
154
|
+
```powershell
|
|
155
|
+
docker run @runtime `
|
|
156
|
+
--mount "type=bind,source=$appPath,target=/workspace,readonly" `
|
|
157
|
+
$image install /workspace --agent codex
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Apply after reviewing the preview:
|
|
161
|
+
|
|
162
|
+
```powershell
|
|
163
|
+
docker run @runtime `
|
|
164
|
+
--mount "type=bind,source=$appPath,target=/workspace" `
|
|
165
|
+
$image install /workspace --agent codex --apply --check
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Check the installed project:
|
|
169
|
+
|
|
170
|
+
```powershell
|
|
171
|
+
docker run @runtime `
|
|
172
|
+
--mount "type=bind,source=$appPath,target=/workspace,readonly" `
|
|
173
|
+
$image doctor /workspace
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
The image uses UID/GID `10001:10001` by default. Docker Desktop file sharing must permit access to the mounted folder.
|
|
177
|
+
|
|
178
|
+
## Enable optional modules
|
|
179
|
+
|
|
180
|
+
Optional modules are selected explicitly and remain independent of installation presets.
|
|
181
|
+
|
|
182
|
+
| Installer option | Installs |
|
|
183
|
+
| --- | --- |
|
|
184
|
+
| `--with-web-design` | Design skills, conditional guides and project design documents. |
|
|
185
|
+
| `--with-context7` | Context7 documentation lookup guidance and skill entry points. |
|
|
186
|
+
| `--with-security-audit` | Pinned Cloudflare security-audit resources and an explicit entry point. |
|
|
187
|
+
| `--with-strix` | Pinned Strix workflow references and an explicit entry point. |
|
|
188
|
+
|
|
189
|
+
For example, in the Bash session above, preview a Codex and Claude Code installation with all four modules:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
docker run "${runtime[@]}" \
|
|
193
|
+
--mount "type=bind,source=$app_path,target=/workspace,readonly" \
|
|
194
|
+
"$image" install /workspace \
|
|
195
|
+
--agent codex --agent claude \
|
|
196
|
+
--with-web-design \
|
|
197
|
+
--with-context7 \
|
|
198
|
+
--with-security-audit \
|
|
199
|
+
--with-strix
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
To apply that selection, use a writable project mount and append `--apply --check`, keeping the same agent and module options.
|
|
203
|
+
|
|
204
|
+
Installing these modules does not start a security scan, connect an MCP server or invoke a model. External tools and client activation are configured separately.
|
|
205
|
+
|
|
206
|
+
## Shared context from conversations
|
|
207
|
+
|
|
208
|
+
AI-KIT can import two local dialogues and prepare a shared reference state.
|
|
209
|
+
|
|
210
|
+
Supported inputs include:
|
|
211
|
+
|
|
212
|
+
- ChatGPT-style conversation JSON with explicit conversation or branch selection when needed.
|
|
213
|
+
- OpenRouter-style `messages` JSON.
|
|
214
|
+
- UTF-8 text or Markdown transcripts from other clients.
|
|
215
|
+
|
|
216
|
+
The workflow is:
|
|
217
|
+
|
|
218
|
+
1. Import each conversation into a private workspace.
|
|
219
|
+
2. Merge the imports and generate a review worksheet.
|
|
220
|
+
3. Review claims and resolve explicit contradictions.
|
|
221
|
+
4. Export ChatGPT Markdown and/or an OpenRouter JSON request fragment.
|
|
222
|
+
|
|
223
|
+
Explore the commands without mounting any project:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
docker run "${runtime[@]}" "$image" memory --help
|
|
227
|
+
docker run "${runtime[@]}" "$image" memory import --help
|
|
228
|
+
docker run "${runtime[@]}" "$image" memory merge --help
|
|
229
|
+
docker run "${runtime[@]}" "$image" memory export --help
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Imports, merges and exports preview by default; `--apply` writes local artifacts. Use a writable mount for the workspace and readable mounts for source transcripts.
|
|
233
|
+
|
|
234
|
+
Normal exports require review. Explicit draft exports can retain pending claims and unresolved alternatives. Free-form semantic disagreements require human review.
|
|
235
|
+
|
|
236
|
+
ChatGPT output is reference Markdown for manual use. OpenRouter output contains a reference message for your own client to include in a request. This workflow does not synchronize accounts, upload conversations or execute API calls.
|
|
237
|
+
|
|
238
|
+
See the [shared dialogue context guide](https://github.com/tigusigalpa/ai-kit#shared-context-from-two-dialogues).
|
|
239
|
+
|
|
240
|
+
## Other useful commands
|
|
241
|
+
|
|
242
|
+
Using the Bash runtime options defined above:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
# Show CLI help.
|
|
246
|
+
docker run "${runtime[@]}" "$image" --help
|
|
247
|
+
|
|
248
|
+
# Validate the bundled AI-KIT distribution.
|
|
249
|
+
docker run "${runtime[@]}" "$image" check
|
|
250
|
+
|
|
251
|
+
# Inspect a routing recommendation.
|
|
252
|
+
docker run "${runtime[@]}" "$image" route "review an interface"
|
|
253
|
+
|
|
254
|
+
# Show provider records.
|
|
255
|
+
docker run "${runtime[@]}" "$image" providers
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
`check` validates the bundled distribution. `doctor /workspace` examines an installed application project.
|
|
259
|
+
|
|
260
|
+
For a project with Web Design enabled:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
docker run "${runtime[@]}" \
|
|
264
|
+
--mount "type=bind,source=$app_path,target=/workspace,readonly" \
|
|
265
|
+
"$image" context select /workspace --workflow web-design
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Context selection reports the relevant files and their scope. It does not send them to a model.
|
|
269
|
+
|
|
270
|
+
## Runtime contract
|
|
271
|
+
|
|
272
|
+
| Setting | Value |
|
|
273
|
+
| --- | --- |
|
|
274
|
+
| Entrypoint | `aikit` |
|
|
275
|
+
| Default command | `--help` |
|
|
276
|
+
| Published platform | `linux/amd64` |
|
|
277
|
+
| Default user | UID/GID `10001:10001` |
|
|
278
|
+
| Working directory | `/workspace` |
|
|
279
|
+
| Temporary writable storage | `/tmp`, supplied by the caller |
|
|
280
|
+
| Exposed ports | None |
|
|
281
|
+
| Shutdown signal | SIGTERM |
|
|
282
|
+
|
|
283
|
+
The image is a CLI workload. Each invocation runs a command and exits.
|
|
284
|
+
|
|
285
|
+
Python, Git and AI-KIT resources are bundled. Application toolchains, browsers, Node.js, Composer, model runtimes, MCP connections and the Strix executable are separate.
|
|
286
|
+
|
|
287
|
+
The examples use a read-only container root and explicit project mounts. Preview commands can use read-only mounts; installation and other explicit writes require writable mounts.
|
|
288
|
+
|
|
289
|
+
## Updates and reproducible references
|
|
290
|
+
|
|
291
|
+
To update a project, pull the selected image version, preview installation against the same project folder and review any conflicts before applying.
|
|
292
|
+
|
|
293
|
+
Existing project documents, settings, private dialogue memory and local edits retain the normal preservation rules.
|
|
294
|
+
|
|
295
|
+
For an immutable reference to this published build:
|
|
296
|
+
|
|
297
|
+
```sh
|
|
298
|
+
docker pull tigusigalpa/ai-kit@sha256:d11fc24026f13ad90d3ef7a39a235fa40db29ff022999cff3585e7e707978370
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Use the explicit version tag or digest. This release did not assign a `latest` tag.
|
|
302
|
+
|
|
303
|
+
## Documentation and license
|
|
304
|
+
|
|
305
|
+
- [Source repository and README](https://github.com/tigusigalpa/ai-kit)
|
|
306
|
+
- [Docker usage](https://github.com/tigusigalpa/ai-kit#run-ai-kit-with-docker)
|
|
307
|
+
- [Web Design](https://github.com/tigusigalpa/ai-kit#web-design)
|
|
308
|
+
- [Shared dialogue context](https://github.com/tigusigalpa/ai-kit#shared-context-from-two-dialogues)
|
|
309
|
+
- [OpenRouter guidance](https://github.com/tigusigalpa/ai-kit#working-with-openrouter)
|
|
310
|
+
|
|
311
|
+
AI-KIT is licensed under MIT. Bundled Cloudflare references retain MIT licensing; bundled Strix references retain Apache-2.0 licensing.
|
aikit/docs/EVALUATION.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Real-project evaluation protocol
|
|
2
|
+
|
|
3
|
+
This protocol prepares application trials; it contains no measured application results. The owner chose to run the real-project trials separately. Synthetic routing and installer regressions validate implementation behavior, not productivity or savings.
|
|
4
|
+
|
|
5
|
+
## First experiment: instructions with a fixed model
|
|
6
|
+
|
|
7
|
+
1. Select a representative repository and record its starting revision, actual stack/versions, runnable checks, and allowed files. Use isolated disposable checkouts and a disposable database for each run; never reuse changes from the other arm.
|
|
8
|
+
2. Define a small task set before running anything: mechanical edit, substantive feature, bug diagnosis, authorization/tenant boundary, and fresh-session continuation. Include Filament tasks only if the application actually uses Filament. For each task write an identical prompt, acceptance rubric, scope, required checks, and stopping rule. Include tasks where the kit may add overhead. Use `scripts/evaluate.py scaffold` to create an opaque private baseline/kit task-ID pack, not a prompt or evidence store.
|
|
9
|
+
3. Arm A uses the project's existing instructions; arm B adds a reviewed AI-KIT installation. Preserve the same project facts, source starting state, tools, permissions, provider, actual model, effort, context/output limits, and runtime settings. Disable adaptive model changes in this experiment. Record the kit version and installation choices.
|
|
10
|
+
4. Start a fresh session for every run. Balance/randomize A/B order, repeat task pairs, and record model/version and pricing dates when runs occur. Do not feed one arm's answer, patch, or corrections into the other. Account for bootstrap/context preparation time separately and for every retry/review/recovery call within the task.
|
|
11
|
+
5. Apply the predeclared rubric and checks. Prefer a reviewer unaware of the arm, when available and authorized. Mark failures, unavailable checks, and incomplete work explicitly. Avoid treating compilation or tests alone as full semantic correctness. Record code scope violations or unintended edits in the private trial notes.
|
|
12
|
+
6. Collect actual runtime telemetry; store one reviewed task record with all attempts through [metrics.py](../scripts/metrics.py) using the [measurement contract](../template/ai-kit/METRICS.md). A generated route/configuration is not telemetry. Use opaque matched task IDs and private notes. Baseline records may use `kit_version: "not-used"`.
|
|
13
|
+
|
|
14
|
+
Run `scripts/evaluate.py coverage PROJECT --tasks PRIVATE_PACK` before comparing results. It reports missing baseline/kit pairs and unexpected journal records, but cannot assess semantic equivalence. Compare matched correctness and failure rate before cost/time. Report total cost per correct result, rework, recovery/escalations, duration coverage, input/output/reasoning/cache token coverage, and bootstrap overhead. Include failed tasks in spend. Separate billed/usage-derived costs from estimates, keep currencies separate, and report missing observations. Small samples support provisional conclusions; do not publish a savings percentage when arms or telemetry are not comparable.
|
|
15
|
+
|
|
16
|
+
## Context and continuation checks
|
|
17
|
+
|
|
18
|
+
For a mixed repository, pick one affected module. Observe which context/profile files are loaded: the active module's minimum needed rules and relevant shared boundaries should be selected from PROJECT_CONTEXT/WIKI. Unrelated stack/provider profiles should not be loaded by default. Record loaded bytes/tokens only when actually observable; do not substitute file size for token usage.
|
|
19
|
+
|
|
20
|
+
For continuation, end a session after documenting verified facts, commands, decisions, and unresolved work. Start another session with the same repository state and task handoff but without the previous chat. Check whether the agent recovers module paths, commands, defaults, Git authorization limits, and remaining work correctly. Measure rereads/corrections and accidental unrelated edits. The existing context map and continuity skills guide this process; no automatic context engine is claimed.
|
|
21
|
+
|
|
22
|
+
## Second experiment: routing
|
|
23
|
+
|
|
24
|
+
Hold the adopted instruction setup fixed, then compare fixed-model execution with reviewed routing recommendations on matched tasks. Record the recommended level/model/effort separately from what the client actually executed. Manual risk/operation inputs must have the same evidence available across runs. Diagnose missing facts, ambiguous tasks, tool failures, and environment failures before model escalation; level 6 needs a documented capability reason.
|
|
25
|
+
|
|
26
|
+
The offline helper does not switch live models, invoke delegates, or measure calls. Trials must verify client controls explicitly. Evaluate cost to a correct result including escalation and retained context, rather than initial-call price. Add orchestration only after a measured improvement justifies its operational complexity.
|
|
27
|
+
|
|
28
|
+
## Trial notes template
|
|
29
|
+
|
|
30
|
+
Keep this file in the project's ignored `ai-kit/.metrics/` directory. Record experiment ID, starting revisions, kit version/choices, task IDs, acceptance rubrics, run order, timestamps, actual model/settings, tools, check commands/results/skips, reviewer disposition, cost/pricing provenance, missing telemetry, and deviations. Store no secrets or production data. Summaries may be shared after reviewing their contents and receiving the owner's publication authorization.
|