@@ -55,6 +55,159 @@ pub enum Command {
5555 Status ( StatusArgs ) ,
5656 /// View and edit configuration
5757 Config ( ConfigArgs ) ,
58+ /// View and manage the continuous timeline
59+ Timeline ( TimelineArgs ) ,
60+ /// Promote timeline entries to a curated changeset
61+ Promote ( PromoteArgs ) ,
62+ /// View changeset history
63+ Log ( LogArgs ) ,
64+ /// Show changes (line-based; semantic diff arrives in Phase 2)
65+ Diff ( DiffArgs ) ,
66+ /// Manage branches and agent exploration branches
67+ Branch ( BranchArgs ) ,
68+ }
69+
70+ #[ derive( Args ) ]
71+ pub struct TimelineArgs {
72+ #[ command( subcommand) ]
73+ pub action : Option < TimelineAction > ,
74+
75+ /// Show entries since this time (e.g. "1h", "2d", "today", "2026-05-16")
76+ #[ arg( long, global = true ) ]
77+ pub since : Option < String > ,
78+ /// Show entries until this time
79+ #[ arg( long, global = true ) ]
80+ pub until : Option < String > ,
81+ /// Filter by author id
82+ #[ arg( long, global = true ) ]
83+ pub author : Option < String > ,
84+ /// Filter by file path glob
85+ #[ arg( long, global = true , value_name = "PATTERN" ) ]
86+ pub file : Option < String > ,
87+ /// Show last N entries
88+ #[ arg( short = 'n' , long, global = true , default_value_t = 20 ) ]
89+ pub limit : u32 ,
90+ /// Show per-file change details
91+ #[ arg( long, global = true ) ]
92+ pub stat : bool ,
93+ }
94+
95+ #[ derive( Subcommand ) ]
96+ pub enum TimelineAction {
97+ /// Live-stream timeline entries as they happen
98+ Watch ,
99+ /// Search timeline by file/author
100+ Search ,
101+ /// Remove old timeline entries per retention policy
102+ Prune {
103+ /// Override retention (e.g. "60d", "24h")
104+ #[ arg( long) ]
105+ older_than : Option < String > ,
106+ } ,
107+ /// Export the (filtered) timeline as JSON
108+ Export {
109+ /// Output file (default: stdout)
110+ path : Option < PathBuf > ,
111+ } ,
112+ }
113+
114+ #[ derive( Args ) ]
115+ pub struct PromoteArgs {
116+ /// Start of timeline range (entry id or time)
117+ #[ arg( long) ]
118+ pub from : Option < String > ,
119+ /// End of timeline range (entry id or time)
120+ #[ arg( long) ]
121+ pub to : Option < String > ,
122+ /// Changeset description
123+ #[ arg( short, long) ]
124+ pub message : Option < String > ,
125+ /// Intent type: feature|bugfix|refactor|docs|dependency
126+ #[ arg( long) ]
127+ pub intent : Option < String > ,
128+ /// Link to a task/issue
129+ #[ arg( long) ]
130+ pub task : Option < String > ,
131+ /// Interactively select entries (Phase 1: not implemented)
132+ #[ arg( short, long) ]
133+ pub interactive : bool ,
134+ /// Use AI to summarize (later phase: not implemented)
135+ #[ arg( long) ]
136+ pub auto_summarize : bool ,
137+ /// Cryptographically sign (later phase: not implemented)
138+ #[ arg( long) ]
139+ pub sign : bool ,
140+ }
141+
142+ #[ derive( Args ) ]
143+ pub struct LogArgs {
144+ /// One line per changeset
145+ #[ arg( long) ]
146+ pub oneline : bool ,
147+ /// Show a simple ASCII graph column
148+ #[ arg( long) ]
149+ pub graph : bool ,
150+ /// Show semantic change summaries (Phase 2: not available)
151+ #[ arg( long) ]
152+ pub semantic : bool ,
153+ /// Filter by author id
154+ #[ arg( long) ]
155+ pub author : Option < String > ,
156+ /// Only agent-authored changesets
157+ #[ arg( long) ]
158+ pub agent : bool ,
159+ /// Only human-authored changesets
160+ #[ arg( long) ]
161+ pub human : bool ,
162+ /// Filter by intent type
163+ #[ arg( long) ]
164+ pub intent : Option < String > ,
165+ #[ arg( long) ]
166+ pub since : Option < String > ,
167+ #[ arg( long) ]
168+ pub until : Option < String > ,
169+ /// Show last N changesets
170+ #[ arg( short = 'n' , long, default_value_t = 20 ) ]
171+ pub limit : usize ,
172+ }
173+
174+ #[ derive( Args ) ]
175+ pub struct DiffArgs {
176+ /// Target: empty (working vs HEAD), <changeset>, or <cs1>..<cs2>
177+ pub target : Option < String > ,
178+ /// Force line-based diff (the only mode in Phase 1)
179+ #[ arg( long) ]
180+ pub line : bool ,
181+ /// Show semantic operations (Phase 2: falls back to line)
182+ #[ arg( long) ]
183+ pub semantic : bool ,
184+ /// Show only statistics
185+ #[ arg( long) ]
186+ pub stat : bool ,
187+ /// Show only file names
188+ #[ arg( long) ]
189+ pub files : bool ,
190+ }
191+
192+ #[ derive( Args ) ]
193+ pub struct BranchArgs {
194+ #[ command( subcommand) ]
195+ pub action : Option < BranchAction > ,
196+ /// Show all branches including explorations
197+ #[ arg( short, long) ]
198+ pub all : bool ,
199+ }
200+
201+ #[ derive( Subcommand ) ]
202+ pub enum BranchAction {
203+ /// Create a new branch at the current tip
204+ Create { name : String } ,
205+ /// Delete a branch
206+ Delete { name : String } ,
207+ /// Switch to a branch
208+ Switch { name : String } ,
209+ /// Create an exploration branch (explorations/<name>)
210+ Explore { name : String } ,
58211}
59212
60213#[ derive( Args ) ]
0 commit comments