@memberjunction/cli 6.2.0-edge.1 → 6.2.0-edge.2

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 (59) hide show
  1. package/dist/commands/agent/init.d.ts +12 -0
  2. package/dist/commands/agent/init.d.ts.map +1 -1
  3. package/dist/commands/agent/init.js +42 -8
  4. package/dist/commands/agent/init.js.map +1 -1
  5. package/dist/commands/migrate/convert.d.ts.map +1 -1
  6. package/dist/commands/migrate/convert.js +15 -1
  7. package/dist/commands/migrate/convert.js.map +1 -1
  8. package/dist/commands/migrate/rebake.d.ts.map +1 -1
  9. package/dist/commands/migrate/rebake.js +7 -0
  10. package/dist/commands/migrate/rebake.js.map +1 -1
  11. package/dist/commands/rubric/diff.d.ts +11 -0
  12. package/dist/commands/rubric/diff.d.ts.map +1 -0
  13. package/dist/commands/rubric/diff.js +20 -0
  14. package/dist/commands/rubric/diff.js.map +1 -0
  15. package/dist/commands/rubric/evaluate.d.ts +12 -0
  16. package/dist/commands/rubric/evaluate.d.ts.map +1 -0
  17. package/dist/commands/rubric/evaluate.js +21 -0
  18. package/dist/commands/rubric/evaluate.js.map +1 -0
  19. package/dist/commands/rubric/index.d.ts +6 -0
  20. package/dist/commands/rubric/index.d.ts.map +1 -0
  21. package/dist/commands/rubric/index.js +13 -0
  22. package/dist/commands/rubric/index.js.map +1 -0
  23. package/dist/commands/rubric/list.d.ts +6 -0
  24. package/dist/commands/rubric/list.d.ts.map +1 -0
  25. package/dist/commands/rubric/list.js +14 -0
  26. package/dist/commands/rubric/list.js.map +1 -0
  27. package/dist/commands/rubric/show.d.ts +9 -0
  28. package/dist/commands/rubric/show.d.ts.map +1 -0
  29. package/dist/commands/rubric/show.js +16 -0
  30. package/dist/commands/rubric/show.js.map +1 -0
  31. package/dist/commands/rubric/validate.d.ts +9 -0
  32. package/dist/commands/rubric/validate.d.ts.map +1 -0
  33. package/dist/commands/rubric/validate.js +16 -0
  34. package/dist/commands/rubric/validate.js.map +1 -0
  35. package/dist/commands/test/index.d.ts.map +1 -1
  36. package/dist/commands/test/index.js +2 -0
  37. package/dist/commands/test/index.js.map +1 -1
  38. package/dist/commands/test/promote-criteria.d.ts +10 -0
  39. package/dist/commands/test/promote-criteria.d.ts.map +1 -0
  40. package/dist/commands/test/promote-criteria.js +25 -0
  41. package/dist/commands/test/promote-criteria.js.map +1 -0
  42. package/dist/commands/test/report.d.ts +9 -0
  43. package/dist/commands/test/report.d.ts.map +1 -0
  44. package/dist/commands/test/report.js +18 -0
  45. package/dist/commands/test/report.js.map +1 -0
  46. package/dist/commands/test/run.d.ts +1 -0
  47. package/dist/commands/test/run.d.ts.map +1 -1
  48. package/dist/commands/test/run.js +4 -0
  49. package/dist/commands/test/run.js.map +1 -1
  50. package/dist/commands/test/suite.d.ts +1 -0
  51. package/dist/commands/test/suite.d.ts.map +1 -1
  52. package/dist/commands/test/suite.js +4 -0
  53. package/dist/commands/test/suite.js.map +1 -1
  54. package/dist/init-templates/citizen-builder/.env.example +6 -0
  55. package/dist/init-templates/citizen-builder/docker/Dockerfile +10 -2
  56. package/dist/init-templates/citizen-builder/docker-compose.yml +6 -0
  57. package/dist/init-templates/citizen-builder/scripts/docker-entrypoint.sh +56 -20
  58. package/oclif.manifest.json +1702 -1443
  59. package/package.json +22 -22
@@ -79,7 +79,7 @@
79
79
  "type": "option"
80
80
  },
81
81
  "skip-docker-check": {
82
- "description": "Skip verifying whether Docker Desktop is currently running.",
82
+ "description": "Skip the Docker availability check and assume Docker is running (the stack still starts unless --no-start is passed).",
83
83
  "name": "skip-docker-check",
84
84
  "allowNo": false,
85
85
  "type": "boolean"
@@ -1832,38 +1832,139 @@
1832
1832
  "usage.js"
1833
1833
  ]
1834
1834
  },
