ace-b36ts 0.13.0

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.
@@ -0,0 +1,127 @@
1
+ ---
2
+ doc-type: workflow
3
+ title: B36ts Workflow
4
+ purpose: b36ts workflow instruction
5
+ ace-docs:
6
+ last-updated: 2026-02-14
7
+ last-checked: 2026-03-21
8
+ ---
9
+
10
+ # B36ts Workflow
11
+
12
+ ## Purpose
13
+
14
+ Work with Base36 compact timestamp IDs using the ace-b36ts gem - encode timestamps to 6-character IDs, decode IDs back to timestamps, and validate format.
15
+
16
+ ## Primary Tool: ace-b36ts
17
+
18
+ Use the **ace-b36ts** command for all timestamp operations.
19
+
20
+ ## Commands
21
+
22
+ ### Encode
23
+ Convert timestamps to compact IDs:
24
+ ```bash
25
+ # Encode current time
26
+ ace-b36ts encode now
27
+
28
+ # Encode specific time
29
+ ace-b36ts encode "2025-01-06 12:30:00"
30
+ ace-b36ts encode "2025-01-06T12:30:00Z"
31
+
32
+ # With custom year_zero
33
+ ace-b36ts encode "2025-01-06" --year-zero 2020
34
+ ```
35
+
36
+ ### Decode
37
+ Convert compact IDs back to timestamps:
38
+ ```bash
39
+ # Decode to readable format (default)
40
+ ace-b36ts decode i50jj3
41
+ # => 2025-01-06 12:30:00 UTC
42
+
43
+ # Decode to ISO format
44
+ ace-b36ts decode i50jj3 --format iso
45
+ # => 2025-01-06T12:30:00Z
46
+
47
+ # Decode to timestamp format
48
+ ace-b36ts decode i50jj3 --format timestamp
49
+ # => 20250106-123000
50
+ ```
51
+
52
+ ### Config
53
+ Show current configuration:
54
+ ```bash
55
+ ace-b36ts config
56
+ ace-b36ts config --verbose
57
+ ```
58
+
59
+ ## Format Specification
60
+
61
+ The 6-character Base36 ID encodes:
62
+
63
+ | Positions | Field | Range | Description |
64
+ |-----------|-------|-------|-------------|
65
+ | 1-2 | Month offset | 0-1295 | Months since year_zero (108 years) |
66
+ | 3 | Day | 0-30 | Day of month (maps to 1-31) |
67
+ | 4 | Block | 0-35 | 40-minute block of day (36 per day) |
68
+ | 5-6 | Precision | 0-1295 | Position within 40-min block (~1.85s) |
69
+
70
+ ## Command Options
71
+
72
+ ### encode
73
+ - `--year-zero YEAR`: Base year for encoding (default: 2000)
74
+ - `--verbose`: Show detailed encoding information
75
+
76
+ ### decode
77
+ - `--format FORMAT`: Output format (readable, iso, timestamp)
78
+ - `--verbose`: Show detailed decoding information
79
+
80
+ ### config
81
+ - `--verbose`: Show detailed configuration
82
+
83
+ ## Important Notes
84
+
85
+ - IDs are chronologically sortable (string sort = time sort)
86
+ - Default year_zero is 2000, covering 2000-2107
87
+ - Precision is approximately 1.85 seconds
88
+ - All times are handled in UTC
89
+
90
+ ## Examples
91
+
92
+ ### Current Time Encoding
93
+ ```bash
94
+ $ ace-b36ts encode now
95
+ i50jj3
96
+ ```
97
+
98
+ ### Specific Date Encoding
99
+ ```bash
100
+ $ ace-b36ts encode "2025-01-06 12:30:00"
101
+ i50jj3
102
+ ```
103
+
104
+ ### Decode to Different Formats
105
+ ```bash
106
+ $ ace-b36ts decode i50jj3
107
+ 2025-01-06 12:30:00 UTC
108
+
109
+ $ ace-b36ts decode i50jj3 --format iso
110
+ 2025-01-06T12:30:00Z
111
+
112
+ $ ace-b36ts decode i50jj3 --format timestamp
113
+ 20250106-123000
114
+ ```
115
+
116
+ ### Custom Year Zero
117
+ ```bash
118
+ $ ace-b36ts encode "2030-01-01" --year-zero 2020
119
+ k00000
120
+ ```
121
+
122
+ ## Response Format
123
+
124
+ When providing results:
125
+ 1. Show the input and output clearly
126
+ 2. Explain the encoding/decoding if asked
127
+ 3. Note any precision limitations