git-intent 0.3.2__tar.gz → 0.5.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-intent
3
- Version: 0.3.2
3
+ Version: 0.5.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
@@ -74,13 +74,35 @@ start → snap → done
74
74
  ## Example
75
75
 
76
76
  ```bash
77
- itt init
77
+ pipx install git-intent
78
+ itt init # creates .intent/
78
79
  itt start "Fix login timeout"
79
80
  itt snap "Increase timeout to 30s" -m "5s too short for slow networks"
80
81
  git add . && git commit -m "fix timeout"
81
82
  itt done
82
83
  ```
83
84
 
85
+ ## Why Not Just…
86
+
87
+ | Approach | What it does well | What falls through |
88
+ | --- | --- | --- |
89
+ | **Git commit messages** | Records what changed per commit | No goal structure across commits; rationale is afterthought; no work-in-progress state |
90
+ | **CLAUDE.md / .cursorrules** | Gives agents project-level instructions | Static — doesn't track active tasks, decisions, or progress; must be manually maintained |
91
+ | **TODO comments** | Marks incomplete work in-place | Scattered across files; no lifecycle; no rationale; agents must grep and guess priority |
92
+ | **Notion / Linear / Jira** | Rich project tracking for humans | External to the repo; agents can't read them without API integration; overhead is high for solo/agent workflows |
93
+ | **Agent memory** (e.g. Claude Code memory) | Persists user preferences across sessions | Tied to one platform; not versioned with code; not shareable across agents or teammates |
94
+ | **Ad-hoc context files** (e.g. `context.md`) | Quick, zero-tooling setup | No schema — every project invents its own format; no lifecycle management; grows stale silently |
95
+
96
+ **Intent occupies a specific gap**: structured, versioned, task-scoped context that lives *in the repo* and works across any agent platform.
97
+
98
+ - **Structured** — JSON objects with defined schema, not free text an agent must interpret
99
+ - **Task-scoped** — an intent has a lifecycle (`open → done`); snaps are ordered steps, not a pile of notes
100
+ - **Versioned** — `.intent/` is committed alongside code; `git blame` works on your decisions too
101
+ - **Platform-agnostic** — any agent that reads JSON can use it; no vendor lock-in
102
+ - **Minimal** — two objects (intent, snap), one CLI, zero dependencies; adds seconds to a workflow, not minutes
103
+
104
+ The closest alternative is writing a `context.md` by hand. Intent trades that flexibility for consistency: a schema agents can rely on without per-project prompt engineering.
105
+
84
106
  ## Where This Is Going
85
107
 
86
108
  `.intent/` is a protocol, not just a tool.
@@ -91,22 +113,36 @@ itt done
91
113
 
92
114
  ## Install
93
115
 
116
+ **Users:**
117
+
94
118
  ```bash
95
- pip install git-intent
119
+ pipx install git-intent
96
120
  ```
97
121
 
98
- Or from source:
122
+ **Configure your agent:** Intent ships a ready-to-use skill file in [`skills/git-intent.md`](skills/git-intent.md). Copy it into your agent's skill directory so it knows the Intent workflow:
123
+
124
+ ```bash
125
+ # Claude Code
126
+ mkdir -p .claude/skills
127
+ curl -o .claude/skills/git-intent.md \
128
+ https://raw.githubusercontent.com/dozybot001/Intent/main/skills/git-intent.md
129
+ ```
130
+
131
+ For other agents, adapt `skills/git-intent.md` to your platform's instruction format.
132
+
133
+ **Contributors:**
99
134
 
100
135
  ```bash
101
- git clone https://github.com/dozybot001/Intent.git && cd Intent
102
- pip install -e .
136
+ git clone https://github.com/dozybot001/Intent.git
137
+ cd Intent
138
+ python3 ./itt # dev entry point, no install needed
103
139
  ```
104
140
 
105
141
  ## Commands
106
142
 
107
143
  | Command | Purpose |
108
144
  | --- | --- |
109
- | `itt init` | Initialize `.intent/` in a Git repo |
145
+ | `itt init` | Initialize `.intent/` |
110
146
  | `itt start <title>` | Open an intent |
111
147
  | `itt snap <title> [-m why]` | Record a snap |
112
148
  | `itt done` | Close the active intent |
