intent-cli-python 1.3.0__tar.gz → 2.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.
Files changed (49) hide show
  1. intent_cli_python-2.1.0/PKG-INFO +136 -0
  2. intent_cli_python-2.1.0/README.md +112 -0
  3. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/pyproject.toml +3 -8
  4. intent_cli_python-2.1.0/src/intent_cli/__init__.py +38 -0
  5. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/cli.py +11 -57
  6. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/commands/core.py +164 -145
  7. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/commands/hub.py +9 -16
  8. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/hub/runtime.py +1 -1
  9. intent_cli_python-2.1.0/src/intent_cli/origin.py +57 -0
  10. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/store.py +1 -8
  11. intent_cli_python-2.1.0/src/intent_cli_python.egg-info/PKG-INFO +136 -0
  12. intent_cli_python-2.1.0/src/intent_cli_python.egg-info/SOURCES.txt +26 -0
  13. intent_cli_python-2.1.0/src/intent_cli_python.egg-info/entry_points.txt +2 -0
  14. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0/src}/intent_cli_python.egg-info/top_level.txt +0 -1
  15. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/tests/test_cli.py +183 -151
  16. intent_cli_python-2.1.0/tests/test_inthub_api_server.py +59 -0
  17. intent_cli_python-2.1.0/tests/test_inthub_local.py +87 -0
  18. intent_cli_python-2.1.0/tests/test_origin.py +31 -0
  19. intent_cli_python-1.3.0/PKG-INFO +0 -206
  20. intent_cli_python-1.3.0/README.md +0 -182
  21. intent_cli_python-1.3.0/apps/__init__.py +0 -1
  22. intent_cli_python-1.3.0/apps/inthub_api/__init__.py +0 -1
  23. intent_cli_python-1.3.0/apps/inthub_api/__main__.py +0 -4
  24. intent_cli_python-1.3.0/apps/inthub_api/common.py +0 -43
  25. intent_cli_python-1.3.0/apps/inthub_api/db.py +0 -47
  26. intent_cli_python-1.3.0/apps/inthub_api/ingest.py +0 -170
  27. intent_cli_python-1.3.0/apps/inthub_api/queries.py +0 -366
  28. intent_cli_python-1.3.0/apps/inthub_api/server.py +0 -168
  29. intent_cli_python-1.3.0/apps/inthub_api/store.py +0 -31
  30. intent_cli_python-1.3.0/apps/inthub_web/__init__.py +0 -1
  31. intent_cli_python-1.3.0/apps/inthub_web/__main__.py +0 -4
  32. intent_cli_python-1.3.0/apps/inthub_web/server.py +0 -87
  33. intent_cli_python-1.3.0/apps/inthub_web/static/app.js +0 -745
  34. intent_cli_python-1.3.0/apps/inthub_web/static/index.html +0 -123
  35. intent_cli_python-1.3.0/apps/inthub_web/static/styles.css +0 -490
  36. intent_cli_python-1.3.0/intent_cli_python.egg-info/PKG-INFO +0 -206
  37. intent_cli_python-1.3.0/intent_cli_python.egg-info/SOURCES.txt +0 -37
  38. intent_cli_python-1.3.0/intent_cli_python.egg-info/entry_points.txt +0 -4
  39. intent_cli_python-1.3.0/src/intent_cli/__init__.py +0 -8
  40. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/LICENSE +0 -0
  41. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/setup.cfg +0 -0
  42. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/__main__.py +0 -0
  43. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/commands/__init__.py +0 -0
  44. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/commands/common.py +0 -0
  45. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/hub/__init__.py +0 -0
  46. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/hub/client.py +0 -0
  47. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/hub/payload.py +0 -0
  48. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0}/src/intent_cli/output.py +0 -0
  49. {intent_cli_python-1.3.0 → intent_cli_python-2.1.0/src}/intent_cli_python.egg-info/dependency_links.txt +0 -0
