@mytechtoday/augment-extensions 2.4.0 → 2.5.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.
Files changed (20) hide show
  1. package/augment-extensions/writing-standards/screenplay/commercials/CHARACTER-COUNT-TRACKING.md +226 -0
  2. package/augment-extensions/writing-standards/screenplay/commercials/CONFIGURATION.md +327 -0
  3. package/augment-extensions/writing-standards/screenplay/commercials/README.md +223 -0
  4. package/augment-extensions/writing-standards/screenplay/commercials/REFACTORING-SUMMARY.md +193 -0
  5. package/augment-extensions/writing-standards/screenplay/commercials/REFERENCES.md +157 -0
  6. package/augment-extensions/writing-standards/screenplay/commercials/VALIDATION-REPORT.md +109 -0
  7. package/augment-extensions/writing-standards/screenplay/commercials/examples/.gitkeep +0 -0
  8. package/augment-extensions/writing-standards/screenplay/commercials/module.json +111 -0
  9. package/augment-extensions/writing-standards/screenplay/commercials/rules/.gitkeep +0 -0
  10. package/augment-extensions/writing-standards/screenplay/commercials/rules/commercial-audience.md +343 -0
  11. package/augment-extensions/writing-standards/screenplay/commercials/rules/commercial-formats.md +396 -0
  12. package/augment-extensions/writing-standards/screenplay/commercials/rules/commercial-persuasion.md +387 -0
  13. package/augment-extensions/writing-standards/screenplay/commercials/rules/commercial-scripts.md +531 -0
  14. package/augment-extensions/writing-standards/screenplay/commercials/rules/commercial-techniques.md +912 -0
  15. package/augment-extensions/writing-standards/screenplay/commercials/rules/commercial-types.md +700 -0
  16. package/augment-extensions/writing-standards/screenplay/commercials/rules/commercials.md +285 -0
  17. package/augment-extensions/writing-standards/screenplay/commercials/scripts/validate-character-count.ts +284 -0
  18. package/cli/dist/cli.js +0 -2
  19. package/cli/dist/cli.js.map +1 -1
  20. package/package.json +4 -1
