cja-auto-sdr 3.11.5__tar.gz

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 (130) hide show
  1. cja_auto_sdr-3.11.5/.gitignore +66 -0
  2. cja_auto_sdr-3.11.5/LICENSE +21 -0
  3. cja_auto_sdr-3.11.5/PKG-INFO +574 -0
  4. cja_auto_sdr-3.11.5/README.md +536 -0
  5. cja_auto_sdr-3.11.5/docs/agent-playbooks/README.md +32 -0
  6. cja_auto_sdr-3.11.5/pyproject.toml +186 -0
  7. cja_auto_sdr-3.11.5/sample_outputs/agent/README.md +21 -0
  8. cja_auto_sdr-3.11.5/sample_outputs/git-snapshots/README.md +98 -0
  9. cja_auto_sdr-3.11.5/src/cja_auto_sdr/__init__.py +23 -0
  10. cja_auto_sdr-3.11.5/src/cja_auto_sdr/__main__.py +553 -0
  11. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/__init__.py +65 -0
  12. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/cache.py +650 -0
  13. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/client.py +438 -0
  14. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/fetch.py +509 -0
  15. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/quality.py +490 -0
  16. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/quality_policy.py +244 -0
  17. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/resilience.py +1040 -0
  18. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/tuning.py +192 -0
  19. cja_auto_sdr-3.11.5/src/cja_auto_sdr/api/validation.py +7 -0
  20. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/__init__.py +37 -0
  21. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/agent_output.py +152 -0
  22. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/commands/__init__.py +35 -0
  23. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/commands/config.py +556 -0
  24. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/commands/discovery.py +1617 -0
  25. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/commands/list.py +493 -0
  26. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/commands/stats.py +486 -0
  27. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/commands/watch.py +235 -0
  28. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/execution.py +855 -0
  29. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/interactive.py +471 -0
  30. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/main.py +7 -0
  31. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/mode_scoped_options.py +120 -0
  32. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/option_resolution.py +54 -0
  33. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/parser.py +1581 -0
  34. cja_auto_sdr-3.11.5/src/cja_auto_sdr/cli/standalone_policy.py +105 -0
  35. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/__init__.py +241 -0
  36. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/advisories.py +69 -0
  37. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/advisory_builders.py +343 -0
  38. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/colors.py +294 -0
  39. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/config.py +204 -0
  40. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/config_validation.py +368 -0
  41. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/constants.py +280 -0
  42. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/credentials.py +457 -0
  43. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/discovery_exceptions.py +102 -0
  44. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/discovery_normalization.py +187 -0
  45. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/discovery_payloads.py +726 -0
  46. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/error_policies.py +39 -0
  47. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/exceptions.py +399 -0
  48. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/exit_codes.py +222 -0
  49. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/json_io.py +379 -0
  50. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/lazy.py +39 -0
  51. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/locks/__init__.py +20 -0
  52. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/locks/backends.py +910 -0
  53. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/locks/manager.py +348 -0
  54. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/logging.py +710 -0
  55. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/perf.py +74 -0
  56. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/profiles.py +728 -0
  57. cja_auto_sdr-3.11.5/src/cja_auto_sdr/core/version.py +3 -0
  58. cja_auto_sdr-3.11.5/src/cja_auto_sdr/data/__init__.py +27 -0
  59. cja_auto_sdr-3.11.5/src/cja_auto_sdr/diff/__init__.py +66 -0
  60. cja_auto_sdr-3.11.5/src/cja_auto_sdr/diff/cli.py +725 -0
  61. cja_auto_sdr-3.11.5/src/cja_auto_sdr/diff/commands.py +901 -0
  62. cja_auto_sdr-3.11.5/src/cja_auto_sdr/diff/comparator.py +495 -0
  63. cja_auto_sdr-3.11.5/src/cja_auto_sdr/diff/git.py +450 -0
  64. cja_auto_sdr-3.11.5/src/cja_auto_sdr/diff/models.py +403 -0
  65. cja_auto_sdr-3.11.5/src/cja_auto_sdr/diff/snapshot.py +460 -0
  66. cja_auto_sdr-3.11.5/src/cja_auto_sdr/diff/writers.py +16 -0
  67. cja_auto_sdr-3.11.5/src/cja_auto_sdr/generator.py +7734 -0
  68. cja_auto_sdr-3.11.5/src/cja_auto_sdr/git/__init__.py +24 -0
  69. cja_auto_sdr-3.11.5/src/cja_auto_sdr/inventory/__init__.py +69 -0
  70. cja_auto_sdr-3.11.5/src/cja_auto_sdr/inventory/calculated_metrics.py +1212 -0
  71. cja_auto_sdr-3.11.5/src/cja_auto_sdr/inventory/derived_fields.py +1577 -0
  72. cja_auto_sdr-3.11.5/src/cja_auto_sdr/inventory/segments.py +960 -0
  73. cja_auto_sdr-3.11.5/src/cja_auto_sdr/inventory/summary.py +7 -0
  74. cja_auto_sdr-3.11.5/src/cja_auto_sdr/inventory/utils.py +380 -0
  75. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/__init__.py +64 -0
  76. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/analyzer.py +1905 -0
  77. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/cache.py +677 -0
  78. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/identifiers.py +12 -0
  79. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/models.py +1016 -0
  80. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/snapshot_utils.py +1335 -0
  81. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/trending.py +585 -0
  82. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/__init__.py +201 -0
  83. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/common.py +175 -0
  84. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/compat.py +525 -0
  85. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/console.py +480 -0
  86. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/csv.py +281 -0
  87. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/excel.py +501 -0
  88. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/html.py +381 -0
  89. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/json.py +254 -0
  90. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/markdown.py +267 -0
  91. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/notion.py +34 -0
  92. cja_auto_sdr-3.11.5/src/cja_auto_sdr/org/writers/trending.py +470 -0
  93. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/__init__.py +25 -0
  94. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/__init__.py +160 -0
  95. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/common.py +217 -0
  96. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/console.py +362 -0
  97. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/csv.py +190 -0
  98. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/excel.py +236 -0
  99. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/grouped.py +123 -0
  100. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/html.py +374 -0
  101. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/json.py +192 -0
  102. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/markdown.py +240 -0
  103. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/diff/pr_comment.py +124 -0
  104. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/excel.py +7 -0
  105. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/inventory/__init__.py +7 -0
  106. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/inventory/summary.py +218 -0
  107. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/notion_database.py +374 -0
  108. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/notion_org_publisher.py +121 -0
  109. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/notion_registry.py +188 -0
  110. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/protocols.py +7 -0
  111. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/registry.py +29 -0
  112. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/run_summary.py +166 -0
  113. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/sdr/__init__.py +1040 -0
  114. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/watch_event.py +78 -0
  115. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/writers/__init__.py +15 -0
  116. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/writers/csv.py +5 -0
  117. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/writers/excel.py +5 -0
  118. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/writers/html.py +5 -0
  119. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/writers/json.py +5 -0
  120. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/writers/markdown.py +5 -0
  121. cja_auto_sdr-3.11.5/src/cja_auto_sdr/output/writers/notion.py +765 -0
  122. cja_auto_sdr-3.11.5/src/cja_auto_sdr/pipeline/__init__.py +15 -0
  123. cja_auto_sdr-3.11.5/src/cja_auto_sdr/pipeline/batch.py +394 -0
  124. cja_auto_sdr-3.11.5/src/cja_auto_sdr/pipeline/dry_run.py +18 -0
  125. cja_auto_sdr-3.11.5/src/cja_auto_sdr/pipeline/models.py +203 -0
  126. cja_auto_sdr-3.11.5/src/cja_auto_sdr/pipeline/single.py +30 -0
  127. cja_auto_sdr-3.11.5/src/cja_auto_sdr/pipeline/watch.py +156 -0
  128. cja_auto_sdr-3.11.5/src/cja_auto_sdr/pipeline/workers.py +55 -0
  129. cja_auto_sdr-3.11.5/tests/README.md +864 -0
  130. cja_auto_sdr-3.11.5/tools/README.md +175 -0
