intent-cli-python 1.0.0__tar.gz → 1.2.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 (27) hide show
  1. {intent_cli_python-1.0.0/src/intent_cli_python.egg-info → intent_cli_python-1.2.0}/PKG-INFO +26 -5
  2. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/README.md +25 -4
  3. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/pyproject.toml +1 -1
  4. intent_cli_python-1.2.0/src/intent_cli/__init__.py +8 -0
  5. intent_cli_python-1.2.0/src/intent_cli/cli.py +178 -0
  6. intent_cli_python-1.2.0/src/intent_cli/commands/__init__.py +1 -0
  7. intent_cli_python-1.2.0/src/intent_cli/commands/common.py +41 -0
  8. intent_cli_python-1.2.0/src/intent_cli/commands/core.py +376 -0
  9. intent_cli_python-1.2.0/src/intent_cli/commands/hub.py +107 -0
  10. intent_cli_python-1.2.0/src/intent_cli/hub/__init__.py +1 -0
  11. intent_cli_python-1.2.0/src/intent_cli/hub/client.py +59 -0
  12. intent_cli_python-1.2.0/src/intent_cli/hub/payload.py +65 -0
  13. intent_cli_python-1.2.0/src/intent_cli/hub/runtime.py +40 -0
  14. intent_cli_python-1.2.0/src/intent_cli/store.py +324 -0
  15. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0/src/intent_cli_python.egg-info}/PKG-INFO +26 -5
  16. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/src/intent_cli_python.egg-info/SOURCES.txt +8 -0
  17. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/tests/test_cli.py +165 -3
  18. intent_cli_python-1.0.0/src/intent_cli/__init__.py +0 -1
  19. intent_cli_python-1.0.0/src/intent_cli/cli.py +0 -497
  20. intent_cli_python-1.0.0/src/intent_cli/store.py +0 -90
  21. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/LICENSE +0 -0
  22. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/setup.cfg +0 -0
  23. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/src/intent_cli/__main__.py +0 -0
  24. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/src/intent_cli/output.py +0 -0
  25. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/src/intent_cli_python.egg-info/dependency_links.txt +0 -0
  26. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/src/intent_cli_python.egg-info/entry_points.txt +0 -0
  27. {intent_cli_python-1.0.0 → intent_cli_python-1.2.0}/src/intent_cli_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intent-cli-python
3
- Version: 1.0.0
3
+ Version: 1.2.0
4
4
  Summary: Semantic history for agent-driven development. Records what you did and why.
5
5
  Author: Zeng Deyang
6
6
  License-Expression: MIT
@@ -30,6 +30,16 @@ Semantic history for agent-driven development. Records **what you did** and **wh
30
30
 
31
31
  Intent CLI gives AI agents a structured way to track goals, interactions, and decisions across sessions. Instead of losing context when a conversation ends, agents persist their understanding into three simple objects stored alongside your code.
32
32
 
33
+ ## Why
34
+
35
+ 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.
36
+
37
+ Today that context lives in chat logs, PR threads, and your head. It works — until the session ends, the agent forgets, or a teammate picks up your work blind.
38
+
39
+ Intent treats these as a missing layer: **semantic history**. Not more docs, not better commit messages — a small set of formal objects that capture goals, interactions, and decisions so they survive context loss.
40
+
41
+ > The shift is simple: development is moving from *writing code* to *guiding agents and distilling decisions*. The history layer should reflect that.
42
+
33
43
  ## Three objects, one graph
34
44
 
35
45
  | Object | What it captures |
@@ -62,12 +72,18 @@ pip install intent-cli-python
62
72
 
63
73
  Requires Python 3.9+ and Git.
64
74
 
65
- ### Add the Claude Code skill
75
+ ### Install the skills.sh skill
66
76
 
67
77
  ```bash
68
- npx skills add dozybot001/Intent
78
+ npx skills add dozybot001/Intent -g
69
79
  ```
70
80
 
81
+ This installs the `intent-cli` skill into your global skills library for supported agents such as Codex and Claude Code.
82
+
83
+ > **Tip:** `itt` is a new tool — current models have never seen it in training data. Your agent may forget to call it mid-conversation. A short nudge like *"use itt to record this"* is usually enough to bring it back on track.
84
+ >
85
+ > This isn't busywork — every record is a **semantic asset**. An upcoming platform, **IntHub**, will turn these assets into searchable, shareable project intelligence.
86
+
71
87
  ## Quick start
72
88
 
