@workingdevshero/olympia-ait-adapter 0.1.5 → 1.1.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.
- package/README.md +139 -35
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/reader/cell-utils.d.ts +10 -0
- package/dist/reader/cell-utils.d.ts.map +1 -0
- package/dist/reader/cell-utils.js +40 -0
- package/dist/reader/cell-utils.js.map +1 -0
- package/dist/reader/parse-day-sheet.d.ts +0 -1
- package/dist/reader/parse-day-sheet.d.ts.map +1 -1
- package/dist/reader/parse-day-sheet.js +95 -75
- package/dist/reader/parse-day-sheet.js.map +1 -1
- package/dist/reader/parse-warmup-workbook.d.ts +13 -0
- package/dist/reader/parse-warmup-workbook.d.ts.map +1 -0
- package/dist/reader/parse-warmup-workbook.js +154 -0
- package/dist/reader/parse-warmup-workbook.js.map +1 -0
- package/dist/reader/parse-workbook.d.ts +2 -2
- package/dist/reader/parse-workbook.d.ts.map +1 -1
- package/dist/reader/parse-workbook.js +1 -6
- package/dist/reader/parse-workbook.js.map +1 -1
- package/dist/schema/program.d.ts +398 -67
- package/dist/schema/program.d.ts.map +1 -1
- package/dist/schema/program.js +135 -28
- package/dist/schema/program.js.map +1 -1
- package/dist/schema/warmup.d.ts +426 -0
- package/dist/schema/warmup.d.ts.map +1 -0
- package/dist/schema/warmup.js +100 -0
- package/dist/schema/warmup.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +51 -18
- package/dist/server.js.map +1 -1
- package/dist/tools/program-json-to-xlsx.d.ts +3 -0
- package/dist/tools/program-json-to-xlsx.d.ts.map +1 -0
- package/dist/tools/program-json-to-xlsx.js +5 -0
- package/dist/tools/program-json-to-xlsx.js.map +1 -0
- package/dist/tools/program-xlsx-to-json.d.ts +3 -0
- package/dist/tools/program-xlsx-to-json.d.ts.map +1 -0
- package/dist/tools/program-xlsx-to-json.js +5 -0
- package/dist/tools/program-xlsx-to-json.js.map +1 -0
- package/dist/tools/warmup-json-to-xlsx.d.ts +3 -0
- package/dist/tools/warmup-json-to-xlsx.d.ts.map +1 -0
- package/dist/tools/warmup-json-to-xlsx.js +5 -0
- package/dist/tools/warmup-json-to-xlsx.js.map +1 -0
- package/dist/tools/warmup-xlsx-to-json.d.ts +3 -0
- package/dist/tools/warmup-xlsx-to-json.d.ts.map +1 -0
- package/dist/tools/warmup-xlsx-to-json.js +5 -0
- package/dist/tools/warmup-xlsx-to-json.js.map +1 -0
- package/dist/writer/build-warmup-workbook.d.ts +3 -0
- package/dist/writer/build-warmup-workbook.d.ts.map +1 -0
- package/dist/writer/build-warmup-workbook.js +101 -0
- package/dist/writer/build-warmup-workbook.js.map +1 -0
- package/dist/writer/build-workbook.d.ts +2 -2
- package/dist/writer/build-workbook.d.ts.map +1 -1
- package/dist/writer/build-workbook.js +19 -23
- package/dist/writer/build-workbook.js.map +1 -1
- package/dist/writer/layout.d.ts +19 -7
- package/dist/writer/layout.d.ts.map +1 -1
- package/dist/writer/layout.js +40 -21
- package/dist/writer/layout.js.map +1 -1
- package/dist/writer/stamp-exercise.d.ts +13 -5
- package/dist/writer/stamp-exercise.d.ts.map +1 -1
- package/dist/writer/stamp-exercise.js +25 -18
- package/dist/writer/stamp-exercise.js.map +1 -1
- package/dist/writer/supplemental-template.d.ts +3 -2
- package/dist/writer/supplemental-template.d.ts.map +1 -1
- package/dist/writer/supplemental-template.js +15 -15
- package/dist/writer/supplemental-template.js.map +1 -1
- package/package.json +5 -4
- package/skills/olympia-authoring/SKILL.md +140 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stamp-exercise.js","sourceRoot":"","sources":["../../src/writer/stamp-exercise.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"stamp-exercise.js","sourceRoot":"","sources":["../../src/writer/stamp-exercise.ts"],"names":[],"mappings":"AAEA,OA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O,SAAS,CAAC;IAC7B,MAAM,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAChC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC9B,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type ExcelJS from "exceljs";
|
|
2
2
|
import type { SupplementalNote } from "../schema/program.js";
|
|
3
|
+
import { type WeekLayout } from "./layout.js";
|
|
3
4
|
/**
|
|
4
5
|
* Stamps the fixed "Sport Specific / Supplemental" template area at the
|
|
5
6
|
* bottom of a day sheet, then layers in any supplementalNotes the program
|
|
6
7
|
* JSON supplied. The template is 10 rows tall and uses single-row merges
|
|
7
|
-
* in each week-column pair (D-E, F-G,
|
|
8
|
+
* in each week-column pair (D-E, F-G, … one pair per week) so the LLM can
|
|
8
9
|
* put a value into any cell by its master address.
|
|
9
10
|
*
|
|
10
11
|
* Layout:
|
|
@@ -19,5 +20,5 @@ import type { SupplementalNote } from "../schema/program.js";
|
|
|
19
20
|
*
|
|
20
21
|
* @returns the next free row after the template (startRow + 10).
|
|
21
22
|
*/
|
|
22
|
-
export declare function stampSupplementalTemplate(ws: ExcelJS.Worksheet, startRow: number, supplementalNotes?: SupplementalNote[]): number;
|
|
23
|
+
export declare function stampSupplementalTemplate(ws: ExcelJS.Worksheet, startRow: number, layout: WeekLayout, supplementalNotes?: SupplementalNote[]): number;
|
|
23
24
|
//# sourceMappingURL=supplemental-template.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supplemental-template.d.ts","sourceRoot":"","sources":["../../src/writer/supplemental-template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"supplemental-template.d.ts","sourceRoot":"","sources":["../../src/writer/supplemental-template.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAYjE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CACvC,EAAE,EAAE,OAAO,CAAC,SAAS,EACrB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,UAAU,EAClB,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,GACrC,MAAM,CAkER"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EXERCISE_NAME_COL
|
|
1
|
+
import { EXERCISE_NAME_COL } from "./layout.js";
|
|
2
2
|
import { TPL_C_GRAY, TPL_C_GRAY_BOTTOM, TPL_NOTES_LEFT, TPL_NOTES_LEFT_BOTTOM, } from "./styles.js";
|
|
3
3
|
const TEMPLATE_ROWS = 10;
|
|
4
4
|
const LABEL_SPORT_SPECIFIC_ROW = 0;
|
|
@@ -7,7 +7,7 @@ const LABEL_SUPPLEMENTAL_ROW = 1;
|
|
|
7
7
|
* Stamps the fixed "Sport Specific / Supplemental" template area at the
|
|
8
8
|
* bottom of a day sheet, then layers in any supplementalNotes the program
|
|
9
9
|
* JSON supplied. The template is 10 rows tall and uses single-row merges
|
|
10
|
-
* in each week-column pair (D-E, F-G,
|
|
10
|
+
* in each week-column pair (D-E, F-G, … one pair per week) so the LLM can
|
|
11
11
|
* put a value into any cell by its master address.
|
|
12
12
|
*
|
|
13
13
|
* Layout:
|
|
@@ -22,7 +22,8 @@ const LABEL_SUPPLEMENTAL_ROW = 1;
|
|
|
22
22
|
*
|
|
23
23
|
* @returns the next free row after the template (startRow + 10).
|
|
24
24
|
*/
|
|
25
|
-
export function stampSupplementalTemplate(ws, startRow, supplementalNotes) {
|
|
25
|
+
export function stampSupplementalTemplate(ws, startRow, layout, supplementalNotes) {
|
|
26
|
+
const { weekCount, repsCols: WEEK_REPS_COLS, weightCols: WEEK_WEIGHT_COLS, notesCol: NOTES_COL } = layout;
|
|
26
27
|
const lastTemplateRow = startRow + TEMPLATE_ROWS - 1;
|
|
27
28
|
// --- Column C: gray bar with labels at the top two rows. ---
|
|
28
29
|
for (let i = 0; i < TEMPLATE_ROWS; i++) {
|
|
@@ -36,37 +37,37 @@ export function stampSupplementalTemplate(ws, startRow, supplementalNotes) {
|
|
|
36
37
|
c.value = null;
|
|
37
38
|
Object.assign(c, i === TEMPLATE_ROWS - 1 ? TPL_C_GRAY_BOTTOM : TPL_C_GRAY);
|
|
38
39
|
}
|
|
39
|
-
// --- Week-column content cells: each week pair (D-E, F-G,
|
|
40
|
+
// --- Week-column content cells: each week pair (D-E, F-G, …) is
|
|
40
41
|
// merged into a single master cell per row, matching the source files.
|
|
41
42
|
// Merging (plus wrapText on the style) lets a long phrase wrap inside
|
|
42
43
|
// the cell instead of clipping at the D/E boundary. Each cell is
|
|
43
44
|
// plain-white-filled. Borders are only on the "reps" columns
|
|
44
|
-
//
|
|
45
|
+
// and on the last weight column so the rendered area has:
|
|
45
46
|
// - a left edge on D
|
|
46
|
-
// -
|
|
47
|
-
// - a right edge on
|
|
47
|
+
// - a vertical divider between adjacent week pairs (E|F, G|H, …)
|
|
48
|
+
// - a right edge on the last weight column
|
|
48
49
|
// - top edge on row 0, bottom edge on row 9
|
|
49
50
|
// No horizontal lines between content rows.
|
|
50
51
|
for (let i = 0; i < TEMPLATE_ROWS; i++) {
|
|
51
52
|
const r = startRow + i;
|
|
52
53
|
const isTop = i === 0;
|
|
53
54
|
const isBottom = i === TEMPLATE_ROWS - 1;
|
|
54
|
-
for (let w = 0; w <
|
|
55
|
+
for (let w = 0; w < weekCount; w++) {
|
|
55
56
|
const left = WEEK_REPS_COLS[w];
|
|
56
57
|
const right = WEEK_WEIGHT_COLS[w];
|
|
57
|
-
const isLastPair = w ===
|
|
58
|
+
const isLastPair = w === weekCount - 1;
|
|
58
59
|
ws.mergeCells(`${left}${r}:${right}${r}`);
|
|
59
60
|
Object.assign(ws.getCell(`${left}${r}`), contentCellStyle({ side: "left", isTop, isBottom, isLastPair: false }));
|
|
60
61
|
Object.assign(ws.getCell(`${right}${r}`), contentCellStyle({ side: "right", isTop, isBottom, isLastPair }));
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
// --- Notes column
|
|
64
|
+
// --- Notes column: open above, closed at the bottom. ---
|
|
64
65
|
for (let i = 0; i < TEMPLATE_ROWS; i++) {
|
|
65
66
|
const r = startRow + i;
|
|
66
67
|
Object.assign(ws.getCell(`${NOTES_COL}${r}`), i === TEMPLATE_ROWS - 1 ? TPL_NOTES_LEFT_BOTTOM : TPL_NOTES_LEFT);
|
|
67
68
|
}
|
|
68
69
|
// --- Apply supplementalNotes on top of the template. Each note's col is a
|
|
69
|
-
// week-pair master (D, F, H,
|
|
70
|
+
// week-pair master (D, F, H, …), so writing to it fills the
|
|
70
71
|
// merged cell. ---
|
|
71
72
|
if (supplementalNotes) {
|
|
72
73
|
for (const note of supplementalNotes) {
|
|
@@ -95,10 +96,9 @@ function contentCellStyle(opts) {
|
|
|
95
96
|
// the outer left edge of the whole area.
|
|
96
97
|
if (opts.side === "left")
|
|
97
98
|
border.left = MEDIUM;
|
|
98
|
-
// The "right" cell of the LAST week pair
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
// cell (F, H, J, L, N).
|
|
99
|
+
// The "right" cell of the LAST week pair carries the right edge of the
|
|
100
|
+
// whole area. Other "right" cells carry no right border — the divider to
|
|
101
|
+
// the next pair is provided by THAT pair's left cell.
|
|
102
102
|
if (opts.side === "right" && opts.isLastPair)
|
|
103
103
|
border.right = MEDIUM;
|
|
104
104
|
if (opts.isTop)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supplemental-template.js","sourceRoot":"","sources":["../../src/writer/supplemental-template.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"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MAAM,CAAC,IAAI,GAAG,MAAM,CAAC;IAC/C,uEAAuE;IACvE,yEAAyE;IACzE,sDAAsD;IACtD,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO,IAAI,IAAI,CAAC,UAAU;QAAE,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC;IACpE,IAAI,IAAI,CAAC,KAAK;QAAE,MAAM,CAAC,GAAG,GAAG,MAAM,CAAC;IACpC,IAAI,IAAI,CAAC,QAAQ;QAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IAC1C,OAAO;QACL,MAAM,EAAE,MAAyB;QACjC,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;QAC5C,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACvE,IAAI,EAAE,UAAU;KACjB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workingdevshero/olympia-ait-adapter",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "MCP adapter that converts between Olympia Fitness & Performance
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "MCP adapter that converts between Olympia Fitness & Performance XLSX workbooks (programs and companion warm-ups) and strict JSON schemas.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"olympia-ait-adapter": "./dist/bin.js"
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
|
-
"src/assets"
|
|
13
|
+
"src/assets",
|
|
14
|
+
"skills"
|
|
14
15
|
],
|
|
15
16
|
"scripts": {
|
|
16
17
|
"build": "tsc -p tsconfig.json && chmod +x dist/bin.js",
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
"dev": "tsx src/bin.ts",
|
|
19
20
|
"test": "vitest run",
|
|
20
21
|
"test:watch": "vitest",
|
|
21
|
-
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
22
|
+
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.scripts.json",
|
|
22
23
|
"prepublishOnly": "npm run build && npm test"
|
|
23
24
|
},
|
|
24
25
|
"publishConfig": {
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: olympia-authoring
|
|
3
|
+
description: Technical reference for decoding and authoring Olympia Fitness program and warm-up documents via the olympia-ait-adapter MCP tools — JSON schemas, prescription notation, layout conventions, and the decode → author → encode workflow.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Olympia document authoring
|
|
7
|
+
|
|
8
|
+
Technical specifics for working with Olympia Fitness & Performance client
|
|
9
|
+
paperwork through the `olympia-ait-adapter` MCP tools. Two document types
|
|
10
|
+
exist, with different formats and separate tool pairs.
|
|
11
|
+
|
|
12
|
+
## The document pair
|
|
13
|
+
|
|
14
|
+
A client's paperwork for one training cycle is **two workbooks**:
|
|
15
|
+
|
|
16
|
+
- `<Client> Programs <M.YY>.xlsx` — the training program
|
|
17
|
+
- `<Client> Warm Up <M.YY>.xlsx` — its companion warm-up document
|
|
18
|
+
|
|
19
|
+
Same client, same date identifier (`4.26` = April 2026). The pairing is
|
|
20
|
+
day-for-day: the warm-up's "Day 4" column is performed before the program's
|
|
21
|
+
"Day 4" sheet. Each program day sheet carries a "Warm Up #N" label that
|
|
22
|
+
refers to the matching day in the companion warm-up workbook. When
|
|
23
|
+
authoring, day names in the warm-up document must match the program's day
|
|
24
|
+
sheet names.
|
|
25
|
+
|
|
26
|
+
## Tools
|
|
27
|
+
|
|
28
|
+
| Tool | Input | Output |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| `olympia_program_xlsx_to_json` | `{ xlsxPath }` | `{ program, warnings }` |
|
|
31
|
+
| `olympia_program_json_to_xlsx` | `{ program, outputPath }` | `{ outputPath, bytesWritten }` |
|
|
32
|
+
| `olympia_warmup_xlsx_to_json` | `{ xlsxPath }` | `{ warmUp, warnings }` |
|
|
33
|
+
| `olympia_warmup_json_to_xlsx` | `{ warmUp, outputPath }` | `{ outputPath, bytesWritten }` |
|
|
34
|
+
|
|
35
|
+
Paths are absolute; the output parent directory must exist. `warnings`
|
|
36
|
+
lists structural surprises found while parsing — treat any warning as a
|
|
37
|
+
signal the source file deviated from the expected layout.
|
|
38
|
+
|
|
39
|
+
All schemas are strict: unknown fields are rejected with an error, never
|
|
40
|
+
silently dropped (e.g. the removed `weekDates` field fails loudly).
|
|
41
|
+
|
|
42
|
+
## Program format
|
|
43
|
+
|
|
44
|
+
JSON shape (zod-validated; every tool call re-validates):
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Program { client, programDate, days[] }
|
|
48
|
+
Day { name, sections[], supplementalNotes?[] }
|
|
49
|
+
Section { kind: "warmup"|"main"|"sportSpecific"|"supplemental"|"conditioning", exercises[] }
|
|
50
|
+
Exercise { name, groupLabel?, notes?, sets[][], weights?[][] } // [setIdx][weekIdx], one entry per week
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- One sheet per day; sheet name = day name (`"Day 1"`).
|
|
54
|
+
- Week grid: a program runs a fixed number of weeks, 4 or 6 at Olympia
|
|
55
|
+
(1-6 accepted). Every set row has one cell per week, in week order, and
|
|
56
|
+
every set row in the program must be the same length. Decoding a client's
|
|
57
|
+
past program tells you their week count — author the new program with the
|
|
58
|
+
same count; the sheet is laid out with exactly that many week columns.
|
|
59
|
+
Set positions are coherent across weeks (`sets[0]` is set 1's
|
|
60
|
+
progression).
|
|
61
|
+
- `groupLabel` matches `/^\d+[A-Z]$/`. Same number = one superset/circuit
|
|
62
|
+
group (1A/1B run back-to-back).
|
|
63
|
+
- Cell notation: `"12"` (reps), `"10E"` (each side), `":20"` (20-sec hold),
|
|
64
|
+
`":20E"`, `":60"`, `"5 breaths"`, or freeform circuit strings like
|
|
65
|
+
`"x3 Rest :60"`. `null` = empty cell.
|
|
66
|
+
- `weights` is the Weight column beside each reps cell, same shape as
|
|
67
|
+
`sets` (`weights[setIdx][weekIdx]`). Cells are free text and most are
|
|
68
|
+
empty, because the client writes in what they lifted. Coaches type a
|
|
69
|
+
starting load (`"25"`) or an equipment setting — band colour (`"Yel"`),
|
|
70
|
+
box height (`'12" + 2 Pads'`), rack position (`"#10"`) — usually in
|
|
71
|
+
week 1 only. A bodyweight exercise may have empty reps and a setting in
|
|
72
|
+
every Weight cell. Omit `weights` when every cell is empty.
|
|
73
|
+
- The row-2 `Date:` cells are **intentionally blank** — clients hand-write
|
|
74
|
+
week dates. Never author values for them.
|
|
75
|
+
- `Section.kind: "warmup"` holds warm-up exercises listed *inside* a
|
|
76
|
+
program day sheet, above the main exercises. On the sheet each one is
|
|
77
|
+
closed by a "Warmup N" label row where a main exercise has its group
|
|
78
|
+
label, so give them no `groupLabel`. One set is fine. It is
|
|
79
|
+
unrelated to the companion warm-up workbook.
|
|
80
|
+
- `supplementalNotes` is the freeform trainer-managed area at the bottom of
|
|
81
|
+
a day sheet: sparse `{ row, col, value }` entries where `row` is the
|
|
82
|
+
offset from the area's first row and `col` is a week-column master:
|
|
83
|
+
`D/F/H/J` for a 4-week program, plus `L/N` for a 6-week one. Any other
|
|
84
|
+
column is rejected. One full
|
|
85
|
+
phrase per row; to span the row visually,
|
|
86
|
+
repeat the same `value` in each week column.
|
|
87
|
+
|
|
88
|
+
## Warm-up format
|
|
89
|
+
|
|
90
|
+
JSON shape:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
WarmUpDocument { client, warmUpDate, days[] }
|
|
94
|
+
WarmUpDay { name, sections[] }
|
|
95
|
+
WarmUpSection { title, items[] }
|
|
96
|
+
WarmUpItem { text, note? }
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
- Single sheet; **days are columns** (A, C, E, … with empty gutter columns
|
|
100
|
+
between), not sheets. Day label at the top of each column.
|
|
101
|
+
- Sections are row-aligned across days: each section header sits on the
|
|
102
|
+
same row in every day column, padded with blank rows where days are
|
|
103
|
+
ragged.
|
|
104
|
+
- `title` is the bold header line and may embed a rounds count, e.g.
|
|
105
|
+
`"Prep \ Activation X2 Rounds"`.
|
|
106
|
+
- `text` is one freeform exercise line with the prescription embedded:
|
|
107
|
+
observed shorthand includes `:45E`, `:45EL`, `:30E`, `X8br`, `X8 Br E`,
|
|
108
|
+
`X10EL`, `X4ES`. These are trainer conventions — treat them as opaque,
|
|
109
|
+
copy the style of the client's past documents, never invent new notation
|
|
110
|
+
semantics.
|
|
111
|
+
- `note` is an annotation line rendered under its item (italic in encoded
|
|
112
|
+
output), stored verbatim including decoration, e.g.
|
|
113
|
+
`"(^R.F.E on SB, F-Roller for Balance^)"`. Multiple note lines join with
|
|
114
|
+
`"\n"`; every line must be non-empty (blank lines don't survive a
|
|
115
|
+
round-trip). Omit the field when there is no note — `note: ""` is
|
|
116
|
+
rejected.
|
|
117
|
+
- Never author an item whose **entire** text is wrapped in parentheses —
|
|
118
|
+
fully-parenthesized lines decode as notes attached to the previous item.
|
|
119
|
+
|
|
120
|
+
## Workflow
|
|
121
|
+
|
|
122
|
+
1. Decode the client's most recent program **and** companion warm-up
|
|
123
|
+
(`*_xlsx_to_json`) to learn their conventions: section titles, notation
|
|
124
|
+
style, day count, volume.
|
|
125
|
+
2. Author new JSON conforming to the schema. Keep warm-up day names
|
|
126
|
+
matched to the program's day sheets and both documents' date
|
|
127
|
+
identifiers equal.
|
|
128
|
+
3. Encode with `*_json_to_xlsx` to `<Client> Programs <M.YY>.xlsx` /
|
|
129
|
+
`<Client> Warm Up <M.YY>.xlsx`.
|
|
130
|
+
|
|
131
|
+
## Gotchas
|
|
132
|
+
|
|
133
|
+
- A `WarmUpSection` with `title: ""` is a decode artifact (items appeared
|
|
134
|
+
before any bold header in the source) — don't author empty titles.
|
|
135
|
+
- Round-trip fidelity is at the **JSON level**: decode → encode → decode
|
|
136
|
+
yields identical JSON, but the encoded file is a canonical layout, not a
|
|
137
|
+
byte-for-byte copy of a hand-made source.
|
|
138
|
+
- Client/date metadata: the encoders stamp them into workbook properties;
|
|
139
|
+
the decoders fall back to parsing the filename, so keep the filename
|
|
140
|
+
conventions exact.
|