@@ -0,0 +1,66 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ .coverage
5
+ htmlcov/
6
+
7
+ # Credentials (DO NOT COMMIT)
8
+ config.json
9
+ myconfig.json
10
+ .env
11
+ .env.*
12
+ !.env.example
13
+ *.key
14
+ *.pem
15
+
16
+ # Notion integration registry (runtime state, per working directory)
17
+ .notion_pages.json
18
+ .notion_pages.json.lock
19
+
20
+ # Build artifacts
21
+ build/
22
+ dist/
23
+ wheels/
24
+ *.egg-info
25
+
26
+ # Office temp files
27
+ ~$*
28
+
29
+ # Logs
30
+ logs/
31
+
32
+ # IDE
33
+ .idea/
34
+ .vscode/
35
+
36
+ # Virtual environments
37
+ .venv/
38
+
39
+ # Python version (managed by pyproject.toml requires-python)
40
+ .python-version
41
+
42
+ # Test output
43
+ out.json
44
+
45
+ # Temporary files
46
+ plan.md
47
+
48
+ # Ignore xlsx everywhere except sample_outputs and test fixtures
49
+ *.xlsx
50
+ !sample_outputs/**/*.xlsx
51
+ !tests/fixtures/**/*.xlsx
52
+
53
+ # Claude Code session files
54
+ .claude/
55
+ CLAUDE.md
56
+
57
+ # Git worktrees
58
+ .worktrees/
59
+ plan.md
60
+
61
+ # Local smoke test (uses live API credentials)
62
+ scripts/smoke_test_production.py
63
+
64
+ # Superpowers plans/specs (local only)
65
+ docs/superpowers/
66
+ docs/plans
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Brian Au
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,574 @@
1
+ Metadata-Version: 2.4
2
+ Name: cja-auto-sdr
3
+ Version: 3.11.5
4
+ Summary: Customer Journey Analytics SDR Generator with Data Quality Validation
5
+ Project-URL: Homepage, https://github.com/brian-a-au/cja_auto_sdr
6
+ Project-URL: Repository, https://github.com/brian-a-au/cja_auto_sdr
7
+ Project-URL: Issues, https://github.com/brian-a-au/cja_auto_sdr/issues
8
+ Project-URL: Changelog, https://github.com/brian-a-au/cja_auto_sdr/blob/main/CHANGELOG.md
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Topic :: Software Development :: Documentation
18
+ Requires-Python: >=3.14
19
+ Requires-Dist: cjapy>=0.3.1
20
+ Requires-Dist: numpy!=2.4.0,>=2.2.0
21
+ Requires-Dist: pandas<3,>=2.3.3
22
+ Requires-Dist: tqdm>=4.66.0
23
+ Requires-Dist: xlsxwriter>=3.2.9
24
+ Provides-Extra: clustering
25
+ Requires-Dist: scipy>=1.14.0; extra == 'clustering'
26
+ Provides-Extra: completion
27
+ Requires-Dist: argcomplete>=3.0.0; extra == 'completion'
28
+ Provides-Extra: env
29
+ Requires-Dist: python-dotenv>=1.0.0; extra == 'env'
30
+ Provides-Extra: full
31
+ Requires-Dist: argcomplete>=3.0.0; extra == 'full'
32
+ Requires-Dist: notion-client>=3.0.0; extra == 'full'
33
+ Requires-Dist: python-dotenv>=1.0.0; extra == 'full'
34
+ Requires-Dist: scipy>=1.14.0; extra == 'full'
35
+ Provides-Extra: notion
36
+ Requires-Dist: notion-client>=3.0.0; extra == 'notion'
37
+ Description-Content-Type: text/markdown
38
+
39
+ # Adobe Customer Journey Analytics SDR Generator
40
+
41
+ <img width="1024" height="572" alt="image" src="https://github.com/user-attachments/assets/54a43474-3fc6-4379-909c-452c19cdeac2" />
42
+
43
+ [![PyPI](https://img.shields.io/pypi/v/cja-auto-sdr.svg)](https://pypi.org/project/cja-auto-sdr/)
44
+ [![Tests](https://github.com/brian-a-au/cja_auto_sdr/actions/workflows/tests.yml/badge.svg)](https://github.com/brian-a-au/cja_auto_sdr/actions/workflows/tests.yml)
45
+ [![Lint](https://github.com/brian-a-au/cja_auto_sdr/actions/workflows/lint.yml/badge.svg)](https://github.com/brian-a-au/cja_auto_sdr/actions/workflows/lint.yml)
46
+ [![Version Sync](https://github.com/brian-a-au/cja_auto_sdr/actions/workflows/version-sync.yml/badge.svg)](https://github.com/brian-a-au/cja_auto_sdr/actions/workflows/version-sync.yml)
47
+ [![Python 3.14+](https://img.shields.io/badge/python-3.14%2B-blue.svg)](https://www.python.org/downloads/)
48
+ [![Coverage](https://img.shields.io/badge/coverage-99%25-brightgreen.svg)](tests/)
49
+ [![Tests](https://img.shields.io/badge/tests-8377-brightgreen.svg)](tests/)
50
+ [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
51
+ [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
52
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
53
+
54
+ A production-ready Python CLI that automates the creation of Solution Design Reference (SDR) documentation from your Adobe Customer Journey Analytics (CJA) implementation. Read-only against CJA.
55
+
56
+ Counterpart to [`aa_auto_sdr`](https://github.com/brian-a-au/aa_auto_sdr); shares UX conventions, does not share code.
57
+
58
+ ## What It Is
59
+
60
+ A **Solution Design Reference** is the essential documentation that bridges your business requirements and your analytics implementation. It catalogs every metric and dimension in your CJA Data View, serving as the single source of truth for what data you're collecting and how it's configured.
61
+
62
+ **The Problem:** Manually documenting CJA implementations is time-consuming, error-prone, and quickly becomes outdated. Teams waste hours exporting data, formatting spreadsheets, and cross-referencing configurations—only to repeat the process when things change.
63
+
64
+ **The Solution:** This tool connects directly to the CJA API, extracts your complete Data View configuration, validates data quality, and generates professionally formatted documentation in seconds. It also tracks changes between Data Views over time with built-in diff comparison and snapshot capabilities.
65
+
66
+ ### How It Works
67
+
68
+ 1. **Connects** to your CJA instance via the Adobe API
69
+ 2. **Extracts** all metrics, dimensions, and configuration from your Data View(s)
70
+ 3. **Validates** data quality with core automated checks (duplicates, required fields, null values, missing descriptions, empty datasets, invalid IDs)
71
+ 4. **Generates** formatted documentation with color-coded quality indicators
72
+
73
+ ### Key Features
74
+
75
+ | Category | Feature | Benefit |
76
+ | -------- | ------- | ------- |
77
+ | **Performance** | Parallel Batch Processing | Process multiple Data Views simultaneously (3-4x faster) |
78
+ | | Validation Caching | 50-90% faster on repeated runs with intelligent result caching |
79
+ | | Optimized Validation | Single-pass DataFrame scanning (30-50% faster) |
80
+ | | Configurable Workers | Scale from 1-256 parallel workers based on your infrastructure |
81
+ | **Quality** | Core Validation Checks | Detect duplicates, missing fields, null values, invalid IDs, and empty datasets |
82
+ | | Severity Classification | CRITICAL, HIGH, MEDIUM, LOW with color-coded Excel formatting |
83
+ | | Quality Dashboard | Dedicated sheet with filtering, sorting, and actionable insights |
84
+ | **Output** | Multiple Formats | Excel, CSV, JSON, HTML, Markdown—or generate all at once |
85
+ | | Professional Excel | Up to 8 formatted sheets with conditional formatting, frozen headers, auto-filtering |
86
+ | | Segments Inventory | Document segment filters, complexity, and references with `--include-segments` (SDR + Snapshot Diff) |
87
+ | | Derived Field Inventory | Document derived field logic, complexity, and dependencies with `--include-derived` (SDR only) |
88
+ | | Calculated Metrics Inventory | Document calculated metric formulas and references with `--include-calculated` (SDR + Snapshot Diff) |
89
+ | | Inventory-Only Mode | Generate only inventory sheets without standard SDR with `--inventory-only` |
90
+ | | Stdout Support | Pipe JSON/CSV output directly to other tools with `--output -` |
91
+ | | Auto-Open Files | Open generated files immediately with `--open` flag |
92
+ | **Reliability** | Automatic Retry | Exponential backoff with jitter for transient network failures |
93
+ | | Continue-on-Error | Batch processing continues even if individual Data Views fail |
94
+ | | Pre-flight Validation | Validates config and connectivity before processing |
95
+ | | Circuit Breaker | Prevent cascading failures with automatic recovery |
96
+ | | API Auto-Tuning | Dynamic worker adjustment based on response times |
97
+ | | Shared Validation Cache | Cross-process cache sharing for batch operations |
98
+ | **Comparison** | Data View Diff | Compare two Data Views to identify added, removed, and modified components |
99
+ | | Snapshot Support | Save and compare against baseline snapshots for change tracking |
100
+ | | Snapshot-to-Snapshot | Compare two snapshot files directly without API calls |
101
+ | | Auto-Snapshot on Diff | Automatically save timestamped snapshots during comparisons for audit trails |
102
+ | | CI/CD Integration | Policy exit codes for automation (2=policy threshold exceeded, 3=diff warn threshold exceeded) |
103
+ | | GitHub Actions Step Summary | Automatically writes Markdown summaries to `GITHUB_STEP_SUMMARY` when available |
104
+ | | Smart Name Resolution | Fuzzy matching suggestions for typos, interactive disambiguation for duplicates |
105
+ | **Git Integration** | Version-Controlled Snapshots | Save SDR snapshots in Git-friendly format with auto-commit |
106
+ | | Audit Trail | Full history of every Data View configuration change |
107
+ | | Team Collaboration | Share snapshots via Git repositories with PR-based review workflows |
108
+ | **Org-Wide Analysis** | Component Distribution | Analyze metrics/dimensions across all data views with `--org-report` |
109
+ | | Similarity Matrix | Identify duplicate or near-duplicate data views via Jaccard similarity |
110
+ | | Data View Clustering | Group related data views using hierarchical clustering |
111
+ | | Governance Recommendations | Automated insights for standardization opportunities |
112
+ | | CI/CD Exit Codes | Threshold-based exit codes for governance automation |
113
+ | | Trending & Drift | Compare reports over time to detect changes |
114
+ | **Multi-Org** | Profile Management | Switch between Adobe Organizations with `--profile client-a` |
115
+ | | Interactive Profile Setup | Create profiles interactively with `--profile-add` |
116
+ | | Profile Testing | Validate credentials with `--profile-test` before use |
117
+ | **Developer UX** | Quick Stats Mode | Get metrics/dimensions count instantly with `--stats` (no full report) |
118
+ | | Connection & Dataset Discovery | `--list-connections` and `--list-datasets` for infrastructure inventory |
119
+ | | Discovery Inspection | Drill into a data view's metrics, dimensions, segments, and calculated metrics |
120
+ | | Machine-Readable Discovery | `--list-dataviews --format json` for scripting integration |
121
+ | | Dry-Run Mode | Test configuration without generating reports |
122
+ | | Color-Coded Output | Global color controls via `--no-color`, `NO_COLOR`, and `FORCE_COLOR` |
123
+ | | Enhanced Error Messages | Contextual error messages with actionable fix suggestions |
124
+ | | Comprehensive Logging | Timestamped logs with rotation for audit trails |
125
+ | **Agent & Automation** | AGENTS.md Contract | Machine-parseable tool contract for AI agents (Claude Code, LangChain, etc.) |
126
+ | | Python Orchestrator | Subprocess wrapper for programmatic automation (`scripts/orchestrator.py`) |
127
+ | | Shell Script Templates | Cron-ready weekly, daily, and quarterly automation examples |
128
+ | | GitHub Actions Template | Copy-paste workflow for scheduled SDR auditing |
129
+ | | Exit Code Conventions | Structured exit codes (0/1/2/3) for agent decision-making |
130
+
131
+ ### Who It's For
132
+
133
+ - **Analytics Teams** needing up-to-date implementation documentation
134
+ - **Consultants** managing multiple client implementations
135
+ - **Data Governance** teams requiring audit trails and quality tracking
136
+ - **DevOps Engineers** automating CJA audits in CI/CD pipelines
137
+
138
+ ## Quick Start
139
+
140
+ ### Install from PyPI (recommended)
141
+
142
+ The tool is published on [PyPI](https://pypi.org/project/cja-auto-sdr/), so most users can install it with a single command — no clone required:
143
+
144
+ ```bash
145
+ pip install cja-auto-sdr
146
+
147
+ # or install it as an isolated CLI tool with uv:
148
+ uv tool install cja-auto-sdr
149
+ ```
150
+
151
+ Optional features ship as extras:
152
+
153
+ ```bash
154
+ pip install "cja-auto-sdr[full]" # clustering + env + shell completion + notion
155
+ ```
156
+
157
+ This puts the `cja-auto-sdr` (and `cja_auto_sdr`) command on your PATH. Verify with `cja-auto-sdr --version`, then skip ahead to [Configure Credentials](#3-configure-credentials).
158
+
159
+ To set up a development checkout from source instead, follow the numbered steps below.
160
+
161
+ ### 1. Clone the Repository
162
+
163
+ ```bash
164
+ # Clone the repository
165
+ git clone https://github.com/brian-a-au/cja_auto_sdr.git
166
+ cd cja_auto_sdr
167
+ ```
168
+
169
+ ### 2. Install Dependencies
170
+
171
+ **macOS/Linux:**
172
+
173
+ ```bash
174
+ # Install uv package manager (if not already installed)
175
+ curl -LsSf https://astral.sh/uv/install.sh | sh
176
+
177
+ # Install project dependencies
178
+ uv sync
179
+ ```
180
+
181
+ **Windows (PowerShell):**
182
+
183
+ ```powershell
184
+ # Install uv package manager
185
+ powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
186
+
187
+ # Install project dependencies
188
+ uv sync
189
+ ```
190
+
191
+ If uv doesn't work, use native Python instead (recommended for Windows):
192
+
193
+ ```text
194
+ python -m venv .venv
195
+ .venv\Scripts\activate
196
+ pip install -e .
197
+ ```
198
+
199
+ > **Windows Users:** If you encounter issues with `uv run` or NumPy import errors on Windows, we recommend using Python directly. See the [Windows-Specific Issues](docs/TROUBLESHOOTING.md#windows-specific-issues) section in the troubleshooting guide for detailed solutions.
200
+
201
+ <!-- separator between blockquotes -->
202
+
203
+ > **Running commands:** You have two equivalent options:
204
+ >
205
+ > - `uv run cja_auto_sdr ...` — works immediately on macOS/Linux, may have issues on Windows
206
+ > - `cja_auto_sdr ...` — after activating the venv: `source .venv/bin/activate` (Unix) or `.venv\Scripts\activate` (Windows)
207
+ >
208
+ > This guide uses `uv run`. Windows users should activate the venv first (`pip install -e .` makes the command available). The [Common Use Cases](#common-use-cases) table omits the prefix for brevity.
209
+
210
+ ### 3. Configure Credentials
211
+
212
+ Get your credentials from [Adobe Developer Console](https://developer.adobe.com/console/) (see [QUICKSTART_GUIDE](docs/QUICKSTART_GUIDE.md) for detailed steps).
213
+
214
+ > ⚠ **Important:** Your Adobe Developer Console project must have **both** the CJA API **and** the AEP (Experience Platform) API added. The AEP API associates your service account with an Experience Platform product profile, which is required for CJA API authentication. See the [Quickstart Guide](docs/QUICKSTART_GUIDE.md#15-add-the-adobe-experience-platform-aep-api) for setup instructions.
215
+
216
+ #### Option A: Configuration File (Quickest)
217
+
218
+ Create a `config.json` file with your Adobe credentials:
219
+
220
+ ```bash
221
+ # Copy the example template
222
+ cp config.json.example config.json
223
+
224
+ # Or generate a template (creates config.sample.json)
225
+ uv run cja_auto_sdr --sample-config
226
+
227
+ # Edit config.json with your credentials
228
+ ```
229
+
230
+ > **Note:** By default, the tool reads `./config.json` from your current working directory. Use `--config-file /path/to/config.json` to load a file from a different location or filename.
231
+
232
+ ```json
233
+ {
234
+ "org_id": "YOUR_ORG_ID@AdobeOrg",
235
+ "client_id": "YOUR_CLIENT_ID",
236
+ "secret": "YOUR_CLIENT_SECRET",
237
+ "scopes": "your_scopes_from_developer_console"
238
+ }
239
+ ```
240
+
241
+ #### Option B: Environment Variables (Recommended for CI/CD)
242
+
243
+ Use a `.env` file (copy from `.env.example`) or export directly:
244
+
245
+ ```bash
246
+ ORG_ID=your_org_id@AdobeOrg
247
+ CLIENT_ID=your_client_id
248
+ SECRET=your_client_secret
249
+ SCOPES=your_scopes_from_developer_console
250
+ ```
251
+
252
+ > **Note:** Environment variables take precedence over `config.json`.
253
+
254
+ ### 4. Verify Setup & Run
255
+
256
+ **Interactive Mode (Recommended for First-Time Users):**
257
+
258
+ ```bash
259
+ # Launch interactive mode - walks through all options step by step
260
+ uv run cja_auto_sdr --interactive
261
+ ```
262
+
263
+ Interactive mode guides you through data view selection, output format, and inventory options.
264
+
265
+ **macOS/Linux (Direct Commands):**
266
+
267
+ ```bash
268
+ # Verify configuration and list available data views
269
+ uv run cja_auto_sdr --validate-config
270
+ uv run cja_auto_sdr --list-dataviews
271
+
272
+ # Generate SDR for a data view (by ID)
273
+ uv run cja_auto_sdr dv_YOUR_DATA_VIEW_ID
274
+
275
+ # Or by name (quotes recommended for names with spaces)
276
+ uv run cja_auto_sdr "Production Analytics"
277
+ ```
278
+
279
+ **Windows (if uv run doesn't work):**
280
+
281
+ ```text
282
+ # Activate virtual environment first
283
+ .venv\Scripts\activate
284
+
285
+ # Verify configuration and list available data views
286
+ cja_auto_sdr --validate-config
287
+ cja_auto_sdr --list-dataviews
288
+
289
+ # Generate SDR for a data view (by ID or name)
290
+ cja_auto_sdr dv_YOUR_DATA_VIEW_ID
291
+ cja_auto_sdr "Production Analytics"
292
+ ```
293
+
294
+ > **Tip:** You can specify Data Views by **name** in addition to ID. If multiple Data Views share the same name, all matching views will be processed.
295
+
296
+ ### 5. Review Output
297
+
298
+ - Generated Excel file: `CJA_DataView_[Name]_[ID]_SDR.xlsx`
299
+ - Logs: `logs/` directory
300
+
301
+ ## Common Use Cases
302
+
303
+ **Note:** Commands below omit the `uv run` prefix for brevity:
304
+
305
+ - **macOS/Linux:** Add `uv run` before each command (e.g., `uv run cja_auto_sdr dv_12345`)
306
+ - **Windows:** Activate the venv first (`.venv\Scripts\activate`), then run commands directly
307
+
308
+ | Task | Command |
309
+ | ---- | ------- |
310
+ | **Getting Started** | |
311
+ | Interactive mode (guided) | `cja_auto_sdr --interactive` |
312
+ | List available data views | `cja_auto_sdr --list-dataviews` |
313
+ | **SDR Generation** | |
314
+ | Single Data View (by ID) | `cja_auto_sdr dv_12345` |
315
+ | Single Data View (by name) | `cja_auto_sdr "Production Analytics"` |
316
+ | Generate and open file | `cja_auto_sdr dv_12345 --open` |
317
+ | Batch processing | `cja_auto_sdr dv_1 dv_2 dv_3` |
318
+ | Custom output location | `cja_auto_sdr dv_12345 --output-dir ./reports` |
319
+ | Skip validation (faster) | `cja_auto_sdr dv_12345 --skip-validation` |
320
+ | Metrics-only SDR output (skip dimensions) | `cja_auto_sdr dv_12345 --metrics-only` |
321
+ | Dimensions-only SDR output (skip metrics) | `cja_auto_sdr dv_12345 --dimensions-only` |
322
+ | Include segments inventory | `cja_auto_sdr dv_12345 --include-segments` |
323
+ | Include derived fields (SDR only) | `cja_auto_sdr dv_12345 --include-derived` |
324
+ | Include calculated metrics | `cja_auto_sdr dv_12345 --include-calculated` |
325
+ | Include all inventories | `cja_auto_sdr dv_12345 --include-all-inventory` |
326
+ | Inventory-only output | `cja_auto_sdr dv_12345 --include-segments --inventory-only` |
327
+ | Quick inventory stats | `cja_auto_sdr dv_12345 --include-all-inventory --inventory-summary` |
328
+ | Fail on quality issues >= HIGH | `cja_auto_sdr dv_12345 --fail-on-quality HIGH` |
329
+ | Standalone quality report | `cja_auto_sdr dv_12345 --quality-report json --output -` |
330
+ | **Output Formats** | |
331
+ | Export as Excel (default) | `cja_auto_sdr dv_12345 --format excel` |
332
+ | Export as CSV | `cja_auto_sdr dv_12345 --format csv` |
333
+ | Export as JSON | `cja_auto_sdr dv_12345 --format json` |
334
+ | Export as HTML | `cja_auto_sdr dv_12345 --format html` |
335
+ | Export as Markdown | `cja_auto_sdr dv_12345 --format markdown` |
336
+ | Generate all formats | `cja_auto_sdr dv_12345 --format all` |
337
+ | **Notion SDR Registry (v3.8.0)** | |
338
+ | Create registry database (first publish) | `cja_auto_sdr dv_12345 --format notion --notion-create-database` (optionally `--notion-database-title "Name"`) |
339
+ | Publish detail page + registry row | `cja_auto_sdr dv_12345 --format notion` (with `NOTION_DATABASE_ID` set) |
340
+ | Batch publish with complete rows | `cja_auto_sdr --batch dv_1 dv_2 dv_3 --format notion` |
341
+ | Org-report lightweight catalog | `cja_auto_sdr --org-report --format notion --notion-database-id <id>` (counts only; no detail pages; needs a registry database) |
342
+ | **Notion Maintenance (v3.9.0)** | |
343
+ | Preview orphan pages (dry run) | `cja_auto_sdr --notion-prune-orphans --dry-run --output-dir ./out` |
344
+ | Archive orphan pages (Notion trash) | `cja_auto_sdr --notion-prune-orphans --output-dir ./out` |
345
+ | **Notion Registry Repair (v3.10.0)** | |
346
+ | Print canonical registry schema | `cja_auto_sdr --notion-print-database-schema` |
347
+ | Preview schema repair (dry run) | `cja_auto_sdr --notion-repair-database --dry-run --notion-database-id <id>` |
348
+ | Apply schema repair (add-only) | `cja_auto_sdr --notion-repair-database --notion-database-id <id>` |
349
+ | **Quick Stats & Discovery** | |
350
+ | Quick stats (no full report) | `cja_auto_sdr dv_12345 --stats` |
351
+ | Stats as JSON | `cja_auto_sdr dv_12345 --stats --format json` |
352
+ | List Data Views | `cja_auto_sdr --list-dataviews` |
353
+ | List Connections | `cja_auto_sdr --list-connections` |
354
+ | List Data Views with Datasets | `cja_auto_sdr --list-datasets` |
355
+ | Filter discovery results | `cja_auto_sdr --list-dataviews --filter "Prod.*"` |
356
+ | Sort discovery output | `cja_auto_sdr --list-dataviews --sort name` |
357
+ | List as JSON (for scripting) | `cja_auto_sdr --list-dataviews --format json` |
358
+ | Interactive Data View selection | `cja_auto_sdr --interactive` |
359
+ | Pipe to other tools | `cja_auto_sdr --list-dataviews --output - \| jq '.dataViews[]'` |
360
+ | Inspect a data view | `cja_auto_sdr --describe-dataview dv_abc123` |
361
+ | Inspect by name | `cja_auto_sdr --describe-dataview "Production Web Data"` |
362
+ | List metrics (with filter) | `cja_auto_sdr --list-metrics dv_abc123 --filter revenue` |
363
+ | List dimensions as CSV | `cja_auto_sdr --list-dimensions dv_abc123 --format csv --output dims.csv` |
364
+ | List segments | `cja_auto_sdr --list-segments dv_abc123` |
365
+ | List calculated metrics | `cja_auto_sdr --list-calculated-metrics dv_abc123 --format json` |
366
+ | Validate config only | `cja_auto_sdr --validate-config` |
367
+ | **Diff Comparison** (default: console output) | |
368
+ | Compare two Data Views | `cja_auto_sdr --diff dv_1 dv_2` |
369
+ | Compare by name | `cja_auto_sdr --diff "Production" "Staging"` |
370
+ | Diff as Markdown | `cja_auto_sdr --diff dv_1 dv_2 --format markdown` |
371
+ | Diff as JSON | `cja_auto_sdr --diff dv_1 dv_2 --format json` |
372
+ | Diff metrics only | `cja_auto_sdr --diff dv_1 dv_2 --metrics-only` |
373
+ | Diff dimensions only | `cja_auto_sdr --diff dv_1 dv_2 --dimensions-only` |
374
+ | Save snapshot | `cja_auto_sdr dv_12345 --snapshot ./baseline.json` |
375
+ | Compare to snapshot | `cja_auto_sdr dv_12345 --diff-snapshot ./baseline.json` |
376
+ | Compare two snapshots | `cja_auto_sdr --compare-snapshots ./old.json ./new.json` |
377
+ | Auto-save snapshots | `cja_auto_sdr --diff dv_1 dv_2 --auto-snapshot` |
378
+ | With retention policy | `cja_auto_sdr --diff dv_1 dv_2 --auto-snapshot --keep-last 10` |
379
+ | Auto-prune snapshots (defaults) | `cja_auto_sdr --diff dv_1 dv_2 --auto-snapshot --auto-prune` |
380
+ | List saved snapshots | `cja_auto_sdr --list-snapshots` |
381
+ | Prune snapshots only | `cja_auto_sdr --prune-snapshots --keep-last 20` |
382
+ | **Inventory Diff** (same data view over time) | |
383
+ | Snapshot with inventory | `cja_auto_sdr dv_12345 --snapshot ./baseline.json --include-all-inventory` |
384
+ | Compare with inventory | `cja_auto_sdr dv_12345 --diff-snapshot ./baseline.json --include-calculated` |
385
+ | Full inventory diff | `cja_auto_sdr dv_12345 --diff-snapshot ./baseline.json --include-calculated --include-segments` |
386
+ | **Git Integration** | |
387
+ | Initialize Git repo | `cja_auto_sdr --git-init --git-dir ./sdr-snapshots` |
388
+ | Generate and commit | `cja_auto_sdr dv_12345 --git-commit` |
389
+ | Commit with custom message | `cja_auto_sdr dv_12345 --git-commit --git-message "Weekly audit"` |
390
+ | Commit and push | `cja_auto_sdr dv_12345 --git-commit --git-push` |
391
+ | **Org-Wide Analysis** | |
392
+ | Analyze all data views | `cja_auto_sdr --org-report` |
393
+ | Filter by name pattern | `cja_auto_sdr --org-report --filter "Prod.*"` |
394
+ | Exclude patterns | `cja_auto_sdr --org-report --exclude "Test\|Dev"` |
395
+ | Limit analysis scope | `cja_auto_sdr --org-report --limit 10` |
396
+ | Include component names | `cja_auto_sdr --org-report --include-names` |
397
+ | Skip similarity matrix | `cja_auto_sdr --org-report --skip-similarity` |
398
+ | Export as Excel | `cja_auto_sdr --org-report --format excel` |
399
+ | Export as HTML | `cja_auto_sdr --org-report --format html` |
400
+ | Export as CSV | `cja_auto_sdr --org-report --format csv` |
401
+ | Export all formats | `cja_auto_sdr --org-report --format all` |
402
+ | Custom thresholds | `cja_auto_sdr --org-report --core-threshold 0.7 --overlap-threshold 0.9` |
403
+ | Overlap threshold note | Similarity reporting caps the effective threshold at 90% for governance checks (reports show configured vs. effective when higher) |
404
+ | Quick stats mode | `cja_auto_sdr --org-report --org-stats` |
405
+ | Cluster data views | `cja_auto_sdr --org-report --cluster --format excel` |
406
+ | CI/CD governance check | `cja_auto_sdr --org-report --duplicate-threshold 5 --fail-on-threshold` |
407
+ | **Watch Mode** | |
408
+ | Watch for changes every hour | `cja_auto_sdr --watch dv_12345 --interval 1h` |
409
+ | Watch multiple data views (6h cycle) | `cja_auto_sdr --watch dv_1 dv_2 --interval 6h` |
410
+ | Heartbeat mode (emit every cycle) | `cja_auto_sdr --watch dv_12345 --interval 1d --watch-threshold 0` |
411
+
412
+ ## Documentation
413
+
414
+ | Guide | Description |
415
+ | ----- | ----------- |
416
+ | [Quick Reference](docs/QUICK_REFERENCE.md) | Single-page command cheat sheet |
417
+ | [Extended Quick Start](docs/QUICKSTART_GUIDE.md) | Complete walkthrough from zero to first SDR |
418
+ | [Installation Guide](docs/INSTALLATION.md) | Detailed setup instructions, authentication options |
419
+ | [Configuration Guide](docs/CONFIGURATION.md) | config.json, environment variables, Profile management |
420
+ | [Notion Setup](docs/NOTION_SETUP.md) | Step-by-step Notion integration setup and overview |
421
+ | [CLI Reference](docs/CLI_REFERENCE.md) | Complete command-line options and examples |
422
+ | [Shell Completion](docs/SHELL_COMPLETION.md) | Enable tab-completion for bash/zsh |
423
+ | [Data Quality](docs/DATA_QUALITY.md) | Validation checks, severity levels, understanding issues |
424
+ | [Inventory Overview](docs/INVENTORY_OVERVIEW.md) | Unified guide to all component inventories |
425
+ | [Derived Field Inventory](docs/DERIVED_FIELDS_INVENTORY.md) | Derived field analysis, complexity scores, logic summaries |
426
+ | [Segments Inventory](docs/SEGMENTS_INVENTORY.md) | Segment filters, container types, definition summaries |
427
+ | [Calculated Metrics Inventory](docs/CALCULATED_METRICS_INVENTORY.md) | Calculated metric formulas, complexity, references |
428
+ | [Performance](docs/PERFORMANCE.md) | Optimization options, caching, batch processing |
429
+ | [Troubleshooting](docs/TROUBLESHOOTING.md) | Common errors and solutions |
430
+ | [Use Cases & Best Practices](docs/USE_CASES.md) | Automation, scheduling, workflows |
431
+ | [Output Formats](docs/OUTPUT_FORMATS.md) | Format specifications and examples |
432
+ | [Batch Processing](docs/BATCH_PROCESSING_GUIDE.md) | Multi-Data View processing guide |
433
+ | [Data View Names](docs/DATA_VIEW_NAMES.md) | Using Data View names instead of IDs |
434
+ | [Data View Comparison](docs/DIFF_COMPARISON.md) | Compare Data Views, snapshots, CI/CD integration |
435
+ | [Git Integration](docs/GIT_INTEGRATION.md) | Version-controlled snapshots, audit trails, team collaboration |
436
+ | [Org-Wide Analysis](docs/ORG_WIDE_ANALYSIS.md) | Cross-data view component analysis, similarity detection, governance |
437
+ | [Agent Automation](docs/AGENT_AUTOMATION.md) | CI/CD pipelines, AI agent integration, scheduling patterns |
438
+ | [Testing](tests/README.md) | Running and writing tests |
439
+
440
+ ## Requirements
441
+
442
+ - Python 3.14+
443
+ - Adobe I/O integration with CJA and AEP API access
444
+ - Network connectivity to Adobe APIs
445
+
446
+ ## Project Structure
447
+
448
+ High-level overview of the current repository layout (representative, not exhaustive):
449
+
450
+ ```text
451
+ cja_auto_sdr/
452
+ ├── .github/
453
+ │ └── workflows/ # CI, lint, version-sync, and release checks
454
+ ├── src/
455
+ │ └── cja_auto_sdr/ # Main package (src-layout)
456
+ │ ├── __init__.py # Package init with version
457
+ │ ├── __main__.py # Installed CLI entry point (`cja_auto_sdr`, `cja-auto-sdr`)
458
+ │ ├── generator.py # Main SDR generation flow and legacy full CLI path
459
+ │ ├── api/ # API communication layer
460
+ │ │ ├── cache.py # Validation result caching
461
+ │ │ ├── client.py # CJA client initialization
462
+ │ │ ├── fetch.py # Parallel API data fetching
463
+ │ │ ├── quality.py # Data quality validation
464
+ │ │ ├── quality_policy.py # Quality gates and policy helpers
465
+ │ │ ├── resilience.py # Retry, circuit breaker
466
+ │ │ ├── tuning.py # API worker auto-tuning
467
+ │ │ └── validation.py # Config & input validation
468
+ │ ├── cli/ # CLI parsing and interactive mode
469
+ │ │ ├── commands/ # Subcommand handlers
470
+ │ │ ├── execution.py # Execution-context resolution
471
+ │ │ ├── interactive.py # Interactive data view selection
472
+ │ │ ├── main.py # CLI entry orchestration
473
+ │ │ ├── mode_scoped_options.py # Option validation by command mode
474
+ │ │ ├── option_resolution.py # Shared option normalization
475
+ │ │ ├── parser.py # Argument parser definitions
476
+ │ │ └── standalone_policy.py # Standalone command policy rules
477
+ │ ├── core/ # Shared core utilities
478
+ │ │ ├── colors.py # ANSI color helpers
479
+ │ │ ├── config.py # Configuration dataclasses
480
+ │ │ ├── config_validation.py # Config validation helpers
481
+ │ │ ├── constants.py # Global constants
482
+ │ │ ├── credentials.py # Credential loading
483
+ │ │ ├── discovery_*.py # Discovery normalization/payload helpers
484
+ │ │ ├── error_policies.py # Error-handling policy helpers
485
+ │ │ ├── exceptions.py # Custom exception hierarchy
486
+ │ │ ├── exit_codes.py # Stable exit-code definitions
487
+ │ │ ├── json_io.py # JSON read/write helpers
488
+ │ │ ├── lazy.py # Lazy-loading helpers
489
+ │ │ ├── logging.py # Log setup and formatting
490
+ │ │ ├── perf.py # Lightweight performance helpers
491
+ │ │ ├── profiles.py # Multi-org profile management
492
+ │ │ └── version.py # Single-source version string
493
+ │ ├── data/ # Shared data package hooks
494
+ │ ├── diff/ # Data view comparison
495
+ │ │ ├── cli.py # Diff CLI dispatch helpers
496
+ │ │ ├── commands.py # Diff command orchestration
497
+ │ │ ├── comparator.py # Diff logic and change detection
498
+ │ │ ├── git.py # Git snapshot integration
499
+ │ │ ├── models.py # Snapshot and diff data models
500
+ │ │ ├── snapshot.py # Snapshot save/load/prune
501
+ │ │ └── writers.py # Diff output formatters
502
+ │ ├── git/ # Git package compatibility surface
503
+ │ ├── inventory/ # Component inventory modules
504
+ │ │ ├── calculated_metrics.py
505
+ │ │ ├── derived_fields.py
506
+ │ │ ├── segments.py
507
+ │ │ ├── summary.py # Inventory summary stats
508
+ │ │ └── utils.py # Shared inventory helpers
509
+ │ ├── org/ # Org-wide analysis
510
+ │ │ ├── analyzer.py # OrgComponentAnalyzer
511
+ │ │ ├── cache.py # Report caching
512
+ │ │ ├── identifiers.py # Org/data-view identifier helpers
513
+ │ │ ├── models.py # Data classes for org analysis
514
+ │ │ ├── snapshot_utils.py # Org snapshot helpers
515
+ │ │ ├── trending.py # Historical trend analysis
516
+ │ │ └── writers/ # Org-report writers
517
+ │ ├── output/ # Output generation
518
+ │ │ ├── diff/ # Diff output implementations
519
+ │ │ ├── excel.py # Excel formatting
520
+ │ │ ├── inventory/ # Inventory summary output helpers
521
+ │ │ ├── protocols.py # OutputWriter protocol
522
+ │ │ ├── registry.py # Format registry
523
+ │ │ ├── run_summary.py # Run summary output helpers
524
+ │ │ ├── sdr/ # SDR output assembly
525
+ │ │ └── writers/ # CSV, HTML, JSON, Markdown writers
526
+ │ └── pipeline/ # Processing pipeline
527
+ │ ├── batch.py # Batch processor
528
+ │ ├── dry_run.py # Dry-run mode
529
+ │ ├── models.py # Pipeline data models
530
+ │ ├── single.py # Single data view processing
531
+ │ └── workers.py # Worker coordination
532
+ ├── docs/ # Documentation (20+ guides)
533
+ │ ├── QUICKSTART_GUIDE.md # Getting started guide
534
+ │ ├── CONFIGURATION.md # Profiles, config.json & env vars
535
+ │ ├── CLI_REFERENCE.md # Command-line reference
536
+ │ ├── INVENTORY_OVERVIEW.md # Unified inventory guide
537
+ │ ├── DIFF_COMPARISON.md # Data view comparison guide
538
+ │ ├── GIT_INTEGRATION.md # Git integration guide
539
+ │ ├── ORG_WIDE_ANALYSIS.md # Org-wide report guide
540
+ │ └── ... # Additional guides
541
+ ├── examples/ # Automation and GitHub Actions examples
542
+ ├── scripts/ # Utility scripts
543
+ ├── tests/ # Test suite (8,378+ tests)
544
+ │ ├── category_rules.py # File-based test-category rules
545
+ │ ├── conftest.py # Pytest fixtures and auto-marking
546
+ │ ├── README.md # Test inventory and execution guide
547
+ │ └── test_*.py # 114 collected test modules
548
+ ├── sample_outputs/ # Example output files
549
+ │ ├── excel/ # Sample Excel SDR
550
+ │ ├── csv/ # Sample CSV output
551
+ │ ├── json/ # Sample JSON output
552
+ │ ├── html/ # Sample HTML output
553
+ │ ├── markdown/ # Sample Markdown output
554
+ │ ├── diff/ # Sample diff comparison outputs
555
+ │ └── git-snapshots/ # Sample Git integration snapshots
556
+ ├── logs/ # Generated log files
557
+ ├── snapshots/ # Saved Data View snapshots
558
+ ├── sdr-snapshots/ # Additional SDR snapshot artifacts
559
+ ├── pyproject.toml # Project configuration and dependencies
560
+ ├── uv.lock # Dependency lock file for reproducible builds
561
+ ├── README.md # This file
562
+ ├── CHANGELOG.md # Version history and release notes
563
+ ├── LICENSE # License file
564
+ ├── config.json.example # Config file template
565
+ ├── .env.example # Environment variable template
566
+ └── *.xlsx # Generated SDR files
567
+ ```
568
+
569
+ ## Additional Resources
570
+
571
+ - [CJA API Documentation](https://developer.adobe.com/cja-apis/docs/)
572
+ - [cjapy Library](https://github.com/pitchmuc/cjapy)
573
+ - [uv Package Manager](https://github.com/astral-sh/uv)
574
+ - [Changelog](CHANGELOG.md)