73
89
  ```bash
@@ -101,13 +117,14 @@ itt inspect
101
117
  | `itt version` | Print version |
102
118
  | `itt init` | Initialize `.intent/` in current git repo |
103
119
  | `itt inspect` | Show the live object graph snapshot |
120
+ | `itt doctor` | Validate the object graph for broken references and invalid states |
104
121
 
105
122
  ### Intent
106
123
 
107
124
  | Command | Description |
108
125
  |---|---|
109
126
  | `itt intent create TITLE --query Q` | Create a new intent |
110
- | `itt intent list [--status S]` | List intents |
127
+ | `itt intent list [--status S] [--decision ID]` | List intents |
111
128
  | `itt intent show ID` | Show intent details |
112
129
  | `itt intent activate ID` | Resume a suspended intent |
113
130
  | `itt intent suspend ID` | Suspend an active intent |
@@ -128,7 +145,7 @@ itt inspect
128
145
  | Command | Description |
129
146
  |---|---|
130
147
  | `itt decision create TITLE --rationale R` | Create a long-lived decision |
131
- | `itt decision list [--status S]` | List decisions |
148
+ | `itt decision list [--status S] [--intent ID]` | List decisions |
132
149
  | `itt decision show ID` | Show decision details |
133
150
  | `itt decision deprecate ID` | Deprecate a decision |
134
151
  | `itt decision attach ID --intent ID` | Manually link a decision to an intent |
@@ -156,11 +173,15 @@ All data lives in `.intent/` at your git repo root:
156
173
  decision-001.json
157
174
  ```
158
175
 
176
+ `.intent/` is local semantic-workspace metadata. It should stay out of Git history and should remain ignored by `.gitignore`.
177
+
159
178
  ## Docs
160
179
 
161
180
  - [Vision](docs/EN/vision.md) — why semantic history matters. **If this project interests you, start here.**
162
181
  - [CLI Design](docs/EN/cli.md) — object model, commands, JSON contract
163
182
  - [Roadmap](docs/EN/roadmap.md) — phase plan
183
+ - [IntHub MVP](docs/EN/inthub-mvp.md) — first remote collaboration-layer scope
184
+ - [IntHub Sync Contract](docs/EN/inthub-sync-contract.md) — first sync, identity, and API contract
164
185
 
165
186
  ## License
166
187
 
@@ -6,6 +6,16 @@ Semantic history for agent-driven development. Records **what you did** and **wh
6
6
 
7
7
  Intent CLI gives AI agents a structured way to track goals, interactions, and decisions across sessions. Instead of losing context when a conversation ends, agents persist their understanding into three simple objects stored alongside your code.
8
8
 
9
+ ## Why
10
+
11
+ 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.
12
+
13
+ Today that context lives in chat logs, PR threads, and your head. It works — until the session ends, the agent forgets, or a teammate picks up your work blind.
14
+
15
+ Intent treats these as a missing layer: **semantic history**. Not more docs, not better commit messages — a small set of formal objects that capture goals, interactions, and decisions so they survive context loss.
16
+
17
+ > The shift is simple: development is moving from *writing code* to *guiding agents and distilling decisions*. The history layer should reflect that.
18
+
9
19
  ## Three objects, one graph
10
20
 
11
21
  | Object | What it captures |
@@ -38,12 +48,18 @@ pip install intent-cli-python
38
48
 
39
49
  Requires Python 3.9+ and Git.
40
50
 
41
- ### Add the Claude Code skill
51
+ ### Install the skills.sh skill
42
52
 
43
53
  ```bash
44
- npx skills add dozybot001/Intent
54
+ npx skills add dozybot001/Intent -g
45
55
  ```
46
56
 
57
+ This installs the `intent-cli` skill into your global skills library for supported agents such as Codex and Claude Code.
58
+
59
+ > **Tip:** `itt` is a new tool — current models have never seen it in training data. Your agent may forget to call it mid-conversation. A short nudge like *"use itt to record this"* is usually enough to bring it back on track.
60
+ >
61
+ > This isn't busywork — every record is a **semantic asset**. An upcoming platform, **IntHub**, will turn these assets into searchable, shareable project intelligence.
62
+
47
63
  ## Quick start
48
64
 