@@ -121,4 +157,4 @@ pip install -e .
121
157
  ## Documentation
122
158
 
123
159
  - [CLI spec](https://github.com/dozybot001/Intent/blob/main/docs/cli.EN.md) — objects, commands, JSON output contract
124
- - [Agent integration](https://github.com/dozybot001/Intent/blob/main/docs/agent-integration.md) — copy-paste snippets for Claude Code, Cursor, AGENTS.md
160
+ - [Dogfooding](https://github.com/dozybot001/Intent/blob/main/docs/dogfooding.md) — how we built Intent with Intent
@@ -50,13 +50,35 @@ start → snap → done
50
50
  ## Example
51
51
 
52
52
  ```bash
53
- itt init
53
+ pipx install git-intent
54
+ itt init # creates .intent/
54
55
  itt start "Fix login timeout"
55
56
  itt snap "Increase timeout to 30s" -m "5s too short for slow networks"
56
57
  git add . && git commit -m "fix timeout"
57
58
  itt done
58
59
  ```
59
60
 
61
+ ## Why Not Just…
62
+
63
+ | Approach | What it does well | What falls through |
64
+ | --- | --- | --- |
65
+ | **Git commit messages** | Records what changed per commit | No goal structure across commits; rationale is afterthought; no work-in-progress state |
66
+ | **CLAUDE.md / .cursorrules** | Gives agents project-level instructions | Static — doesn't track active tasks, decisions, or progress; must be manually maintained |
67
+ | **TODO comments** | Marks incomplete work in-place | Scattered across files; no lifecycle; no rationale; agents must grep and guess priority |
68
+ | **Notion / Linear / Jira** | Rich project tracking for humans | External to the repo; agents can't read them without API integration; overhead is high for solo/agent workflows |
69
+ | **Agent memory** (e.g. Claude Code memory) | Persists user preferences across sessions | Tied to one platform; not versioned with code; not shareable across agents or teammates |
70
+ | **Ad-hoc context files** (e.g. `context.md`) | Quick, zero-tooling setup | No schema — every project invents its own format; no lifecycle management; grows stale silently |
71
+
72
+ **Intent occupies a specific gap**: structured, versioned, task-scoped context that lives *in the repo* and works across any agent platform.
73
+
74
+ - **Structured** — JSON objects with defined schema, not free text an agent must interpret
75
+ - **Task-scoped** — an intent has a lifecycle (`open → done`); snaps are ordered steps, not a pile of notes
76
+ - **Versioned** — `.intent/` is committed alongside code; `git blame` works on your decisions too
77
+ - **Platform-agnostic** — any agent that reads JSON can use it; no vendor lock-in
78
+ - **Minimal** — two objects (intent, snap), one CLI, zero dependencies; adds seconds to a workflow, not minutes
79
+
80
+ The closest alternative is writing a `context.md` by hand. Intent trades that flexibility for consistency: a schema agents can rely on without per-project prompt engineering.
81
+
60
82
  ## Where This Is Going
61
83
 
62
84
  `.intent/` is a protocol, not just a tool.
@@ -67,22 +89,36 @@ itt done
67
89
 
68
90
  ## Install
69
91
 
92
+ **Users:**
93
+
70
94
  ```bash
71
- pip install git-intent
95
+ pipx install git-intent
72
96
  ```
73
97
 
74
- Or from source:
98
+ **Configure your agent:** Intent ships a ready-to-use skill file in [`skills/git-intent.md`](skills/git-intent.md). Copy it into your agent's skill directory so it knows the Intent workflow:
99
+
100
+ ```bash
101
+ # Claude Code
102
+ mkdir -p .claude/skills
103
+ curl -o .claude/skills/git-intent.md \
104
+ https://raw.githubusercontent.com/dozybot001/Intent/main/skills/git-intent.md
105
+ ```
106
+
107
+ For other agents, adapt `skills/git-intent.md` to your platform's instruction format.
108
+
109
+ **Contributors:**
75
110
 
76
111
  ```bash
77
- git clone https://github.com/dozybot001/Intent.git && cd Intent
78
- pip install -e .
112
+ git clone https://github.com/dozybot001/Intent.git
113
+ cd Intent
114
+ python3 ./itt # dev entry point, no install needed
79
115
  ```
80
116
 
81
117
  ## Commands
82
118
 
83
119
  | Command | Purpose |
84
120
  | --- | --- |
85
- | `itt init` | Initialize `.intent/` in a Git repo |
121
+ | `itt init` | Initialize `.intent/` |
86
122
  | `itt start <title>` | Open an intent |
87
123
  | `itt snap <title> [-m why]` | Record a snap |
88
124
  | `itt done` | Close the active intent |
@@ -97,4 +133,4 @@ pip install -e .
97
133
  ## Documentation
98
134
 
99
135
  - [CLI spec](https://github.com/dozybot001/Intent/blob/main/docs/cli.EN.md) — objects, commands, JSON output contract
100
- - [Agent integration](https://github.com/dozybot001/Intent/blob/main/docs/agent-integration.md) — copy-paste snippets for Claude Code, Cursor, AGENTS.md
136
+ - [Dogfooding](https://github.com/dozybot001/Intent/blob/main/docs/dogfooding.md) — how we built Intent with Intent
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "git-intent"
7
- version = "0.3.2"
7
+ version = "0.5.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"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-intent
3
- Version: 0.3.2
3
+ Version: 0.5.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
@@ -74,13 +74,35 @@ start → snap → done
74
74
  ## Example
75
75
 
76
76
  ```bash
77
- itt init
77
+ pipx install git-intent
78
+ itt init # creates .intent/
78
79
  itt start "Fix login timeout"
79
80
  itt snap "Increase timeout to 30s" -m "5s too short for slow networks"
80
81
  git add . && git commit -m "fix timeout"
81
82
  itt done
82
83
  ```
83
84
 
85
+ ## Why Not Just…
86
+
87
+ | Approach | What it does well | What falls through |
88
+ | --- | --- | --- |
89
+ | **Git commit messages** | Records what changed per commit | No goal structure across commits; rationale is afterthought; no work-in-progress state |
90
+ | **CLAUDE.md / .cursorrules** | Gives agents project-level instructions | Static — doesn't track active tasks, decisions, or progress; must be manually maintained |
91
+ | **TODO comments** | Marks incomplete work in-place | Scattered across files; no lifecycle; no rationale; agents must grep and guess priority |
92
+ | **Notion / Linear / Jira** | Rich project tracking for humans | External to the repo; agents can't read them without API integration; overhead is high for solo/agent workflows |
93
+ | **Agent memory** (e.g. Claude Code memory) | Persists user preferences across sessions | Tied to one platform; not versioned with code; not shareable across agents or teammates |
94
+ | **Ad-hoc context files** (e.g. `context.md`) | Quick, zero-tooling setup | No schema — every project invents its own format; no lifecycle management; grows stale silently |
95
+
96
+ **Intent occupies a specific gap**: structured, versioned, task-scoped context that lives *in the repo* and works across any agent platform.
97
+
98
+ - **Structured** — JSON objects with defined schema, not free text an agent must interpret
99
+ - **Task-scoped** — an intent has a lifecycle (`open → done`); snaps are ordered steps, not a pile of notes
100
+ - **Versioned** — `.intent/` is committed alongside code; `git blame` works on your decisions too
101
+ - **Platform-agnostic** — any agent that reads JSON can use it; no vendor lock-in
102
+ - **Minimal** — two objects (intent, snap), one CLI, zero dependencies; adds seconds to a workflow, not minutes
103
+
104
+ The closest alternative is writing a `context.md` by hand. Intent trades that flexibility for consistency: a schema agents can rely on without per-project prompt engineering.
105
+
84
106
  ## Where This Is Going
85
107
 
86
108
  `.intent/` is a protocol, not just a tool.
@@ -91,22 +113,36 @@ itt done
91
113
 
92
114
  ## Install
93
115
 
116
+ **Users:**
117
+
94
118
  ```bash
95
- pip install git-intent
119
+ pipx install git-intent
96
120
  ```
97
121
 
98
- Or from source:
122
+ **Configure your agent:** Intent ships a ready-to-use skill file in [`skills/git-intent.md`](skills/git-intent.md). Copy it into your agent's skill directory so it knows the Intent workflow:
123
+
124
+ ```bash
125
+ # Claude Code
126
+ mkdir -p .claude/skills
127
+ curl -o .claude/skills/git-intent.md \
128
+ https://raw.githubusercontent.com/dozybot001/Intent/main/skills/git-intent.md
129
+ ```
130
+
131
+ For other agents, adapt `skills/git-intent.md` to your platform's instruction format.
132
+
133
+ **Contributors:**
99
134
 
100
135
  ```bash
101
- git clone https://github.com/dozybot001/Intent.git && cd Intent
102
- pip install -e .
136
+ git clone https://github.com/dozybot001/Intent.git
137
+ cd Intent
138
+ python3 ./itt # dev entry point, no install needed
103
139
  ```
104
140
 
105
141
  ## Commands
106
142
 
107
143
  | Command | Purpose |
108
144
  | --- | --- |
109
- | `itt init` | Initialize `.intent/` in a Git repo |
145
+ | `itt init` | Initialize `.intent/` |
110
146
  | `itt start <title>` | Open an intent |
111
147
  | `itt snap <title> [-m why]` | Record a snap |
112
148
  | `itt done` | Close the active intent |
@@ -121,4 +157,4 @@ pip install -e .
121
157
  ## Documentation
122
158
 
123
159
  - [CLI spec](https://github.com/dozybot001/Intent/blob/main/docs/cli.EN.md) — objects, commands, JSON output contract
124
- - [Agent integration](https://github.com/dozybot001/Intent/blob/main/docs/agent-integration.md) — copy-paste snippets for Claude Code, Cursor, AGENTS.md
160
+ - [Dogfooding](https://github.com/dozybot001/Intent/blob/main/docs/dogfooding.md) — how we built Intent with Intent
@@ -26,4 +26,4 @@ if __version__ is None:
26
26
  try:
27
27
  __version__ = metadata.version(PACKAGE_NAME)
28
28
  except metadata.PackageNotFoundError:
29
- __version__ = "0.3.2"
29
+ __version__ = "0.4.0"
@@ -60,6 +60,7 @@ def build_parser() -> argparse.ArgumentParser:
60
60
 
61
61
  list_p = sub.add_parser("list", help="List objects")
62
62
  list_p.add_argument("type", choices=["intent", "snap"])
63
+ list_p.add_argument("--intent", dest="intent_id", help="Filter snaps by intent ID")
63
64
 
64
65
  show_p = sub.add_parser("show", help="Show a single object by ID")
65
66
  show_p.add_argument("id")
@@ -130,7 +131,7 @@ def main(argv: Optional[list[str]] = None) -> int:
130
131
  return EXIT_SUCCESS
131
132
 
132
133
  if args.command == "list":
133
- items = repo.list_objects(args.type)
134
+ items = repo.list_objects(args.type, intent_id=getattr(args, "intent_id", None))
134
135
  emit(ok("list", items, count=len(items)))
135
136
  return EXIT_SUCCESS
136
137
 
@@ -382,7 +382,7 @@ class IntentRepository:
382
382
  "warnings": git_warnings,
383
383
  }
384
384
 
385
- def list_objects(self, object_name: str) -> List[Dict[str, Any]]:
385
+ def list_objects(self, object_name: str, intent_id: Optional[str] = None) -> List[Dict[str, Any]]:
386
386
  self.ensure_git()
387
387
  self.ensure_initialized()
388
388
  if object_name not in ("intent", "snap"):
@@ -392,7 +392,10 @@ class IntentRepository:
392
392
  f"Unknown object type: {object_name}",
393
393
  suggested_fix="Use 'intent' or 'snap'.",
394
394
  )
395
- return sorted(self.store.list_objects(object_name), key=object_sort_key, reverse=True)
395
+ items = self.store.list_objects(object_name)
396
+ if intent_id and object_name == "snap":
397
+ items = [s for s in items if s.get("intent_id") == intent_id]
398
+ return sorted(items, key=object_sort_key, reverse=True)
396
399
 
397
400
  def show_object(self, object_id: str) -> Dict[str, Any]:
398
401
  self.ensure_git()
@@ -51,6 +51,7 @@ class IntentStore:
51
51
  }
52
52
  write_json(self.config_path, config)
53
53
  write_json(self.state_path, state)
54
+
54
55
  return config, state
55
56
 
56
57
  def load_state(self) -> Dict[str, Any]:
File without changes
File without changes
File without changes