@tanagram/cli 0.1.11 → 0.1.13

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.
package/README.md CHANGED
@@ -123,7 +123,7 @@ If you have existing hooks, you can merge this hook into your existing config.
123
123
 
124
124
  ## How It Works
125
125
 
126
- 1. **Finds instruction files** - Searches for `AGENTS.md`, `POLICIES.md`, `CLAUDE.md`, and `.cursor/rules/*.mdc` in your git repository
126
+ 1. **Finds instruction files** - Searches for `AGENTS.md`, `POLICIES.md`, `CLAUDE.md`, `BUGBOT.md`, and `.cursor/rules/*.mdc` in your git repository
127
127
  2. **Checks cache** - Loads cached policies and MD5 hashes from `.tanagram/`
128
128
  3. **Auto-syncs** - Detects file changes via MD5 and automatically resyncs if needed
129
129
  4. **LLM extraction** - Uses Claude AI to extract ALL policies from instruction files
package/bin/tanagram CHANGED
Binary file
package/commands/run.go CHANGED
@@ -47,7 +47,7 @@ func Run() error {
47
47
  }
48
48
 
49
49
  if len(instructionFiles) == 0 {
50
- return fmt.Errorf("no instruction files found (looking for AGENTS.md, POLICIES.md, CLAUDE.md, .cursor/rules/*.mdc)")
50
+ return fmt.Errorf("no instruction files found (looking for AGENTS.md, POLICIES.md, CLAUDE.md, BUGBOT.md, .cursor/rules/*.mdc)")
51
51
  }
52
52
 
53
53
  // Load cache
@@ -129,15 +129,13 @@ func Run() error {
129
129
  // Collect results
130
130
  totalPolicies := 0
131
131
  for result := range results {
132
- mu.Lock()
133
- completed++
134
- mu.Unlock()
135
-
136
132
  if result.err != nil {
137
133
  stop <- true
138
134
  close(stop)
139
135
  time.Sleep(50 * time.Millisecond)
140
- fmt.Printf("\r✗ Failed to process %s\n", result.relPath)
136
+ mu.Lock()
137
+ fmt.Printf("\r\033[K✗ Failed to process %s\n", result.relPath)
138
+ mu.Unlock()
141
139
  return fmt.Errorf("failed to extract policies from %s: %w", result.file, result.err)
142
140
  }
143
141
 
@@ -149,7 +147,12 @@ func Run() error {
149
147
  }
150
148
 
151
149
  totalPolicies += len(result.policies)
152
- fmt.Printf("\r✓ %s - %d policies\n", result.relPath, len(result.policies))
150
+
151
+ // Atomic update of counter and output (prevents race with spinner)
152
+ mu.Lock()
153
+ completed++
154
+ fmt.Printf("\r\033[K✓ %s - %d policies\n", result.relPath, len(result.policies))
155
+ mu.Unlock()
153
156
  }
154
157
 
155
158
  // Stop spinner
package/commands/sync.go CHANGED
@@ -28,7 +28,7 @@ func Sync() error {
28
28
  }
29
29
 
30
30
  if len(instructionFiles) == 0 {
31
- return fmt.Errorf("no instruction files found (looking for AGENTS.md, POLICIES.md, CLAUDE.md, .cursor/rules/*.mdc)")
31
+ return fmt.Errorf("no instruction files found (looking for AGENTS.md, POLICIES.md, CLAUDE.md, BUGBOT.md, .cursor/rules/*.mdc)")
32
32
  }
33
33
 
34
34
  fmt.Printf("Found %d instruction file(s)\n", len(instructionFiles))
@@ -117,15 +117,13 @@ func Sync() error {
117
117
  // Collect results
118
118
  totalPolicies := 0
119
119
  for result := range results {
120
- mu.Lock()
121
- completed++
122
- mu.Unlock()
123
-
124
120
  if result.err != nil {
125
121
  stop <- true
126
122
  close(stop)
127
123
  time.Sleep(50 * time.Millisecond)
128
- fmt.Printf("\r✗ Failed to process %s\n", result.relPath)
124
+ mu.Lock()
125
+ fmt.Printf("\r\033[K✗ Failed to process %s\n", result.relPath)
126
+ mu.Unlock()
129
127
  return fmt.Errorf("failed to extract policies from %s: %w", result.file, result.err)
130
128
  }
131
129
 
@@ -137,7 +135,12 @@ func Sync() error {
137
135
  }
138
136
 
139
137
  totalPolicies += len(result.policies)
140
- fmt.Printf("\r✓ %s - %d policies\n", result.relPath, len(result.policies))
138
+
139
+ // Atomic update of counter and output (prevents race with spinner)
140
+ mu.Lock()
141
+ completed++
142
+ fmt.Printf("\r\033[K✓ %s - %d policies\n", result.relPath, len(result.policies))
143
+ mu.Unlock()
141
144
  }
142
145
 
143
146
  // Stop spinner
@@ -155,12 +158,12 @@ func Sync() error {
155
158
  }
156
159
 
157
160
  // FindInstructionFiles searches for instruction files in the git repository
158
- // Looks for: AGENTS.md, POLICIES.md, CLAUDE.md, and .cursor/rules/*.mdc
161
+ // Looks for: AGENTS.md, POLICIES.md, CLAUDE.md, BUGBOT.md, and .cursor/rules/*.mdc
159
162
  func FindInstructionFiles(gitRoot string) ([]string, error) {
160
163
  var files []string
161
164
 
162
165
  // Common instruction file names to look for
163
- commonNames := []string{"AGENTS.md", "POLICIES.md", "CLAUDE.md"}
166
+ commonNames := []string{"AGENTS.md", "POLICIES.md", "CLAUDE.md", "BUGBOT.md"}
164
167
 
165
168
  // Directories to skip
166
169
  skipDirs := map[string]bool{
package/main.go CHANGED
@@ -57,7 +57,7 @@ EXAMPLES:
57
57
 
58
58
  INSTRUCTION FILES:
59
59
  Tanagram looks for instruction files in your git repository:
60
- - AGENTS.md, POLICIES.md, CLAUDE.md
60
+ - AGENTS.md, POLICIES.md, CLAUDE.md, BUGBOT.md
61
61
  - Cursor rules: .cursor/rules/*.mdc
62
62
 
63
63
  Policies are cached and automatically resynced when files change.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanagram/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Tanagram - Catch sloppy code before it ships",
5
5
  "main": "index.js",
6
6
  "bin": {