49
65
  ```bash
@@ -77,13 +93,14 @@ itt inspect
77
93
  | `itt version` | Print version |
78
94
  | `itt init` | Initialize `.intent/` in current git repo |
79
95
  | `itt inspect` | Show the live object graph snapshot |
96
+ | `itt doctor` | Validate the object graph for broken references and invalid states |
80
97
 
81
98
  ### Intent
82
99
 
83
100
  | Command | Description |
84
101
  |---|---|
85
102
  | `itt intent create TITLE --query Q` | Create a new intent |
86
- | `itt intent list [--status S]` | List intents |
103
+ | `itt intent list [--status S] [--decision ID]` | List intents |
87
104
  | `itt intent show ID` | Show intent details |
88
105
  | `itt intent activate ID` | Resume a suspended intent |
89
106
  | `itt intent suspend ID` | Suspend an active intent |
@@ -104,7 +121,7 @@ itt inspect
104
121
  | Command | Description |
105
122
  |---|---|
106
123
  | `itt decision create TITLE --rationale R` | Create a long-lived decision |
107
- | `itt decision list [--status S]` | List decisions |
124
+ | `itt decision list [--status S] [--intent ID]` | List decisions |
108
125
  | `itt decision show ID` | Show decision details |
109
126
  | `itt decision deprecate ID` | Deprecate a decision |
110
127
  | `itt decision attach ID --intent ID` | Manually link a decision to an intent |
@@ -132,11 +149,15 @@ All data lives in `.intent/` at your git repo root:
132
149
  decision-001.json
133
150
  ```
134
151
 
152
+ `.intent/` is local semantic-workspace metadata. It should stay out of Git history and should remain ignored by `.gitignore`.
153
+
135
154
  ## Docs
136
155
 
137
156
  - [Vision](docs/EN/vision.md) — why semantic history matters. **If this project interests you, start here.**
138
157
  - [CLI Design](docs/EN/cli.md) — object model, commands, JSON contract
139
158
  - [Roadmap](docs/EN/roadmap.md) — phase plan
159
+ - [IntHub MVP](docs/EN/inthub-mvp.md) — first remote collaboration-layer scope
160
+ - [IntHub Sync Contract](docs/EN/inthub-sync-contract.md) — first sync, identity, and API contract
140
161
 
141
162
  ## License