@@ -0,0 +1,226 @@
1
+ # Commercial Writing Standards - Character Count Tracking
2
+
3
+ > **Version:** 2.0.0
4
+ > **Last Updated:** 2026-03-03
5
+ > **Target Range Per File:** 3,000 - 45,000 characters
6
+
7
+ ## Table of Contents
8
+
9
+ - [Overview](#overview)
10
+ - [Target Allocation](#target-allocation)
11
+ - [Validation Script](#validation-script)
12
+ - [Current Status](#current-status)
13
+ - [File-by-File Breakdown](#file-by-file-breakdown)
14
+
15
+ ---
16
+
17
+ ## Overview
18
+
19
+ This document tracks character counts for the Commercial Writing Standards module to ensure **each individual content file** stays within the target range of **3,000 - 45,000 characters**.
20
+
21
+ ### Why Per-File Character Count Matters
22
+
23
+ - **AI Context Window**: Each file can be loaded independently within AI context limits
24
+ - **Modularity**: Files are self-contained, comprehensive guides
25
+ - **Flexibility**: Users can load only the files they need
26
+ - **Quality**: Ensures each file has sufficient depth and examples
27
+ - **Consistency**: Maintains uniform quality across all rule files
28
+
29
+ ### File Categories
30
+
31
+ **Content Files** (17 files): Each must be 3,000 - 45,000 characters
32
+ - Rule files (15 files)
33
+ - Example files (2 files)
34
+
35
+ **Infrastructure Files** (5 files): No character count requirement
36
+ - module.json, README.md, CONFIGURATION.md, REFERENCES.md, CHARACTER-COUNT-TRACKING.md
37
+
38
+ ---
39
+
40
+ ## Target Allocation
41
+
42
+ ### Per-File Target: 3,000 - 45,000 characters
43
+
44
+ | Category | Files | Target Per File | Total Range |
45
+ |----------|-------|-----------------|-------------|
46
+ | **Foundational Rules** | 3 | 3,000 - 45,000 | 9,000 - 135,000 |
47
+ | **Technique Rules** | 5 | 3,000 - 45,000 | 15,000 - 225,000 |
48
+ | **Legal/Ethical Rules** | 2 | 3,000 - 45,000 | 6,000 - 90,000 |
49
+ | **Supporting Rules** | 5 | 3,000 - 45,000 | 15,000 - 225,000 |
50
+ | **Example Files** | 2 | 3,000 - 45,000 | 6,000 - 90,000 |
51
+ | **Infrastructure** | 5 | No requirement | Variable |
52
+ | **Total Content** | **17** | **3,000 - 45,000** | **51,000 - 765,000** |
53
+
54
+ ### Per-File Targets
55
+
56
+ #### Foundational Rules (3 files)
57
+ - `commercials.md`: 3,000 - 45,000 chars (core principles)
58
+ - `commercial-formats.md`: 3,000 - 45,000 chars (duration-specific rules)
59
+ - `commercial-types.md`: 3,000 - 45,000 chars (type-specific best practices)
60
+
61
+ #### Technique Rules (5 files)
62
+ - `commercial-techniques.md`: 3,000 - 45,000 chars (techniques guide)
63
+ - `commercial-persuasion.md`: 3,000 - 45,000 chars (persuasion frameworks)
64
+ - `commercial-audience.md`: 3,000 - 45,000 chars (audience targeting)
65
+ - `commercial-scripts.md`: 3,000 - 45,000 chars (script structure)
66
+ - `commercial-tips.md`: 3,000 - 45,000 chars (best practices)
67
+
68
+ #### Legal/Ethical Rules (2 files)
69
+ - `commercial-laws.md`: 3,000 - 45,000 chars (legal compliance)
70
+ - `commercial-ethics.md`: 3,000 - 45,000 chars (ethical guidelines)
71
+
72
+ #### Supporting Rules (5 files)
73
+ - `commercial-counter-principles-examples.md`: 3,000 - 45,000 chars (rule-breaking)
74
+ - `commercial-templates.md`: 3,000 - 45,000 chars (ready-to-use templates)
75
+ - `commercial-mistakes.md`: 3,000 - 45,000 chars (common pitfalls)
76
+ - `commercial-history.md`: 3,000 - 45,000 chars (advertising evolution)
77
+ - `commercial-glossary.md`: 3,000 - 45,000 chars (industry terminology)
78
+
79
+ #### Example Files (2 files)
80
+ - `effective-commercials.md`: 3,000 - 45,000 chars (effective examples)
81
+ - `ineffective-commercials.md`: 3,000 - 45,000 chars (ineffective examples)
82
+
83
+ #### Infrastructure Files (no character requirement)
84
+ - `module.json`: ~1,200 chars
85
+ - `README.md`: ~2,000 chars
86
+ - `CONFIGURATION.md`: ~300 chars
87
+ - `REFERENCES.md`: ~500 chars
88
+ - `CHARACTER-COUNT-TRACKING.md`: ~500 chars
89
+
90
+ ---
91
+
92
+ ## Validation Script
93
+
94
+ ### TypeScript Script
95
+
96
+ See `scripts/validate-character-count.ts` for the validation script.
97
+
98
+ **Validation Logic:**
99
+ - Checks each content file individually (not total)
100
+ - Content files must be 3,000 - 45,000 characters
101
+ - Infrastructure files are excluded from validation
102
+ - Reports pass/fail status for each file
103
+ - Exit code 0 if all files pass, 1 if any fail
104
+
105
+ ### Usage
106
+
107
+ ```bash
108
+ # Run validation (from repository root)
109
+ npm run validate:commercials
110
+
111
+ # Verbose output with file breakdown
112
+ npm run validate:commercials:verbose
113
+
114
+ # JSON output for CI/CD
115
+ npm run validate:commercials:json
116
+
117
+ # Direct execution with tsx
118
+ npx tsx augment-extensions/writing-standards/screenplay/commercials/scripts/validate-character-count.ts --verbose
119
+
120
+ # In CI/CD pipeline
121
+ npm run validate:commercials
122
+ # Exit code will be 0 for pass, 1 for fail
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Current Status
128
+
129
+ **Last Measured:** 2026-03-03
130
+ **Validation:** Run `npm run validate:commercials`
131
+ **Status:** 🟡 In Progress
132
+
133
+ ### Progress Checklist
134
+
135
+ - [x] Infrastructure files created (module.json, README.md, CONFIGURATION.md, REFERENCES.md)
136
+ - [x] Character count tracking established (per-file validation)
137
+ - [ ] Foundational rules written (0/3)
138
+ - [ ] Technique rules written (0/5)
139
+ - [ ] Legal/ethical rules written (0/2)
140
+ - [ ] Supporting rules written (0/5)
141
+ - [ ] Examples created (0/2)
142
+ - [ ] All files within 3,000 - 45,000 character range
143
+ - [ ] Final validation passed
144
+
145
+ ---
146
+
147
+ ## File-by-File Breakdown
148
+
149
+ ### Foundational Rules (3 files)
150
+ | File | Target Range | Actual | Status |
151
+ |------|--------------|--------|--------|
152
+ | commercials.md | 3,000 - 45,000 | - | ⚪ |
153
+ | commercial-formats.md | 3,000 - 45,000 | - | ⚪ |
154
+ | commercial-types.md | 3,000 - 45,000 | - | ⚪ |
155
+
156
+ ### Technique Rules (5 files)
157
+ | File | Target Range | Actual | Status |
158
+ |------|--------------|--------|--------|
159
+ | commercial-techniques.md | 3,000 - 45,000 | - | ⚪ |
160
+ | commercial-persuasion.md | 3,000 - 45,000 | - | ⚪ |
161
+ | commercial-audience.md | 3,000 - 45,000 | - | ⚪ |
162
+ | commercial-scripts.md | 3,000 - 45,000 | - | ⚪ |
163
+ | commercial-tips.md | 3,000 - 45,000 | - | ⚪ |
164
+
165
+ ### Legal/Ethical Rules (2 files)
166
+ | File | Target Range | Actual | Status |
167
+ |------|--------------|--------|--------|
168
+ | commercial-laws.md | 3,000 - 45,000 | - | ⚪ |
169
+ | commercial-ethics.md | 3,000 - 45,000 | - | ⚪ |
170
+
171
+ ### Supporting Rules (5 files)
172
+ | File | Target Range | Actual | Status |
173
+ |------|--------------|--------|--------|
174
+ | commercial-counter-principles-examples.md | 3,000 - 45,000 | - | ⚪ |
175
+ | commercial-templates.md | 3,000 - 45,000 | - | ⚪ |
176
+ | commercial-mistakes.md | 3,000 - 45,000 | - | ⚪ |
177
+ | commercial-history.md | 3,000 - 45,000 | - | ⚪ |
178
+ | commercial-glossary.md | 3,000 - 45,000 | - | ⚪ |
179
+
180
+ ### Example Files (2 files)
181
+ | File | Target Range | Actual | Status |
182
+ |------|--------------|--------|--------|
183
+ | effective-commercials.md | 3,000 - 45,000 | - | ⚪ |
184
+ | ineffective-commercials.md | 3,000 - 45,000 | - | ⚪ |
185
+
186
+ ### Infrastructure Files (no requirement)
187
+ | File | Actual | Status |
188
+ |------|--------|--------|
189
+ | module.json | ~1,200 | ✅ |
190
+ | README.md | ~2,000 | ✅ |
191
+ | CONFIGURATION.md | ~300 | ✅ |
192
+ | REFERENCES.md | ~500 | ✅ |
193
+ | CHARACTER-COUNT-TRACKING.md | ~500 | ✅ |
194
+
195
+ **Legend:**
196
+ - ✅ Complete and within target (or N/A for infrastructure)
197
+ - 🟡 In progress
198
+ - ⚪ Not started
199
+ - ⚠️ Needs adjustment (outside 3,000 - 45,000 range)
200
+
201
+ ---
202
+
203
+ ## Maintenance
204
+
205
+ ### When to Update
206
+
207
+ - After creating/editing any file
208
+ - Before committing changes
209
+ - During code review
210
+ - Before module release
211
+
212
+ ### How to Update
213
+
214
+ 1. Run validation script
215
+ 2. Update "Current Status" section
216
+ 3. Update "File-by-File Breakdown" table
217
+ 4. Commit changes with character count in commit message
218
+
219
+ ---
220
+
221
+ ## References
222
+
223
+ - [Character Count Management](.augment/rules/character-count-management.md)
224
+ - [Module Validation](../../../docs/VALIDATION.md)
225
+ - [Go Module Character Count](../../../coding-standards/go/CHARACTER-COUNT-REPORT.md)
226
+
@@ -0,0 +1,327 @@
1
+ # Commercial Writing Standards - Configuration System
2
+
3
+ > **Version:** 1.0.0
4
+ > **Last Updated:** 2026-03-03
5
+
6
+ ## Table of Contents
7
+
8
+ - [Overview](#overview)
9
+ - [Configuration Schema](#configuration-schema)
10
+ - [Override Semantics](#override-semantics)
11
+ - [Conflict Detection](#conflict-detection)
12
+ - [Integration with .augment/config.json](#integration-with-augmentconfigjson)
13
+ - [Examples](#examples)
14
+
15
+ ---
16
+
17
+ ## Overview
18
+
19
+ The Commercial Writing Standards module uses a **modular configuration system** that allows fine-grained control over which rules apply to your project. Configuration can be set at multiple levels with clear precedence rules.
20
+
21
+ ### Configuration Levels
22
+
23
+ 1. **Module Defaults** (lowest precedence) - Defined in `module.json`
24
+ 2. **Global Config** - `.augment/config.json` (project-wide settings)
25
+ 3. **Commercial Config** - `.augment/commercials-config.json` (commercial-specific)
26
+ 4. **File-Level Overrides** (highest precedence) - Frontmatter in `.fountain` files
27
+
28
+ ---
29
+
30
+ ## Configuration Schema
31
+
32
+ ### File: `.augment/commercials-config.json`
33
+
34
+ ```json
35
+ {
36
+ "$schema": "https://augment-extensions.dev/schemas/commercials-config.json",
37
+ "version": "1.0.0",
38
+ "enabled": true,
39
+ "formats": {
40
+ "tv": {
41
+ "enabled": true,
42
+ "durations": ["15sec", "30sec", "60sec"]
43
+ },
44
+ "streaming": {
45
+ "enabled": true,
46
+ "types": ["pre-roll", "mid-roll"]
47
+ },
48
+ "digital": {
49
+ "enabled": false,
50
+ "types": ["banner", "social-media"]
51
+ },
52
+ "radio": {
53
+ "enabled": false
54
+ }
55
+ },
56
+ "legalCompliance": {
57
+ "enabled": true,
58
+ "ftcGuidelines": true,
59
+ "disclosureRequirements": true,
60
+ "healthClaims": false,
61
+ "financialServices": false
62
+ },
63
+ "brandGuidelines": {
64
+ "toneOfVoice": "professional",
65
+ "prohibitedWords": [],
66
+ "requiredDisclosures": [],
67
+ "logoUsage": "standard"
68
+ },
69
+ "persuasionTechniques": {
70
+ "enabled": true,
71
+ "allowedTechniques": [
72
+ "emotional-appeal",
73
+ "social-proof",
74
+ "scarcity",
75
+ "authority"
76
+ ],
77
+ "prohibitedTechniques": []
78
+ },
79
+ "productionNotes": {
80
+ "enabled": true,
81
+ "aiVideoGeneration": true,
82
+ "shotListGeneration": true
83
+ },
84
+ "validation": {
85
+ "strictMode": false,
86
+ "warningsAsErrors": false,
87
+ "characterCountLimits": true
88
+ }
89
+ }
90
+ ```
91
+
92
+ ### Schema Properties
93
+
94
+ | Property | Type | Default | Description |
95
+ |----------|------|---------|-------------|
96
+ | `enabled` | boolean | `true` | Enable/disable entire module |
97
+ | `formats` | object | See above | Format-specific settings |
98
+ | `legalCompliance` | object | See above | Legal compliance settings |
99
+ | `brandGuidelines` | object | `{}` | Brand-specific rules |
100
+ | `persuasionTechniques` | object | See above | Persuasion technique controls |
101
+ | `productionNotes` | object | See above | Production integration settings |
102
+ | `validation` | object | See above | Validation behavior |
103
+
104
+ ---
105
+
106
+ ## Override Semantics
107
+
108
+ ### Precedence Order (Highest to Lowest)
109
+
110
+ 1. **File-Level Frontmatter** (`.fountain` file)
111
+ 2. **Commercial Config** (`.augment/commercials-config.json`)
112
+ 3. **Global Config** (`.augment/config.json`)
113
+ 4. **Module Defaults** (`module.json`)
114
+
115
+ ### Override Rules
116
+
117
+ - **Additive**: Arrays are merged (union)
118
+ - **Replacement**: Objects replace entirely unless `merge: true` is specified
119
+ - **Boolean**: Higher precedence always wins
120
+
121
+ ### Example: File-Level Override
122
+
123
+ ```fountain
124
+ ---
125
+ config:
126
+ formats: ["tv-30sec"]
127
+ legalCompliance:
128
+ ftcGuidelines: true
129
+ validation:
130
+ strictMode: true
131
+ ---
132
+
133
+ INT. KITCHEN - DAY
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Conflict Detection
139
+
140
+ The configuration system automatically detects and reports conflicts:
141
+
142
+ ### Conflict Types
143
+
144
+ 1. **Format Conflicts**: Multiple incompatible formats enabled
145
+ 2. **Legal Conflicts**: Contradictory legal requirements
146
+ 3. **Brand Conflicts**: Conflicting brand guidelines
147
+ 4. **Technique Conflicts**: Prohibited technique in allowed list
148
+
149
+ ### Conflict Resolution
150
+
151
+ **Strategy**: Fail-fast with clear error messages
152
+
153
+ ```json
154
+ {
155
+ "error": "Configuration Conflict",
156
+ "type": "format-conflict",
157
+ "message": "Cannot enable both 'tv-15sec' and 'tv-60sec' for same file",
158
+ "resolution": "Choose one format per file",
159
+ "location": ".augment/commercials-config.json:5"
160
+ }
161
+ ```
162
+
163
+ ### Validation Command
164
+
165
+ ```bash
166
+ augx validate commercials-config
167
+ ```
168
+
169
+ **Output**:
170
+ ```
171
+ ✓ Configuration valid
172
+ ✓ No conflicts detected
173
+ ✓ All required fields present
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Integration with .augment/config.json
179
+
180
+ ### Global Configuration
181
+
182
+ ```json
183
+ {
184
+ "modules": {
185
+ "screenplay": {
186
+ "enabled": true,
187
+ "categories": ["commercials"]
188
+ }
189
+ },
190
+ "commercials": {
191
+ "$ref": ".augment/commercials-config.json"
192
+ }
193
+ }
194
+ ```
195
+
196
+ ### Inheritance
197
+
198
+ Commercial config inherits from screenplay config:
199
+
200
+ ```json
201
+ {
202
+ "screenplay": {
203
+ "fountainFormat": true,
204
+ "exportFormats": ["pdf", "fdx"]
205
+ },
206
+ "commercials": {
207
+ "formats": ["tv-30sec"]
208
+ // Inherits fountainFormat and exportFormats from screenplay
209
+ }
210
+ }
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Examples
216
+
217
+ ### Example 1: TV Commercial Only
218
+
219
+ ```json
220
+ {
221
+ "enabled": true,
222
+ "formats": {
223
+ "tv": {
224
+ "enabled": true,
225
+ "durations": ["30sec"]
226
+ },
227
+ "streaming": { "enabled": false },
228
+ "digital": { "enabled": false },
229
+ "radio": { "enabled": false }
230
+ }
231
+ }
232
+ ```
233
+
234
+ ### Example 2: Streaming with Legal Compliance
235
+
236
+ ```json
237
+ {
238
+ "enabled": true,
239
+ "formats": {
240
+ "streaming": {
241
+ "enabled": true,
242
+ "types": ["pre-roll"]
243
+ }
244
+ },
245
+ "legalCompliance": {
246
+ "enabled": true,
247
+ "ftcGuidelines": true,
248
+ "disclosureRequirements": true
249
+ }
250
+ }
251
+ ```
252
+
253
+ ### Example 3: Brand-Specific Configuration
254
+
255
+ ```json
256
+ {
257
+ "enabled": true,
258
+ "brandGuidelines": {
259
+ "toneOfVoice": "friendly",
260
+ "prohibitedWords": ["cheap", "free", "guarantee"],
261
+ "requiredDisclosures": [
262
+ "Results may vary",
263
+ "See website for details"
264
+ ]
265
+ }
266
+ }
267
+ ```
268
+
269
+ ---
270
+
271
+ ## Configuration Validation
272
+
273
+ ### Validation Rules
274
+
275
+ 1. ✅ **Schema Compliance**: Must match JSON schema
276
+ 2. ✅ **No Conflicts**: No contradictory settings
277
+ 3. ✅ **Required Fields**: All required fields present
278
+ 4. ✅ **Valid Values**: Enum values must be valid
279
+ 5. ✅ **Dependencies**: Dependent settings must be enabled
280
+
281
+ ### Validation Errors
282
+
283
+ ```json
284
+ {
285
+ "errors": [
286
+ {
287
+ "field": "formats.tv.durations",
288
+ "message": "Invalid duration '45sec'. Valid: 15sec, 30sec, 60sec",
289
+ "severity": "error"
290
+ }
291
+ ]
292
+ }
293
+ ```
294
+
295
+ ---
296
+
297
+ ## Best Practices
298
+
299
+ 1. **Start Simple**: Enable only formats you need
300
+ 2. **Use Inheritance**: Leverage screenplay config for common settings
301
+ 3. **Validate Early**: Run `augx validate` before committing
302
+ 4. **Document Overrides**: Comment why you override defaults
303
+ 5. **Version Control**: Track config changes in git
304
+
305
+ ---
306
+
307
+ ## Troubleshooting
308
+
309
+ ### Common Issues
310
+
311
+ **Issue**: Configuration not applied
312
+ **Solution**: Check precedence order, ensure file is in correct location
313
+
314
+ **Issue**: Validation fails
315
+ **Solution**: Run `augx validate commercials-config --verbose` for details
316
+
317
+ **Issue**: Conflicts detected
318
+ **Solution**: Review conflict report, adjust settings to resolve
319
+
320
+ ---
321
+
322
+ ## References
323
+
324
+ - [JSON Schema Specification](https://json-schema.org/)
325
+ - [Screenplay Configuration](../schemas/screenplay-config.json)
326
+ - [Module Configuration](module.json)
327
+