1835
- "dbdoc:analyze": {
1835
+ "dev": {
1836
1836
  "aliases": [],
1837
1837
  "args": {},
1838
- "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
1838
+ "description": "Local development tooling: generate, inspect, and tear down the cross-repo pnpm workspace that links sibling repo clones. Run `mj dev usage` for every command's flags, examples, and runtime hints.",
1839
+ "flags": {},
1840
+ "hasDynamicHelp": false,
1841
+ "hidden": false,
1842
+ "hiddenAliases": [],
1843
+ "id": "dev",
1844
+ "pluginAlias": "@memberjunction/cli",
1845
+ "pluginName": "@memberjunction/cli",
1846
+ "pluginType": "core",
1847
+ "strict": true,
1848
+ "enableJsonFlag": false,
1849
+ "isESM": true,
1850
+ "relativePath": [
1851
+ "dist",
1852
+ "commands",
1853
+ "dev",
1854
+ "index.js"
1855
+ ]
1856
+ },
1857
+ "dev:usage": {
1858
+ "aliases": [],
1859
+ "args": {},
1860
+ "description": "Show usage, flags, examples, and runtime hints for every `mj dev` command.",
1861
+ "flags": {
1862
+ "format": {
1863
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
1864
+ "name": "format",
1865
+ "hasDynamicHelp": false,
1866
+ "multiple": false,
1867
+ "options": [
1868
+ "text",
1869
+ "json",
1870
+ "md"
1871
+ ],
1872
+ "type": "option"
1873
+ }
1874
+ },
1875
+ "hasDynamicHelp": false,
1876
+ "hiddenAliases": [],
1877
+ "id": "dev:usage",
1878
+ "pluginAlias": "@memberjunction/cli",
1879
+ "pluginName": "@memberjunction/cli",
1880
+ "pluginType": "core",
1881
+ "strict": true,
1882
+ "enableJsonFlag": false,
1883
+ "isESM": true,
1884
+ "relativePath": [
1885
+ "dist",
1886
+ "commands",
1887
+ "dev",
1888
+ "usage.js"
1889
+ ]
1890
+ },
1891
+ "doctor": {
1892
+ "aliases": [],
1893
+ "args": {},
1894
+ "description": "Diagnose a MemberJunction installation",
1839
1895
  "examples": [
1840
1896
  "<%= config.bin %> <%= command.id %>",
1841
- "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
1842
- "<%= config.bin %> <%= command.id %> --config ./my-config.json"
1897
+ "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
1898
+ "<%= config.bin %> <%= command.id %> --format json",
1899
+ "<%= config.bin %> <%= command.id %> --scope ai",
1900
+ "<%= config.bin %> <%= command.id %> --verbose",
1901
+ "<%= config.bin %> <%= command.id %> --report",
1902
+ "<%= config.bin %> <%= command.id %> --report_extended"
1843
1903
  ],
1844
1904
  "flags": {
1845
- "resume": {
1846
- "char": "r",
1847
- "description": "Resume from an existing state file",
1848
- "name": "resume",
1849
- "required": false,
1905
+ "dir": {
1906
+ "description": "Target directory to diagnose",
1907
+ "name": "dir",
1908
+ "default": ".",
1850
1909
  "hasDynamicHelp": false,
1851
1910
  "multiple": false,
1852
1911
  "type": "option"
1853
1912
  },
1854
- "config": {
1855
- "char": "c",
1856
- "description": "Path to config file",
1857
- "name": "config",
1858
- "default": "./config.json",
1913
+ "scope": {
1914
+ "description": "Diagnostic scope to filter by (install, runtime, ai, metadata, agent)",
1915
+ "name": "scope",
1859
1916
  "hasDynamicHelp": false,
1860
1917
  "multiple": false,
1918
+ "options": [
1919
+ "install",
1920
+ "runtime",
1921
+ "ai",
1922
+ "metadata",
1923
+ "agent"
1924
+ ],
1861
1925
  "type": "option"
1926
+ },
1927
+ "format": {
1928
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
1929
+ "name": "format",
1930
+ "hasDynamicHelp": false,
1931
+ "multiple": false,
1932
+ "options": [
1933
+ "text",
1934
+ "json",
1935
+ "md",
1936
+ "human",
1937
+ "console",
1938
+ "markdown",
1939
+ "compact",
1940
+ "table"
1941
+ ],
1942
+ "type": "option"
1943
+ },
1944
+ "verbose": {
1945
+ "char": "v",
1946
+ "description": "Show detailed output including suggested fixes inline",
1947
+ "name": "verbose",
1948
+ "allowNo": false,
1949
+ "type": "boolean"
1950
+ },
1951
+ "report": {
1952
+ "char": "r",
1953
+ "description": "Generate a diagnostic report file (mj-diagnostic-report.md) for sharing with support",
1954
+ "name": "report",
1955
+ "allowNo": false,
1956
+ "type": "boolean"
1957
+ },
1958
+ "report_extended": {
1959
+ "description": "Generate an extended report with config file snapshots and service startup log capture (~60s longer)",
1960
+ "name": "report_extended",
1961
+ "allowNo": false,
1962
+ "type": "boolean"
1862
1963
  }
1863
1964
  },
1864
1965
  "hasDynamicHelp": false,
1865
1966
  "hiddenAliases": [],
1866
- "id": "dbdoc:analyze",
1967
+ "id": "doctor",
1867
1968
  "pluginAlias": "@memberjunction/cli",
1868
1969
  "pluginName": "@memberjunction/cli",
1869
1970
  "pluginType": "core",
@@ -1873,105 +1974,144 @@
1873
1974
  "relativePath": [
1874
1975
  "dist",
1875
1976
  "commands",
1876
- "dbdoc",
1877
- "analyze.js"
1977
+ "doctor",
1978
+ "index.js"
1878
1979
  ]
1879
1980
  },
1880
- "dbdoc:export-sample-queries": {
1981
+ "doctor:usage": {
1881
1982
  "aliases": [],
1882
1983
  "args": {},
1883
- "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
1884
- "examples": [
1885
- "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
1886
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
1887
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
1888
- "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
1889
- ],
1984
+ "description": "Show usage, flags, examples, and runtime hints for every `mj doctor` command.",
1890
1985
  "flags": {
1891
- "input": {
1892
- "char": "i",
1893
- "description": "Path to sample-queries.json file generated by generate-queries command",
1894
- "name": "input",
1895
- "required": true,
1986
+ "format": {
1987
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
1988
+ "name": "format",
1896
1989
  "hasDynamicHelp": false,
1897
1990
  "multiple": false,
1991
+ "options": [
1992
+ "text",
1993
+ "json",
1994
+ "md"
1995
+ ],
1898
1996
  "type": "option"
1899
- },
1900
- "output": {
1901
- "char": "o",
1902
- "description": "Output path for the .queries.json metadata file",
1903
- "name": "output",
1904
- "required": true,
1997
+ }
1998
+ },
1999
+ "hasDynamicHelp": false,
2000
+ "hiddenAliases": [],
2001
+ "id": "doctor:usage",
2002
+ "pluginAlias": "@memberjunction/cli",
2003
+ "pluginName": "@memberjunction/cli",
2004
+ "pluginType": "core",
2005
+ "strict": true,
2006
+ "enableJsonFlag": false,
2007
+ "isESM": true,
2008
+ "relativePath": [
2009
+ "dist",
2010
+ "commands",
2011
+ "doctor",
2012
+ "usage.js"
2013
+ ]
2014
+ },
2015
+ "install:claude": {
2016
+ "aliases": [],
2017
+ "args": {},
2018
+ "description": "Install or refresh the Claude Code pack in the current directory.",
2019
+ "examples": [
2020
+ "<%= config.bin %> install:claude",
2021
+ "<%= config.bin %> install:claude --dry-run",
2022
+ "<%= config.bin %> install:claude --from ./local-pack",
2023
+ "<%= config.bin %> install:claude --json"
2024
+ ],
2025
+ "flags": {
2026
+ "dir": {
2027
+ "description": "Target directory for the install",
2028
+ "name": "dir",
2029
+ "default": ".",
1905
2030
  "hasDynamicHelp": false,
1906
2031
  "multiple": false,
1907
2032
  "type": "option"
1908
2033
  },
1909
- "separate-sql-files": {
1910
- "description": "Write SQL to separate files and use @file: references",
1911
- "name": "separate-sql-files",
1912
- "allowNo": false,
1913
- "type": "boolean"
1914
- },
1915
- "sql-dir": {
1916
- "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
1917
- "name": "sql-dir",
1918
- "default": "SQL",
2034
+ "major": {
2035
+ "description": "Force a specific MJ major (default: detected from package.json)",
2036
+ "name": "major",
1919
2037
  "hasDynamicHelp": false,
1920
2038
  "multiple": false,
1921
2039
  "type": "option"
1922
2040
  },
1923
- "category": {
1924
- "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
1925
- "name": "category",
1926
- "required": false,
2041
+ "ref": {
2042
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
2043
+ "name": "ref",
1927
2044
  "hasDynamicHelp": false,
1928
2045
  "multiple": false,
1929
2046
  "type": "option"
1930
2047
  },
1931
- "status": {
1932
- "description": "Status to assign to exported queries",
1933
- "name": "status",
1934
- "default": "Pending",
2048
+ "from": {
2049
+ "description": "Use a local pack source instead of fetching from GitHub",
2050
+ "name": "from",
1935
2051
  "hasDynamicHelp": false,
1936
2052
  "multiple": false,
1937
- "options": [
1938
- "Approved",
1939
- "Pending",
1940
- "Rejected",
1941
- "Expired"
1942
- ],
1943
2053
  "type": "option"
1944
2054
  },
1945
- "min-confidence": {
1946
- "description": "Minimum confidence threshold to export (0-1)",
1947
- "name": "min-confidence",
1948
- "default": "0",
1949
- "hasDynamicHelp": false,
1950
- "multiple": false,
1951
- "type": "option"
2055
+ "offline": {
2056
+ "description": "Forbid network; requires --from <path>",
2057
+ "name": "offline",
2058
+ "allowNo": false,
2059
+ "type": "boolean"
2060
+ },
2061
+ "dry-run": {
2062
+ "description": "Print what would be written; change nothing",
2063
+ "name": "dry-run",
2064
+ "allowNo": false,
2065
+ "type": "boolean"
2066
+ },
2067
+ "yes": {
2068
+ "char": "y",
2069
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
2070
+ "name": "yes",
2071
+ "allowNo": false,
2072
+ "type": "boolean"
2073
+ },
2074
+ "force": {
2075
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
2076
+ "name": "force",
2077
+ "allowNo": false,
2078
+ "type": "boolean"
2079
+ },
2080
+ "skip-commands": {
2081
+ "description": "Skip seeding .claude/commands/",
2082
+ "name": "skip-commands",
2083
+ "allowNo": false,
2084
+ "type": "boolean"
2085
+ },
2086
+ "skip-skills": {
2087
+ "description": "Skip seeding .claude/skills/",
2088
+ "name": "skip-skills",
2089
+ "allowNo": false,
2090
+ "type": "boolean"
1952
2091
  },
1953
- "validated-only": {
1954
- "description": "Only export queries that were successfully validated",
1955
- "name": "validated-only",
2092
+ "skip-settings": {
2093
+ "description": "Skip merging .claude/settings.json",
2094
+ "name": "skip-settings",
1956
2095
  "allowNo": false,
1957
2096
  "type": "boolean"
1958
2097
  },
1959
- "append": {
1960
- "description": "Append to existing metadata file instead of overwriting",
1961
- "name": "append",
2098
+ "json": {
2099
+ "description": "Output as JSON (matches plan §7.5 schema)",
2100
+ "name": "json",
1962
2101
  "allowNo": false,
1963
2102
  "type": "boolean"
1964
2103
  },
1965
- "include-primary-key": {
1966
- "description": "Include primaryKey and sync fields (for updating existing records)",
1967
- "name": "include-primary-key",
2104
+ "verbose": {
2105
+ "char": "v",
2106
+ "description": "Show progress messages from the fetcher and merger",
2107
+ "name": "verbose",
1968
2108
  "allowNo": false,
1969
2109
  "type": "boolean"
1970
2110
  }
1971
2111
  },
1972
2112
  "hasDynamicHelp": false,
1973
2113
  "hiddenAliases": [],
1974
- "id": "dbdoc:export-sample-queries",
2114
+ "id": "install:claude",
1975
2115
  "pluginAlias": "@memberjunction/cli",
1976
2116
  "pluginName": "@memberjunction/cli",
1977
2117
  "pluginType": "core",
@@ -1981,100 +2121,152 @@
1981
2121
  "relativePath": [
1982
2122
  "dist",
1983
2123
  "commands",
1984
- "dbdoc",
1985
- "export-sample-queries.js"
2124
+ "install",
2125
+ "claude.js"
1986
2126
  ]
1987
2127
  },
1988
- "dbdoc:export": {
2128
+ "install": {
1989
2129
  "aliases": [],
1990
2130
  "args": {},
1991
- "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
2131
+ "description": "Install MemberJunction from a GitHub release",
1992
2132
  "examples": [
1993
- "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
1994
- "<%= config.bin %> <%= command.id %> --sql",
1995
- "<%= config.bin %> <%= command.id %> --markdown",
1996
- "<%= config.bin %> <%= command.id %> --html",
1997
- "<%= config.bin %> <%= command.id %> --csv",
1998
- "<%= config.bin %> <%= command.id %> --mermaid",
1999
- "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
2133
+ "<%= config.bin %> <%= command.id %>",
2134
+ "<%= config.bin %> <%= command.id %> -t v4.3.0",
2135
+ "<%= config.bin %> <%= command.id %> --dry-run",
2136
+ "<%= config.bin %> <%= command.id %> --yes"
2000
2137
  ],
2001
2138
  "flags": {
2002
- "state-file": {
2003
- "char": "s",
2004
- "description": "Path to state JSON file",
2005
- "name": "state-file",
2139
+ "tag": {
2140
+ "char": "t",
2141
+ "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
2142
+ "name": "tag",
2006
2143
  "hasDynamicHelp": false,
2007
2144
  "multiple": false,
2008
2145
  "type": "option"
2009
2146
  },
2010
- "output-dir": {
2011
- "char": "o",
2012
- "description": "Output directory for generated files",
2013
- "name": "output-dir",
2147
+ "dir": {
2148
+ "description": "Target directory for the installation",
2149
+ "name": "dir",
2150
+ "default": ".",
2014
2151
  "hasDynamicHelp": false,
2015
2152
  "multiple": false,
2016
2153
  "type": "option"
2017
2154
  },
2018
- "sql": {
2019
- "description": "Generate SQL script",
2020
- "name": "sql",
2155
+ "config": {
2156
+ "char": "c",
2157
+ "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
2158
+ "name": "config",
2159
+ "hasDynamicHelp": false,
2160
+ "multiple": false,
2161
+ "type": "option"
2162
+ },
2163
+ "legacy": {
2164
+ "description": "Use the legacy interactive installer (ZIP-only distribution)",
2165
+ "hidden": true,
2166
+ "name": "legacy",
2021
2167
  "allowNo": false,
2022
2168
  "type": "boolean"
2023
2169
  },
2024
- "markdown": {
2025
- "description": "Generate Markdown documentation",
2026
- "name": "markdown",
2170
+ "dry-run": {
2171
+ "description": "Show the install plan without executing it",
2172
+ "name": "dry-run",
2027
2173
  "allowNo": false,
2028
2174
  "type": "boolean"
2029
2175
  },
2030
- "html": {
2031
- "description": "Generate interactive HTML documentation",
2032
- "name": "html",
2176
+ "yes": {
2177
+ "char": "y",
2178
+ "description": "Non-interactive mode: auto-select latest version and accept defaults",
2179
+ "name": "yes",
2033
2180
  "allowNo": false,
2034
2181
  "type": "boolean"
2035
2182
  },
2036
- "csv": {
2037
- "description": "Generate CSV exports (tables and columns)",
2038
- "name": "csv",
2183
+ "verbose": {
2184
+ "char": "v",
2185
+ "description": "Show detailed output",
2186
+ "name": "verbose",
2039
2187
  "allowNo": false,
2040
2188
  "type": "boolean"
2041
2189
  },
2042
- "mermaid": {
2043
- "description": "Generate Mermaid ERD diagram files",
2044
- "name": "mermaid",
2190
+ "skip-db": {
2191
+ "description": "Skip database provisioning phases",
2192
+ "name": "skip-db",
2045
2193
  "allowNo": false,
2046
2194
  "type": "boolean"
2047
2195
  },
2048
- "report": {
2049
- "description": "Generate analysis report",
2050
- "name": "report",
2196
+ "skip-start": {
2197
+ "description": "Skip service startup and smoke tests",
2198
+ "name": "skip-start",
2051
2199
  "allowNo": false,
2052
2200
  "type": "boolean"
2053
2201
  },
2054
- "apply": {
2055
- "description": "Apply SQL to database",
2056
- "name": "apply",
2202
+ "no-resume": {
2203
+ "description": "Ignore any existing checkpoint and start fresh",
2204
+ "name": "no-resume",
2057
2205
  "allowNo": false,
2058
2206
  "type": "boolean"
2059
2207
  },
2060
- "approved-only": {
2061
- "description": "Only export approved items",
2062
- "name": "approved-only",
2208
+ "fast": {
2209
+ "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
2210
+ "name": "fast",
2063
2211
  "allowNo": false,
2064
2212
  "type": "boolean"
2065
2213
  },
2066
- "confidence-threshold": {
2067
- "description": "Minimum confidence threshold",
2068
- "name": "confidence-threshold",
2069
- "default": "0",
2214
+ "overwrite-config": {
2215
+ "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
2216
+ "name": "overwrite-config",
2217
+ "allowNo": false,
2218
+ "type": "boolean"
2219
+ },
2220
+ "monorepo": {
2221
+ "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
2222
+ "name": "monorepo",
2223
+ "allowNo": false,
2224
+ "type": "boolean"
2225
+ },
2226
+ "no-claude-pack": {
2227
+ "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/ tree) from the scaffold. By default the pack ships with the install so opening Claude Code in your new MJ project gives you the curated MJ-aware experience immediately.",
2228
+ "name": "no-claude-pack",
2229
+ "allowNo": false,
2230
+ "type": "boolean"
2231
+ }
2232
+ },
2233
+ "hasDynamicHelp": false,
2234
+ "hiddenAliases": [],
2235
+ "id": "install",
2236
+ "pluginAlias": "@memberjunction/cli",
2237
+ "pluginName": "@memberjunction/cli",
2238
+ "pluginType": "core",
2239
+ "strict": true,
2240
+ "enableJsonFlag": false,
2241
+ "isESM": true,
2242
+ "relativePath": [
2243
+ "dist",
2244
+ "commands",
2245
+ "install",
2246
+ "index.js"
2247
+ ]
2248
+ },
2249
+ "install:usage": {
2250
+ "aliases": [],
2251
+ "args": {},
2252
+ "description": "Show usage, flags, examples, and runtime hints for every `mj install` command.",
2253
+ "flags": {
2254
+ "format": {
2255
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2256
+ "name": "format",
2070
2257
  "hasDynamicHelp": false,
2071
2258
  "multiple": false,
2259
+ "options": [
2260
+ "text",
2261
+ "json",
2262
+ "md"
2263
+ ],
2072
2264
  "type": "option"
2073
2265
  }
2074
2266
  },
2075
2267
  "hasDynamicHelp": false,
2076
2268
  "hiddenAliases": [],
2077
- "id": "dbdoc:export",
2269
+ "id": "install:usage",
2078
2270
  "pluginAlias": "@memberjunction/cli",
2079
2271
  "pluginName": "@memberjunction/cli",
2080
2272
  "pluginType": "core",
@@ -2084,87 +2276,102 @@
2084
2276
  "relativePath": [
2085
2277
  "dist",
2086
2278
  "commands",
2087
- "dbdoc",
2088
- "export.js"
2279
+ "install",
2280
+ "usage.js"
2089
2281
  ]
2090
2282
  },
2091
- "dbdoc:generate-queries": {
2283
+ "migrate:convert": {
2092
2284
  "aliases": [],
2093
2285
  "args": {},
2094
- "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
2286
+ "description": "Convert T-SQL migrations to PostgreSQL",
2095
2287
  "examples": [
2096
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
2097
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
2098
- "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
2288
+ "<%= config.bin %> migrate convert --split",
2289
+ "<%= config.bin %> migrate convert --split --dry-run",
2290
+ "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
2291
+ "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
2292
+ "<%= config.bin %> migrate convert --verbose"
2099
2293
  ],
2100
2294
  "flags": {
2101
- "from-state": {
2102
- "description": "Path to existing state.json file from previous analysis",
2103
- "name": "from-state",
2104
- "required": true,
2295
+ "source-dir": {
2296
+ "description": "Source T-SQL migrations directory",
2297
+ "name": "source-dir",
2298
+ "default": "./migrations/v5",
2105
2299
  "hasDynamicHelp": false,
2106
2300
  "multiple": false,
2107
2301
  "type": "option"
2108
2302
  },
2109
2303
  "output-dir": {
2110
- "description": "Output directory for generated queries",
2304
+ "description": "Output PG migrations directory",
2111
2305
  "name": "output-dir",
2112
- "required": false,
2306
+ "default": "./migrations-pg/v5",
2113
2307
  "hasDynamicHelp": false,
2114
2308
  "multiple": false,
2115
2309
  "type": "option"
2116
2310
  },
2117
- "config": {
2118
- "char": "c",
2119
- "description": "Path to config file (for database connection and AI settings)",
2120
- "name": "config",
2121
- "default": "./config.json",
2311
+ "file": {
2312
+ "description": "Convert a specific file (filename only, looked up in source-dir)",
2313
+ "name": "file",
2122
2314
  "hasDynamicHelp": false,
2123
2315
  "multiple": false,
2124
2316
  "type": "option"
2125
2317
  },
2126
- "queries-per-table": {
2127
- "description": "Number of queries to generate per table",
2128
- "name": "queries-per-table",
2129
- "required": false,
2318
+ "schema": {
2319
+ "description": "Target schema name",
2320
+ "name": "schema",
2321
+ "default": "__mj",
2322
+ "hasDynamicHelp": false,
2323
+ "multiple": false,
2324
+ "type": "option"
2325
+ },
2326
+ "core-schema": {
2327
+ "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
2328
+ "name": "core-schema",
2329
+ "default": "__mj",
2130
2330
  "hasDynamicHelp": false,
2131
2331
  "multiple": false,
2132
2332
  "type": "option"
2133
2333
  },
2134
- "max-execution-time": {
2135
- "description": "Maximum execution time for query validation (ms)",
2136
- "name": "max-execution-time",
2137
- "required": false,
2138
- "hasDynamicHelp": false,
2139
- "multiple": false,
2140
- "type": "option"
2334
+ "dry-run": {
2335
+ "description": "Show what would be converted without writing files",
2336
+ "name": "dry-run",
2337
+ "allowNo": false,
2338
+ "type": "boolean"
2339
+ },
2340
+ "no-header": {
2341
+ "description": "Skip PG header (extensions, schema, implicit cast)",
2342
+ "name": "no-header",
2343
+ "allowNo": false,
2344
+ "type": "boolean"
2345
+ },
2346
+ "verbose": {
2347
+ "char": "v",
2348
+ "description": "Show per-statement progress",
2349
+ "name": "verbose",
2350
+ "allowNo": false,
2351
+ "type": "boolean"
2352
+ },
2353
+ "split": {
2354
+ "description": "Split-and-regenerate (the standard path): transpile only hand-written DDL via the AST dialect; CodeGen objects are regenerated by `mj codegen` and mj-sync metadata re-seeded by `mj sync push`; every conversion gap is surfaced and fails the run unless --allow-gaps.",
2355
+ "name": "split",
2356
+ "allowNo": false,
2357
+ "type": "boolean"
2358
+ },
2359
+ "allow-gaps": {
2360
+ "description": "Exit 0 even when migrations have conversion gaps — with --split: hand-authoring needed or unhandled statements; on the legacy path: \"-- Could not parse\" / \"-- ERROR converting batch\" markers in the output. Gaps are still embedded as comments and listed in the summary.",
2361
+ "name": "allow-gaps",
2362
+ "allowNo": false,
2363
+ "type": "boolean"
2364
+ },
2365
+ "bake-codegen": {
2366
+ "description": "With --split: bake native PG CodeGen objects inline per migration (Path C), so the set deploys with `mj migrate` alone — no `mj codegen` step. Requires a LIVE working PG database (DB_PLATFORM=postgresql + PG_* env, same as `mj codegen`) seeded to the state just BEFORE the migrations being converted (typically the latest baseline); the converter brings it forward in committed order as it bakes. Not compatible with --dry-run.",
2367
+ "name": "bake-codegen",
2368
+ "allowNo": false,
2369
+ "type": "boolean"
2141
2370
  }
2142
2371
  },
2143
2372
  "hasDynamicHelp": false,
2144
2373
  "hiddenAliases": [],
2145
- "id": "dbdoc:generate-queries",
2146
- "pluginAlias": "@memberjunction/cli",
2147
- "pluginName": "@memberjunction/cli",
2148
- "pluginType": "core",
2149
- "strict": true,
2150
- "enableJsonFlag": false,
2151
- "isESM": true,
2152
- "relativePath": [
2153
- "dist",
2154
- "commands",
2155
- "dbdoc",
2156
- "generate-queries.js"
2157
- ]
2158
- },
2159
- "dbdoc": {
2160
- "aliases": [],
2161
- "args": {},
2162
- "description": "AI-powered database documentation generator",
2163
- "flags": {},
2164
- "hasDynamicHelp": false,
2165
- "hidden": false,
2166
- "hiddenAliases": [],
2167
- "id": "dbdoc",
2374
+ "id": "migrate:convert",
2168
2375
  "pluginAlias": "@memberjunction/cli",
2169
2376
  "pluginName": "@memberjunction/cli",
2170
2377
  "pluginType": "core",
@@ -2174,21 +2381,63 @@
2174
2381
  "relativePath": [
2175
2382
  "dist",
2176
2383
  "commands",
2177
- "dbdoc",
2178
- "index.js"
2384
+ "migrate",
2385
+ "convert.js"
2179
2386
  ]
2180
2387
  },
2181
- "dbdoc:init": {
2388
+ "migrate:create": {
2182
2389
  "aliases": [],
2183
- "args": {},
2184
- "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
2390
+ "args": {
2391
+ "description": {
2392
+ "description": "Short description (will be converted to PascalCase with underscores)",
2393
+ "name": "description",
2394
+ "required": true
2395
+ }
2396
+ },
2397
+ "description": "Scaffold a new migration file for the current database platform",
2185
2398
  "examples": [
2186
- "<%= config.bin %> <%= command.id %>"
2399
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
2400
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
2401
+ "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
2187
2402
  ],
2188
- "flags": {},
2403
+ "flags": {
2404
+ "version": {
2405
+ "char": "v",
2406
+ "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
2407
+ "name": "version",
2408
+ "hasDynamicHelp": false,
2409
+ "multiple": false,
2410
+ "type": "option"
2411
+ },
2412
+ "platform": {
2413
+ "char": "p",
2414
+ "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
2415
+ "name": "platform",
2416
+ "hasDynamicHelp": false,
2417
+ "multiple": false,
2418
+ "options": [
2419
+ "sqlserver",
2420
+ "postgresql"
2421
+ ],
2422
+ "type": "option"
2423
+ },
2424
+ "dir": {
2425
+ "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
2426
+ "name": "dir",
2427
+ "hasDynamicHelp": false,
2428
+ "multiple": false,
2429
+ "type": "option"
2430
+ },
2431
+ "x-x": {
2432
+ "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
2433
+ "name": "x-x",
2434
+ "allowNo": false,
2435
+ "type": "boolean"
2436
+ }
2437
+ },
2189
2438
  "hasDynamicHelp": false,
2190
2439
  "hiddenAliases": [],
2191
- "id": "dbdoc:init",
2440
+ "id": "migrate:create",
2192
2441
  "pluginAlias": "@memberjunction/cli",
2193
2442
  "pluginName": "@memberjunction/cli",
2194
2443
  "pluginType": "core",
@@ -2198,30 +2447,60 @@
2198
2447
  "relativePath": [
2199
2448
  "dist",
2200
2449
  "commands",
2201
- "dbdoc",
2202
- "init.js"
2450
+ "migrate",
2451
+ "create.js"
2203
2452
  ]
2204
2453
  },
2205
- "dbdoc:reset": {
2454
+ "migrate": {
2206
2455
  "aliases": [],
2207
2456
  "args": {},
2208
- "description": "Reset analysis state (delegates to db-auto-doc reset)",
2457
+ "description": "Migrate MemberJunction database to latest version. Open App migrates also run the core metadata-heal procs (same work as R__RefreshMetadata) scoped to the app schema, on SQL Server and PostgreSQL.",
2209
2458
  "examples": [
2210
- "<%= config.bin %> <%= command.id %>",
2211
- "<%= config.bin %> <%= command.id %> --force"
2459
+ "<%= config.bin %> <%= command.id %>\n",
2460
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
2461
+ "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
2212
2462
  ],
2213
2463
  "flags": {
2214
- "force": {
2215
- "char": "f",
2216
- "description": "Force reset without confirmation",
2217
- "name": "force",
2464
+ "verbose": {
2465
+ "char": "v",
2466
+ "description": "Enable additional logging",
2467
+ "name": "verbose",
2468
+ "allowNo": false,
2469
+ "type": "boolean"
2470
+ },
2471
+ "tag": {
2472
+ "char": "t",
2473
+ "description": "Version tag to use for running remote migrations",
2474
+ "name": "tag",
2475
+ "hasDynamicHelp": false,
2476
+ "multiple": false,
2477
+ "type": "option"
2478
+ },
2479
+ "schema": {
2480
+ "char": "s",
2481
+ "description": "Target schema (overrides coreSchema from config)",
2482
+ "name": "schema",
2483
+ "hasDynamicHelp": false,
2484
+ "multiple": false,
2485
+ "type": "option"
2486
+ },
2487
+ "dir": {
2488
+ "description": "Migration source directory (overrides migrationsLocation from config)",
2489
+ "name": "dir",
2490
+ "hasDynamicHelp": false,
2491
+ "multiple": false,
2492
+ "type": "option"
2493
+ },
2494
+ "check-connection": {
2495
+ "description": "Verify the database connection (including TLS) and exit without migrating",
2496
+ "name": "check-connection",
2218
2497
  "allowNo": false,
2219
2498
  "type": "boolean"
2220
2499
  }
2221
2500
  },
2222
2501
  "hasDynamicHelp": false,
2223
2502
  "hiddenAliases": [],
2224
- "id": "dbdoc:reset",
2503
+ "id": "migrate",
2225
2504
  "pluginAlias": "@memberjunction/cli",
2226
2505
  "pluginName": "@memberjunction/cli",
2227
2506
  "pluginType": "core",
@@ -2231,31 +2510,68 @@
2231
2510
  "relativePath": [
2232
2511
  "dist",
2233
2512
  "commands",
2234
- "dbdoc",
2235
- "reset.js"
2513
+ "migrate",
2514
+ "index.js"
2236
2515
  ]
2237
2516
  },
2238
- "dbdoc:status": {
2517
+ "migrate:rebake": {
2239
2518
  "aliases": [],
2240
2519
  "args": {},
2241
- "description": "Show analysis status and progress (delegates to db-auto-doc status)",
2520
+ "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
2242
2521
  "examples": [
2243
- "<%= config.bin %> <%= command.id %>",
2244
- "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
2522
+ "<%= config.bin %> migrate rebake",
2523
+ "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
2245
2524
  ],
2246
2525
  "flags": {
2247
- "state-file": {
2248
- "char": "s",
2249
- "description": "Path to state JSON file",
2250
- "name": "state-file",
2526
+ "source-dir": {
2527
+ "description": "Source T-SQL migrations directory",
2528
+ "name": "source-dir",
2529
+ "default": "./migrations/v5",
2530
+ "hasDynamicHelp": false,
2531
+ "multiple": false,
2532
+ "type": "option"
2533
+ },
2534
+ "output-dir": {
2535
+ "description": "PG migrations directory (committed files read here + baked output written here)",
2536
+ "name": "output-dir",
2537
+ "default": "./migrations-pg/v5",
2538
+ "hasDynamicHelp": false,
2539
+ "multiple": false,
2540
+ "type": "option"
2541
+ },
2542
+ "schema": {
2543
+ "description": "Target schema name",
2544
+ "name": "schema",
2545
+ "default": "__mj",
2546
+ "hasDynamicHelp": false,
2547
+ "multiple": false,
2548
+ "type": "option"
2549
+ },
2550
+ "core-schema": {
2551
+ "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
2552
+ "name": "core-schema",
2553
+ "default": "__mj",
2554
+ "hasDynamicHelp": false,
2555
+ "multiple": false,
2556
+ "type": "option"
2557
+ },
2558
+ "baseline-floor": {
2559
+ "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
2560
+ "name": "baseline-floor",
2251
2561
  "hasDynamicHelp": false,
2252
2562
  "multiple": false,
2253
2563
  "type": "option"
2564
+ },
2565
+ "dry-run": {
2566
+ "description": "Report what would be re-baked without writing files",
2567
+ "name": "dry-run",
2568
+ "allowNo": false,
2569
+ "type": "boolean"
2254
2570
  }
2255
2571
  },
2256
2572
  "hasDynamicHelp": false,
2257
2573
  "hiddenAliases": [],
2258
- "id": "dbdoc:status",
2574
+ "id": "migrate:rebake",
2259
2575
  "pluginAlias": "@memberjunction/cli",
2260
2576
  "pluginName": "@memberjunction/cli",
2261
2577
  "pluginType": "core",
@@ -2265,14 +2581,14 @@
2265
2581
  "relativePath": [
2266
2582
  "dist",
2267
2583
  "commands",
2268
- "dbdoc",
2269
- "status.js"
2584
+ "migrate",
2585
+ "rebake.js"
2270
2586
  ]
2271
2587
  },
2272
- "dbdoc:usage": {
2588
+ "migrate:usage": {
2273
2589
  "aliases": [],
2274
2590
  "args": {},
2275
- "description": "Show usage, flags, examples, and runtime hints for every `mj dbdoc` command.",
2591
+ "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
2276
2592
  "flags": {
2277
2593
  "format": {
2278
2594
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -2289,7 +2605,7 @@
2289
2605
  },
2290
2606
  "hasDynamicHelp": false,
2291
2607
  "hiddenAliases": [],
2292
- "id": "dbdoc:usage",
2608
+ "id": "migrate:usage",
2293
2609
  "pluginAlias": "@memberjunction/cli",
2294
2610
  "pluginName": "@memberjunction/cli",
2295
2611
  "pluginType": "core",
@@ -2299,19 +2615,41 @@
2299
2615
  "relativePath": [
2300
2616
  "dist",
2301
2617
  "commands",
2302
- "dbdoc",
2618
+ "migrate",
2303
2619
  "usage.js"
2304
2620
  ]
2305
2621
  },
2306
- "dev": {
2622
+ "plugin:add": {
2307
2623
  "aliases": [],
2308
- "args": {},
2309
- "description": "Local development tooling: generate, inspect, and tear down the cross-repo pnpm workspace that links sibling repo clones. Run `mj dev usage` for every command's flags, examples, and runtime hints.",
2310
- "flags": {},
2624
+ "args": {
2625
+ "package": {
2626
+ "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
2627
+ "name": "package",
2628
+ "required": true
2629
+ }
2630
+ },
2631
+ "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
2632
+ "examples": [
2633
+ "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
2634
+ "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
2635
+ ],
2636
+ "flags": {
2637
+ "format": {
2638
+ "description": "Output format",
2639
+ "name": "format",
2640
+ "default": "text",
2641
+ "hasDynamicHelp": false,
2642
+ "multiple": false,
2643
+ "options": [
2644
+ "text",
2645
+ "json"
2646
+ ],
2647
+ "type": "option"
2648
+ }
2649
+ },
2311
2650
  "hasDynamicHelp": false,
2312
- "hidden": false,
2313
2651
  "hiddenAliases": [],
2314
- "id": "dev",
2652
+ "id": "plugin:add",
2315
2653
  "pluginAlias": "@memberjunction/cli",
2316
2654
  "pluginName": "@memberjunction/cli",
2317
2655
  "pluginType": "core",
@@ -2321,14 +2659,14 @@
2321
2659
  "relativePath": [
2322
2660
  "dist",
2323
2661
  "commands",
2324
- "dev",
2325
- "index.js"
2662
+ "plugin",
2663
+ "add.js"
2326
2664
  ]
2327
2665
  },
2328
- "dev:usage": {
2666
+ "plugin:usage": {
2329
2667
  "aliases": [],
2330
2668
  "args": {},
2331
- "description": "Show usage, flags, examples, and runtime hints for every `mj dev` command.",
2669
+ "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
2332
2670
  "flags": {
2333
2671
  "format": {
2334
2672
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -2345,7 +2683,7 @@
2345
2683
  },
2346
2684
  "hasDynamicHelp": false,
2347
2685
  "hiddenAliases": [],
2348
- "id": "dev:usage",
2686
+ "id": "plugin:usage",
2349
2687
  "pluginAlias": "@memberjunction/cli",
2350
2688
  "pluginName": "@memberjunction/cli",
2351
2689
  "pluginType": "core",
@@ -2355,87 +2693,42 @@
2355
2693
  "relativePath": [
2356
2694
  "dist",
2357
2695
  "commands",
2358
- "dev",
2696
+ "plugin",
2359
2697
  "usage.js"
2360
2698
  ]
2361
2699
  },
2362
- "doctor": {
2700
+ "dbdoc:analyze": {
2363
2701
  "aliases": [],
2364
2702
  "args": {},
2365
- "description": "Diagnose a MemberJunction installation",
2703
+ "description": "Analyze database and generate documentation (delegates to db-auto-doc analyze)",
2366
2704
  "examples": [
2367
2705
  "<%= config.bin %> <%= command.id %>",
2368
- "<%= config.bin %> <%= command.id %> --dir ./my-mj-project",
2369
- "<%= config.bin %> <%= command.id %> --format json",
2370
- "<%= config.bin %> <%= command.id %> --scope ai",
2371
- "<%= config.bin %> <%= command.id %> --verbose",
2372
- "<%= config.bin %> <%= command.id %> --report",
2373
- "<%= config.bin %> <%= command.id %> --report_extended"
2706
+ "<%= config.bin %> <%= command.id %> --resume ./output/run-6/state.json",
2707
+ "<%= config.bin %> <%= command.id %> --config ./my-config.json"
2374
2708
  ],
2375
2709
  "flags": {
2376
- "dir": {
2377
- "description": "Target directory to diagnose",
2378
- "name": "dir",
2379
- "default": ".",
2380
- "hasDynamicHelp": false,
2381
- "multiple": false,
2382
- "type": "option"
2383
- },
2384
- "scope": {
2385
- "description": "Diagnostic scope to filter by (install, runtime, ai, metadata, agent)",
2386
- "name": "scope",
2710
+ "resume": {
2711
+ "char": "r",
2712
+ "description": "Resume from an existing state file",
2713
+ "name": "resume",
2714
+ "required": false,
2387
2715
  "hasDynamicHelp": false,
2388
2716
  "multiple": false,
2389
- "options": [
2390
- "install",
2391
- "runtime",
2392
- "ai",
2393
- "metadata",
2394
- "agent"
2395
- ],
2396
2717
  "type": "option"
2397
2718
  },
2398
- "format": {
2399
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
2400
- "name": "format",
2719
+ "config": {
2720
+ "char": "c",
2721
+ "description": "Path to config file",
2722
+ "name": "config",
2723
+ "default": "./config.json",
2401
2724
  "hasDynamicHelp": false,
2402
2725
  "multiple": false,
2403
- "options": [
2404
- "text",
2405
- "json",
2406
- "md",
2407
- "human",
2408
- "console",
2409
- "markdown",
2410
- "compact",
2411
- "table"
2412
- ],
2413
2726
  "type": "option"
2414
- },
2415
- "verbose": {
2416
- "char": "v",
2417
- "description": "Show detailed output including suggested fixes inline",
2418
- "name": "verbose",
2419
- "allowNo": false,
2420
- "type": "boolean"
2421
- },
2422
- "report": {
2423
- "char": "r",
2424
- "description": "Generate a diagnostic report file (mj-diagnostic-report.md) for sharing with support",
2425
- "name": "report",
2426
- "allowNo": false,
2427
- "type": "boolean"
2428
- },
2429
- "report_extended": {
2430
- "description": "Generate an extended report with config file snapshots and service startup log capture (~60s longer)",
2431
- "name": "report_extended",
2432
- "allowNo": false,
2433
- "type": "boolean"
2434
2727
  }
2435
2728
  },
2436
2729
  "hasDynamicHelp": false,
2437
2730
  "hiddenAliases": [],
2438
- "id": "doctor",
2731
+ "id": "dbdoc:analyze",
2439
2732
  "pluginAlias": "@memberjunction/cli",
2440
2733
  "pluginName": "@memberjunction/cli",
2441
2734
  "pluginType": "core",
@@ -2445,31 +2738,105 @@
2445
2738
  "relativePath": [
2446
2739
  "dist",
2447
2740
  "commands",
2448
- "doctor",
2449
- "index.js"
2741
+ "dbdoc",
2742
+ "analyze.js"
2450
2743
  ]
2451
2744
  },
2452
- "doctor:usage": {
2745
+ "dbdoc:export-sample-queries": {
2453
2746
  "aliases": [],
2454
2747
  "args": {},
2455
- "description": "Show usage, flags, examples, and runtime hints for every `mj doctor` command.",
2748
+ "description": "Export sample queries to MemberJunction metadata format (delegates to db-auto-doc export-sample-queries)",
2749
+ "examples": [
2750
+ "<%= config.bin %> <%= command.id %> --input ./output/sample-queries.json --output ./metadata/queries/.queries.json",
2751
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./metadata/queries/.queries.json --separate-sql-files",
2752
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --category \"Database Documentation\"",
2753
+ "<%= config.bin %> <%= command.id %> --input ./sample-queries.json --output ./queries/.queries.json --status Pending --min-confidence 0.8"
2754
+ ],
2456
2755
  "flags": {
2457
- "format": {
2458
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2459
- "name": "format",
2756
+ "input": {
2757
+ "char": "i",
2758
+ "description": "Path to sample-queries.json file generated by generate-queries command",
2759
+ "name": "input",
2760
+ "required": true,
2761
+ "hasDynamicHelp": false,
2762
+ "multiple": false,
2763
+ "type": "option"
2764
+ },
2765
+ "output": {
2766
+ "char": "o",
2767
+ "description": "Output path for the .queries.json metadata file",
2768
+ "name": "output",
2769
+ "required": true,
2770
+ "hasDynamicHelp": false,
2771
+ "multiple": false,
2772
+ "type": "option"
2773
+ },
2774
+ "separate-sql-files": {
2775
+ "description": "Write SQL to separate files and use @file: references",
2776
+ "name": "separate-sql-files",
2777
+ "allowNo": false,
2778
+ "type": "boolean"
2779
+ },
2780
+ "sql-dir": {
2781
+ "description": "Directory for SQL files when using --separate-sql-files (relative to output file)",
2782
+ "name": "sql-dir",
2783
+ "default": "SQL",
2784
+ "hasDynamicHelp": false,
2785
+ "multiple": false,
2786
+ "type": "option"
2787
+ },
2788
+ "category": {
2789
+ "description": "Category name for @lookup reference (e.g., \"Database Documentation\")",
2790
+ "name": "category",
2791
+ "required": false,
2792
+ "hasDynamicHelp": false,
2793
+ "multiple": false,
2794
+ "type": "option"
2795
+ },
2796
+ "status": {
2797
+ "description": "Status to assign to exported queries",
2798
+ "name": "status",
2799
+ "default": "Pending",
2460
2800
  "hasDynamicHelp": false,
2461
2801
  "multiple": false,
2462
2802
  "options": [
2463
- "text",
2464
- "json",
2465
- "md"
2803
+ "Approved",
2804
+ "Pending",
2805
+ "Rejected",
2806
+ "Expired"
2466
2807
  ],
2467
2808
  "type": "option"
2809
+ },
2810
+ "min-confidence": {
2811
+ "description": "Minimum confidence threshold to export (0-1)",
2812
+ "name": "min-confidence",
2813
+ "default": "0",
2814
+ "hasDynamicHelp": false,
2815
+ "multiple": false,
2816
+ "type": "option"
2817
+ },
2818
+ "validated-only": {
2819
+ "description": "Only export queries that were successfully validated",
2820
+ "name": "validated-only",
2821
+ "allowNo": false,
2822
+ "type": "boolean"
2823
+ },
2824
+ "append": {
2825
+ "description": "Append to existing metadata file instead of overwriting",
2826
+ "name": "append",
2827
+ "allowNo": false,
2828
+ "type": "boolean"
2829
+ },
2830
+ "include-primary-key": {
2831
+ "description": "Include primaryKey and sync fields (for updating existing records)",
2832
+ "name": "include-primary-key",
2833
+ "allowNo": false,
2834
+ "type": "boolean"
2468
2835
  }
2469
2836
  },
2470
2837
  "hasDynamicHelp": false,
2471
2838
  "hiddenAliases": [],
2472
- "id": "doctor:usage",
2839
+ "id": "dbdoc:export-sample-queries",
2473
2840
  "pluginAlias": "@memberjunction/cli",
2474
2841
  "pluginName": "@memberjunction/cli",
2475
2842
  "pluginType": "core",
@@ -2479,110 +2846,100 @@
2479
2846
  "relativePath": [
2480
2847
  "dist",
2481
2848
  "commands",
2482
- "doctor",
2483
- "usage.js"
2849
+ "dbdoc",
2850
+ "export-sample-queries.js"
2484
2851
  ]
2485
2852
  },
2486
- "install:claude": {
2853
+ "dbdoc:export": {
2487
2854
  "aliases": [],
2488
2855
  "args": {},
2489
- "description": "Install or refresh the Claude Code pack in the current directory.",
2856
+ "description": "Export documentation in multiple formats (delegates to db-auto-doc export)",
2490
2857
  "examples": [
2491
- "<%= config.bin %> install:claude",
2492
- "<%= config.bin %> install:claude --dry-run",
2493
- "<%= config.bin %> install:claude --from ./local-pack",
2494
- "<%= config.bin %> install:claude --json"
2858
+ "<%= config.bin %> <%= command.id %> --state-file=./db-doc-state.json",
2859
+ "<%= config.bin %> <%= command.id %> --sql",
2860
+ "<%= config.bin %> <%= command.id %> --markdown",
2861
+ "<%= config.bin %> <%= command.id %> --html",
2862
+ "<%= config.bin %> <%= command.id %> --csv",
2863
+ "<%= config.bin %> <%= command.id %> --mermaid",
2864
+ "<%= config.bin %> <%= command.id %> --sql --markdown --html --csv --mermaid --apply"
2495
2865
  ],
2496
2866
  "flags": {
2497
- "dir": {
2498
- "description": "Target directory for the install",
2499
- "name": "dir",
2500
- "default": ".",
2501
- "hasDynamicHelp": false,
2502
- "multiple": false,
2503
- "type": "option"
2504
- },
2505
- "major": {
2506
- "description": "Force a specific MJ major (default: detected from package.json)",
2507
- "name": "major",
2508
- "hasDynamicHelp": false,
2509
- "multiple": false,
2510
- "type": "option"
2511
- },
2512
- "ref": {
2513
- "description": "Git ref to fetch from (branch or tag). Default: main.",
2514
- "name": "ref",
2867
+ "state-file": {
2868
+ "char": "s",
2869
+ "description": "Path to state JSON file",
2870
+ "name": "state-file",
2515
2871
  "hasDynamicHelp": false,
2516
2872
  "multiple": false,
2517
2873
  "type": "option"
2518
2874
  },
2519
- "from": {
2520
- "description": "Use a local pack source instead of fetching from GitHub",
2521
- "name": "from",
2875
+ "output-dir": {
2876
+ "char": "o",
2877
+ "description": "Output directory for generated files",
2878
+ "name": "output-dir",
2522
2879
  "hasDynamicHelp": false,
2523
2880
  "multiple": false,
2524
2881
  "type": "option"
2525
2882
  },
2526
- "offline": {
2527
- "description": "Forbid network; requires --from <path>",
2528
- "name": "offline",
2529
- "allowNo": false,
2530
- "type": "boolean"
2531
- },
2532
- "dry-run": {
2533
- "description": "Print what would be written; change nothing",
2534
- "name": "dry-run",
2883
+ "sql": {
2884
+ "description": "Generate SQL script",
2885
+ "name": "sql",
2535
2886
  "allowNo": false,
2536
2887
  "type": "boolean"
2537
2888
  },
2538
- "yes": {
2539
- "char": "y",
2540
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
2541
- "name": "yes",
2889
+ "markdown": {
2890
+ "description": "Generate Markdown documentation",
2891
+ "name": "markdown",
2542
2892
  "allowNo": false,
2543
2893
  "type": "boolean"
2544
2894
  },
2545
- "force": {
2546
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
2547
- "name": "force",
2895
+ "html": {
2896
+ "description": "Generate interactive HTML documentation",
2897
+ "name": "html",
2548
2898
  "allowNo": false,
2549
2899
  "type": "boolean"
2550
2900
  },
2551
- "skip-commands": {
2552
- "description": "Skip seeding .claude/commands/",
2553
- "name": "skip-commands",
2901
+ "csv": {
2902
+ "description": "Generate CSV exports (tables and columns)",
2903
+ "name": "csv",
2554
2904
  "allowNo": false,
2555
2905
  "type": "boolean"
2556
2906
  },
2557
- "skip-skills": {
2558
- "description": "Skip seeding .claude/skills/",
2559
- "name": "skip-skills",
2907
+ "mermaid": {
2908
+ "description": "Generate Mermaid ERD diagram files",
2909
+ "name": "mermaid",
2560
2910
  "allowNo": false,
2561
2911
  "type": "boolean"
2562
2912
  },
2563
- "skip-settings": {
2564
- "description": "Skip merging .claude/settings.json",
2565
- "name": "skip-settings",
2913
+ "report": {
2914
+ "description": "Generate analysis report",
2915
+ "name": "report",
2566
2916
  "allowNo": false,
2567
2917
  "type": "boolean"
2568
2918
  },
2569
- "json": {
2570
- "description": "Output as JSON (matches plan §7.5 schema)",
2571
- "name": "json",
2919
+ "apply": {
2920
+ "description": "Apply SQL to database",
2921
+ "name": "apply",
2572
2922
  "allowNo": false,
2573
2923
  "type": "boolean"
2574
2924
  },
2575
- "verbose": {
2576
- "char": "v",
2577
- "description": "Show progress messages from the fetcher and merger",
2578
- "name": "verbose",
2925
+ "approved-only": {
2926
+ "description": "Only export approved items",
2927
+ "name": "approved-only",
2579
2928
  "allowNo": false,
2580
2929
  "type": "boolean"
2930
+ },
2931
+ "confidence-threshold": {
2932
+ "description": "Minimum confidence threshold",
2933
+ "name": "confidence-threshold",
2934
+ "default": "0",
2935
+ "hasDynamicHelp": false,
2936
+ "multiple": false,
2937
+ "type": "option"
2581
2938
  }
2582
2939
  },
2583
2940
  "hasDynamicHelp": false,
2584
2941
  "hiddenAliases": [],
2585
- "id": "install:claude",
2942
+ "id": "dbdoc:export",
2586
2943
  "pluginAlias": "@memberjunction/cli",
2587
2944
  "pluginName": "@memberjunction/cli",
2588
2945
  "pluginType": "core",
@@ -2592,118 +2949,65 @@
2592
2949
  "relativePath": [
2593
2950
  "dist",
2594
2951
  "commands",
2595
- "install",
2596
- "claude.js"
2952
+ "dbdoc",
2953
+ "export.js"
2597
2954
  ]
2598
2955
  },
2599
- "install": {
2956
+ "dbdoc:generate-queries": {
2600
2957
  "aliases": [],
2601
2958
  "args": {},
2602
- "description": "Install MemberJunction from a GitHub release",
2959
+ "description": "Generate sample SQL queries from existing analysis state (delegates to db-auto-doc generate-queries)",
2603
2960
  "examples": [
2604
- "<%= config.bin %> <%= command.id %>",
2605
- "<%= config.bin %> <%= command.id %> -t v4.3.0",
2606
- "<%= config.bin %> <%= command.id %> --dry-run",
2607
- "<%= config.bin %> <%= command.id %> --yes"
2961
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json",
2962
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --output-dir ./queries",
2963
+ "<%= config.bin %> <%= command.id %> --from-state ./output/run-1/state.json --queries-per-table 10"
2608
2964
  ],
2609
2965
  "flags": {
2610
- "tag": {
2611
- "char": "t",
2612
- "description": "Release tag to install (e.g. v4.3.0). If omitted, shows a version picker.",
2613
- "name": "tag",
2966
+ "from-state": {
2967
+ "description": "Path to existing state.json file from previous analysis",
2968
+ "name": "from-state",
2969
+ "required": true,
2614
2970
  "hasDynamicHelp": false,
2615
2971
  "multiple": false,
2616
2972
  "type": "option"
2617
2973
  },
2618
- "dir": {
2619
- "description": "Target directory for the installation",
2620
- "name": "dir",
2621
- "default": ".",
2974
+ "output-dir": {
2975
+ "description": "Output directory for generated queries",
2976
+ "name": "output-dir",
2977
+ "required": false,
2622
2978
  "hasDynamicHelp": false,
2623
2979
  "multiple": false,
2624
2980
  "type": "option"
2625
2981
  },
2626
2982
  "config": {
2627
2983
  "char": "c",
2628
- "description": "Path to JSON config file with install settings (database, auth, ports, etc.)",
2984
+ "description": "Path to config file (for database connection and AI settings)",
2629
2985
  "name": "config",
2986
+ "default": "./config.json",
2630
2987
  "hasDynamicHelp": false,
2631
2988
  "multiple": false,
2632
2989
  "type": "option"
2633
2990
  },
2634
- "legacy": {
2635
- "description": "Use the legacy interactive installer (ZIP-only distribution)",
2636
- "hidden": true,
2637
- "name": "legacy",
2638
- "allowNo": false,
2639
- "type": "boolean"
2640
- },
2641
- "dry-run": {
2642
- "description": "Show the install plan without executing it",
2643
- "name": "dry-run",
2644
- "allowNo": false,
2645
- "type": "boolean"
2646
- },
2647
- "yes": {
2648
- "char": "y",
2649
- "description": "Non-interactive mode: auto-select latest version and accept defaults",
2650
- "name": "yes",
2651
- "allowNo": false,
2652
- "type": "boolean"
2653
- },
2654
- "verbose": {
2655
- "char": "v",
2656
- "description": "Show detailed output",
2657
- "name": "verbose",
2658
- "allowNo": false,
2659
- "type": "boolean"
2660
- },
2661
- "skip-db": {
2662
- "description": "Skip database provisioning phases",
2663
- "name": "skip-db",
2664
- "allowNo": false,
2665
- "type": "boolean"
2666
- },
2667
- "skip-start": {
2668
- "description": "Skip service startup and smoke tests",
2669
- "name": "skip-start",
2670
- "allowNo": false,
2671
- "type": "boolean"
2672
- },
2673
- "no-resume": {
2674
- "description": "Ignore any existing checkpoint and start fresh",
2675
- "name": "no-resume",
2676
- "allowNo": false,
2677
- "type": "boolean"
2678
- },
2679
- "fast": {
2680
- "description": "Fast mode: skip smoke test and optimize post-codegen steps. Re-run without --fast if you encounter issues.",
2681
- "name": "fast",
2682
- "allowNo": false,
2683
- "type": "boolean"
2684
- },
2685
- "overwrite-config": {
2686
- "description": "Overwrite existing config files (.env, mj.config.cjs, environment.ts) instead of preserving them",
2687
- "name": "overwrite-config",
2688
- "allowNo": false,
2689
- "type": "boolean"
2690
- },
2691
- "monorepo": {
2692
- "description": "Install the full MemberJunction source repository instead of the lightweight distribution. Use this for MJ framework development.",
2693
- "name": "monorepo",
2694
- "allowNo": false,
2695
- "type": "boolean"
2991
+ "queries-per-table": {
2992
+ "description": "Number of queries to generate per table",
2993
+ "name": "queries-per-table",
2994
+ "required": false,
2995
+ "hasDynamicHelp": false,
2996
+ "multiple": false,
2997
+ "type": "option"
2696
2998
  },
2697
- "no-claude-pack": {
2698
- "description": "Exclude the Claude Code pack (CLAUDE.md + .claude/ tree) from the scaffold. By default the pack ships with the install so opening Claude Code in your new MJ project gives you the curated MJ-aware experience immediately.",
2699
- "name": "no-claude-pack",
2700
- "allowNo": false,
2701
- "type": "boolean"
2999
+ "max-execution-time": {
3000
+ "description": "Maximum execution time for query validation (ms)",
3001
+ "name": "max-execution-time",
3002
+ "required": false,
3003
+ "hasDynamicHelp": false,
3004
+ "multiple": false,
3005
+ "type": "option"
2702
3006
  }
2703
3007
  },
2704
3008
  "hasDynamicHelp": false,
2705
3009
  "hiddenAliases": [],
2706
- "id": "install",
3010
+ "id": "dbdoc:generate-queries",
2707
3011
  "pluginAlias": "@memberjunction/cli",
2708
3012
  "pluginName": "@memberjunction/cli",
2709
3013
  "pluginType": "core",
@@ -2713,31 +3017,76 @@
2713
3017
  "relativePath": [
2714
3018
  "dist",
2715
3019
  "commands",
2716
- "install",
3020
+ "dbdoc",
3021
+ "generate-queries.js"
3022
+ ]
3023
+ },
3024
+ "dbdoc": {
3025
+ "aliases": [],
3026
+ "args": {},
3027
+ "description": "AI-powered database documentation generator",
3028
+ "flags": {},
3029
+ "hasDynamicHelp": false,
3030
+ "hidden": false,
3031
+ "hiddenAliases": [],
3032
+ "id": "dbdoc",
3033
+ "pluginAlias": "@memberjunction/cli",
3034
+ "pluginName": "@memberjunction/cli",
3035
+ "pluginType": "core",
3036
+ "strict": true,
3037
+ "enableJsonFlag": false,
3038
+ "isESM": true,
3039
+ "relativePath": [
3040
+ "dist",
3041
+ "commands",
3042
+ "dbdoc",
2717
3043
  "index.js"
2718
3044
  ]
2719
3045
  },
2720
- "install:usage": {
3046
+ "dbdoc:init": {
2721
3047
  "aliases": [],
2722
3048
  "args": {},
2723
- "description": "Show usage, flags, examples, and runtime hints for every `mj install` command.",
3049
+ "description": "Initialize DBAutoDoc project (delegates to db-auto-doc init)",
3050
+ "examples": [
3051
+ "<%= config.bin %> <%= command.id %>"
3052
+ ],
3053
+ "flags": {},
3054
+ "hasDynamicHelp": false,
3055
+ "hiddenAliases": [],
3056
+ "id": "dbdoc:init",
3057
+ "pluginAlias": "@memberjunction/cli",
3058
+ "pluginName": "@memberjunction/cli",
3059
+ "pluginType": "core",
3060
+ "strict": true,
3061
+ "enableJsonFlag": false,
3062
+ "isESM": true,
3063
+ "relativePath": [
3064
+ "dist",
3065
+ "commands",
3066
+ "dbdoc",
3067
+ "init.js"
3068
+ ]
3069
+ },
3070
+ "dbdoc:reset": {
3071
+ "aliases": [],
3072
+ "args": {},
3073
+ "description": "Reset analysis state (delegates to db-auto-doc reset)",
3074
+ "examples": [
3075
+ "<%= config.bin %> <%= command.id %>",
3076
+ "<%= config.bin %> <%= command.id %> --force"
3077
+ ],
2724
3078
  "flags": {
2725
- "format": {
2726
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
2727
- "name": "format",
2728
- "hasDynamicHelp": false,
2729
- "multiple": false,
2730
- "options": [
2731
- "text",
2732
- "json",
2733
- "md"
2734
- ],
2735
- "type": "option"
3079
+ "force": {
3080
+ "char": "f",
3081
+ "description": "Force reset without confirmation",
3082
+ "name": "force",
3083
+ "allowNo": false,
3084
+ "type": "boolean"
2736
3085
  }
2737
3086
  },
2738
3087
  "hasDynamicHelp": false,
2739
3088
  "hiddenAliases": [],
2740
- "id": "install:usage",
3089
+ "id": "dbdoc:reset",
2741
3090
  "pluginAlias": "@memberjunction/cli",
2742
3091
  "pluginName": "@memberjunction/cli",
2743
3092
  "pluginType": "core",
@@ -2747,41 +3096,31 @@
2747
3096
  "relativePath": [
2748
3097
  "dist",
2749
3098
  "commands",
2750
- "install",
2751
- "usage.js"
3099
+ "dbdoc",
3100
+ "reset.js"
2752
3101
  ]
2753
3102
  },
2754
- "plugin:add": {
3103
+ "dbdoc:status": {
2755
3104
  "aliases": [],
2756
- "args": {
2757
- "package": {
2758
- "description": "Plugin entry-point specifier (package name, subpath, or relative path)",
2759
- "name": "package",
2760
- "required": true
2761
- }
2762
- },
2763
- "description": "Register a CLI plugin package in mj-cli-plugins.json so `mj` loads it at startup.",
3105
+ "args": {},
3106
+ "description": "Show analysis status and progress (delegates to db-auto-doc status)",
2764
3107
  "examples": [
2765
- "<%= config.bin %> <%= command.id %> @my-org/mj-plugin/plugins",
2766
- "<%= config.bin %> <%= command.id %> ./local-plugins/my-tool"
3108
+ "<%= config.bin %> <%= command.id %>",
3109
+ "<%= config.bin %> <%= command.id %> --state-file ./custom-state.json"
2767
3110
  ],
2768
3111
  "flags": {
2769
- "format": {
2770
- "description": "Output format",
2771
- "name": "format",
2772
- "default": "text",
3112
+ "state-file": {
3113
+ "char": "s",
3114
+ "description": "Path to state JSON file",
3115
+ "name": "state-file",
2773
3116
  "hasDynamicHelp": false,
2774
3117
  "multiple": false,
2775
- "options": [
2776
- "text",
2777
- "json"
2778
- ],
2779
3118
  "type": "option"
2780
3119
  }
2781
3120
  },
2782
3121
  "hasDynamicHelp": false,
2783
3122
  "hiddenAliases": [],
2784
- "id": "plugin:add",
3123
+ "id": "dbdoc:status",
2785
3124
  "pluginAlias": "@memberjunction/cli",
2786
3125
  "pluginName": "@memberjunction/cli",
2787
3126
  "pluginType": "core",
@@ -2791,14 +3130,14 @@
2791
3130
  "relativePath": [
2792
3131
  "dist",
2793
3132
  "commands",
2794
- "plugin",
2795
- "add.js"
3133
+ "dbdoc",
3134
+ "status.js"
2796
3135
  ]
2797
3136
  },
2798
- "plugin:usage": {
3137
+ "dbdoc:usage": {
2799
3138
  "aliases": [],
2800
3139
  "args": {},
2801
- "description": "Show usage, flags, examples, and runtime hints for every `mj plugin` command.",
3140
+ "description": "Show usage, flags, examples, and runtime hints for every `mj dbdoc` command.",
2802
3141
  "flags": {
2803
3142
  "format": {
2804
3143
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -2815,7 +3154,7 @@
2815
3154
  },
2816
3155
  "hasDynamicHelp": false,
2817
3156
  "hiddenAliases": [],
2818
- "id": "plugin:usage",
3157
+ "id": "dbdoc:usage",
2819
3158
  "pluginAlias": "@memberjunction/cli",
2820
3159
  "pluginName": "@memberjunction/cli",
2821
3160
  "pluginType": "core",
@@ -2825,7 +3164,7 @@
2825
3164
  "relativePath": [
2826
3165
  "dist",
2827
3166
  "commands",
2828
- "plugin",
3167
+ "dbdoc",
2829
3168
  "usage.js"
2830
3169
  ]
2831
3170
  },
@@ -3179,6 +3518,193 @@
3179
3518
  "usage.js"
3180
3519
  ]
3181
3520
  },
3521
+ "rubric:diff": {
3522
+ "aliases": [],
3523
+ "args": {
3524
+ "rubric": {
3525
+ "description": "Rubric name or id",
3526
+ "name": "rubric",
3527
+ "required": true
3528
+ },
3529
+ "from": {
3530
+ "description": "Version 1.2.0 or id",
3531
+ "name": "from",
3532
+ "required": true
3533
+ },
3534
+ "to": {
3535
+ "description": "Version 1.2.0 or id",
3536
+ "name": "to",
3537
+ "required": true
3538
+ }
3539
+ },
3540
+ "description": "Print the version bump between two rubric versions.",
3541
+ "flags": {},
3542
+ "hasDynamicHelp": false,
3543
+ "hiddenAliases": [],
3544
+ "id": "rubric:diff",
3545
+ "pluginAlias": "@memberjunction/cli",
3546
+ "pluginName": "@memberjunction/cli",
3547
+ "pluginType": "core",
3548
+ "strict": true,
3549
+ "enableJsonFlag": false,
3550
+ "isESM": true,
3551
+ "relativePath": [
3552
+ "dist",
3553
+ "commands",
3554
+ "rubric",
3555
+ "diff.js"
3556
+ ]
3557
+ },
3558
+ "rubric:evaluate": {
3559
+ "aliases": [],
3560
+ "args": {},
3561
+ "description": "Evaluate one record against a rubric. Does not publish.",
3562
+ "flags": {
3563
+ "rubric": {
3564
+ "description": "Rubric name or id, optionally @version",
3565
+ "name": "rubric",
3566
+ "required": true,
3567
+ "hasDynamicHelp": false,
3568
+ "multiple": false,
3569
+ "type": "option"
3570
+ },
3571
+ "entity": {
3572
+ "description": "Subject entity name",
3573
+ "name": "entity",
3574
+ "required": true,
3575
+ "hasDynamicHelp": false,
3576
+ "multiple": false,
3577
+ "type": "option"
3578
+ },
3579
+ "record": {
3580
+ "description": "Subject record id",
3581
+ "name": "record",
3582
+ "required": true,
3583
+ "hasDynamicHelp": false,
3584
+ "multiple": false,
3585
+ "type": "option"
3586
+ },
3587
+ "evaluator": {
3588
+ "description": "LLM or Deterministic",
3589
+ "name": "evaluator",
3590
+ "default": "LLM",
3591
+ "hasDynamicHelp": false,
3592
+ "multiple": false,
3593
+ "type": "option"
3594
+ }
3595
+ },
3596
+ "hasDynamicHelp": false,
3597
+ "hiddenAliases": [],
3598
+ "id": "rubric:evaluate",
3599
+ "pluginAlias": "@memberjunction/cli",
3600
+ "pluginName": "@memberjunction/cli",
3601
+ "pluginType": "core",
3602
+ "strict": true,
3603
+ "enableJsonFlag": false,
3604
+ "isESM": true,
3605
+ "relativePath": [
3606
+ "dist",
3607
+ "commands",
3608
+ "rubric",
3609
+ "evaluate.js"
3610
+ ]
3611
+ },
3612
+ "rubric": {
3613
+ "aliases": [],
3614
+ "args": {},
3615
+ "description": "List, show, diff, validate, and evaluate rubrics.",
3616
+ "flags": {},
3617
+ "hasDynamicHelp": false,
3618
+ "hiddenAliases": [],
3619
+ "id": "rubric",
3620
+ "pluginAlias": "@memberjunction/cli",
3621
+ "pluginName": "@memberjunction/cli",
3622
+ "pluginType": "core",
3623
+ "strict": true,
3624
+ "enableJsonFlag": false,
3625
+ "isESM": true,
3626
+ "relativePath": [
3627
+ "dist",
3628
+ "commands",
3629
+ "rubric",
3630
+ "index.js"
3631
+ ]
3632
+ },
3633
+ "rubric:list": {
3634
+ "aliases": [],
3635
+ "args": {},
3636
+ "description": "List rubrics.",
3637
+ "flags": {},
3638
+ "hasDynamicHelp": false,
3639
+ "hiddenAliases": [],
3640
+ "id": "rubric:list",
3641
+ "pluginAlias": "@memberjunction/cli",
3642
+ "pluginName": "@memberjunction/cli",
3643
+ "pluginType": "core",
3644
+ "strict": true,
3645
+ "enableJsonFlag": false,
3646
+ "isESM": true,
3647
+ "relativePath": [
3648
+ "dist",
3649
+ "commands",
3650
+ "rubric",
3651
+ "list.js"
3652
+ ]
3653
+ },
3654
+ "rubric:show": {
3655
+ "aliases": [],
3656
+ "args": {
3657
+ "rubric": {
3658
+ "description": "Rubric name or id, optionally @version",
3659
+ "name": "rubric",
3660
+ "required": true
3661
+ }
3662
+ },
3663
+ "description": "Show a rubric version and its criteria.",
3664
+ "flags": {},
3665
+ "hasDynamicHelp": false,
3666
+ "hiddenAliases": [],
3667
+ "id": "rubric:show",
3668
+ "pluginAlias": "@memberjunction/cli",
3669
+ "pluginName": "@memberjunction/cli",
3670
+ "pluginType": "core",
3671
+ "strict": true,
3672
+ "enableJsonFlag": false,
3673
+ "isESM": true,
3674
+ "relativePath": [
3675
+ "dist",
3676
+ "commands",
3677
+ "rubric",
3678
+ "show.js"
3679
+ ]
3680
+ },
3681
+ "rubric:validate": {
3682
+ "aliases": [],
3683
+ "args": {
3684
+ "file": {
3685
+ "description": "JSON snapshot file",
3686
+ "name": "file",
3687
+ "required": true
3688
+ }
3689
+ },
3690
+ "description": "Check a rubric snapshot file for duplicate keys, gates, weights, and scales.",
3691
+ "flags": {},
3692
+ "hasDynamicHelp": false,
3693
+ "hiddenAliases": [],
3694
+ "id": "rubric:validate",
3695
+ "pluginAlias": "@memberjunction/cli",
3696
+ "pluginName": "@memberjunction/cli",
3697
+ "pluginType": "core",
3698
+ "strict": true,
3699
+ "enableJsonFlag": false,
3700
+ "isESM": true,
3701
+ "relativePath": [
3702
+ "dist",
3703
+ "commands",
3704
+ "rubric",
3705
+ "validate.js"
3706
+ ]
3707
+ },
3182
3708
  "sql-convert": {
3183
3709
  "aliases": [],
3184
3710
  "args": {
@@ -4066,111 +4592,21 @@
4066
4592
  "dist",
4067
4593
  "commands",
4068
4594
  "sync",
4069
- "push.js"
4070
- ]
4071
- },
4072
- "sync:status": {
4073
- "aliases": [],
4074
- "args": {},
4075
- "description": "Show status of local files vs database",
4076
- "examples": [
4077
- "<%= config.bin %> <%= command.id %>",
4078
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4079
- "<%= config.bin %> <%= command.id %> --verbose"
4080
- ],
4081
- "flags": {
4082
- "dir": {
4083
- "description": "Specific entity directory to check status",
4084
- "name": "dir",
4085
- "hasDynamicHelp": false,
4086
- "multiple": false,
4087
- "type": "option"
4088
- },
4089
- "verbose": {
4090
- "char": "v",
4091
- "description": "Show detailed field-level differences",
4092
- "name": "verbose",
4093
- "allowNo": false,
4094
- "type": "boolean"
4095
- },
4096
- "include": {
4097
- "description": "Only process these directories (comma-separated, supports patterns)",
4098
- "name": "include",
4099
- "hasDynamicHelp": false,
4100
- "multiple": false,
4101
- "type": "option"
4102
- },
4103
- "exclude": {
4104
- "description": "Skip these directories (comma-separated, supports patterns)",
4105
- "name": "exclude",
4106
- "hasDynamicHelp": false,
4107
- "multiple": false,
4108
- "type": "option"
4109
- }
4110
- },
4111
- "hasDynamicHelp": false,
4112
- "hiddenAliases": [],
4113
- "id": "sync:status",
4114
- "pluginAlias": "@memberjunction/cli",
4115
- "pluginName": "@memberjunction/cli",
4116
- "pluginType": "core",
4117
- "strict": true,
4118
- "enableJsonFlag": false,
4119
- "isESM": true,
4120
- "relativePath": [
4121
- "dist",
4122
- "commands",
4123
- "sync",
4124
- "status.js"
4125
- ]
4126
- },
4127
- "sync:usage": {
4128
- "aliases": [],
4129
- "args": {},
4130
- "description": "Show usage, flags, examples, and runtime hints for every `mj sync` command.",
4131
- "flags": {
4132
- "format": {
4133
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4134
- "name": "format",
4135
- "hasDynamicHelp": false,
4136
- "multiple": false,
4137
- "options": [
4138
- "text",
4139
- "json",
4140
- "md"
4141
- ],
4142
- "type": "option"
4143
- }
4144
- },
4145
- "hasDynamicHelp": false,
4146
- "hiddenAliases": [],
4147
- "id": "sync:usage",
4148
- "pluginAlias": "@memberjunction/cli",
4149
- "pluginName": "@memberjunction/cli",
4150
- "pluginType": "core",
4151
- "strict": true,
4152
- "enableJsonFlag": false,
4153
- "isESM": true,
4154
- "relativePath": [
4155
- "dist",
4156
- "commands",
4157
- "sync",
4158
- "usage.js"
4595
+ "push.js"
4159
4596
  ]
4160
4597
  },
4161
- "sync:validate": {
4598
+ "sync:status": {
4162
4599
  "aliases": [],
4163
4600
  "args": {},
4164
- "description": "Validate metadata files",
4601
+ "description": "Show status of local files vs database",
4165
4602
  "examples": [
4166
4603
  "<%= config.bin %> <%= command.id %>",
4167
4604
  "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4168
- "<%= config.bin %> <%= command.id %> --save-report",
4169
4605
  "<%= config.bin %> <%= command.id %> --verbose"
4170
4606
  ],
4171
4607
  "flags": {
4172
4608
  "dir": {
4173
- "description": "Specific entity directory to validate",
4609
+ "description": "Specific entity directory to check status",
4174
4610
  "name": "dir",
4175
4611
  "hasDynamicHelp": false,
4176
4612
  "multiple": false,
@@ -4178,83 +4614,29 @@
4178
4614
  },
4179
4615
  "verbose": {
4180
4616
  "char": "v",
4181
- "description": "Show detailed validation output",
4617
+ "description": "Show detailed field-level differences",
4182
4618
  "name": "verbose",
4183
4619
  "allowNo": false,
4184
4620
  "type": "boolean"
4185
4621
  },
4186
- "save-report": {
4187
- "description": "Save validation report as markdown file",
4188
- "name": "save-report",
4189
- "allowNo": false,
4190
- "type": "boolean"
4191
- },
4192
- "output": {
4193
- "description": "Output file path for validation report (default: validation-report.md)",
4194
- "name": "output",
4195
- "hasDynamicHelp": false,
4196
- "multiple": false,
4197
- "type": "option"
4198
- }
4199
- },
4200
- "hasDynamicHelp": false,
4201
- "hiddenAliases": [],
4202
- "id": "sync:validate",
4203
- "pluginAlias": "@memberjunction/cli",
4204
- "pluginName": "@memberjunction/cli",
4205
- "pluginType": "core",
4206
- "strict": true,
4207
- "enableJsonFlag": false,
4208
- "isESM": true,
4209
- "relativePath": [
4210
- "dist",
4211
- "commands",
4212
- "sync",
4213
- "validate.js"
4214
- ]
4215
- },
4216
- "sync:watch": {
4217
- "aliases": [],
4218
- "args": {},
4219
- "description": "Watch for file changes and sync automatically",
4220
- "examples": [
4221
- "<%= config.bin %> <%= command.id %>",
4222
- "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4223
- "<%= config.bin %> <%= command.id %> --debounce=1000",
4224
- "<%= config.bin %> <%= command.id %> --no-validate"
4225
- ],
4226
- "flags": {
4227
- "dir": {
4228
- "description": "Specific entity directory to watch",
4229
- "name": "dir",
4622
+ "include": {
4623
+ "description": "Only process these directories (comma-separated, supports patterns)",
4624
+ "name": "include",
4230
4625
  "hasDynamicHelp": false,
4231
4626
  "multiple": false,
4232
4627
  "type": "option"
4233
4628
  },
4234
- "debounce": {
4235
- "description": "Debounce delay in milliseconds (default: 500)",
4236
- "name": "debounce",
4629
+ "exclude": {
4630
+ "description": "Skip these directories (comma-separated, supports patterns)",
4631
+ "name": "exclude",
4237
4632
  "hasDynamicHelp": false,
4238
4633
  "multiple": false,
4239
4634
  "type": "option"
4240
- },
4241
- "no-validate": {
4242
- "description": "Skip validation before sync",
4243
- "name": "no-validate",
4244
- "allowNo": false,
4245
- "type": "boolean"
4246
- },
4247
- "verbose": {
4248
- "char": "v",
4249
- "description": "Show detailed output",
4250
- "name": "verbose",
4251
- "allowNo": false,
4252
- "type": "boolean"
4253
4635
  }
4254
4636
  },
4255
4637
  "hasDynamicHelp": false,
4256
4638
  "hiddenAliases": [],
4257
- "id": "sync:watch",
4639
+ "id": "sync:status",
4258
4640
  "pluginAlias": "@memberjunction/cli",
4259
4641
  "pluginName": "@memberjunction/cli",
4260
4642
  "pluginType": "core",
@@ -4265,113 +4647,30 @@
4265
4647
  "dist",
4266
4648
  "commands",
4267
4649
  "sync",
4268
- "watch.js"
4650
+ "status.js"
4269
4651
  ]
4270
4652
  },
4271
- "test:compare": {
4653
+ "sync:usage": {
4272
4654
  "aliases": [],
4273
- "args": {
4274
- "runId1": {
4275
- "description": "First test run ID to compare",
4276
- "name": "runId1",
4277
- "required": false
4278
- },
4279
- "runId2": {
4280
- "description": "Second test run ID to compare",
4281
- "name": "runId2",
4282
- "required": false
4283
- }
4284
- },
4285
- "description": "Compare test runs for regression detection",
4286
- "examples": [
4287
- "<%= config.bin %> <%= command.id %>",
4288
- "<%= config.bin %> <%= command.id %> --latest",
4289
- "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
4290
- "<%= config.bin %> <%= command.id %> -v 5.17.0 -v 5.18.0",
4291
- "<%= config.bin %> <%= command.id %> -c abc1234 -c def5678",
4292
- "<%= config.bin %> <%= command.id %> --from-json baseline.json latest.json",
4293
- "<%= config.bin %> <%= command.id %> --latest --format=markdown --output=report.md"
4294
- ],
4655
+ "args": {},
4656
+ "description": "Show usage, flags, examples, and runtime hints for every `mj sync` command.",
4295
4657
  "flags": {
4296
- "version": {
4297
- "char": "v",
4298
- "description": "Compare runs by version",
4299
- "name": "version",
4300
- "hasDynamicHelp": false,
4301
- "multiple": true,
4302
- "type": "option"
4303
- },
4304
- "commit": {
4305
- "char": "c",
4306
- "description": "Compare runs by git commit",
4307
- "name": "commit",
4308
- "hasDynamicHelp": false,
4309
- "multiple": true,
4310
- "type": "option"
4311
- },
4312
- "diff-only": {
4313
- "description": "Show only differences",
4314
- "name": "diff-only",
4315
- "allowNo": false,
4316
- "type": "boolean"
4317
- },
4318
- "latest": {
4319
- "char": "l",
4320
- "description": "Compare the two most recent completed suite runs",
4321
- "name": "latest",
4322
- "allowNo": false,
4323
- "type": "boolean"
4324
- },
4325
- "from-json": {
4326
- "description": "Compare two results.json files directly (no DB). Pass twice: --from-json PREV --from-json CURR",
4327
- "name": "from-json",
4328
- "hasDynamicHelp": false,
4329
- "multiple": true,
4330
- "type": "option"
4331
- },
4332
4658
  "format": {
4333
- "char": "f",
4334
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4659
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4335
4660
  "name": "format",
4336
4661
  "hasDynamicHelp": false,
4337
4662
  "multiple": false,
4338
4663
  "options": [
4339
4664
  "text",
4340
4665
  "json",
4341
- "md",
4342
- "human",
4343
- "console",
4344
- "markdown",
4345
- "compact",
4346
- "table"
4666
+ "md"
4347
4667
  ],
4348
4668
  "type": "option"
4349
- },
4350
- "output": {
4351
- "char": "o",
4352
- "description": "Output file path",
4353
- "name": "output",
4354
- "hasDynamicHelp": false,
4355
- "multiple": false,
4356
- "type": "option"
4357
- },
4358
- "verbose": {
4359
- "description": "Show detailed information",
4360
- "name": "verbose",
4361
- "allowNo": false,
4362
- "type": "boolean"
4363
- },
4364
- "tag": {
4365
- "description": "Filter suite runs by tag (matches against MJTestSuiteRunEntity.Tags). Useful for isolating runs from a specific source environment in an archive MJ. DB mode only — --from-json ignores this flag.",
4366
- "name": "tag",
4367
- "hasDynamicHelp": false,
4368
- "multiple": false,
4369
- "type": "option"
4370
4669
  }
4371
4670
  },
4372
4671
  "hasDynamicHelp": false,
4373
4672
  "hiddenAliases": [],
4374
- "id": "test:compare",
4673
+ "id": "sync:usage",
4375
4674
  "pluginAlias": "@memberjunction/cli",
4376
4675
  "pluginName": "@memberjunction/cli",
4377
4676
  "pluginType": "core",
@@ -4381,90 +4680,52 @@
4381
4680
  "relativePath": [
4382
4681
  "dist",
4383
4682
  "commands",
4384
- "test",
4385
- "compare.js"
4683
+ "sync",
4684
+ "usage.js"
4386
4685
  ]
4387
4686
  },
4388
- "test:history": {
4687
+ "sync:validate": {
4389
4688
  "aliases": [],
4390
4689
  "args": {},
4391
- "description": "View test execution history",
4690
+ "description": "Validate metadata files",
4392
4691
  "examples": [
4393
4692
  "<%= config.bin %> <%= command.id %>",
4394
- "<%= config.bin %> <%= command.id %> --test=<test-id>",
4395
- "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
4396
- "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
4397
- "<%= config.bin %> <%= command.id %> --limit=50"
4693
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4694
+ "<%= config.bin %> <%= command.id %> --save-report",
4695
+ "<%= config.bin %> <%= command.id %> --verbose"
4398
4696
  ],
4399
4697
  "flags": {
4400
- "test": {
4401
- "char": "t",
4402
- "description": "Filter by test ID",
4403
- "name": "test",
4404
- "hasDynamicHelp": false,
4405
- "multiple": false,
4406
- "type": "option"
4407
- },
4408
- "recent": {
4409
- "char": "r",
4410
- "description": "Number of recent runs to show",
4411
- "name": "recent",
4412
- "hasDynamicHelp": false,
4413
- "multiple": false,
4414
- "type": "option"
4415
- },
4416
- "from": {
4417
- "description": "Show history from date (YYYY-MM-DD)",
4418
- "name": "from",
4419
- "hasDynamicHelp": false,
4420
- "multiple": false,
4421
- "type": "option"
4422
- },
4423
- "status": {
4424
- "char": "s",
4425
- "description": "Filter by status",
4426
- "name": "status",
4427
- "hasDynamicHelp": false,
4428
- "multiple": false,
4429
- "type": "option"
4430
- },
4431
- "format": {
4432
- "char": "f",
4433
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4434
- "name": "format",
4435
- "hasDynamicHelp": false,
4436
- "multiple": false,
4437
- "options": [
4438
- "text",
4439
- "json",
4440
- "md",
4441
- "human",
4442
- "console",
4443
- "markdown",
4444
- "compact",
4445
- "table"
4446
- ],
4447
- "type": "option"
4448
- },
4449
- "output": {
4450
- "char": "o",
4451
- "description": "Output file path",
4452
- "name": "output",
4698
+ "dir": {
4699
+ "description": "Specific entity directory to validate",
4700
+ "name": "dir",
4453
4701
  "hasDynamicHelp": false,
4454
4702
  "multiple": false,
4455
4703
  "type": "option"
4456
4704
  },
4457
4705
  "verbose": {
4458
4706
  "char": "v",
4459
- "description": "Show detailed information",
4707
+ "description": "Show detailed validation output",
4460
4708
  "name": "verbose",
4461
4709
  "allowNo": false,
4462
4710
  "type": "boolean"
4711
+ },
4712
+ "save-report": {
4713
+ "description": "Save validation report as markdown file",
4714
+ "name": "save-report",
4715
+ "allowNo": false,
4716
+ "type": "boolean"
4717
+ },
4718
+ "output": {
4719
+ "description": "Output file path for validation report (default: validation-report.md)",
4720
+ "name": "output",
4721
+ "hasDynamicHelp": false,
4722
+ "multiple": false,
4723
+ "type": "option"
4463
4724
  }
4464
4725
  },
4465
4726
  "hasDynamicHelp": false,
4466
4727
  "hiddenAliases": [],
4467
- "id": "test:history",
4728
+ "id": "sync:validate",
4468
4729
  "pluginAlias": "@memberjunction/cli",
4469
4730
  "pluginName": "@memberjunction/cli",
4470
4731
  "pluginType": "core",
@@ -4474,26 +4735,52 @@
4474
4735
  "relativePath": [
4475
4736
  "dist",
4476
4737
  "commands",
4477
- "test",
4478
- "history.js"
4738
+ "sync",
4739
+ "validate.js"
4479
4740
  ]
4480
4741
  },
4481
- "test": {
4742
+ "sync:watch": {
4482
4743
  "aliases": [],
4483
4744
  "args": {},
4484
- "description": "MemberJunction Testing Framework - Execute and manage tests",
4745
+ "description": "Watch for file changes and sync automatically",
4485
4746
  "examples": [
4486
- "<%= config.bin %> <%= command.id %> run <test-id>",
4487
- "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
4488
- "<%= config.bin %> <%= command.id %> suite <suite-id>",
4489
- "<%= config.bin %> <%= command.id %> list",
4490
- "<%= config.bin %> <%= command.id %> list --suites",
4491
- "<%= config.bin %> <%= command.id %> validate --all"
4747
+ "<%= config.bin %> <%= command.id %>",
4748
+ "<%= config.bin %> <%= command.id %> --dir=\"ai-prompts\"",
4749
+ "<%= config.bin %> <%= command.id %> --debounce=1000",
4750
+ "<%= config.bin %> <%= command.id %> --no-validate"
4492
4751
  ],
4493
- "flags": {},
4752
+ "flags": {
4753
+ "dir": {
4754
+ "description": "Specific entity directory to watch",
4755
+ "name": "dir",
4756
+ "hasDynamicHelp": false,
4757
+ "multiple": false,
4758
+ "type": "option"
4759
+ },
4760
+ "debounce": {
4761
+ "description": "Debounce delay in milliseconds (default: 500)",
4762
+ "name": "debounce",
4763
+ "hasDynamicHelp": false,
4764
+ "multiple": false,
4765
+ "type": "option"
4766
+ },
4767
+ "no-validate": {
4768
+ "description": "Skip validation before sync",
4769
+ "name": "no-validate",
4770
+ "allowNo": false,
4771
+ "type": "boolean"
4772
+ },
4773
+ "verbose": {
4774
+ "char": "v",
4775
+ "description": "Show detailed output",
4776
+ "name": "verbose",
4777
+ "allowNo": false,
4778
+ "type": "boolean"
4779
+ }
4780
+ },
4494
4781
  "hasDynamicHelp": false,
4495
4782
  "hiddenAliases": [],
4496
- "id": "test",
4783
+ "id": "sync:watch",
4497
4784
  "pluginAlias": "@memberjunction/cli",
4498
4785
  "pluginName": "@memberjunction/cli",
4499
4786
  "pluginType": "core",
@@ -4503,95 +4790,96 @@
4503
4790
  "relativePath": [
4504
4791
  "dist",
4505
4792
  "commands",
4506
- "test",
4507
- "index.js"
4793
+ "sync",
4794
+ "watch.js"
4508
4795
  ]
4509
4796
  },
4510
- "test:list": {
4797
+ "translate-sql": {
4511
4798
  "aliases": [],
4512
4799
  "args": {},
4513
- "description": "List available tests, suites, and types",
4800
+ "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
4514
4801
  "examples": [
4515
- "<%= config.bin %> <%= command.id %>",
4516
- "<%= config.bin %> <%= command.id %> --suites",
4517
- "<%= config.bin %> <%= command.id %> --types",
4518
- "<%= config.bin %> <%= command.id %> --type=agent-eval",
4519
- "<%= config.bin %> <%= command.id %> --tag=smoke",
4520
- "<%= config.bin %> <%= command.id %> --status=active --verbose"
4802
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
4803
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
4804
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
4805
+ "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
4521
4806
  ],
4522
4807
  "flags": {
4523
- "suites": {
4524
- "description": "List test suites instead of tests",
4525
- "name": "suites",
4526
- "allowNo": false,
4527
- "type": "boolean"
4528
- },
4529
- "types": {
4530
- "description": "List test types",
4531
- "name": "types",
4532
- "allowNo": false,
4533
- "type": "boolean"
4534
- },
4535
- "type": {
4536
- "char": "t",
4537
- "description": "Filter by test type",
4538
- "name": "type",
4808
+ "from": {
4809
+ "description": "Source SQL dialect",
4810
+ "name": "from",
4811
+ "required": true,
4539
4812
  "hasDynamicHelp": false,
4540
4813
  "multiple": false,
4814
+ "options": [
4815
+ "sqlserver",
4816
+ "postgresql"
4817
+ ],
4541
4818
  "type": "option"
4542
4819
  },
4543
- "tag": {
4544
- "description": "Filter by tag",
4545
- "name": "tag",
4820
+ "to": {
4821
+ "description": "Target SQL dialect",
4822
+ "name": "to",
4823
+ "required": true,
4546
4824
  "hasDynamicHelp": false,
4547
4825
  "multiple": false,
4826
+ "options": [
4827
+ "sqlserver",
4828
+ "postgresql"
4829
+ ],
4548
4830
  "type": "option"
4549
4831
  },
4550
- "status": {
4551
- "char": "s",
4552
- "description": "Filter by status",
4553
- "name": "status",
4832
+ "scope": {
4833
+ "description": "What to scan for translation",
4834
+ "name": "scope",
4835
+ "default": "all",
4554
4836
  "hasDynamicHelp": false,
4555
4837
  "multiple": false,
4838
+ "options": [
4839
+ "queries",
4840
+ "views",
4841
+ "filters",
4842
+ "all"
4843
+ ],
4556
4844
  "type": "option"
4557
4845
  },
4558
- "format": {
4559
- "char": "f",
4560
- "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
4561
- "name": "format",
4846
+ "sql": {
4847
+ "description": "Translate a single SQL fragment (inline mode)",
4848
+ "name": "sql",
4562
4849
  "hasDynamicHelp": false,
4563
4850
  "multiple": false,
4564
- "options": [
4565
- "text",
4566
- "json",
4567
- "md",
4568
- "human",
4569
- "console",
4570
- "markdown",
4571
- "compact",
4572
- "table"
4573
- ],
4574
4851
  "type": "option"
4575
4852
  },
4853
+ "dry-run": {
4854
+ "description": "Show what would be translated without making changes",
4855
+ "name": "dry-run",
4856
+ "allowNo": false,
4857
+ "type": "boolean"
4858
+ },
4859
+ "review": {
4860
+ "description": "Generate review report only (no writes to database)",
4861
+ "name": "review",
4862
+ "allowNo": false,
4863
+ "type": "boolean"
4864
+ },
4576
4865
  "output": {
4577
4866
  "char": "o",
4578
- "description": "Output file path",
4867
+ "description": "Output directory for the translation report",
4579
4868
  "name": "output",
4580
4869
  "hasDynamicHelp": false,
4581
4870
  "multiple": false,
4582
4871
  "type": "option"
4583
4872
  },
4584
- "verbose": {
4585
- "char": "v",
4586
- "description": "Show detailed information",
4587
- "name": "verbose",
4873
+ "force": {
4874
+ "description": "Re-translate even if platform variants already exist",
4875
+ "name": "force",
4588
4876
  "allowNo": false,
4589
4877
  "type": "boolean"
4590
4878
  }
4591
4879
  },
4592
4880
  "hasDynamicHelp": false,
4593
4881
  "hiddenAliases": [],
4594
- "id": "test:list",
4882
+ "id": "translate-sql",
4595
4883
  "pluginAlias": "@memberjunction/cli",
4596
4884
  "pluginName": "@memberjunction/cli",
4597
4885
  "pluginType": "core",
@@ -4601,42 +4889,103 @@
4601
4889
  "relativePath": [
4602
4890
  "dist",
4603
4891
  "commands",
4604
- "test",
4605
- "list.js"
4892
+ "translate-sql",
4893
+ "index.js"
4606
4894
  ]
4607
4895
  },
4608
- "test:run": {
4896
+ "translate-sql:usage": {
4897
+ "aliases": [],
4898
+ "args": {},
4899
+ "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
4900
+ "flags": {
4901
+ "format": {
4902
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4903
+ "name": "format",
4904
+ "hasDynamicHelp": false,
4905
+ "multiple": false,
4906
+ "options": [
4907
+ "text",
4908
+ "json",
4909
+ "md"
4910
+ ],
4911
+ "type": "option"
4912
+ }
4913
+ },
4914
+ "hasDynamicHelp": false,
4915
+ "hiddenAliases": [],
4916
+ "id": "translate-sql:usage",
4917
+ "pluginAlias": "@memberjunction/cli",
4918
+ "pluginName": "@memberjunction/cli",
4919
+ "pluginType": "core",
4920
+ "strict": true,
4921
+ "enableJsonFlag": false,
4922
+ "isESM": true,
4923
+ "relativePath": [
4924
+ "dist",
4925
+ "commands",
4926
+ "translate-sql",
4927
+ "usage.js"
4928
+ ]
4929
+ },
4930
+ "test:compare": {
4609
4931
  "aliases": [],
4610
4932
  "args": {
4611
- "testId": {
4612
- "description": "Test ID to execute",
4613
- "name": "testId",
4933
+ "runId1": {
4934
+ "description": "First test run ID to compare",
4935
+ "name": "runId1",
4936
+ "required": false
4937
+ },
4938
+ "runId2": {
4939
+ "description": "Second test run ID to compare",
4940
+ "name": "runId2",
4614
4941
  "required": false
4615
4942
  }
4616
4943
  },
4617
- "description": "Execute a single test by ID or name",
4944
+ "description": "Compare test runs for regression detection",
4618
4945
  "examples": [
4619
- "<%= config.bin %> <%= command.id %> <test-id>",
4620
- "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
4621
- "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
4622
- "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
4623
- "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
4946
+ "<%= config.bin %> <%= command.id %>",
4947
+ "<%= config.bin %> <%= command.id %> --latest",
4948
+ "<%= config.bin %> <%= command.id %> <run-id-1> <run-id-2>",
4949
+ "<%= config.bin %> <%= command.id %> -v 5.17.0 -v 5.18.0",
4950
+ "<%= config.bin %> <%= command.id %> -c abc1234 -c def5678",
4951
+ "<%= config.bin %> <%= command.id %> --from-json baseline.json latest.json",
4952
+ "<%= config.bin %> <%= command.id %> --latest --format=markdown --output=report.md"
4624
4953
  ],
4625
4954
  "flags": {
4626
- "name": {
4627
- "char": "n",
4628
- "description": "Test name to execute",
4629
- "name": "name",
4955
+ "version": {
4956
+ "char": "v",
4957
+ "description": "Compare runs by version",
4958
+ "name": "version",
4630
4959
  "hasDynamicHelp": false,
4631
- "multiple": false,
4960
+ "multiple": true,
4961
+ "type": "option"
4962
+ },
4963
+ "commit": {
4964
+ "char": "c",
4965
+ "description": "Compare runs by git commit",
4966
+ "name": "commit",
4967
+ "hasDynamicHelp": false,
4968
+ "multiple": true,
4632
4969
  "type": "option"
4633
4970
  },
4634
- "environment": {
4635
- "char": "e",
4636
- "description": "Environment context (dev, staging, prod)",
4637
- "name": "environment",
4971
+ "diff-only": {
4972
+ "description": "Show only differences",
4973
+ "name": "diff-only",
4974
+ "allowNo": false,
4975
+ "type": "boolean"
4976
+ },
4977
+ "latest": {
4978
+ "char": "l",
4979
+ "description": "Compare the two most recent completed suite runs",
4980
+ "name": "latest",
4981
+ "allowNo": false,
4982
+ "type": "boolean"
4983
+ },
4984
+ "from-json": {
4985
+ "description": "Compare two results.json files directly (no DB). Pass twice: --from-json PREV --from-json CURR",
4986
+ "name": "from-json",
4638
4987
  "hasDynamicHelp": false,
4639
- "multiple": false,
4988
+ "multiple": true,
4640
4989
  "type": "option"
4641
4990
  },
4642
4991
  "format": {
@@ -4665,29 +5014,15 @@
4665
5014
  "multiple": false,
4666
5015
  "type": "option"
4667
5016
  },
4668
- "dry-run": {
4669
- "description": "Validate without executing",
4670
- "name": "dry-run",
4671
- "allowNo": false,
4672
- "type": "boolean"
4673
- },
4674
5017
  "verbose": {
4675
- "char": "v",
4676
- "description": "Show detailed execution information",
5018
+ "description": "Show detailed information",
4677
5019
  "name": "verbose",
4678
5020
  "allowNo": false,
4679
5021
  "type": "boolean"
4680
5022
  },
4681
- "checks-module": {
4682
- "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
4683
- "name": "checks-module",
4684
- "hasDynamicHelp": false,
4685
- "multiple": false,
4686
- "type": "option"
4687
- },
4688
- "oracles-module": {
4689
- "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the test runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
4690
- "name": "oracles-module",
5023
+ "tag": {
5024
+ "description": "Filter suite runs by tag (matches against MJTestSuiteRunEntity.Tags). Useful for isolating runs from a specific source environment in an archive MJ. DB mode only — --from-json ignores this flag.",
5025
+ "name": "tag",
4691
5026
  "hasDynamicHelp": false,
4692
5027
  "multiple": false,
4693
5028
  "type": "option"
@@ -4695,7 +5030,7 @@
4695
5030
  },
4696
5031
  "hasDynamicHelp": false,
4697
5032
  "hiddenAliases": [],
4698
- "id": "test:run",
5033
+ "id": "test:compare",
4699
5034
  "pluginAlias": "@memberjunction/cli",
4700
5035
  "pluginName": "@memberjunction/cli",
4701
5036
  "pluginType": "core",
@@ -4706,91 +5041,48 @@
4706
5041
  "dist",
4707
5042
  "commands",
4708
5043
  "test",
4709
- "run.js"
5044
+ "compare.js"
4710
5045
  ]
4711
5046
  },
4712
- "test:scripts": {
5047
+ "test:history": {
4713
5048
  "aliases": [],
4714
5049
  "args": {},
4715
- "description": "Review and promote recorded replay scripts. A run that re-derives a test which already had a script stores the new one as pending rather than replacing what replay uses, so a UI change never rewrites the suite unnoticed. This is where you see the drift and decide.",
5050
+ "description": "View test execution history",
4716
5051
  "examples": [
4717
5052
  "<%= config.bin %> <%= command.id %>",
4718
- "<%= config.bin %> <%= command.id %> --test \"T042 - Filter Grid\"",
4719
- "<%= config.bin %> <%= command.id %> --promote --test \"T042 - Filter Grid\"",
4720
- "<%= config.bin %> <%= command.id %> --promote --yes",
4721
- "<%= config.bin %> <%= command.id %> --discard --test \"T042 - Filter Grid\""
5053
+ "<%= config.bin %> <%= command.id %> --test=<test-id>",
5054
+ "<%= config.bin %> <%= command.id %> --suite=<suite-id>",
5055
+ "<%= config.bin %> <%= command.id %> --since=\"2024-01-01\"",
5056
+ "<%= config.bin %> <%= command.id %> --limit=50"
4722
5057
  ],
4723
5058
  "flags": {
4724
5059
  "test": {
4725
- "description": "Limit to one test, by name or ID",
5060
+ "char": "t",
5061
+ "description": "Filter by test ID",
4726
5062
  "name": "test",
4727
5063
  "hasDynamicHelp": false,
4728
5064
  "multiple": false,
4729
5065
  "type": "option"
4730
5066
  },
4731
- "promote": {
4732
- "description": "Promote the pending script(s) into the slot replay uses",
4733
- "exclusive": [
4734
- "discard"
4735
- ],
4736
- "name": "promote",
4737
- "allowNo": false,
4738
- "type": "boolean"
5067
+ "recent": {
5068
+ "char": "r",
5069
+ "description": "Number of recent runs to show",
5070
+ "name": "recent",
5071
+ "hasDynamicHelp": false,
5072
+ "multiple": false,
5073
+ "type": "option"
4739
5074
  },
4740
- "discard": {
4741
- "description": "Drop the pending script(s), keeping the promoted one",
4742
- "exclusive": [
4743
- "promote"
4744
- ],
4745
- "name": "discard",
4746
- "allowNo": false,
4747
- "type": "boolean"
5075
+ "from": {
5076
+ "description": "Show history from date (YYYY-MM-DD)",
5077
+ "name": "from",
5078
+ "hasDynamicHelp": false,
5079
+ "multiple": false,
5080
+ "type": "option"
4748
5081
  },
4749
- "yes": {
4750
- "char": "y",
4751
- "description": "Confirm a bulk --promote/--discard that was not narrowed with --test",
4752
- "name": "yes",
4753
- "allowNo": false,
4754
- "type": "boolean"
4755
- }
4756
- },
4757
- "hasDynamicHelp": false,
4758
- "hiddenAliases": [],
4759
- "id": "test:scripts",
4760
- "pluginAlias": "@memberjunction/cli",
4761
- "pluginName": "@memberjunction/cli",
4762
- "pluginType": "core",
4763
- "strict": true,
4764
- "enableJsonFlag": false,
4765
- "isESM": true,
4766
- "relativePath": [
4767
- "dist",
4768
- "commands",
4769
- "test",
4770
- "scripts.js"
4771
- ]
4772
- },
4773
- "test:suite": {
4774
- "aliases": [],
4775
- "args": {
4776
- "suiteId": {
4777
- "description": "Test suite ID to execute",
4778
- "name": "suiteId",
4779
- "required": false
4780
- }
4781
- },
4782
- "description": "Execute a test suite",
4783
- "examples": [
4784
- "<%= config.bin %> <%= command.id %> <suite-id>",
4785
- "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
4786
- "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
4787
- "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
4788
- ],
4789
- "flags": {
4790
- "name": {
4791
- "char": "n",
4792
- "description": "Test suite name to execute",
4793
- "name": "name",
5082
+ "status": {
5083
+ "char": "s",
5084
+ "description": "Filter by status",
5085
+ "name": "status",
4794
5086
  "hasDynamicHelp": false,
4795
5087
  "multiple": false,
4796
5088
  "type": "option"
@@ -4823,60 +5115,15 @@
4823
5115
  },
4824
5116
  "verbose": {
4825
5117
  "char": "v",
4826
- "description": "Show detailed execution information",
5118
+ "description": "Show detailed information",
4827
5119
  "name": "verbose",
4828
5120
  "allowNo": false,
4829
5121
  "type": "boolean"
4830
- },
4831
- "delay": {
4832
- "char": "d",
4833
- "description": "Delay in milliseconds between test executions (avoids Auth0 rate limits)",
4834
- "name": "delay",
4835
- "default": 0,
4836
- "hasDynamicHelp": false,
4837
- "multiple": false,
4838
- "type": "option"
4839
- },
4840
- "parallel": {
4841
- "char": "p",
4842
- "description": "Run tests in parallel with shared browser sessions",
4843
- "name": "parallel",
4844
- "allowNo": false,
4845
- "type": "boolean"
4846
- },
4847
- "max-parallel": {
4848
- "description": "Maximum number of parallel workers (default 4)",
4849
- "name": "max-parallel",
4850
- "default": 4,
4851
- "hasDynamicHelp": false,
4852
- "multiple": false,
4853
- "type": "option"
4854
- },
4855
- "flaky-check": {
4856
- "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
4857
- "name": "flaky-check",
4858
- "hasDynamicHelp": false,
4859
- "multiple": false,
4860
- "type": "option"
4861
- },
4862
- "checks-module": {
4863
- "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
4864
- "name": "checks-module",
4865
- "hasDynamicHelp": false,
4866
- "multiple": false,
4867
- "type": "option"
4868
- },
4869
- "oracles-module": {
4870
- "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the suite runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
4871
- "name": "oracles-module",
4872
- "hasDynamicHelp": false,
4873
- "multiple": false,
4874
- "type": "option"
4875
5122
  }
4876
5123
  },
4877
5124
  "hasDynamicHelp": false,
4878
5125
  "hiddenAliases": [],
4879
- "id": "test:suite",
5126
+ "id": "test:history",
4880
5127
  "pluginAlias": "@memberjunction/cli",
4881
5128
  "pluginName": "@memberjunction/cli",
4882
5129
  "pluginType": "core",
@@ -4887,30 +5134,25 @@
4887
5134
  "dist",
4888
5135
  "commands",
4889
5136
  "test",
4890
- "suite.js"
5137
+ "history.js"
4891
5138
  ]
4892
5139
  },
4893
- "test:usage": {
5140
+ "test": {
4894
5141
  "aliases": [],
4895
5142
  "args": {},
4896
- "description": "Show usage, flags, examples, and runtime hints for every `mj test` command.",
4897
- "flags": {
4898
- "format": {
4899
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
4900
- "name": "format",
4901
- "hasDynamicHelp": false,
4902
- "multiple": false,
4903
- "options": [
4904
- "text",
4905
- "json",
4906
- "md"
4907
- ],
4908
- "type": "option"
4909
- }
4910
- },
5143
+ "description": "MemberJunction Testing Framework - Execute and manage tests",
5144
+ "examples": [
5145
+ "<%= config.bin %> <%= command.id %> run <test-id>",
5146
+ "<%= config.bin %> <%= command.id %> run --name=\"Active Members Count\"",
5147
+ "<%= config.bin %> <%= command.id %> suite <suite-id>",
5148
+ "<%= config.bin %> <%= command.id %> list",
5149
+ "<%= config.bin %> <%= command.id %> list --suites",
5150
+ "<%= config.bin %> <%= command.id %> validate --all"
5151
+ ],
5152
+ "flags": {},
4911
5153
  "hasDynamicHelp": false,
4912
5154
  "hiddenAliases": [],
4913
- "id": "test:usage",
5155
+ "id": "test",
4914
5156
  "pluginAlias": "@memberjunction/cli",
4915
5157
  "pluginName": "@memberjunction/cli",
4916
5158
  "pluginType": "core",
@@ -4921,47 +5163,56 @@
4921
5163
  "dist",
4922
5164
  "commands",
4923
5165
  "test",
4924
- "usage.js"
5166
+ "index.js"
4925
5167
  ]
4926
5168
  },
4927
- "test:validate": {
5169
+ "test:list": {
4928
5170
  "aliases": [],
4929
- "args": {
4930
- "testId": {
4931
- "description": "Test ID to validate",
4932
- "name": "testId",
4933
- "required": false
4934
- }
4935
- },
4936
- "description": "Validate test definitions without executing",
5171
+ "args": {},
5172
+ "description": "List available tests, suites, and types",
4937
5173
  "examples": [
4938
- "<%= config.bin %> <%= command.id %> <test-id>",
4939
- "<%= config.bin %> <%= command.id %> --all",
5174
+ "<%= config.bin %> <%= command.id %>",
5175
+ "<%= config.bin %> <%= command.id %> --suites",
5176
+ "<%= config.bin %> <%= command.id %> --types",
4940
5177
  "<%= config.bin %> <%= command.id %> --type=agent-eval",
4941
- "<%= config.bin %> <%= command.id %> --all --save-report",
4942
- "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
5178
+ "<%= config.bin %> <%= command.id %> --tag=smoke",
5179
+ "<%= config.bin %> <%= command.id %> --status=active --verbose"
4943
5180
  ],
4944
5181
  "flags": {
4945
- "all": {
4946
- "char": "a",
4947
- "description": "Validate all tests",
4948
- "name": "all",
5182
+ "suites": {
5183
+ "description": "List test suites instead of tests",
5184
+ "name": "suites",
5185
+ "allowNo": false,
5186
+ "type": "boolean"
5187
+ },
5188
+ "types": {
5189
+ "description": "List test types",
5190
+ "name": "types",
4949
5191
  "allowNo": false,
4950
5192
  "type": "boolean"
4951
5193
  },
4952
5194
  "type": {
4953
5195
  "char": "t",
4954
- "description": "Validate tests by type",
5196
+ "description": "Filter by test type",
4955
5197
  "name": "type",
4956
5198
  "hasDynamicHelp": false,
4957
5199
  "multiple": false,
4958
5200
  "type": "option"
4959
5201
  },
4960
- "save-report": {
4961
- "description": "Save validation report to file",
4962
- "name": "save-report",
4963
- "allowNo": false,
4964
- "type": "boolean"
5202
+ "tag": {
5203
+ "description": "Filter by tag",
5204
+ "name": "tag",
5205
+ "hasDynamicHelp": false,
5206
+ "multiple": false,
5207
+ "type": "option"
5208
+ },
5209
+ "status": {
5210
+ "char": "s",
5211
+ "description": "Filter by status",
5212
+ "name": "status",
5213
+ "hasDynamicHelp": false,
5214
+ "multiple": false,
5215
+ "type": "option"
4965
5216
  },
4966
5217
  "format": {
4967
5218
  "char": "f",
@@ -4999,7 +5250,7 @@
4999
5250
  },
5000
5251
  "hasDynamicHelp": false,
5001
5252
  "hiddenAliases": [],
5002
- "id": "test:validate",
5253
+ "id": "test:list",
5003
5254
  "pluginAlias": "@memberjunction/cli",
5004
5255
  "pluginName": "@memberjunction/cli",
5005
5256
  "pluginType": "core",
@@ -5010,95 +5261,27 @@
5010
5261
  "dist",
5011
5262
  "commands",
5012
5263
  "test",
5013
- "validate.js"
5264
+ "list.js"
5014
5265
  ]
5015
5266
  },
5016
- "translate-sql": {
5267
+ "test:promote-criteria": {
5017
5268
  "aliases": [],
5018
- "args": {},
5019
- "description": "Translate SQL fragments between database dialects (SQL Server ↔ PostgreSQL)",
5020
- "examples": [
5021
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --dry-run",
5022
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope queries",
5023
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --sql \"SELECT TOP 10 [Name] FROM [Users]\"",
5024
- "<%= config.bin %> translate-sql --from sqlserver --to postgresql --scope all --output ./reports"
5025
- ],
5026
- "flags": {
5027
- "from": {
5028
- "description": "Source SQL dialect",
5029
- "name": "from",
5030
- "required": true,
5031
- "hasDynamicHelp": false,
5032
- "multiple": false,
5033
- "options": [
5034
- "sqlserver",
5035
- "postgresql"
5036
- ],
5037
- "type": "option"
5038
- },
5039
- "to": {
5040
- "description": "Target SQL dialect",
5041
- "name": "to",
5042
- "required": true,
5043
- "hasDynamicHelp": false,
5044
- "multiple": false,
5045
- "options": [
5046
- "sqlserver",
5047
- "postgresql"
5048
- ],
5049
- "type": "option"
5050
- },
5051
- "scope": {
5052
- "description": "What to scan for translation",
5053
- "name": "scope",
5054
- "default": "all",
5055
- "hasDynamicHelp": false,
5056
- "multiple": false,
5057
- "options": [
5058
- "queries",
5059
- "views",
5060
- "filters",
5061
- "all"
5062
- ],
5063
- "type": "option"
5064
- },
5065
- "sql": {
5066
- "description": "Translate a single SQL fragment (inline mode)",
5067
- "name": "sql",
5068
- "hasDynamicHelp": false,
5069
- "multiple": false,
5070
- "type": "option"
5071
- },
5072
- "dry-run": {
5073
- "description": "Show what would be translated without making changes",
5074
- "name": "dry-run",
5075
- "allowNo": false,
5076
- "type": "boolean"
5077
- },
5078
- "review": {
5079
- "description": "Generate review report only (no writes to database)",
5080
- "name": "review",
5081
- "allowNo": false,
5082
- "type": "boolean"
5083
- },
5084
- "output": {
5085
- "char": "o",
5086
- "description": "Output directory for the translation report",
5087
- "name": "output",
5088
- "hasDynamicHelp": false,
5089
- "multiple": false,
5090
- "type": "option"
5091
- },
5092
- "force": {
5093
- "description": "Re-translate even if platform variants already exist",
5094
- "name": "force",
5095
- "allowNo": false,
5096
- "type": "boolean"
5269
+ "args": {
5270
+ "test": {
5271
+ "description": "Test name or ID",
5272
+ "name": "test",
5273
+ "required": true
5097
5274
  }
5098
5275
  },
5276
+ "description": "Copy a test's inline judge criteria into a Draft rubric and set Test.RubricID. Does not publish.",
5277
+ "examples": [
5278
+ "<%= config.bin %> <%= command.id %> <test-id>",
5279
+ "<%= config.bin %> <%= command.id %> \"Reply check\""
5280
+ ],
5281
+ "flags": {},
5099
5282
  "hasDynamicHelp": false,
5100
5283
  "hiddenAliases": [],
5101
- "id": "translate-sql",
5284
+ "id": "test:promote-criteria",
5102
5285
  "pluginAlias": "@memberjunction/cli",
5103
5286
  "pluginName": "@memberjunction/cli",
5104
5287
  "pluginType": "core",
@@ -5108,31 +5291,24 @@
5108
5291
  "relativePath": [
5109
5292
  "dist",
5110
5293
  "commands",
5111
- "translate-sql",
5112
- "index.js"
5294
+ "test",
5295
+ "promote-criteria.js"
5113
5296
  ]
5114
5297
  },
5115
- "translate-sql:usage": {
5298
+ "test:report": {
5116
5299
  "aliases": [],
5117
- "args": {},
5118
- "description": "Show usage, flags, examples, and runtime hints for every `mj translate-sql` command.",
5119
- "flags": {
5120
- "format": {
5121
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5122
- "name": "format",
5123
- "hasDynamicHelp": false,
5124
- "multiple": false,
5125
- "options": [
5126
- "text",
5127
- "json",
5128
- "md"
5129
- ],
5130
- "type": "option"
5300
+ "args": {
5301
+ "runId": {
5302
+ "description": "Test run ID",
5303
+ "name": "runId",
5304
+ "required": true
5131
5305
  }
5132
5306
  },
5307
+ "description": "Print the per-criterion rubric breakdown for a test run.",
5308
+ "flags": {},
5133
5309
  "hasDynamicHelp": false,
5134
5310
  "hiddenAliases": [],
5135
- "id": "translate-sql:usage",
5311
+ "id": "test:report",
5136
5312
  "pluginAlias": "@memberjunction/cli",
5137
5313
  "pluginName": "@memberjunction/cli",
5138
5314
  "pluginType": "core",
@@ -5142,135 +5318,108 @@
5142
5318
  "relativePath": [
5143
5319
  "dist",
5144
5320
  "commands",
5145
- "translate-sql",
5146
- "usage.js"
5321
+ "test",
5322
+ "report.js"
5147
5323
  ]
5148
5324
  },
5149
- "update:claude": {
5325
+ "test:run": {
5150
5326
  "aliases": [],
5151
- "args": {},
5152
- "description": "Update the Claude Code pack in the current directory.",
5327
+ "args": {
5328
+ "testId": {
5329
+ "description": "Test ID to execute",
5330
+ "name": "testId",
5331
+ "required": false
5332
+ }
5333
+ },
5334
+ "description": "Execute a single test by ID or name",
5153
5335
  "examples": [
5154
- "<%= config.bin %> update:claude",
5155
- "<%= config.bin %> update:claude --check",
5156
- "<%= config.bin %> update:claude --refresh-commands",
5157
- "<%= config.bin %> update:claude --allow-major",
5158
- "<%= config.bin %> update:claude --json"
5336
+ "<%= config.bin %> <%= command.id %> <test-id>",
5337
+ "<%= config.bin %> <%= command.id %> --name=\"Active Members Count\"",
5338
+ "<%= config.bin %> <%= command.id %> <test-id> --environment=staging",
5339
+ "<%= config.bin %> <%= command.id %> <test-id> --format=json --output=results.json",
5340
+ "<%= config.bin %> <%= command.id %> <test-id> --dry-run"
5159
5341
  ],
5160
5342
  "flags": {
5161
- "dir": {
5162
- "description": "Target directory",
5163
- "name": "dir",
5164
- "default": ".",
5165
- "hasDynamicHelp": false,
5166
- "multiple": false,
5167
- "type": "option"
5168
- },
5169
- "major": {
5170
- "description": "Force a specific MJ major (default: detected from package.json)",
5171
- "name": "major",
5343
+ "name": {
5344
+ "char": "n",
5345
+ "description": "Test name to execute",
5346
+ "name": "name",
5172
5347
  "hasDynamicHelp": false,
5173
5348
  "multiple": false,
5174
5349
  "type": "option"
5175
5350
  },
5176
- "ref": {
5177
- "description": "Git ref to fetch from (branch or tag). Default: main.",
5178
- "name": "ref",
5351
+ "environment": {
5352
+ "char": "e",
5353
+ "description": "Environment context (dev, staging, prod)",
5354
+ "name": "environment",
5179
5355
  "hasDynamicHelp": false,
5180
5356
  "multiple": false,
5181
5357
  "type": "option"
5182
5358
  },
5183
- "from": {
5184
- "description": "Use a local pack source instead of fetching from GitHub",
5185
- "name": "from",
5359
+ "format": {
5360
+ "char": "f",
5361
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
5362
+ "name": "format",
5186
5363
  "hasDynamicHelp": false,
5187
5364
  "multiple": false,
5188
- "type": "option"
5189
- },
5190
- "offline": {
5191
- "description": "Forbid network; requires --from <path>",
5192
- "name": "offline",
5193
- "allowNo": false,
5194
- "type": "boolean"
5195
- },
5196
- "dry-run": {
5197
- "description": "Print what would be written; change nothing",
5198
- "name": "dry-run",
5199
- "allowNo": false,
5200
- "type": "boolean"
5201
- },
5202
- "yes": {
5203
- "char": "y",
5204
- "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
5205
- "name": "yes",
5206
- "allowNo": false,
5207
- "type": "boolean"
5208
- },
5209
- "force": {
5210
- "description": "Overwrite user-customized commands/skills (saves .bak files)",
5211
- "name": "force",
5212
- "allowNo": false,
5213
- "type": "boolean"
5214
- },
5215
- "skip-commands": {
5216
- "description": "Skip seeding .claude/commands/",
5217
- "name": "skip-commands",
5218
- "allowNo": false,
5219
- "type": "boolean"
5220
- },
5221
- "skip-skills": {
5222
- "description": "Skip seeding .claude/skills/",
5223
- "name": "skip-skills",
5224
- "allowNo": false,
5225
- "type": "boolean"
5226
- },
5227
- "skip-settings": {
5228
- "description": "Skip merging .claude/settings.json",
5229
- "name": "skip-settings",
5230
- "allowNo": false,
5231
- "type": "boolean"
5232
- },
5233
- "check": {
5234
- "description": "Compare local pack version to remote without writing anything",
5235
- "name": "check",
5236
- "allowNo": false,
5237
- "type": "boolean"
5238
- },
5239
- "refresh-commands": {
5240
- "description": "Force-resync .claude/commands/* from the pack (saves .bak files)",
5241
- "name": "refresh-commands",
5242
- "allowNo": false,
5243
- "type": "boolean"
5244
- },
5245
- "refresh-skills": {
5246
- "description": "Force-resync .claude/skills/** from the pack (saves .bak files)",
5247
- "name": "refresh-skills",
5248
- "allowNo": false,
5249
- "type": "boolean"
5365
+ "options": [
5366
+ "text",
5367
+ "json",
5368
+ "md",
5369
+ "human",
5370
+ "console",
5371
+ "markdown",
5372
+ "compact",
5373
+ "table"
5374
+ ],
5375
+ "type": "option"
5250
5376
  },
5251
- "allow-major": {
5252
- "description": "Allow the remote pack's major to differ from local MJ's major",
5253
- "name": "allow-major",
5254
- "allowNo": false,
5255
- "type": "boolean"
5377
+ "output": {
5378
+ "char": "o",
5379
+ "description": "Output file path",
5380
+ "name": "output",
5381
+ "hasDynamicHelp": false,
5382
+ "multiple": false,
5383
+ "type": "option"
5256
5384
  },
5257
- "json": {
5258
- "description": "Output as JSON (matches plan §7.5 schema)",
5259
- "name": "json",
5385
+ "dry-run": {
5386
+ "description": "Validate without executing",
5387
+ "name": "dry-run",
5260
5388
  "allowNo": false,
5261
5389
  "type": "boolean"
5262
5390
  },
5263
5391
  "verbose": {
5264
5392
  "char": "v",
5265
- "description": "Show progress messages",
5393
+ "description": "Show detailed execution information",
5266
5394
  "name": "verbose",
5267
5395
  "allowNo": false,
5268
5396
  "type": "boolean"
5397
+ },
5398
+ "checks-module": {
5399
+ "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
5400
+ "name": "checks-module",
5401
+ "hasDynamicHelp": false,
5402
+ "multiple": false,
5403
+ "type": "option"
5404
+ },
5405
+ "rubric": {
5406
+ "description": "Rubric override: name or id, optionally @version (1.2.0 or a version id)",
5407
+ "name": "rubric",
5408
+ "hasDynamicHelp": false,
5409
+ "multiple": false,
5410
+ "type": "option"
5411
+ },
5412
+ "oracles-module": {
5413
+ "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the test runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
5414
+ "name": "oracles-module",
5415
+ "hasDynamicHelp": false,
5416
+ "multiple": false,
5417
+ "type": "option"
5269
5418
  }
5270
5419
  },
5271
5420
  "hasDynamicHelp": false,
5272
5421
  "hiddenAliases": [],
5273
- "id": "update:claude",
5422
+ "id": "test:run",
5274
5423
  "pluginAlias": "@memberjunction/cli",
5275
5424
  "pluginName": "@memberjunction/cli",
5276
5425
  "pluginType": "core",
@@ -5280,31 +5429,58 @@
5280
5429
  "relativePath": [
5281
5430
  "dist",
5282
5431
  "commands",
5283
- "update",
5284
- "claude.js"
5432
+ "test",
5433
+ "run.js"
5285
5434
  ]
5286
5435
  },
5287
- "update:usage": {
5436
+ "test:scripts": {
5288
5437
  "aliases": [],
5289
5438
  "args": {},
5290
- "description": "Show usage, flags, examples, and runtime hints for every `mj update` command.",
5439
+ "description": "Review and promote recorded replay scripts. A run that re-derives a test which already had a script stores the new one as pending rather than replacing what replay uses, so a UI change never rewrites the suite unnoticed. This is where you see the drift and decide.",
5440
+ "examples": [
5441
+ "<%= config.bin %> <%= command.id %>",
5442
+ "<%= config.bin %> <%= command.id %> --test \"T042 - Filter Grid\"",
5443
+ "<%= config.bin %> <%= command.id %> --promote --test \"T042 - Filter Grid\"",
5444
+ "<%= config.bin %> <%= command.id %> --promote --yes",
5445
+ "<%= config.bin %> <%= command.id %> --discard --test \"T042 - Filter Grid\""
5446
+ ],
5291
5447
  "flags": {
5292
- "format": {
5293
- "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5294
- "name": "format",
5448
+ "test": {
5449
+ "description": "Limit to one test, by name or ID",
5450
+ "name": "test",
5295
5451
  "hasDynamicHelp": false,
5296
5452
  "multiple": false,
5297
- "options": [
5298
- "text",
5299
- "json",
5300
- "md"
5301
- ],
5302
5453
  "type": "option"
5454
+ },
5455
+ "promote": {
5456
+ "description": "Promote the pending script(s) into the slot replay uses",
5457
+ "exclusive": [
5458
+ "discard"
5459
+ ],
5460
+ "name": "promote",
5461
+ "allowNo": false,
5462
+ "type": "boolean"
5463
+ },
5464
+ "discard": {
5465
+ "description": "Drop the pending script(s), keeping the promoted one",
5466
+ "exclusive": [
5467
+ "promote"
5468
+ ],
5469
+ "name": "discard",
5470
+ "allowNo": false,
5471
+ "type": "boolean"
5472
+ },
5473
+ "yes": {
5474
+ "char": "y",
5475
+ "description": "Confirm a bulk --promote/--discard that was not narrowed with --test",
5476
+ "name": "yes",
5477
+ "allowNo": false,
5478
+ "type": "boolean"
5303
5479
  }
5304
5480
  },
5305
5481
  "hasDynamicHelp": false,
5306
5482
  "hiddenAliases": [],
5307
- "id": "update:usage",
5483
+ "id": "test:scripts",
5308
5484
  "pluginAlias": "@memberjunction/cli",
5309
5485
  "pluginName": "@memberjunction/cli",
5310
5486
  "pluginType": "core",
@@ -5314,102 +5490,124 @@
5314
5490
  "relativePath": [
5315
5491
  "dist",
5316
5492
  "commands",
5317
- "update",
5318
- "usage.js"
5493
+ "test",
5494
+ "scripts.js"
5319
5495
  ]
5320
5496
  },
5321
- "migrate:convert": {
5497
+ "test:suite": {
5322
5498
  "aliases": [],
5323
- "args": {},
5324
- "description": "Convert T-SQL migrations to PostgreSQL",
5499
+ "args": {
5500
+ "suiteId": {
5501
+ "description": "Test suite ID to execute",
5502
+ "name": "suiteId",
5503
+ "required": false
5504
+ }
5505
+ },
5506
+ "description": "Execute a test suite",
5325
5507
  "examples": [
5326
- "<%= config.bin %> migrate convert --split",
5327
- "<%= config.bin %> migrate convert --split --dry-run",
5328
- "<%= config.bin %> migrate convert --split --file V202604060452__v5.24.x__KnowledgeHub.sql",
5329
- "<%= config.bin %> migrate convert --source-dir ./migrations/v5 --output-dir ./migrations-pg/v5",
5330
- "<%= config.bin %> migrate convert --verbose"
5508
+ "<%= config.bin %> <%= command.id %> <suite-id>",
5509
+ "<%= config.bin %> <%= command.id %> --name=\"Agent Quality Suite\"",
5510
+ "<%= config.bin %> <%= command.id %> <suite-id> --format=json",
5511
+ "<%= config.bin %> <%= command.id %> <suite-id> --output=suite-results.json"
5331
5512
  ],
5332
5513
  "flags": {
5333
- "source-dir": {
5334
- "description": "Source T-SQL migrations directory",
5335
- "name": "source-dir",
5336
- "default": "./migrations/v5",
5514
+ "name": {
5515
+ "char": "n",
5516
+ "description": "Test suite name to execute",
5517
+ "name": "name",
5337
5518
  "hasDynamicHelp": false,
5338
5519
  "multiple": false,
5339
5520
  "type": "option"
5340
5521
  },
5341
- "output-dir": {
5342
- "description": "Output PG migrations directory",
5343
- "name": "output-dir",
5344
- "default": "./migrations-pg/v5",
5522
+ "format": {
5523
+ "char": "f",
5524
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
5525
+ "name": "format",
5345
5526
  "hasDynamicHelp": false,
5346
5527
  "multiple": false,
5528
+ "options": [
5529
+ "text",
5530
+ "json",
5531
+ "md",
5532
+ "human",
5533
+ "console",
5534
+ "markdown",
5535
+ "compact",
5536
+ "table"
5537
+ ],
5347
5538
  "type": "option"
5348
5539
  },
5349
- "file": {
5350
- "description": "Convert a specific file (filename only, looked up in source-dir)",
5351
- "name": "file",
5540
+ "output": {
5541
+ "char": "o",
5542
+ "description": "Output file path",
5543
+ "name": "output",
5352
5544
  "hasDynamicHelp": false,
5353
5545
  "multiple": false,
5354
5546
  "type": "option"
5355
5547
  },
5356
- "schema": {
5357
- "description": "Target schema name",
5358
- "name": "schema",
5359
- "default": "__mj",
5360
- "hasDynamicHelp": false,
5361
- "multiple": false,
5362
- "type": "option"
5548
+ "verbose": {
5549
+ "char": "v",
5550
+ "description": "Show detailed execution information",
5551
+ "name": "verbose",
5552
+ "allowNo": false,
5553
+ "type": "boolean"
5363
5554
  },
5364
- "core-schema": {
5365
- "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
5366
- "name": "core-schema",
5367
- "default": "__mj",
5555
+ "delay": {
5556
+ "char": "d",
5557
+ "description": "Delay in milliseconds between test executions (avoids Auth0 rate limits)",
5558
+ "name": "delay",
5559
+ "default": 0,
5368
5560
  "hasDynamicHelp": false,
5369
5561
  "multiple": false,
5370
5562
  "type": "option"
5371
5563
  },
5372
- "dry-run": {
5373
- "description": "Show what would be converted without writing files",
5374
- "name": "dry-run",
5564
+ "parallel": {
5565
+ "char": "p",
5566
+ "description": "Run tests in parallel with shared browser sessions",
5567
+ "name": "parallel",
5375
5568
  "allowNo": false,
5376
5569
  "type": "boolean"
5377
5570
  },
5378
- "no-header": {
5379
- "description": "Skip PG header (extensions, schema, implicit cast)",
5380
- "name": "no-header",
5381
- "allowNo": false,
5382
- "type": "boolean"
5571
+ "max-parallel": {
5572
+ "description": "Maximum number of parallel workers (default 4)",
5573
+ "name": "max-parallel",
5574
+ "default": 4,
5575
+ "hasDynamicHelp": false,
5576
+ "multiple": false,
5577
+ "type": "option"
5383
5578
  },
5384
- "verbose": {
5385
- "char": "v",
5386
- "description": "Show per-statement progress",
5387
- "name": "verbose",
5388
- "allowNo": false,
5389
- "type": "boolean"
5579
+ "rubric": {
5580
+ "description": "Rubric override for every test: name or id, optionally @version",
5581
+ "name": "rubric",
5582
+ "hasDynamicHelp": false,
5583
+ "multiple": false,
5584
+ "type": "option"
5390
5585
  },
5391
- "split": {
5392
- "description": "Split-and-regenerate (the standard path): transpile only hand-written DDL via the AST dialect; CodeGen objects are regenerated by `mj codegen` and mj-sync metadata re-seeded by `mj sync push`; every conversion gap is surfaced and fails the run unless --allow-gaps.",
5393
- "name": "split",
5394
- "allowNo": false,
5395
- "type": "boolean"
5586
+ "flaky-check": {
5587
+ "description": "Run each test N times to detect flakiness (variance > 0.3 or mixed pass/fail = flaky). Recommended: 3 or 5",
5588
+ "name": "flaky-check",
5589
+ "hasDynamicHelp": false,
5590
+ "multiple": false,
5591
+ "type": "option"
5396
5592
  },
5397
- "allow-gaps": {
5398
- "description": "Exit 0 even when migrations have conversion gaps — with --split: hand-authoring needed or unhandled statements; on the legacy path: \"-- Could not parse\" / \"-- ERROR converting batch\" markers in the output. Gaps are still embedded as comments and listed in the summary.",
5399
- "name": "allow-gaps",
5400
- "allowNo": false,
5401
- "type": "boolean"
5593
+ "checks-module": {
5594
+ "description": "Module specifier (package name or path) side-effect-imported before the run so its integration check bundles register on the IntegrationCheckRegistry. Durable form: mj.config.cjs `testing.checkModules` (this repo loads '@memberjunction/integration-test-suite' that way).",
5595
+ "name": "checks-module",
5596
+ "hasDynamicHelp": false,
5597
+ "multiple": false,
5598
+ "type": "option"
5402
5599
  },
5403
- "bake-codegen": {
5404
- "description": "With --split: bake native PG CodeGen objects inline per migration (Path C), so the set deploys with `mj migrate` alone — no `mj codegen` step. Requires a LIVE working PG database (DB_PLATFORM=postgresql + PG_* env, same as `mj codegen`) seeded to the state just BEFORE the migrations being converted (typically the latest baseline); the converter brings it forward in committed order as it bakes. Not compatible with --dry-run.",
5405
- "name": "bake-codegen",
5406
- "allowNo": false,
5407
- "type": "boolean"
5600
+ "oracles-module": {
5601
+ "description": "Path to a JS/TS module that exports custom IOracle classes or instances. Each export is registered on the engine before the suite runs — used by non-MJ adopters to plug app-specific oracle types without modifying TestingFramework.",
5602
+ "name": "oracles-module",
5603
+ "hasDynamicHelp": false,
5604
+ "multiple": false,
5605
+ "type": "option"
5408
5606
  }
5409
5607
  },
5410
5608
  "hasDynamicHelp": false,
5411
5609
  "hiddenAliases": [],
5412
- "id": "migrate:convert",
5610
+ "id": "test:suite",
5413
5611
  "pluginAlias": "@memberjunction/cli",
5414
5612
  "pluginName": "@memberjunction/cli",
5415
5613
  "pluginType": "core",
@@ -5419,63 +5617,31 @@
5419
5617
  "relativePath": [
5420
5618
  "dist",
5421
5619
  "commands",
5422
- "migrate",
5423
- "convert.js"
5620
+ "test",
5621
+ "suite.js"
5424
5622
  ]
5425
5623
  },
5426
- "migrate:create": {
5427
- "aliases": [],
5428
- "args": {
5429
- "description": {
5430
- "description": "Short description (will be converted to PascalCase with underscores)",
5431
- "name": "description",
5432
- "required": true
5433
- }
5434
- },
5435
- "description": "Scaffold a new migration file for the current database platform",
5436
- "examples": [
5437
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\"",
5438
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --version 5.25 --platform postgresql",
5439
- "<%= config.bin %> <%= command.id %> \"Add FooID to Bar\" --dir ./migrations/v5"
5440
- ],
5624
+ "test:usage": {
5625
+ "aliases": [],
5626
+ "args": {},
5627
+ "description": "Show usage, flags, examples, and runtime hints for every `mj test` command.",
5441
5628
  "flags": {
5442
- "version": {
5443
- "char": "v",
5444
- "description": "Migration version tag, e.g. \"5.25\" (default: parsed from repo baseline or \"0.0\")",
5445
- "name": "version",
5446
- "hasDynamicHelp": false,
5447
- "multiple": false,
5448
- "type": "option"
5449
- },
5450
- "platform": {
5451
- "char": "p",
5452
- "description": "Override platform: sqlserver | postgresql (default: config.dbPlatform)",
5453
- "name": "platform",
5629
+ "format": {
5630
+ "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
5631
+ "name": "format",
5454
5632
  "hasDynamicHelp": false,
5455
5633
  "multiple": false,
5456
5634
  "options": [
5457
- "sqlserver",
5458
- "postgresql"
5635
+ "text",
5636
+ "json",
5637
+ "md"
5459
5638
  ],
5460
5639
  "type": "option"
5461
- },
5462
- "dir": {
5463
- "description": "Output directory (default: ./migrations/v5 or ./migrations-pg/v5)",
5464
- "name": "dir",
5465
- "hasDynamicHelp": false,
5466
- "multiple": false,
5467
- "type": "option"
5468
- },
5469
- "x-x": {
5470
- "description": "Use {version}.x.x suffix instead of {version}.x (e.g. 5.25.x instead of 5.25.x)",
5471
- "name": "x-x",
5472
- "allowNo": false,
5473
- "type": "boolean"
5474
5640
  }
5475
5641
  },
5476
5642
  "hasDynamicHelp": false,
5477
5643
  "hiddenAliases": [],
5478
- "id": "migrate:create",
5644
+ "id": "test:usage",
5479
5645
  "pluginAlias": "@memberjunction/cli",
5480
5646
  "pluginName": "@memberjunction/cli",
5481
5647
  "pluginType": "core",
@@ -5485,60 +5651,86 @@
5485
5651
  "relativePath": [
5486
5652
  "dist",
5487
5653
  "commands",
5488
- "migrate",
5489
- "create.js"
5654
+ "test",
5655
+ "usage.js"
5490
5656
  ]
5491
5657
  },
5492
- "migrate": {
5658
+ "test:validate": {
5493
5659
  "aliases": [],
5494
- "args": {},
5495
- "description": "Migrate MemberJunction database to latest version. Open App migrates also run the core metadata-heal procs (same work as R__RefreshMetadata) scoped to the app schema, on SQL Server and PostgreSQL.",
5660
+ "args": {
5661
+ "testId": {
5662
+ "description": "Test ID to validate",
5663
+ "name": "testId",
5664
+ "required": false
5665
+ }
5666
+ },
5667
+ "description": "Validate test definitions without executing",
5496
5668
  "examples": [
5497
- "<%= config.bin %> <%= command.id %>\n",
5498
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --dir ./migrations/v1\n",
5499
- "<%= config.bin %> <%= command.id %> --schema __BCSaaS --tag v1.0.0\n"
5669
+ "<%= config.bin %> <%= command.id %> <test-id>",
5670
+ "<%= config.bin %> <%= command.id %> --all",
5671
+ "<%= config.bin %> <%= command.id %> --type=agent-eval",
5672
+ "<%= config.bin %> <%= command.id %> --all --save-report",
5673
+ "<%= config.bin %> <%= command.id %> --all --output=validation-report.md"
5500
5674
  ],
5501
5675
  "flags": {
5502
- "verbose": {
5503
- "char": "v",
5504
- "description": "Enable additional logging",
5505
- "name": "verbose",
5676
+ "all": {
5677
+ "char": "a",
5678
+ "description": "Validate all tests",
5679
+ "name": "all",
5506
5680
  "allowNo": false,
5507
5681
  "type": "boolean"
5508
5682
  },
5509
- "tag": {
5683
+ "type": {
5510
5684
  "char": "t",
5511
- "description": "Version tag to use for running remote migrations",
5512
- "name": "tag",
5685
+ "description": "Validate tests by type",
5686
+ "name": "type",
5513
5687
  "hasDynamicHelp": false,
5514
5688
  "multiple": false,
5515
5689
  "type": "option"
5516
5690
  },
5517
- "schema": {
5518
- "char": "s",
5519
- "description": "Target schema (overrides coreSchema from config)",
5520
- "name": "schema",
5691
+ "save-report": {
5692
+ "description": "Save validation report to file",
5693
+ "name": "save-report",
5694
+ "allowNo": false,
5695
+ "type": "boolean"
5696
+ },
5697
+ "format": {
5698
+ "char": "f",
5699
+ "description": "Output format: text (human), json (machine-readable), md (Markdown). Defaults to human output on a terminal and json when stdout is piped. Legacy spellings (console/markdown/compact/table) are accepted.",
5700
+ "name": "format",
5521
5701
  "hasDynamicHelp": false,
5522
5702
  "multiple": false,
5703
+ "options": [
5704
+ "text",
5705
+ "json",
5706
+ "md",
5707
+ "human",
5708
+ "console",
5709
+ "markdown",
5710
+ "compact",
5711
+ "table"
5712
+ ],
5523
5713
  "type": "option"
5524
5714
  },
5525
- "dir": {
5526
- "description": "Migration source directory (overrides migrationsLocation from config)",
5527
- "name": "dir",
5715
+ "output": {
5716
+ "char": "o",
5717
+ "description": "Output file path",
5718
+ "name": "output",
5528
5719
  "hasDynamicHelp": false,
5529
5720
  "multiple": false,
5530
5721
  "type": "option"
5531
5722
  },
5532
- "check-connection": {
5533
- "description": "Verify the database connection (including TLS) and exit without migrating",
5534
- "name": "check-connection",
5723
+ "verbose": {
5724
+ "char": "v",
5725
+ "description": "Show detailed information",
5726
+ "name": "verbose",
5535
5727
  "allowNo": false,
5536
5728
  "type": "boolean"
5537
5729
  }
5538
5730
  },
5539
5731
  "hasDynamicHelp": false,
5540
5732
  "hiddenAliases": [],
5541
- "id": "migrate",
5733
+ "id": "test:validate",
5542
5734
  "pluginAlias": "@memberjunction/cli",
5543
5735
  "pluginName": "@memberjunction/cli",
5544
5736
  "pluginType": "core",
@@ -5548,68 +5740,135 @@
5548
5740
  "relativePath": [
5549
5741
  "dist",
5550
5742
  "commands",
5551
- "migrate",
5552
- "index.js"
5743
+ "test",
5744
+ "validate.js"
5553
5745
  ]
5554
5746
  },
5555
- "migrate:rebake": {
5747
+ "update:claude": {
5556
5748
  "aliases": [],
5557
5749
  "args": {},
5558
- "description": "Re-bake the post-baseline PG migration set with inline native CodeGen",
5750
+ "description": "Update the Claude Code pack in the current directory.",
5559
5751
  "examples": [
5560
- "<%= config.bin %> migrate rebake",
5561
- "<%= config.bin %> migrate rebake --baseline-floor V202605291452 --dry-run"
5752
+ "<%= config.bin %> update:claude",
5753
+ "<%= config.bin %> update:claude --check",
5754
+ "<%= config.bin %> update:claude --refresh-commands",
5755
+ "<%= config.bin %> update:claude --allow-major",
5756
+ "<%= config.bin %> update:claude --json"
5562
5757
  ],
5563
5758
  "flags": {
5564
- "source-dir": {
5565
- "description": "Source T-SQL migrations directory",
5566
- "name": "source-dir",
5567
- "default": "./migrations/v5",
5759
+ "dir": {
5760
+ "description": "Target directory",
5761
+ "name": "dir",
5762
+ "default": ".",
5568
5763
  "hasDynamicHelp": false,
5569
5764
  "multiple": false,
5570
5765
  "type": "option"
5571
5766
  },
5572
- "output-dir": {
5573
- "description": "PG migrations directory (committed files read here + baked output written here)",
5574
- "name": "output-dir",
5575
- "default": "./migrations-pg/v5",
5767
+ "major": {
5768
+ "description": "Force a specific MJ major (default: detected from package.json)",
5769
+ "name": "major",
5576
5770
  "hasDynamicHelp": false,
5577
5771
  "multiple": false,
5578
5772
  "type": "option"
5579
5773
  },
5580
- "schema": {
5581
- "description": "Target schema name",
5582
- "name": "schema",
5583
- "default": "__mj",
5774
+ "ref": {
5775
+ "description": "Git ref to fetch from (branch or tag). Default: main.",
5776
+ "name": "ref",
5584
5777
  "hasDynamicHelp": false,
5585
5778
  "multiple": false,
5586
5779
  "type": "option"
5587
5780
  },
5588
- "core-schema": {
5589
- "description": "MJ core schema substituted for ${mjSchema} (default __mj). Distinct from --schema, which is the app's OWN schema: an Open App migration references core as ${mjSchema} and itself as ${flyway:defaultSchema}, and for every app those differ.",
5590
- "name": "core-schema",
5591
- "default": "__mj",
5781
+ "from": {
5782
+ "description": "Use a local pack source instead of fetching from GitHub",
5783
+ "name": "from",
5592
5784
  "hasDynamicHelp": false,
5593
5785
  "multiple": false,
5594
5786
  "type": "option"
5595
5787
  },
5596
- "baseline-floor": {
5597
- "description": "Re-bake migrations strictly AFTER this version key (default: the latest B* in output-dir)",
5598
- "name": "baseline-floor",
5599
- "hasDynamicHelp": false,
5600
- "multiple": false,
5601
- "type": "option"
5788
+ "offline": {
5789
+ "description": "Forbid network; requires --from <path>",
5790
+ "name": "offline",
5791
+ "allowNo": false,
5792
+ "type": "boolean"
5602
5793
  },
5603
5794
  "dry-run": {
5604
- "description": "Report what would be re-baked without writing files",
5795
+ "description": "Print what would be written; change nothing",
5605
5796
  "name": "dry-run",
5606
5797
  "allowNo": false,
5607
5798
  "type": "boolean"
5799
+ },
5800
+ "yes": {
5801
+ "char": "y",
5802
+ "description": "Don't prompt (reserved for future interactive paths; currently no-op)",
5803
+ "name": "yes",
5804
+ "allowNo": false,
5805
+ "type": "boolean"
5806
+ },
5807
+ "force": {
5808
+ "description": "Overwrite user-customized commands/skills (saves .bak files)",
5809
+ "name": "force",
5810
+ "allowNo": false,
5811
+ "type": "boolean"
5812
+ },
5813
+ "skip-commands": {
5814
+ "description": "Skip seeding .claude/commands/",
5815
+ "name": "skip-commands",
5816
+ "allowNo": false,
5817
+ "type": "boolean"
5818
+ },
5819
+ "skip-skills": {
5820
+ "description": "Skip seeding .claude/skills/",
5821
+ "name": "skip-skills",
5822
+ "allowNo": false,
5823
+ "type": "boolean"
5824
+ },
5825
+ "skip-settings": {
5826
+ "description": "Skip merging .claude/settings.json",
5827
+ "name": "skip-settings",
5828
+ "allowNo": false,
5829
+ "type": "boolean"
5830
+ },
5831
+ "check": {
5832
+ "description": "Compare local pack version to remote without writing anything",
5833
+ "name": "check",
5834
+ "allowNo": false,
5835
+ "type": "boolean"
5836
+ },
5837
+ "refresh-commands": {
5838
+ "description": "Force-resync .claude/commands/* from the pack (saves .bak files)",
5839
+ "name": "refresh-commands",
5840
+ "allowNo": false,
5841
+ "type": "boolean"
5842
+ },
5843
+ "refresh-skills": {
5844
+ "description": "Force-resync .claude/skills/** from the pack (saves .bak files)",
5845
+ "name": "refresh-skills",
5846
+ "allowNo": false,
5847
+ "type": "boolean"
5848
+ },
5849
+ "allow-major": {
5850
+ "description": "Allow the remote pack's major to differ from local MJ's major",
5851
+ "name": "allow-major",
5852
+ "allowNo": false,
5853
+ "type": "boolean"
5854
+ },
5855
+ "json": {
5856
+ "description": "Output as JSON (matches plan §7.5 schema)",
5857
+ "name": "json",
5858
+ "allowNo": false,
5859
+ "type": "boolean"
5860
+ },
5861
+ "verbose": {
5862
+ "char": "v",
5863
+ "description": "Show progress messages",
5864
+ "name": "verbose",
5865
+ "allowNo": false,
5866
+ "type": "boolean"
5608
5867
  }
5609
5868
  },
5610
5869
  "hasDynamicHelp": false,
5611
5870
  "hiddenAliases": [],
5612
- "id": "migrate:rebake",
5871
+ "id": "update:claude",
5613
5872
  "pluginAlias": "@memberjunction/cli",
5614
5873
  "pluginName": "@memberjunction/cli",
5615
5874
  "pluginType": "core",
@@ -5619,14 +5878,14 @@
5619
5878
  "relativePath": [
5620
5879
  "dist",
5621
5880
  "commands",
5622
- "migrate",
5623
- "rebake.js"
5881
+ "update",
5882
+ "claude.js"
5624
5883
  ]
5625
5884
  },
5626
- "migrate:usage": {
5885
+ "update:usage": {
5627
5886
  "aliases": [],
5628
5887
  "args": {},
5629
- "description": "Show usage, flags, examples, and runtime hints for every `mj migrate` command.",
5888
+ "description": "Show usage, flags, examples, and runtime hints for every `mj update` command.",
5630
5889
  "flags": {
5631
5890
  "format": {
5632
5891
  "description": "Output format. Defaults to text on a terminal and json when stdout is piped.",
@@ -5643,7 +5902,7 @@
5643
5902
  },
5644
5903
  "hasDynamicHelp": false,
5645
5904
  "hiddenAliases": [],
5646
- "id": "migrate:usage",
5905
+ "id": "update:usage",
5647
5906
  "pluginAlias": "@memberjunction/cli",
5648
5907
  "pluginName": "@memberjunction/cli",
5649
5908
  "pluginType": "core",
@@ -5653,7 +5912,7 @@
5653
5912
  "relativePath": [
5654
5913
  "dist",
5655
5914
  "commands",
5656
- "migrate",
5915
+ "update",
5657
5916
  "usage.js"
5658
5917
  ]
5659
5918
  },
@@ -7020,5 +7279,5 @@
7020
7279
  ]
7021
7280
  }
7022
7281
  },
7023
- "version": "6.2.0-edge.1"
7282
+ "version": "6.2.0-edge.2"
7024
7283
  }