Skip to content

Commit 22f1e65

Browse files
cailmdaleyclaude
andcommitted
refactor: remove priority field — unused ballast
Also update session hook: fold "leave breadcrumbs" into "leave a wake" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2c7760c commit 22f1e65

File tree

11 files changed

+30
-113
lines changed

11 files changed

+30
-113
lines changed

cmd/add.go

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ import (
1111
)
1212

1313
var (
14-
addBody string
15-
addStatus string
16-
addPriority int
17-
addDeps []string
14+
addBody string
15+
addStatus string
16+
addDeps []string
1817
addDue string
1918
addTags []string
2019
addOutcome string
@@ -58,9 +57,6 @@ var addCmd = &cobra.Command{
5857
if addStatus != "" {
5958
f.Status = addStatus
6059
}
61-
if cmd.Flags().Changed("priority") {
62-
f.Priority = addPriority
63-
}
6460
if len(addTags) > 0 {
6561
for _, tag := range addTags {
6662
f.AddTag(tag)
@@ -114,7 +110,6 @@ func init() {
114110
rootCmd.AddCommand(addCmd)
115111
addCmd.Flags().StringVarP(&addBody, "body", "b", "", "Body text")
116112
addCmd.Flags().StringVarP(&addStatus, "status", "s", "", "Status (open, active, closed)")
117-
addCmd.Flags().IntVarP(&addPriority, "priority", "p", 2, "Priority (0-4, lower=more urgent)")
118113
addCmd.Flags().StringArrayVarP(&addDeps, "depends-on", "a", nil, "Dependency ID (repeatable)")
119114
addCmd.Flags().StringVarP(&addDue, "due", "D", "", "Due date (YYYY-MM-DD)")
120115
addCmd.Flags().StringArrayVarP(&addTags, "tag", "t", nil, "Tag (repeatable)")
@@ -128,7 +123,6 @@ func init() {
128123
// Copy add command flags to root so "felt <title> -a dep" works
129124
rootCmd.Flags().StringVarP(&addBody, "body", "b", "", "Body text")
130125
rootCmd.Flags().StringVarP(&addStatus, "status", "s", "", "Status (open, active, closed)")
131-
rootCmd.Flags().IntVarP(&addPriority, "priority", "p", 2, "Priority (0-4, lower=more urgent)")
132126
rootCmd.Flags().StringArrayVarP(&addDeps, "depends-on", "a", nil, "Dependency ID (repeatable)")
133127
rootCmd.Flags().StringVarP(&addDue, "due", "D", "", "Due date (YYYY-MM-DD)")
134128
rootCmd.Flags().StringArrayVarP(&addTags, "tag", "t", nil, "Tag (repeatable)")

cmd/depth.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ func renderSummary(f *felt.Felt, g *felt.Graph) string {
113113
func renderFull(f *felt.Felt, g *felt.Graph) string {
114114
var sb strings.Builder
115115
writeHeader(&sb, f)
116-
fmt.Fprintf(&sb, "Priority: %d\n", f.Priority)
117116
writeDeps(&sb, f, g, true)
118117
if f.Due != nil {
119118
fmt.Fprintf(&sb, "Due: %s\n", f.Due.Format("2006-01-02"))

cmd/edit.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ var (
2121

2222
// Edit command flags
2323
var (
24-
editPriority int
25-
editTitle string
24+
editTitle string
2625
editStatus string
2726
editDue string
2827
editDeps []string
@@ -39,7 +38,6 @@ var editCmd = &cobra.Command{
3938
Long: `Modifies a felt's properties via flags, or opens in $EDITOR if no flags given.
4039
4140
Examples:
42-
felt edit abc123 --priority 1
4341
felt edit abc123 --title "New title" -s active
4442
felt edit abc123 --depends-on other-fiber-id
4543
felt edit abc123 # opens in $EDITOR`,
@@ -57,8 +55,7 @@ Examples:
5755
}
5856

5957
// Check if any modification flags were provided
60-
hasFlags := cmd.Flags().Changed("priority") ||
61-
cmd.Flags().Changed("title") ||
58+
hasFlags := cmd.Flags().Changed("title") ||
6259
cmd.Flags().Changed("status") ||
6360
cmd.Flags().Changed("due") ||
6461
cmd.Flags().Changed("depends-on") ||
@@ -82,9 +79,6 @@ Examples:
8279
}
8380

8481
// Apply flag modifications
85-
if cmd.Flags().Changed("priority") {
86-
f.Priority = editPriority
87-
}
8882
if cmd.Flags().Changed("title") {
8983
f.Title = editTitle
9084
}
@@ -418,7 +412,6 @@ func init() {
418412
rootCmd.AddCommand(findCmd)
419413

420414
// Edit command flags
421-
editCmd.Flags().IntVarP(&editPriority, "priority", "p", 2, "Set priority (0-4, lower=more urgent)")
422415
editCmd.Flags().StringVarP(&editTitle, "title", "t", "", "Set title")
423416
editCmd.Flags().StringVarP(&editStatus, "status", "s", "", "Set status (open, active, closed)")
424417
editCmd.Flags().StringVarP(&editBody, "body", "b", "", "Set body text")

cmd/hook.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func minimalOutput() string {
6767
- Track **work** that spans sessions, has dependencies, or emerges during work
6868
- Track **decisions** — what was decided, why, and how decisions depend on each other
6969
- Outcome (` + "`-o`" + `) is the documentation: capture the conclusion, the reasoning, what was learned
70-
- When in doubt, prefer felt—persistence you don't need is better than lost context
70+
- **Leave a wake** — file as you go; the DAG forms after your path
7171
`
7272
}
7373

@@ -84,11 +84,8 @@ func formatSessionOutput(felts []*felt.Felt, g *felt.Graph) string {
8484
}
8585
}
8686

87-
// Sort active by priority, then creation time
87+
// Sort active by creation time
8888
sort.Slice(active, func(i, j int) bool {
89-
if active[i].Priority != active[j].Priority {
90-
return active[i].Priority < active[j].Priority
91-
}
9289
return active[i].CreatedAt.Before(active[j].CreatedAt)
9390
})
9491

@@ -153,8 +150,7 @@ func formatSessionOutput(felts []*felt.Felt, g *felt.Graph) string {
153150
sb.WriteString("- Track **work** that spans sessions, has dependencies, or emerges during work\n")
154151
sb.WriteString("- Track **decisions** — what was decided, why, and how decisions depend on each other\n")
155152
sb.WriteString("- Outcome (`-o`) is the documentation: capture the conclusion, the reasoning, what was learned\n")
156-
sb.WriteString("- **Leave breadcrumbs** — file fibers for decisions, questions, observations\n")
157-
sb.WriteString("- When in doubt, prefer felt—persistence you don't need is better than lost context\n")
153+
sb.WriteString("- **Leave a wake** — file as you go; the DAG forms after your path\n")
158154

159155
return sb.String()
160156
}

cmd/hook_test.go

Lines changed: 8 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,22 @@ func TestFormatSessionOutput(t *testing.T) {
4242
ID: "active-task-12345678",
4343
Title: "Active task",
4444
Status: felt.StatusActive,
45-
Priority: 2,
45+
4646
CreatedAt: now,
4747
}
4848

4949
readyFelt := &felt.Felt{
5050
ID: "ready-task-87654321",
5151
Title: "Ready task",
5252
Status: felt.StatusOpen,
53-
Priority: 2,
53+
5454
CreatedAt: now,
5555
}
5656

5757
closedFelt := &felt.Felt{
5858
ID: "closed-task-abcdef12",
5959
Title: "Closed task",
6060
Status: felt.StatusClosed,
61-
Priority: 2,
6261
CreatedAt: now.Add(-2 * time.Hour),
6362
ClosedAt: &closedTime,
6463
Outcome: "Done with good results",
@@ -120,45 +119,6 @@ func TestFormatSessionOutput_Empty(t *testing.T) {
120119
}
121120
}
122121

123-
func TestFormatSessionOutput_PrioritySorting(t *testing.T) {
124-
now := time.Now()
125-
126-
// Create active fibers with different priorities
127-
// Lower priority number = higher priority
128-
lowPriorityActive := &felt.Felt{
129-
ID: "low-priority-12345678",
130-
Title: "Low priority active",
131-
Status: felt.StatusActive,
132-
Priority: 3,
133-
CreatedAt: now,
134-
}
135-
136-
highPriorityActive := &felt.Felt{
137-
ID: "high-priority-87654321",
138-
Title: "High priority active",
139-
Status: felt.StatusActive,
140-
Priority: 1,
141-
CreatedAt: now.Add(time.Minute), // Created later but higher priority
142-
}
143-
144-
felts := []*felt.Felt{lowPriorityActive, highPriorityActive}
145-
g := felt.BuildGraph(felts)
146-
147-
output := formatSessionOutput(felts, g)
148-
149-
// High priority should appear before low priority
150-
highIdx := strings.Index(output, "high-priority-87654321")
151-
lowIdx := strings.Index(output, "low-priority-12345678")
152-
153-
if highIdx < 0 || lowIdx < 0 {
154-
t.Error("both active fibers should appear in output")
155-
}
156-
157-
if highIdx > lowIdx {
158-
t.Error("high priority fiber should appear before low priority fiber")
159-
}
160-
}
161-
162122
func TestFormatSessionOutput_BlockedReady(t *testing.T) {
163123
now := time.Now()
164124

@@ -167,15 +127,15 @@ func TestFormatSessionOutput_BlockedReady(t *testing.T) {
167127
ID: "blocker-task-12345678",
168128
Title: "Blocker",
169129
Status: felt.StatusOpen,
170-
Priority: 2,
130+
171131
CreatedAt: now,
172132
}
173133

174134
blockedFelt := &felt.Felt{
175135
ID: "blocked-task-87654321",
176136
Title: "Blocked task",
177137
Status: felt.StatusOpen,
178-
Priority: 2,
138+
179139
DependsOn: felt.Dependencies{{ID: "blocker-task-12345678"}},
180140
CreatedAt: now.Add(time.Minute),
181141
}
@@ -215,7 +175,6 @@ func TestFormatSessionOutput_UnblockedByClosedDep(t *testing.T) {
215175
ID: "closed-dep-12345678",
216176
Title: "Completed prereq",
217177
Status: felt.StatusClosed,
218-
Priority: 2,
219178
CreatedAt: now.Add(-2 * time.Hour),
220179
ClosedAt: &closedTime,
221180
ModifiedAt: closedTime,
@@ -226,7 +185,7 @@ func TestFormatSessionOutput_UnblockedByClosedDep(t *testing.T) {
226185
ID: "unblocked-task-87654321",
227186
Title: "Task unblocked by closed dep",
228187
Status: felt.StatusOpen,
229-
Priority: 2,
188+
230189
DependsOn: felt.Dependencies{{ID: "closed-dep-12345678"}},
231190
CreatedAt: now.Add(time.Minute),
232191
}
@@ -261,7 +220,7 @@ func TestFormatSessionOutput_TagLabels(t *testing.T) {
261220
ID: "impl-auth-12345678",
262221
Title: "Implement auth",
263222
Status: felt.StatusActive,
264-
Priority: 2,
223+
265224
CreatedAt: now,
266225
}
267226

@@ -270,7 +229,7 @@ func TestFormatSessionOutput_TagLabels(t *testing.T) {
270229
Title: "Design REST API",
271230
Status: felt.StatusOpen,
272231
Tags: []string{"decision"},
273-
Priority: 2,
232+
274233
CreatedAt: now,
275234
}
276235

@@ -279,7 +238,7 @@ func TestFormatSessionOutput_TagLabels(t *testing.T) {
279238
Title: "Which library?",
280239
Status: felt.StatusOpen,
281240
Tags: []string{"question"},
282-
Priority: 2,
241+
283242
CreatedAt: now,
284243
}
285244

cmd/ls.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ Use -s to filter: open, active, closed, or all.`,
9090
filtered = filtered[:lsRecent]
9191
}
9292
} else {
93-
// Default: sort by priority, then creation time
93+
// Default: sort by creation time
9494
sort.Slice(filtered, func(i, j int) bool {
95-
if filtered[i].Priority != filtered[j].Priority {
96-
return filtered[i].Priority < filtered[j].Priority
97-
}
9895
return filtered[i].CreatedAt.Before(filtered[j].CreatedAt)
9996
})
10097
}

internal/felt/felt.go

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,8 @@ type Felt struct {
9898
ID string `yaml:"-" json:"id"`
9999
Title string `yaml:"title" json:"title"`
100100
Status string `yaml:"status,omitempty" json:"status,omitempty"`
101-
Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
102-
Priority int `yaml:"priority,omitempty" json:"priority,omitempty"`
103-
DependsOn Dependencies `yaml:"depends-on,omitempty" json:"depends_on,omitempty"`
101+
Tags []string `yaml:"tags,omitempty" json:"tags,omitempty"`
102+
DependsOn Dependencies `yaml:"depends-on,omitempty" json:"depends_on,omitempty"`
104103
CreatedAt time.Time `yaml:"created-at" json:"created_at"`
105104
ClosedAt *time.Time `yaml:"closed-at,omitempty" json:"closed_at,omitempty"`
106105
Outcome string `yaml:"outcome,omitempty" json:"outcome,omitempty"`
@@ -131,7 +130,6 @@ func New(title string) (*Felt, error) {
131130
return &Felt{
132131
ID: id,
133132
Title: title,
134-
Priority: 2,
135133
DependsOn: Dependencies{},
136134
CreatedAt: time.Now(),
137135
}, nil
@@ -267,9 +265,8 @@ type parseFrontmatter struct {
267265
Title string `yaml:"title"`
268266
Status string `yaml:"status,omitempty"`
269267
Kind string `yaml:"kind,omitempty"`
270-
Tags []string `yaml:"tags,omitempty"`
271-
Priority int `yaml:"priority,omitempty"`
272-
DependsOn Dependencies `yaml:"depends-on,omitempty"`
268+
Tags []string `yaml:"tags,omitempty"`
269+
DependsOn Dependencies `yaml:"depends-on,omitempty"`
273270
CreatedAt time.Time `yaml:"created-at"`
274271
ClosedAt *time.Time `yaml:"closed-at,omitempty"`
275272
CloseReason string `yaml:"close-reason,omitempty"`
@@ -296,7 +293,6 @@ func Parse(id string, content []byte) (*Felt, error) {
296293
Title: pf.Title,
297294
Status: pf.Status,
298295
Tags: pf.Tags,
299-
Priority: pf.Priority,
300296
DependsOn: pf.DependsOn,
301297
CreatedAt: pf.CreatedAt,
302298
ClosedAt: pf.ClosedAt,
@@ -370,7 +366,6 @@ func (f *Felt) Marshal() ([]byte, error) {
370366
Title string `yaml:"title"`
371367
Status string `yaml:"status,omitempty"`
372368
Tags []string `yaml:"tags,omitempty"`
373-
Priority int `yaml:"priority,omitempty"`
374369
DependsOn Dependencies `yaml:"depends-on,omitempty"`
375370
CreatedAt time.Time `yaml:"created-at"`
376371
ClosedAt *time.Time `yaml:"closed-at,omitempty"`
@@ -380,7 +375,6 @@ func (f *Felt) Marshal() ([]byte, error) {
380375
Title: f.Title,
381376
Status: f.Status,
382377
Tags: f.Tags,
383-
Priority: f.Priority,
384378
DependsOn: f.DependsOn,
385379
CreatedAt: f.CreatedAt,
386380
ClosedAt: f.ClosedAt,

internal/felt/felt_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@ func TestNew(t *testing.T) {
1818
if f.Status != "" {
1919
t.Errorf("Status = %q, want empty (no default status)", f.Status)
2020
}
21-
if f.Priority != 2 {
22-
t.Errorf("Priority = %d, want 2", f.Priority)
23-
}
2421
if !strings.HasPrefix(f.ID, "test-task-") {
2522
t.Errorf("ID = %q, want prefix %q", f.ID, "test-task-")
2623
}
@@ -94,7 +91,6 @@ func TestParse(t *testing.T) {
9491
title: Test Task
9592
status: active
9693
kind: spec
97-
priority: 1
9894
depends-on:
9995
- dep-a-12345678
10096
- dep-b-87654321
@@ -124,9 +120,6 @@ Some comment here.
124120
if !f.HasTag("spec") {
125121
t.Errorf("HasTag(spec) = false, want true (kind migrates to tags)")
126122
}
127-
if f.Priority != 1 {
128-
t.Errorf("Priority = %d, want 1", f.Priority)
129-
}
130123
if len(f.DependsOn) != 2 {
131124
t.Errorf("DependsOn length = %d, want 2", len(f.DependsOn))
132125
}
@@ -161,7 +154,6 @@ func TestMarshal(t *testing.T) {
161154
f := &Felt{
162155
ID: "test-task-12345678",
163156
Title: "Test Task",
164-
Priority: 2,
165157
DependsOn: Dependencies{{ID: "dep-1-aaaaaaaa"}},
166158
CreatedAt: now,
167159
Body: "Body text here.",
@@ -413,7 +405,6 @@ func TestMarshalTags(t *testing.T) {
413405
Title: "Test Tags",
414406
Status: StatusOpen,
415407
Tags: []string{"alpha", "beta"},
416-
Priority: 2,
417408
CreatedAt: time.Date(2026, 1, 1, 10, 0, 0, 0, time.UTC),
418409
}
419410

@@ -490,7 +481,6 @@ func TestMarshalMixedDependencies(t *testing.T) {
490481
{ID: "bare-id-12345678"},
491482
{ID: "labeled-id-87654321", Label: "needs data from"},
492483
},
493-
Priority: 2,
494484
CreatedAt: time.Date(2026, 1, 1, 10, 0, 0, 0, time.UTC),
495485
}
496486

internal/felt/graph.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,8 @@ func (g *Graph) Ready() []*Felt {
106106
}
107107
}
108108

109-
// Sort by priority, then creation time
109+
// Sort by creation time
110110
sort.Slice(ready, func(i, j int) bool {
111-
if ready[i].Priority != ready[j].Priority {
112-
return ready[i].Priority < ready[j].Priority
113-
}
114111
return ready[i].CreatedAt.Before(ready[j].CreatedAt)
115112
})
116113

0 commit comments

Comments
 (0)