intentspec 0.1.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.
- intentspec-0.1.0/LICENSE +22 -0
- intentspec-0.1.0/MANIFEST.in +13 -0
- intentspec-0.1.0/PKG-INFO +384 -0
- intentspec-0.1.0/README.md +351 -0
- intentspec-0.1.0/benchmark/outputs/customer_brief.output.md +13 -0
- intentspec-0.1.0/benchmark/outputs/imported_customer_brief.output.md +9 -0
- intentspec-0.1.0/benchmark/outputs/report_json.output.json +6 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/README.md +37 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/agents_api_security.md +21 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/agents_architecture_decision.md +19 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/agents_code_review.md +19 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/agents_customer_brief.md +19 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/agents_data_retention.md +23 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/claude_dependency_update.md +28 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/claude_deployment.md +32 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/claude_privacy_assessment.md +27 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/claude_support_triage.md +24 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/gemini_incident.json +32 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/gemini_qa_plan.json +16 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/gemini_vendor.json +17 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/openai_compliance.json +19 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/openai_postmortem.json +20 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/openai_qa_plan.json +19 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/artifacts/handwritten/openai_release.json +34 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/api_security_review.intent.yaml +76 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/architecture_decision_review.intent.yaml +57 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/changelog_draft.intent.yaml +54 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/code_review.intent.yaml +78 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/compliance_checklist_json.intent.yaml +68 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/customer_brief.intent.yaml +112 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/data_retention_audit.intent.yaml +69 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/dependency_update_review.intent.yaml +57 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/deployment_guard.intent.yaml +91 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/imported_customer_brief.intent.yaml +67 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/incident_postmortem_json.intent.yaml +68 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/incident_triage_json.intent.yaml +82 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/market_analysis.intent.yaml +74 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/packs/no-network.intent.yaml +20 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/packs/privacy.intent.yaml +20 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/packs/zh-report.intent.yaml +28 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/privacy_impact_assessment.intent.yaml +62 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/procurement_risk_check.intent.yaml +71 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/qa_test_plan_json.intent.yaml +61 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/release_summary_json.intent.yaml +73 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/report_json.intent.yaml +86 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/support_ticket_triage.intent.yaml +64 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/contracts/vendor_summary_json.intent.yaml +64 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/labels/handwritten_artifacts.json +60 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/labels/handwritten_artifacts_extended.json +130 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/labels/output_samples.json +146 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/labels/output_samples_extended.json +274 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/labels/roundtrip_notes.json +4 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/api_security_review__not_contains.output.md +14 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/api_security_review__required_sections.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/architecture_decision_review__regex.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/architecture_decision_review__required_sections.output.md +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/changelog_draft__max_words.output.md +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/changelog_draft__not_contains.output.md +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/code_review__not_contains.output.md +11 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/code_review__required_sections.output.md +8 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/compliance_checklist_json__json_schema.output.json +6 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/customer_brief__no_regex.output.md +24 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/data_retention_audit__contains.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/data_retention_audit__max_words.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/data_retention_audit__no_regex.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/dependency_update_review__contains.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/dependency_update_review__no_regex.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/deployment_guard__contains.output.md +11 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/deployment_guard__max_chars.output.md +13 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/deployment_guard__max_words.output.md +11 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/deployment_guard__regex.output.md +11 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/incident_postmortem_json__json_array_min_items.output.json +7 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/incident_triage_json__json_array_min_items.output.json +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/incident_triage_json__json_path_exists.output.json +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/privacy_impact_assessment__no_regex.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/privacy_impact_assessment__required_sections.output.md +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/procurement_risk_check__contains.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/procurement_risk_check__not_contains.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/procurement_risk_check__regex.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/qa_test_plan_json__json_path_exists.output.json +5 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/release_summary_json__contains.output.json +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/report_json__json_schema.output.json +8 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/support_ticket_triage__contains.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/support_ticket_triage__max_chars.output.md +11 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/defects/vendor_summary_json__contains.output.json +4 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/api_security_review.output.md +15 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/architecture_decision_review.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/changelog_draft.output.md +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/code_review.output.md +11 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/compliance_checklist_json.output.json +6 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/customer_brief.output.md +27 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/data_retention_audit.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/dependency_update_review.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/deployment_guard.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/imported_customer_brief.output.md +18 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/incident_postmortem_json.output.json +7 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/incident_triage_json.output.json +10 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/market_analysis.output.md +17 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/privacy_impact_assessment.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/procurement_risk_check.output.md +12 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/qa_test_plan_json.output.json +6 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/release_summary_json.output.json +9 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/report_json.output.json +10 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/support_ticket_triage.output.md +11 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/outputs/valid/vendor_summary_json.output.json +6 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/results/assertion_eval.json +878 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/results/compile_matrix.json +1122 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/results/numbers.md +8 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/results/roundtrip_fidelity.json +1820 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/results/summary.json +81 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/results/tables.md +34 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/scripts/paper_helpers.py +212 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/scripts/render_tables.py +158 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/scripts/run_all.py +38 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/scripts/run_assertion_eval.py +102 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/scripts/run_compile_matrix.py +99 -0
- intentspec-0.1.0/benchmark/reproducible_artifact/scripts/run_roundtrip.py +175 -0
- intentspec-0.1.0/benchmark/run_benchmark.py +124 -0
- intentspec-0.1.0/benchmark/tasks/customer_brief.intent.yaml +68 -0
- intentspec-0.1.0/benchmark/tasks/imported_customer_brief.intent.yaml +70 -0
- intentspec-0.1.0/benchmark/tasks/report_json.intent.yaml +74 -0
- intentspec-0.1.0/docs/iir.md +96 -0
- intentspec-0.1.0/docs/integrations.md +191 -0
- intentspec-0.1.0/docs/migration-v0.1.md +222 -0
- intentspec-0.1.0/docs/technical-guide.md +137 -0
- intentspec-0.1.0/docs/zh/README.md +68 -0
- intentspec-0.1.0/docs/zh/benchmark/benchmark-numbers.md +27 -0
- intentspec-0.1.0/docs/zh/benchmark/benchmark-tables.md +27 -0
- intentspec-0.1.0/docs/zh/benchmark/reproducible-benchmark.md +35 -0
- intentspec-0.1.0/docs/zh/benchmark.md +37 -0
- intentspec-0.1.0/docs/zh/failure-cases.md +24 -0
- intentspec-0.1.0/docs/zh/iir.md +32 -0
- intentspec-0.1.0/docs/zh/integrations.md +33 -0
- intentspec-0.1.0/docs/zh/migration-v0.1.md +32 -0
- intentspec-0.1.0/docs/zh/technical-guide.md +57 -0
- intentspec-0.1.0/docs/zh/vscode-extension.md +22 -0
- intentspec-0.1.0/examples/code_review.intent.yaml +84 -0
- intentspec-0.1.0/examples/customer_brief.intent.yaml +112 -0
- intentspec-0.1.0/examples/customer_brief.output.md +31 -0
- intentspec-0.1.0/examples/imported_customer_brief.intent.yaml +68 -0
- intentspec-0.1.0/examples/imported_customer_brief.output.md +18 -0
- intentspec-0.1.0/examples/invalid_dangerous_permission.intent.yaml +45 -0
- intentspec-0.1.0/examples/invalid_missing_goal.intent.yaml +34 -0
- intentspec-0.1.0/examples/market_analysis.intent.yaml +80 -0
- intentspec-0.1.0/examples/packs/no-network.intent.yaml +20 -0
- intentspec-0.1.0/examples/packs/privacy.intent.yaml +20 -0
- intentspec-0.1.0/examples/packs/zh-report.intent.yaml +28 -0
- intentspec-0.1.0/examples/report_json.intent.yaml +96 -0
- intentspec-0.1.0/intentspec.egg-info/PKG-INFO +384 -0
- intentspec-0.1.0/intentspec.egg-info/SOURCES.txt +223 -0
- intentspec-0.1.0/intentspec.egg-info/dependency_links.txt +1 -0
- intentspec-0.1.0/intentspec.egg-info/entry_points.txt +3 -0
- intentspec-0.1.0/intentspec.egg-info/requires.txt +13 -0
- intentspec-0.1.0/intentspec.egg-info/top_level.txt +3 -0
- intentspec-0.1.0/packages/intentspec-cli/src/intentspec/__init__.py +3 -0
- intentspec-0.1.0/packages/intentspec-cli/src/intentspec/cli.py +620 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/__init__.py +71 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/common/__init__.py +2 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/common/errors.py +52 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/common/utils.py +125 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/doctor.py +112 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/draft.py +430 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/examples.py +52 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/iir/__init__.py +2 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/iir/builder.py +130 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/iir/models.py +35 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/importers/__init__.py +1 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/importers/_parsing.py +218 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/importers/cursor_rules.py +45 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/importers/gemini_structured.py +65 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/importers/instruction_markdown.py +290 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/importers/openai_structured.py +70 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/importers/reverse.py +168 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/imports/__init__.py +2 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/imports/resolver.py +171 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/__init__.py +1 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/__init__.py +1 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/code_review.intent.yaml +84 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/customer_brief.intent.yaml +112 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/customer_brief.output.md +31 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/imported_customer_brief.intent.yaml +68 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/imported_customer_brief.output.md +18 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/invalid_dangerous_permission.intent.yaml +45 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/invalid_missing_goal.intent.yaml +34 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/market_analysis.intent.yaml +80 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/packs/no-network.intent.yaml +20 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/packs/privacy.intent.yaml +20 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/packs/zh-report.intent.yaml +28 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/report_json.intent.yaml +96 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/resources/examples/report_json.output.json +11 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/schemas.py +17 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/spec/__init__.py +2 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/spec/models.py +164 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/spec/parser.py +143 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/targets/__init__.py +2 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/targets/compiler.py +498 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/testing/__init__.py +2 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/testing/tester.py +264 -0
- intentspec-0.1.0/packages/intentspec-core/src/intentspec_core/validator.py +212 -0
- intentspec-0.1.0/packages/intentspec-mcp/src/intentspec_mcp/__init__.py +2 -0
- intentspec-0.1.0/packages/intentspec-mcp/src/intentspec_mcp/server.py +383 -0
- intentspec-0.1.0/packages/intentspec-ts/package.json +15 -0
- intentspec-0.1.0/packages/intentspec-ts/src/index.ts +90 -0
- intentspec-0.1.0/packages/intentspec-ts/tsconfig.json +13 -0
- intentspec-0.1.0/packages/intentspec-vscode/README.md +13 -0
- intentspec-0.1.0/packages/intentspec-vscode/package.json +68 -0
- intentspec-0.1.0/packages/intentspec-vscode/src/extension.ts +275 -0
- intentspec-0.1.0/packages/intentspec-vscode/tsconfig.json +13 -0
- intentspec-0.1.0/pyproject.toml +87 -0
- intentspec-0.1.0/schema/intentspec.schema.json +662 -0
- intentspec-0.1.0/setup.cfg +4 -0
- intentspec-0.1.0/tests/test_benchmark.py +18 -0
- intentspec-0.1.0/tests/test_cli.py +287 -0
- intentspec-0.1.0/tests/test_compiler.py +145 -0
- intentspec-0.1.0/tests/test_docs.py +80 -0
- intentspec-0.1.0/tests/test_doctor.py +14 -0
- intentspec-0.1.0/tests/test_draft.py +518 -0
- intentspec-0.1.0/tests/test_importers.py +934 -0
- intentspec-0.1.0/tests/test_imports.py +70 -0
- intentspec-0.1.0/tests/test_integrations.py +105 -0
- intentspec-0.1.0/tests/test_mcp.py +309 -0
- intentspec-0.1.0/tests/test_parser.py +49 -0
- intentspec-0.1.0/tests/test_reproducible_benchmark.py +192 -0
- intentspec-0.1.0/tests/test_tester.py +101 -0
- intentspec-0.1.0/tests/test_validator.py +54 -0
intentspec-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 IntentSpec Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
include LICENSE
|
|
2
|
+
include README.md
|
|
3
|
+
graft packages
|
|
4
|
+
prune packages/intentspec-ts/node_modules
|
|
5
|
+
prune packages/intentspec-vscode/node_modules
|
|
6
|
+
prune packages/intentspec-ts/dist
|
|
7
|
+
prune packages/intentspec-vscode/dist
|
|
8
|
+
recursive-include schema *.json
|
|
9
|
+
recursive-include examples *.yaml *.md
|
|
10
|
+
recursive-include docs *.md
|
|
11
|
+
recursive-include benchmark *.py *.yaml *.md *.json
|
|
12
|
+
global-exclude __pycache__
|
|
13
|
+
global-exclude *.py[cod]
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: intentspec
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-first task contract compiler for AI systems.
|
|
5
|
+
Author-email: Ting Liu <research@symboliclight.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: agent,contracts,llm,software-engineering,structured-output
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
16
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: PyYAML<7.0,>=6.0
|
|
21
|
+
Requires-Dist: jsonschema<5.0,>=4.23
|
|
22
|
+
Requires-Dist: pydantic<3.0,>=2.7
|
|
23
|
+
Requires-Dist: typer<1.0,>=0.12
|
|
24
|
+
Provides-Extra: dev
|
|
25
|
+
Requires-Dist: build<2.0,>=1.2; extra == "dev"
|
|
26
|
+
Requires-Dist: mypy<2.0,>=1.10; extra == "dev"
|
|
27
|
+
Requires-Dist: pytest<9.0,>=8.0; extra == "dev"
|
|
28
|
+
Requires-Dist: pytest-cov<6.0,>=5.0; extra == "dev"
|
|
29
|
+
Requires-Dist: ruff<1.0,>=0.6; extra == "dev"
|
|
30
|
+
Requires-Dist: twine<7.0,>=6.0; extra == "dev"
|
|
31
|
+
Requires-Dist: types-PyYAML<7.0,>=6.0; extra == "dev"
|
|
32
|
+
Dynamic: license-file
|
|
33
|
+
|
|
34
|
+
<p align="center">
|
|
35
|
+
<img src="assets/intentspec-logo.svg" alt="IntentSpec logo" width="720">
|
|
36
|
+
</p>
|
|
37
|
+
|
|
38
|
+
# IntentSpec
|
|
39
|
+
|
|
40
|
+
**Contracts for AI agent tasks.**
|
|
41
|
+
|
|
42
|
+
IntentSpec is a local-first offline contract compiler for AI agent tasks.
|
|
43
|
+
|
|
44
|
+
It lets a team maintain one `intent.yaml` contract and compile it into artifacts
|
|
45
|
+
that existing tools can read, including `AGENTS.md`, `CLAUDE.md`, Cursor Rules,
|
|
46
|
+
OpenAI Structured Outputs, Gemini structured output payloads, and MCP-oriented plan
|
|
47
|
+
artifacts.
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
intent.yaml
|
|
51
|
+
-> validate
|
|
52
|
+
-> resolve imports
|
|
53
|
+
-> inspect normalized IIR
|
|
54
|
+
-> compile to target artifacts
|
|
55
|
+
-> run your agent
|
|
56
|
+
-> test the output offline
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
> Turn scattered AI agent instructions into versioned, compilable, testable
|
|
60
|
+
> contracts.
|
|
61
|
+
|
|
62
|
+
IntentSpec does not call real LLM APIs, does not require API keys, and does not
|
|
63
|
+
replace an agent runtime. It does three things:
|
|
64
|
+
|
|
65
|
+
- records task goals, permissions, constraints, human gates, output formats, and
|
|
66
|
+
acceptance tests as a structured contract;
|
|
67
|
+
- compiles that contract into tool-specific artifacts;
|
|
68
|
+
- tests final agent outputs with deterministic offline checks.
|
|
69
|
+
|
|
70
|
+
For a longer walkthrough, see [docs/technical-guide.md](docs/technical-guide.md).
|
|
71
|
+
|
|
72
|
+
## Why It Matters
|
|
73
|
+
|
|
74
|
+
AI agent instructions are often scattered across prompts, repository rules,
|
|
75
|
+
structured output schemas, and tool-specific memory files. That makes them hard to
|
|
76
|
+
review, migrate, reuse, or test.
|
|
77
|
+
|
|
78
|
+
IntentSpec adds a small contract layer before those artifacts:
|
|
79
|
+
|
|
80
|
+
- write the task once as a structured contract;
|
|
81
|
+
- compile it into the formats your tools already read;
|
|
82
|
+
- test the final output locally before accepting it.
|
|
83
|
+
|
|
84
|
+
No model calls. No API keys. No new runtime to adopt.
|
|
85
|
+
|
|
86
|
+
## Five-Minute Tryout
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
pip install -e ".[dev]"
|
|
90
|
+
intent validate examples/code_review.intent.yaml
|
|
91
|
+
intent inspect examples/code_review.intent.yaml
|
|
92
|
+
intent compile examples/code_review.intent.yaml --target agents-md --out AGENTS.md
|
|
93
|
+
intent test examples/customer_brief.intent.yaml examples/customer_brief.output.md
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Who It Is For
|
|
97
|
+
|
|
98
|
+
IntentSpec is useful for engineering teams that use multiple AI coding tools and do
|
|
99
|
+
not want to maintain the same rules in several formats. It is also useful for AI
|
|
100
|
+
application developers who need stable JSON outputs, governance reviewers who want
|
|
101
|
+
permissions and confirmation gates to be explicit, and researchers studying
|
|
102
|
+
artifact-level agent governance.
|
|
103
|
+
|
|
104
|
+
The generated files are IntentSpec artifacts that can be reviewed, committed, and
|
|
105
|
+
used by downstream tools.
|
|
106
|
+
|
|
107
|
+
IntentSpec is not:
|
|
108
|
+
|
|
109
|
+
- an LLM runtime;
|
|
110
|
+
- an agent orchestration framework;
|
|
111
|
+
- a permission sandbox;
|
|
112
|
+
- a runtime enforcement system;
|
|
113
|
+
- an MCP replacement;
|
|
114
|
+
- a replacement for Cursor, Codex, Claude Code, or other tools.
|
|
115
|
+
|
|
116
|
+
It helps express, propagate, migrate, and check rules. It cannot guarantee that a
|
|
117
|
+
downstream model will obey an instruction at runtime.
|
|
118
|
+
|
|
119
|
+
## What You Get
|
|
120
|
+
|
|
121
|
+
Using IntentSpec gives a project:
|
|
122
|
+
|
|
123
|
+
- a code-reviewable AI task contract;
|
|
124
|
+
- generated artifacts for multiple downstream tools;
|
|
125
|
+
- reusable governance packs through `IntentPack`;
|
|
126
|
+
- explicit permission boundaries and human confirmation gates;
|
|
127
|
+
- local or CI-friendly output acceptance tests;
|
|
128
|
+
- a migration path from existing instruction files back into structured contracts;
|
|
129
|
+
- visibility into target capability limits.
|
|
130
|
+
|
|
131
|
+
## Install
|
|
132
|
+
|
|
133
|
+
Python 3.11 or newer is required.
|
|
134
|
+
|
|
135
|
+
Install from PyPI after publication:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
pip install intentspec
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Install from source:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
git clone https://github.com/<your-org>/IntentSpec.git
|
|
145
|
+
cd IntentSpec
|
|
146
|
+
pip install -e ".[dev]"
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Check the CLI:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
intent --help
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
IntentSpec core workflows do not need API keys or network access.
|
|
156
|
+
|
|
157
|
+
## Minimal Contract
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
version: "0.1"
|
|
161
|
+
kind: "IntentSpec"
|
|
162
|
+
metadata:
|
|
163
|
+
name: "code_review"
|
|
164
|
+
title: "Review code changes"
|
|
165
|
+
owner: "engineering"
|
|
166
|
+
task:
|
|
167
|
+
goal: "Review the repository and report correctness, security, and maintainability issues."
|
|
168
|
+
audience:
|
|
169
|
+
- "maintainers"
|
|
170
|
+
permissions:
|
|
171
|
+
web: false
|
|
172
|
+
filesystem:
|
|
173
|
+
read: true
|
|
174
|
+
write: false
|
|
175
|
+
network: false
|
|
176
|
+
tools:
|
|
177
|
+
send_email: false
|
|
178
|
+
read_calendar: false
|
|
179
|
+
read_gmail: false
|
|
180
|
+
create_file: false
|
|
181
|
+
delete_file: false
|
|
182
|
+
purchase: false
|
|
183
|
+
constraints:
|
|
184
|
+
- "Do not modify files."
|
|
185
|
+
- "Do not expose secrets."
|
|
186
|
+
output:
|
|
187
|
+
format: "markdown"
|
|
188
|
+
sections:
|
|
189
|
+
- "Summary"
|
|
190
|
+
- "Findings"
|
|
191
|
+
- "Risks"
|
|
192
|
+
- "Tests"
|
|
193
|
+
tests:
|
|
194
|
+
- name: "Must include required sections"
|
|
195
|
+
assert:
|
|
196
|
+
- type: "required_sections"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Save this as `code_review.intent.yaml`.
|
|
200
|
+
|
|
201
|
+
## Common Commands
|
|
202
|
+
|
|
203
|
+
Validate a contract:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
intent validate examples/code_review.intent.yaml
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Inspect the normalized intermediate representation:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
intent inspect examples/code_review.intent.yaml
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Compile an artifact:
|
|
216
|
+
|
|
217
|
+
```bash
|
|
218
|
+
intent compile examples/code_review.intent.yaml --target agents-md --out AGENTS.md
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Test an output:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
intent test examples/customer_brief.intent.yaml examples/customer_brief.output.md
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Import an existing artifact:
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
intent import AGENTS.md --type agents-md --out imported.intent.yaml
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Generate the JSON Schema:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
intent schema --out schema/intentspec.schema.json
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Targets
|
|
240
|
+
|
|
241
|
+
IntentSpec currently supports these compile targets:
|
|
242
|
+
|
|
243
|
+
| Target | Use |
|
|
244
|
+
| --- | --- |
|
|
245
|
+
| `agents-md` | Repository instruction files such as `AGENTS.md` |
|
|
246
|
+
| `claude-md` | Claude-style project memory |
|
|
247
|
+
| `cursor-rules` | Cursor Project Rules |
|
|
248
|
+
| `antigravity-rules` | Antigravity-compatible repository rules |
|
|
249
|
+
| `openai-structured` | JSON schema based structured outputs |
|
|
250
|
+
| `gemini-structured` | Gemini structured output payloads |
|
|
251
|
+
| `mcp-plan` | MCP-oriented plan artifacts |
|
|
252
|
+
|
|
253
|
+
See [docs/integrations.md](docs/integrations.md) for integration details.
|
|
254
|
+
|
|
255
|
+
## IntentPack
|
|
256
|
+
|
|
257
|
+
Reusable governance fields can be stored in an `IntentPack`.
|
|
258
|
+
|
|
259
|
+
```yaml
|
|
260
|
+
version: "0.1"
|
|
261
|
+
kind: "IntentPack"
|
|
262
|
+
metadata:
|
|
263
|
+
name: "privacy_pack"
|
|
264
|
+
title: "Privacy constraints"
|
|
265
|
+
permissions:
|
|
266
|
+
web: false
|
|
267
|
+
network: false
|
|
268
|
+
constraints:
|
|
269
|
+
- "Do not expose personal data."
|
|
270
|
+
- "Mask secrets before quoting evidence."
|
|
271
|
+
tests:
|
|
272
|
+
- name: "Must avoid secret markers"
|
|
273
|
+
assert:
|
|
274
|
+
- type: "no_regex"
|
|
275
|
+
pattern: "(?i)(api[_-]?key|secret|password)"
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Contracts can import packs and resolve them before validation, compilation, or
|
|
279
|
+
testing.
|
|
280
|
+
|
|
281
|
+
## Python API
|
|
282
|
+
|
|
283
|
+
```python
|
|
284
|
+
from intentspec_core import (
|
|
285
|
+
inspect_document,
|
|
286
|
+
load_document,
|
|
287
|
+
resolve_document_imports,
|
|
288
|
+
validate_document,
|
|
289
|
+
)
|
|
290
|
+
|
|
291
|
+
document = load_document("examples/code_review.intent.yaml")
|
|
292
|
+
resolved = resolve_document_imports(document)
|
|
293
|
+
report = validate_document(resolved)
|
|
294
|
+
iir = inspect_document(resolved)
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
If you only handle full `IntentSpec` contracts, you can also use narrower helpers
|
|
298
|
+
such as `load_spec`, `resolve_imports`, and `validate_spec`.
|
|
299
|
+
|
|
300
|
+
## Repository Layout
|
|
301
|
+
|
|
302
|
+
```text
|
|
303
|
+
packages/intentspec-core/ schema, parser, IIR, imports, targets, testing
|
|
304
|
+
packages/intentspec-cli/ Typer CLI and intent command
|
|
305
|
+
packages/intentspec-mcp/ thin MCP server
|
|
306
|
+
packages/intentspec-ts/ TypeScript package MVP
|
|
307
|
+
packages/intentspec-vscode/ VS Code extension MVP
|
|
308
|
+
examples/ runnable example contracts and outputs
|
|
309
|
+
schema/ generated JSON Schema
|
|
310
|
+
benchmark/ offline benchmark and reproducible benchmark artifacts
|
|
311
|
+
docs/ technical docs, migration guide, and Chinese docs
|
|
312
|
+
tests/ pytest test suite
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## Documentation
|
|
316
|
+
|
|
317
|
+
- [docs/technical-guide.md](docs/technical-guide.md)
|
|
318
|
+
- [docs/integrations.md](docs/integrations.md)
|
|
319
|
+
- [docs/iir.md](docs/iir.md)
|
|
320
|
+
- [docs/migration-v0.1.md](docs/migration-v0.1.md)
|
|
321
|
+
- [docs/zh/README.md](docs/zh/README.md) for Simplified Chinese documentation
|
|
322
|
+
- [benchmark.md](benchmark.md)
|
|
323
|
+
- [failure-cases.md](failure-cases.md)
|
|
324
|
+
|
|
325
|
+
## Benchmark
|
|
326
|
+
|
|
327
|
+
Run the basic benchmark:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
python benchmark/run_benchmark.py
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
Run the reproducible benchmark:
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
python benchmark/reproducible_artifact/scripts/run_all.py
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
The benchmark does not call real LLM APIs. It evaluates local artifacts, compile
|
|
340
|
+
behavior, round-trip import, and deterministic tests.
|
|
341
|
+
|
|
342
|
+
Current reproducible benchmark snapshot:
|
|
343
|
+
|
|
344
|
+
| Metric | Result |
|
|
345
|
+
| --- | ---: |
|
|
346
|
+
| Contracts | 20 |
|
|
347
|
+
| Compile matrix | 94 / 120 successful target compilations |
|
|
348
|
+
| Compiled round-trip imports | 74 / 100 successful imports |
|
|
349
|
+
| Handwritten artifact imports | 20 / 20 successful imports |
|
|
350
|
+
| Valid output pass rate | 19 / 20 |
|
|
351
|
+
| Targeted defect catch rate | 32 / 32 |
|
|
352
|
+
|
|
353
|
+
Detailed generated results live in
|
|
354
|
+
[benchmark/reproducible_artifact/results](benchmark/reproducible_artifact/results).
|
|
355
|
+
|
|
356
|
+
## Development
|
|
357
|
+
|
|
358
|
+
```bash
|
|
359
|
+
pip install -e ".[dev]"
|
|
360
|
+
pytest
|
|
361
|
+
ruff check .
|
|
362
|
+
mypy
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
Build the release package:
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
python -m build
|
|
369
|
+
twine check dist/*
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
The first public package intentionally focuses on technical documentation,
|
|
373
|
+
user guides, API/CLI usage, examples, tests, and reproducible benchmark assets.
|
|
374
|
+
|
|
375
|
+
## Roadmap
|
|
376
|
+
|
|
377
|
+
Planned directions include better draft generation, richer assertion selection,
|
|
378
|
+
more round-trip fidelity tests, clearer target capability diagnostics, pack
|
|
379
|
+
registries, import traces, workflow-level contract composition, IDE diagnostics,
|
|
380
|
+
and optional model-based semantic evaluation.
|
|
381
|
+
|
|
382
|
+
## License
|
|
383
|
+
|
|
384
|
+
MIT. See [LICENSE](LICENSE).
|