142
163
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "intent-cli-python"
7
- version = "1.0.0"
7
+ version = "1.2.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"
@@ -0,0 +1,8 @@
1
+ """Intent CLI — semantic history for agent-driven development."""
2
+
3
+ from importlib.metadata import PackageNotFoundError, version
4
+
5
+ try:
6
+ __version__ = version("intent-cli-python")
7
+ except PackageNotFoundError:
8
+ __version__ = "0.0.0"
@@ -0,0 +1,178 @@
1
+ """Intent CLI — parser and command dispatch."""
2
+
3
+ import argparse
4
+ import sys
5
+
6
+ from intent_cli.commands.core import (
7
+ cmd_decision_attach,
8
+ cmd_decision_create,
9
+ cmd_decision_deprecate,
10
+ cmd_decision_list,
11
+ cmd_decision_show,
12
+ cmd_doctor,
13
+ cmd_init,
14
+ cmd_inspect,
15
+ cmd_intent_activate,
16
+ cmd_intent_create,
17
+ cmd_intent_done,
18
+ cmd_intent_list,
19
+ cmd_intent_show,
20
+ cmd_intent_suspend,
21
+ cmd_snap_create,
22
+ cmd_snap_feedback,
23
+ cmd_snap_list,
24
+ cmd_snap_revert,
25
+ cmd_snap_show,
26
+ cmd_version,
27
+ )
28
+ from intent_cli.commands.hub import cmd_hub_link, cmd_hub_login, cmd_hub_sync
29
+
30
+
31
+ def main():
32
+ parser = argparse.ArgumentParser(prog="itt", description="Intent CLI")
33
+ sub = parser.add_subparsers(dest="command")
34
+
35
+ # version / init / inspect / doctor
36
+ sub.add_parser("version")
37
+ sub.add_parser("init")
38
+ sub.add_parser("inspect")
39
+ sub.add_parser("doctor")
40
+
41
+ # --- hub ---
42
+ p_hub = sub.add_parser("hub")
43
+ s_hub = p_hub.add_subparsers(dest="sub")
44
+
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
+ p = s_hub.add_parser("link")
50
+ p.add_argument("--project-name", default=None)
51
+ p.add_argument("--api-base-url", default=None)
52
+ p.add_argument("--token", default=None)
53
+
54
+ p = s_hub.add_parser("sync")
55
+ p.add_argument("--api-base-url", default=None)
56
+ p.add_argument("--token", default=None)
57
+ p.add_argument("--dry-run", action="store_true")
58
+
59
+ # --- intent ---
60
+ p_intent = sub.add_parser("intent")
61
+ s_intent = p_intent.add_subparsers(dest="sub")
62
+
63
+ p = s_intent.add_parser("create")
64
+ p.add_argument("title")
65
+ p.add_argument("--query", default="")
66
+ p.add_argument("--rationale", default="")
67
+
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
+ p = s_intent.add_parser("activate")
76
+ p.add_argument("id")
77
+
78
+ p = s_intent.add_parser("suspend")
79
+ p.add_argument("id")
80
+
81
+ p = s_intent.add_parser("done")
82
+ p.add_argument("id")
83
+
84
+ # --- snap ---
85
+ p_snap = sub.add_parser("snap")
86
+ s_snap = p_snap.add_subparsers(dest="sub")
87
+
88
+ p = s_snap.add_parser("create")
89
+ 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
+ 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")
102
+
103
+ p = s_snap.add_parser("feedback")
104
+ p.add_argument("id")
105
+ p.add_argument("feedback")
106
+
107
+ p = s_snap.add_parser("revert")
108
+ p.add_argument("id")
109
+
110
+ # --- decision ---
111
+ p_decision = sub.add_parser("decision")
112
+ s_decision = p_decision.add_subparsers(dest="sub")
113
+
114
+ p = s_decision.add_parser("create")
115
+ p.add_argument("title")
116
+ p.add_argument("--rationale", default="")
117
+
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
+ p = s_decision.add_parser("deprecate")
126
+ p.add_argument("id")
127
+
128
+ p = s_decision.add_parser("attach")
129
+ p.add_argument("id")
130
+ p.add_argument("--intent", required=True)
131
+
132
+ args = parser.parse_args()
133
+
134
+ if args.command is None:
135
+ parser.print_help()
136
+ sys.exit(1)
137
+
138
+ dispatch_global = {
139
+ "version": cmd_version,
140
+ "init": cmd_init,
141
+ "inspect": cmd_inspect,
142
+ "doctor": cmd_doctor,
143
+ }
144
+ if args.command in dispatch_global:
145
+ dispatch_global[args.command](args)
146
+ return
147
+
148
+ if not getattr(args, "sub", None):
149
+ {
150
+ "hub": p_hub,
151
+ "intent": p_intent,
152
+ "snap": p_snap,
153
+ "decision": p_decision,
154
+ }[args.command].print_help()
155
+ sys.exit(1)
156
+
157
+ dispatch = {
158
+ ("hub", "login"): cmd_hub_login,
159
+ ("hub", "link"): cmd_hub_link,
160
+ ("hub", "sync"): cmd_hub_sync,
161
+ ("intent", "create"): cmd_intent_create,
162
+ ("intent", "list"): cmd_intent_list,
163
+ ("intent", "show"): cmd_intent_show,
164
+ ("intent", "activate"): cmd_intent_activate,
165
+ ("intent", "suspend"): cmd_intent_suspend,
166
+ ("intent", "done"): cmd_intent_done,
167
+ ("snap", "create"): cmd_snap_create,
168
+ ("snap", "list"): cmd_snap_list,
169
+ ("snap", "show"): cmd_snap_show,
170
+ ("snap", "feedback"): cmd_snap_feedback,
171
+ ("snap", "revert"): cmd_snap_revert,
172
+ ("decision", "create"): cmd_decision_create,
173
+ ("decision", "list"): cmd_decision_list,
174
+ ("decision", "show"): cmd_decision_show,
175
+ ("decision", "deprecate"): cmd_decision_deprecate,
176
+ ("decision", "attach"): cmd_decision_attach,
177
+ }
178
+ dispatch[(args.command, args.sub)](args)
@@ -0,0 +1 @@
1
+ """Command handlers for the Intent CLI."""
@@ -0,0 +1,41 @@
1
+ """Shared helpers for CLI command handlers."""
2
+
3
+ from datetime import datetime, timezone
4
+
5
+ from intent_cli.output import error
6
+ from intent_cli.store import VALID_STATUSES, ensure_init, git_root
7
+
8
+
9
+ def now_utc():
10
+ return datetime.now(timezone.utc).isoformat()
11
+
12
+
13
+ def require_init():
14
+ """Return .intent/ base path, or exit with a structured error."""
15
+ base = ensure_init()
16
+ if base is not None:
17
+ return base
18
+ if git_root() is None:
19
+ error(
20
+ "GIT_STATE_INVALID",
21
+ "Not inside a Git repository.",
22
+ suggested_fix="cd into a git repo and run: itt init",
23
+ )
24
+ error(
25
+ "NOT_INITIALIZED",
26
+ ".intent/ directory not found.",
27
+ suggested_fix="itt init",
28
+ )
29
+
30
+
31
+ def validate_status_filter(object_type, status):
32
+ """Validate a --status filter against the object's state machine."""
33
+ if status is None:
34
+ return
35
+ allowed = sorted(VALID_STATUSES[object_type])
36
+ if status not in allowed:
37
+ error(
38
+ "INVALID_INPUT",
39
+ f"Invalid status '{status}' for {object_type}. Allowed values: {', '.join(allowed)}.",
40
+ suggested_fix=f"Use one of: {', '.join(allowed)}",
41
+ )