@@ -0,0 +1,136 @@
1
+ Metadata-Version: 2.4
2
+ Name: intent-cli-python
3
+ Version: 2.1.0
4
+ Summary: Semantic history for agent-driven development. Records what you did and why.
5
+ Author: Zeng Deyang
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/dozybot001/Intent
8
+ Project-URL: Repository, https://github.com/dozybot001/Intent
9
+ Keywords: agent,git,semantic-history,intent,developer-tools
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Software Development :: Version Control :: Git
20
+ Requires-Python: >=3.9
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Dynamic: license-file
24
+
25
+ # Intent
26
+
27
+ [中文](README.CN.md) | English
28
+
29
+ Semantic history for agent-driven development. Preserves **how the product took shape** and **how work resumes across sessions and agents**.
30
+
31
+ ## Why
32
+
33
+ Git records how code changes. But it doesn't record **why you're on this path**, what you decided along the way, or where you left off.
34
+
35
+ Intent adds that missing layer: **semantic history** — a small set of formal objects that preserve product formation history and survive context loss.
36
+
37
+ > Development is moving from *writing code* to *guiding agents and distilling decisions*. The history layer should reflect that.
38
+
39
+ ```mermaid
40
+ flowchart LR
41
+ subgraph traditional["Traditional Coding"]
42
+ direction TB
43
+ H1["Human"]
44
+ C1["Code"]
45
+ H1 -->|"Git"| C1
46
+ end
47
+ subgraph agent["Agent Driven Development"]
48
+ direction TB
49
+ H2["Human"]
50
+ AG["Agent"]
51
+ C2["Code"]
52
+ H2 -."❌ no semantic history".-> AG
53
+ AG -->|"Git"| C2
54
+ end
55
+ subgraph withintent["Agent with Intent"]
56
+ direction TB
57
+ H3["Human"]
58
+ AG2["Agent"]
59
+ C3["Code"]
60
+ H3 -->|"Intent"| AG2
61
+ AG2 -->|"Git"| C3
62
+ end
63
+ traditional ~~~ agent ~~~ withintent
64
+ ```
65
+
66
+ ## Three objects, one graph
67
+
68
+ | Object | What it captures |
69
+ |---|---|
70
+ | **Intent** | A goal recognized from your query |
71
+ | **Snap** | A semantic checkpoint that captures what changed, what was learned, and later feedback |
72
+ | **Decision** | A long-lived constraint that spans multiple intents |
73
+
74
+ Objects link automatically. Decisions auto-attach to every active intent; intents auto-attach to every active decision. Relationships are bidirectional and append-only.
75
+
76
+ ```mermaid
77
+ flowchart LR
78
+ D1["🔶 Decision 1"]
79
+ D2["🔶 Decision 2"]
80
+
81
+ subgraph Intent1["🎯 Intent 1"]
82
+ direction LR
83
+ S1["Snap 1"] --> S2["Snap 2"] --> S3["..."]
84
+ end
85
+
86
+ subgraph Intent2["🎯 Intent 2"]
87
+ direction LR
88
+ S4["Snap 1"] --> S5["Snap 2"] --> S6["..."]
89
+ end
90
+
91
+ D1 -- auto-attach --> Intent1
92
+ D1 -- auto-attach --> Intent2
93
+ D2 -- auto-attach --> Intent2
94
+ ```
95
+
96
+ ## Install
97
+
98
+ ```bash
99
+ pipx install intent-cli-python # CLI
100
+ npx skills add dozybot001/Intent -g # Agent skill
101
+ ```
102
+
103
+ Requires Python 3.9+ and Git. The CLI provides the commands; the skill teaches the agent when to use them.
104
+
105
+ > **Tips:** Because `itt` is a new command, agents are not trained on it yet. We recommend typing `/` at the start of each session, selecting the skill, and pressing Enter to enter the workflow.
106
+
107
+ ## IntHub
108
+
109
+ ```mermaid
110
+ flowchart TB
111
+ Hub["IntHub — Collaboration Layer"]
112
+ Intent["Intent — Semantic History Layer"]
113
+ Git["Git — Code History Layer"]
114
+ Hub <--> Intent <--> Git
115
+ ```
116
+
117
+ IntHub is the remote collaboration layer on top of Intent. The first path is **IntHub Local** — download from a [GitHub release](https://github.com/dozybot001/Intent/releases), then:
118
+
119
+ ```bash
120
+ itt hub link --api-base-url http://127.0.0.1:7210
121
+ itt hub sync
122
+ ```
123
+
124
+ Open `http://127.0.0.1:7210` in the browser.
125
+
126
+ ## Docs
127
+
128
+ - [Vision](docs/EN/vision.md) — why semantic history matters
129
+ - [CLI Design](docs/EN/cli.md) — object model, commands, JSON contract
130
+ - [Roadmap](docs/EN/roadmap.md) — phase plan
131
+ - [Dogfooding](docs/EN/dogfooding.md) — cross-agent case study
132
+ - [IntHub Local](docs/EN/inthub-local.md) — run a local IntHub instance
133
+
134
+ ## License
135
+
136
+ MIT
@@ -0,0 +1,112 @@
1
+ # Intent
2
+
3
+ [中文](README.CN.md) | English
4
+
5
+ Semantic history for agent-driven development. Preserves **how the product took shape** and **how work resumes across sessions and agents**.
6
+
7
+ ## Why
8
+
9
+ Git records how code changes. But it doesn't record **why you're on this path**, what you decided along the way, or where you left off.
10
+
11
+ Intent adds that missing layer: **semantic history** — a small set of formal objects that preserve product formation history and survive context loss.
12
+
13
+ > Development is moving from *writing code* to *guiding agents and distilling decisions*. The history layer should reflect that.
14
+
15
+ ```mermaid
16
+ flowchart LR
17
+ subgraph traditional["Traditional Coding"]
18
+ direction TB
19
+ H1["Human"]
20
+ C1["Code"]
21
+ H1 -->|"Git"| C1
22
+ end
23
+ subgraph agent["Agent Driven Development"]
24
+ direction TB
25
+ H2["Human"]
26
+ AG["Agent"]
27
+ C2["Code"]
28
+ H2 -."❌ no semantic history".-> AG
29
+ AG -->|"Git"| C2
30
+ end
31
+ subgraph withintent["Agent with Intent"]
32
+ direction TB
33
+ H3["Human"]
34
+ AG2["Agent"]
35
+ C3["Code"]
36
+ H3 -->|"Intent"| AG2
37
+ AG2 -->|"Git"| C3
38
+ end
39
+ traditional ~~~ agent ~~~ withintent
40
+ ```
41
+
42
+ ## Three objects, one graph
43
+
44
+ | Object | What it captures |
45
+ |---|---|
46
+ | **Intent** | A goal recognized from your query |
47
+ | **Snap** | A semantic checkpoint that captures what changed, what was learned, and later feedback |
48
+ | **Decision** | A long-lived constraint that spans multiple intents |
49
+
50
+ Objects link automatically. Decisions auto-attach to every active intent; intents auto-attach to every active decision. Relationships are bidirectional and append-only.
51
+
52
+ ```mermaid
53
+ flowchart LR
54
+ D1["🔶 Decision 1"]
55
+ D2["🔶 Decision 2"]
56
+
57
+ subgraph Intent1["🎯 Intent 1"]
58
+ direction LR
59
+ S1["Snap 1"] --> S2["Snap 2"] --> S3["..."]
60
+ end
61
+
62
+ subgraph Intent2["🎯 Intent 2"]
63
+ direction LR
64
+ S4["Snap 1"] --> S5["Snap 2"] --> S6["..."]
65
+ end
66
+
67
+ D1 -- auto-attach --> Intent1
68
+ D1 -- auto-attach --> Intent2
69
+ D2 -- auto-attach --> Intent2
70
+ ```
71
+
72
+ ## Install
73
+
74
+ ```bash
75
+ pipx install intent-cli-python # CLI
76
+ npx skills add dozybot001/Intent -g # Agent skill
77
+ ```
78
+
79
+ Requires Python 3.9+ and Git. The CLI provides the commands; the skill teaches the agent when to use them.
80
+
81
+ > **Tips:** Because `itt` is a new command, agents are not trained on it yet. We recommend typing `/` at the start of each session, selecting the skill, and pressing Enter to enter the workflow.
82
+
83
+ ## IntHub
84
+
85
+ ```mermaid
86
+ flowchart TB
87
+ Hub["IntHub — Collaboration Layer"]
88
+ Intent["Intent — Semantic History Layer"]
89
+ Git["Git — Code History Layer"]
90
+ Hub <--> Intent <--> Git
91
+ ```
92
+
93
+ IntHub is the remote collaboration layer on top of Intent. The first path is **IntHub Local** — download from a [GitHub release](https://github.com/dozybot001/Intent/releases), then:
94
+
95
+ ```bash
96
+ itt hub link --api-base-url http://127.0.0.1:7210
97
+ itt hub sync
98
+ ```
99
+
100
+ Open `http://127.0.0.1:7210` in the browser.
101
+
102
+ ## Docs
103
+
104
+ - [Vision](docs/EN/vision.md) — why semantic history matters
105
+ - [CLI Design](docs/EN/cli.md) — object model, commands, JSON contract
106
+ - [Roadmap](docs/EN/roadmap.md) — phase plan
107
+ - [Dogfooding](docs/EN/dogfooding.md) — cross-agent case study
108
+ - [IntHub Local](docs/EN/inthub-local.md) — run a local IntHub instance
109
+
110
+ ## License
111
+
112
+ MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "intent-cli-python"
7
- version = "1.3.0"
7
+ version = "2.1.0"
8
8
  description = "Semantic history for agent-driven development. Records what you did and why."
9
9
  requires-python = ">=3.9"
10
10
  readme = "README.md"
@@ -32,12 +32,7 @@ Repository = "https://github.com/dozybot001/Intent"
32
32
 
33
33
  [project.scripts]
34
34
  itt = "intent_cli.cli:main"
35
- inthub-api = "apps.inthub_api.server:main"
36
- inthub-web = "apps.inthub_web.server:main"
37
35
 
38
36
  [tool.setuptools.packages.find]
39
- where = ["src", "."]
40
- include = ["intent_cli*", "apps*"]
41
-
42
- [tool.setuptools.package-data]
43
- "apps.inthub_web" = ["static/*.html", "static/*.css", "static/*.js"]
37
+ where = ["src"]
38
+ include = ["intent_cli*"]
@@ -0,0 +1,38 @@
1
+ """Intent CLI — semantic history for agent-driven development."""
2
+
3
+ import re
4
+ from importlib.metadata import PackageNotFoundError, version
5
+ from pathlib import Path
6
+
7
+
8
+ def _read_source_version():
9
+ pyproject = Path(__file__).resolve().parents[2] / "pyproject.toml"
10
+ if not pyproject.exists():
11
+ return None
12
+ text = pyproject.read_text(encoding="utf-8")
13
+ in_project = False
14
+ for line in text.splitlines():
15
+ stripped = line.strip()
16
+ if stripped == "[project]":
17
+ in_project = True
18
+ continue
19
+ if in_project and stripped.startswith("["):
20
+ break
21
+ if in_project:
22
+ match = re.match(r'version\s*=\s*"([^"]+)"', stripped)
23
+ if match:
24
+ return match.group(1)
25
+ return None
26
+
27
+
28
+ def _resolve_version():
29
+ source_version = _read_source_version()
30
+ if source_version is not None:
31
+ return source_version
32
+ try:
33
+ return version("intent-cli-python")
34
+ except PackageNotFoundError:
35
+ return "0.0.0"
36
+
37
+
38
+ __version__ = _resolve_version()
@@ -4,28 +4,20 @@ import argparse
4
4
  import sys
5
5
 
6
6
  from intent_cli.commands.core import (
7
- cmd_decision_attach,
8
7
  cmd_decision_create,
9
8
  cmd_decision_deprecate,
10
- cmd_decision_list,
11
- cmd_decision_show,
12
9
  cmd_doctor,
13
10
  cmd_init,
14
11
  cmd_inspect,
15
12
  cmd_intent_activate,
16
13
  cmd_intent_create,
17
14
  cmd_intent_done,
18
- cmd_intent_list,
19
- cmd_intent_show,
20
15
  cmd_intent_suspend,
21
16
  cmd_snap_create,
22
17
  cmd_snap_feedback,
23
- cmd_snap_list,
24
- cmd_snap_revert,
25
- cmd_snap_show,
26
18
  cmd_version,
27
19
  )
28
- from intent_cli.commands.hub import cmd_hub_link, cmd_hub_login, cmd_hub_sync
20
+ from intent_cli.commands.hub import cmd_hub_link, cmd_hub_sync
29
21
 
30
22
 
31
23
  def main():
@@ -42,10 +34,6 @@ def main():
42
34
  p_hub = sub.add_parser("hub")
43
35
  s_hub = p_hub.add_subparsers(dest="sub")
44
36
 
45
- p = s_hub.add_parser("login")
46
- p.add_argument("--api-base-url", default=None)
47
- p.add_argument("--token", default=None)
48
-
49
37
  p = s_hub.add_parser("link")
50
38
  p.add_argument("--project-name", default=None)
51
39
  p.add_argument("--api-base-url", default=None)
@@ -65,21 +53,14 @@ def main():
65
53
  p.add_argument("--query", default="")
66
54
  p.add_argument("--rationale", default="")
67
55
 
68
- p = s_intent.add_parser("list")
69
- p.add_argument("--status", default=None)
70
- p.add_argument("--decision", default=None)
71
-
72
- p = s_intent.add_parser("show")
73
- p.add_argument("id")
74
-
75
56
  p = s_intent.add_parser("activate")
76
- p.add_argument("id")
57
+ p.add_argument("id", nargs="?")
77
58
 
78
59
  p = s_intent.add_parser("suspend")
79
- p.add_argument("id")
60
+ p.add_argument("id", nargs="?")
80
61
 
81
62
  p = s_intent.add_parser("done")
82
- p.add_argument("id")
63
+ p.add_argument("id", nargs="?")
83
64
 
84
65
  # --- snap ---
85
66
  p_snap = sub.add_parser("snap")
@@ -87,26 +68,19 @@ def main():
87
68
 
88
69
  p = s_snap.add_parser("create")
89
70
  p.add_argument("title")
90
- p.add_argument("--intent", required=True)
91
- p.add_argument("--query", default="")
92
- p.add_argument("--rationale", default="")
93
- p.add_argument("--summary", default="")
94
- p.add_argument("--feedback", default="")
95
-
96
- p = s_snap.add_parser("list")
97
71
  p.add_argument("--intent", default=None)
98
- p.add_argument("--status", default=None)
99
-
100
- p = s_snap.add_parser("show")
101
- p.add_argument("id")
72
+ p.add_argument(
73
+ "--origin",
74
+ default=None,
75
+ metavar="LABEL",
76
+ help="Override auto-detected snap origin label (default: from env, see docs)",
77
+ )
78
+ p.add_argument("--summary", required=True)
102
79
 
103
80
  p = s_snap.add_parser("feedback")
104
81
  p.add_argument("id")
105
82
  p.add_argument("feedback")
106
83
 
107
- p = s_snap.add_parser("revert")
108
- p.add_argument("id")
109
-
110
84
  # --- decision ---
111
85
  p_decision = sub.add_parser("decision")
112
86
  s_decision = p_decision.add_subparsers(dest="sub")
@@ -115,20 +89,9 @@ def main():
115
89
  p.add_argument("title")
116
90
  p.add_argument("--rationale", default="")
117
91
 
118
- p = s_decision.add_parser("list")
119
- p.add_argument("--status", default=None)
120
- p.add_argument("--intent", default=None)
121
-
122
- p = s_decision.add_parser("show")
123
- p.add_argument("id")
124
-
125
92
  p = s_decision.add_parser("deprecate")
126
93
  p.add_argument("id")
127
94
 
128
- p = s_decision.add_parser("attach")
129
- p.add_argument("id")
130
- p.add_argument("--intent", required=True)
131
-
132
95
  args = parser.parse_args()
133
96
 
134
97
  if args.command is None:
@@ -155,24 +118,15 @@ def main():
155
118
  sys.exit(1)
156
119
 
157
120
  dispatch = {
158
- ("hub", "login"): cmd_hub_login,
159
121
  ("hub", "link"): cmd_hub_link,
160
122
  ("hub", "sync"): cmd_hub_sync,
161
123
  ("intent", "create"): cmd_intent_create,
162
- ("intent", "list"): cmd_intent_list,
163
- ("intent", "show"): cmd_intent_show,
164
124
  ("intent", "activate"): cmd_intent_activate,
165
125
  ("intent", "suspend"): cmd_intent_suspend,
166
126
  ("intent", "done"): cmd_intent_done,
167
127
  ("snap", "create"): cmd_snap_create,
168
- ("snap", "list"): cmd_snap_list,
169
- ("snap", "show"): cmd_snap_show,
170
128
  ("snap", "feedback"): cmd_snap_feedback,
171
- ("snap", "revert"): cmd_snap_revert,
172
129
  ("decision", "create"): cmd_decision_create,
173
- ("decision", "list"): cmd_decision_list,
174
- ("decision", "show"): cmd_decision_show,
175
130
  ("decision", "deprecate"): cmd_decision_deprecate,
176
- ("decision", "attach"): cmd_decision_attach,
177
131
  }
178
132
  dispatch[(args.command, args.sub)](args)