datasecops-cli 0.6.1__tar.gz → 0.7.0b1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. datasecops_cli-0.7.0b1/AGENTS.md +79 -0
  2. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/CHANGELOG.md +96 -25
  3. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/DEVELOPMENT.md +3 -3
  4. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/PKG-INFO +27 -9
  5. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/README.md +24 -7
  6. datasecops_cli-0.7.0b1/docs/dcm.md +224 -0
  7. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/docs/getting-started.md +4 -4
  8. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/docs/git-operations.md +1 -1
  9. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/docs/legacy_plan_of_action.md +15 -15
  10. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/docs/mcp-server.md +4 -4
  11. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/pyproject.toml +4 -3
  12. datasecops_cli-0.7.0b1/scripts/vendor_model.py +43 -0
  13. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/setup.ps1 +6 -11
  14. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/setup.sh +6 -10
  15. datasecops_cli-0.7.0b1/src/datasecops_cli/__init__.py +1 -0
  16. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/config.py +19 -4
  17. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/main.py +538 -119
  18. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/menus/configuration.py +39 -27
  19. datasecops_cli-0.7.0b1/src/datasecops_cli/menus/dcm_operations.py +198 -0
  20. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/menus/development.py +10 -5
  21. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/menus/downloads.py +5 -5
  22. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/models/project_config.py +35 -2
  23. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/bootstrap_service.py +88 -13
  24. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/dbt_runner.py +43 -85
  25. datasecops_cli-0.7.0b1/src/datasecops_cli/services/dcm_orchestrator.py +351 -0
  26. datasecops_cli-0.7.0b1/src/datasecops_cli/services/dcm_pipelines.py +74 -0
  27. datasecops_cli-0.7.0b1/src/datasecops_cli/services/dcm_registry.py +157 -0
  28. datasecops_cli-0.7.0b1/src/datasecops_cli/services/dcm_service.py +206 -0
  29. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/download_service.py +51 -6
  30. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/linting_service.py +48 -6
  31. datasecops_cli-0.7.0b1/src/datasecops_cli/services/model_commands.py +265 -0
  32. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/skill_service.py +6 -6
  33. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/snowflake_service.py +40 -0
  34. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/utilities/display.py +25 -27
  35. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/utilities/mcp.py +1 -1
  36. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_mcp/connection.py +15 -0
  37. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_mcp/server.py +81 -8
  38. datasecops_cli-0.7.0b1/src/datasecops_model/__init__.py +37 -0
  39. datasecops_cli-0.7.0b1/src/datasecops_model/convert.py +233 -0
  40. datasecops_cli-0.7.0b1/src/datasecops_model/diagram.py +394 -0
  41. datasecops_cli-0.7.0b1/src/datasecops_model/expand.py +103 -0
  42. datasecops_cli-0.7.0b1/src/datasecops_model/extract.py +375 -0
  43. datasecops_cli-0.7.0b1/src/datasecops_model/render.py +356 -0
  44. datasecops_cli-0.7.0b1/src/datasecops_model/schema.py +405 -0
  45. datasecops_cli-0.7.0b1/src/datasecops_model/scope.py +149 -0
  46. datasecops_cli-0.7.0b1/src/datasecops_model/scripts.py +234 -0
  47. datasecops_cli-0.7.0b1/src/datasecops_model/starter.py +111 -0
  48. datasecops_cli-0.7.0b1/src/datasecops_model/templates/macros/role.sql +62 -0
  49. datasecops_cli-0.7.0b1/src/datasecops_model/templates/macros/role_guard.sql +70 -0
  50. datasecops_cli-0.7.0b1/src/datasecops_model/templates/macros/warehouse.sql +94 -0
  51. datasecops_cli-0.7.0b1/src/datasecops_model/validate.py +256 -0
  52. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/tests/test_config.py +63 -0
  53. datasecops_cli-0.7.0b1/tests/test_dbt_runner.py +47 -0
  54. datasecops_cli-0.7.0b1/tests/test_dcm_model.py +582 -0
  55. datasecops_cli-0.7.0b1/tests/test_dcm_orchestrator.py +319 -0
  56. datasecops_cli-0.7.0b1/tests/test_dcm_service.py +93 -0
  57. datasecops_cli-0.7.0b1/tests/test_download_service.py +63 -0
  58. datasecops_cli-0.7.0b1/tests/test_linting_service.py +59 -0
  59. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/tests/test_main.py +123 -32
  60. datasecops_cli-0.7.0b1/tests/test_model_commands.py +76 -0
  61. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/tests/test_models.py +27 -0
  62. datasecops_cli-0.6.1/src/datasecops_cli/__init__.py +0 -1
  63. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/.github/workflows/auto-tag.yml +0 -0
  64. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/.github/workflows/publish-cli.yml +0 -0
  65. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/.github/workflows/test.yml +0 -0
  66. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/.gitignore +0 -0
  67. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/LICENSE +0 -0
  68. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/docs/legacy.md +0 -0
  69. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/mcp-servers.json +0 -0
  70. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/menus/__init__.py +0 -0
  71. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/menus/git_operations.py +0 -0
  72. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/models/__init__.py +0 -0
  73. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/models/git_helpers.py +0 -0
  74. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/__init__.py +0 -0
  75. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/dbt_project_generator.py +0 -0
  76. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/directory_scaffolder.py +0 -0
  77. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/git_service.py +0 -0
  78. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/services/upstream_service.py +0 -0
  79. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/utilities/__init__.py +0 -0
  80. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/utilities/file_utils.py +0 -0
  81. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_cli/utilities/yaml_utils.py +0 -0
  82. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_mcp/__init__.py +0 -0
  83. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/src/datasecops_mcp/__main__.py +0 -0
  84. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/tests/__init__.py +0 -0
  85. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/tests/test_file_utils.py +0 -0
  86. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/tests/test_version.py +0 -0
  87. {datasecops_cli-0.6.1 → datasecops_cli-0.7.0b1}/tests/test_yaml_utils.py +0 -0
@@ -0,0 +1,79 @@
1
+ # Instructions for AI agents (and humans) working on the DataSecOps CLI
2
+
3
+ The `datasecops` CLI (Click) is the developer and CI companion to the Orbit (DataSecOps Framework)
4
+ Snowflake Native App (`monitorial-io/monitorial.orbit.nativeapp`). This repository also owns
5
+ `src/datasecops_model`, the DCM model package that the app vendors. See `DEVELOPMENT.md` for setup,
6
+ project structure and publishing.
7
+
8
+ ## Git workflow
9
+
10
+ - **Never commit to `main`.** Every change goes on a branch and reaches `main` through a pull request.
11
+ Keep one branch per open PR; ongoing DCM work goes on `feature/dcm-integration` (PR #31) until it
12
+ is merged.
13
+ - Check `git status` and `git branch --show-current` before changing anything.
14
+ - Others push to shared branches too (e.g. version bumps for beta releases). If a push is rejected,
15
+ `git fetch`, look at the new commits, `git rebase origin/<branch>`, re-run the tests, then push.
16
+ Never force-push a shared branch without asking.
17
+ - Version numbers in `pyproject.toml` and releases (`cli-v*` tags) are the maintainers' call - don't
18
+ bump or tag unless asked.
19
+ - Commit only what you changed; never commit `.venv/`, `__pycache__/`, build output or secrets.
20
+ - Commit messages: a short imperative subject, a body that says why, and the CoCo footer:
21
+
22
+ ```
23
+ Generated with [Snowflake CoCo](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)
24
+
25
+ Co-authored-by: Snowflake CoCo <noreply@snowflake.com>
26
+ ```
27
+
28
+ ## Tests
29
+
30
+ ```bash
31
+ .venv/bin/python -m pytest -q
32
+ ```
33
+
34
+ Run them before every commit and report the real results. Add tests next to the existing ones
35
+ (`tests/test_dcm_model.py` for the model package, `tests/test_dcm_orchestrator.py` for `dcm`
36
+ commands, `tests/test_model_commands.py` for `model` commands, `tests/test_main.py` for Click wiring).
37
+
38
+ ## `datasecops_model` (shared with the native app)
39
+
40
+ - Keep it dependency-light (pydantic; Jinja only lazily) - it also runs inside Snowflake stored
41
+ procedures from the app's `app.zip`.
42
+ - The schema (`datasecops.dcm/v1`) uses `extra="forbid"`: new fields must be optional with defaults so
43
+ existing model files keep loading. A model without `scope` is a full model; a scoped file is one
44
+ repository's slice (see `scope.py`).
45
+ - After changing it: commit here first, then vendor it into the app on an app branch and run the app's
46
+ tests:
47
+
48
+ ```bash
49
+ .venv/bin/python scripts/vendor_model.py <app-repo>/src
50
+ ```
51
+
52
+ `VENDOR.json` records this repository's commit, so vendor after committing. Never edit the app's copy.
53
+ - Starter model defaults: only `DATAOPS_ADMIN`, `DATA_ENGINEER_ADMIN` and `DEVELOPERS`, no warehouses.
54
+ ORGADMIN / GLOBALORGADMIN are optional Snowflake roles (not extracted; validation warns).
55
+ - `extract.to_warehouses` drops values equal to the `warehouse()` macro defaults, except the grant maps
56
+ (`grants`, `application_grants`), which must stay dictionaries.
57
+
58
+ ## CLI conventions
59
+
60
+ - Commands are Click groups in `src/datasecops_cli/main.py`; logic lives in `services/`.
61
+ - Options are consistent across commands: `-p/--project` (repeatable; names, types or `all`),
62
+ `--target`, `--connection/-c`, `--check` for CI checks that must not write files.
63
+ - Commands must work non-interactively in CI (`CI`, `GITHUB_ACTIONS`, `TF_BUILD`, `BUILD_BUILDID`):
64
+ never prompt there; `dcm deploy` stops for manual scripts only at a terminal.
65
+ - Native app procedures are called through `SnowflakeService.call_procedure`, which only allows names
66
+ in `ALLOWED_PROCEDURES`: add new ones there.
67
+ - Say **CoCo**, not "Cortex Code" (the `cortex` command name stays).
68
+
69
+ ## Documentation
70
+
71
+ When commands or behaviour change, update in the same change: `docs/dcm.md` (DCM), `README.md`, and
72
+ an entry under `## [Unreleased]` in `CHANGELOG.md`.
73
+
74
+ ## Working style
75
+
76
+ - Read the code before changing it, keep changes to what was asked, and flag wider changes.
77
+ - Ask before outward-facing or hard-to-reverse actions that weren't requested (opening or merging PRs,
78
+ tagging releases, publishing, running DDL/DML against an account).
79
+ - At the end, say what changed, what was tested (with the results) and what is still to do.
@@ -2,6 +2,77 @@
2
2
 
3
3
  All notable changes to the DataSecOps CLI are documented in this file.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ ### Added
8
+
9
+ - **Shared DCM model (`datasecops_model`)** — one versioned JSON document (`config/dcm_model.json`, schema `datasecops.dcm/v1`) describing every DCM project (type, dir, `depends_on`, targets with deploy roles), the security model (role groups with environment fan-out, SCIM/UGE prefixes, diagram layout) and the warehouses (the `warehouse()` macro arguments, grants, application grants, budgets). The same package is vendored into the DataSecOps native app (`scripts/vendor_model.py`), so the app and the CLI validate, render and draw identically.
10
+ - **`datasecops model` commands** — `import` (build the model from existing hand-written DCM projects), `validate` (hierarchy: cycles, orphans, unknown roles, duplicate grants, SCIM typos, bootstrap mode; cross-project: warehouse grantees exist, `depends_on` acyclic, unique DCM identifiers), `render [--check] [--scaffold] [--manifest]` (generates `roles.sql` / `warehouses.sql` / `manifest.yml` that still use the projects' macros, so the rendered SQL is statement-identical), `scripts [--previous REF] [--ado]` (pre/post auto/manual scripts incl. application grants, budgets, account privileges and REVOKEs for removed privileges), `diagram [--check]` (grid / snowflake-only / entra-links / entra-ace-map SVGs + markdown), `extract [--diff|--merge|--replace]` (current roles, role grants and warehouses via SHOW commands, env-suffixed roles folded back into environment groups), `pull` / `push` (native app ↔ local file), `schema`.
11
+ - **Multi-project DCM** — `--project` is repeatable and accepts project names, types (`security` / `platform` / `custom`) or `all`; projects always run in `depends_on` order and a failed project skips its dependants only. Each target's `deploy_role` is passed to `snow` as `--role`.
12
+ - **`datasecops dcm deploy`** — generates `out/scripts` per project, refuses to deploy while a manual ACCOUNTADMIN pre-deploy script is pending (unless `--pre-manual-done`), runs `pre_auto.sql` → `snow dcm deploy --alias <target>-<build>-<sha>` → records the deployment (with the CI identity) → `post_auto.sql`.
13
+ - **`datasecops dcm plan --summary plan.md --fail-on-changes`** — runs `snow dcm plan --save-output`, summarises `out/plan/plan_result.json` (counts per operation, DROP / REVOKE warnings, manual steps) for PR comments.
14
+ - **Shared environments** in the DCM model: `environments` are defined once and every project inherits them (`<database>.<schema_name>.<OBJECT_NAME><object_suffix>`, owned by the project `owner`); per-project `targets` are now overrides only. Older models load unchanged; `convert_to_environments` (app: *Use shared environments*) lifts identical targets.
15
+ - **`datasecops dcm pipelines`** — downloads the DCM pipelines defined in the native app's Pipelines page (multi-project steps `dcm_cli_setup`, `dcm_model_validate`, `dcm_render_check`, `dcm_generate_scripts`, `dcm_plan_all`, `dcm_deploy_all`; defaults *DCM Pull Request* and *DCM Release* = build → manual pre gate → deploy → manual post gate). `datasecops download dcm` writes the same files. Pipelines are no longer generated locally.
16
+ - **Per-project DCM pipelines** — each DCM pipeline deploys a single project (projects usually live in their own repositories); the app's all-projects *DCM Pull Request* / *DCM Release* pipelines are gone. `datasecops dcm pipelines` writes the app's pipelines (*DCM PR validate* / *DCM deploy*, assigned to DCM projects in the app) once per assigned project as `.github/workflows/dcm-<project>-<file>` / `.azuredevops/dcm-<project>-<file>`, the same paths the app pushes; `--project` limits them to some projects. Their unassigned generic rendering is never written.
17
+ - **One model file per repository** — each repository's `config/dcm_model.json` holds only its part of the model, marked by a `scope` block: a security project gets the RBAC model (plus warehouse names), a platform project the warehouses (plus role names, so grants are still validated), a custom project only its project. `datasecops model pull` writes the current repository's slice (`-p NAME` to choose, `--full` for the whole model), `model push` merges a slice back into the app's model, `model extract` only compares the sections the file holds and `model diagram --check` passes when no security project is selected. Files without `scope` are the full model, as before (`datasecops_model.scope`: `scoped_model`, `merge_scoped`).
18
+ - **`dcm deploy --sync-model`** — step 7 updates the native app's model from the deployed model file after a successful deploy of a project's default target (`api.sync_deployed_model`). The app only applies it when its own part (the repository's projects and RBAC or warehouses) is unchanged since it last exchanged it with git; otherwise the deploy warns and the drift is left for someone to reconcile. Never fails the deploy. The *DCM deploy* pipeline passes it.
19
+ - **Step-by-step `dcm deploy`** — each project's deploy prints numbered steps (generate scripts, manual pre-deploy script, `pre_auto.sql`, `snow dcm deploy`, `post_auto.sql`, manual post-deploy script). At a terminal and in the DCM Operations menu it stops at a manual ACCOUNTADMIN script, names the file and waits for `done` (`show` prints it, `stop` ends the deploy); in CI or with `--no-input` it never waits. The menu no longer asks about manual scripts up front.
20
+ - **`datasecops dcm list` / `dcm deployments`**; the DCM menu works on every project in the model and its "download" option pulls the model from the app or extracts it from Snowflake.
21
+ - **DCM predeploy/postdeploy SQL scripts** — `datasecops dcm deploy` now runs numbered `.sql` scripts from `<project>/predeploy/` before `snow dcm deploy` and `<project>/postdeploy/` after it succeeds (sorted by filename, executed via `snow sql -f`). A failing predeploy script aborts the deploy for that project; a failing postdeploy script is reported (and fails the overall exit code) but doesn't block the already-recorded deployment status. Both folders are optional (missing/empty = no-op) and are also runnable independently via new `datasecops dcm predeploy`/`datasecops dcm postdeploy` subcommands and matching `DCM Operations` menu options. `BootstrapService`'s DCM scaffolding now creates empty `predeploy/`/`postdeploy/` folders alongside `definitions/`. (These folders are now the legacy auto layout: `pre_deployment/{auto,manual}` and `post_deployment/{auto,manual}` are preferred.)
22
+
23
+ ### Changed
24
+
25
+ - **Starter model holds only the framework's own roles** — DATAOPS_ADMIN, DATA_ENGINEER_ADMIN (the `warehouse()` macro's admin role, so the SYSADMIN admin-role override is gone) and DEVELOPERS, and no warehouses; everything else is imported from Snowflake.
26
+ - **Clearer diagram layout errors** — instead of "grouping 'None' is not listed in diagram_groups", the message names the roles without a diagram box and says to set a Grouping, or names the missing box and the roles that use it. Diagram boxes carry `data-box` so the app can drop dragged roles on them.
27
+ - **ORGADMIN / GLOBALORGADMIN are optional Snowflake roles** — they only exist in some accounts (the organization account), so `model extract` / Import from Snowflake no longer records grants to or from them, and a model that references them validates with a warning ("the deploy fails where it does not exist") instead of an unknown-role or bootstrap error.
28
+
29
+ - **No built-in default DCM target** — `dcm_default_target` (and the app DCM config's `default_target`) no longer default to `DEV`; without one a project uses its `default_target`, else its first target.
30
+
31
+ - **Bootstrap scaffolds real DCM projects** from the native app's DCM model (or a starter model using the app's DCM naming convention): valid `manifest.yml` files, generated definitions, the framework macros and the deployment folders, instead of comment-only manifests.
32
+ - **`SnowflakeService.call_procedure` only calls allow-listed native app procedures.**
33
+ - **MCP setup no longer writes tokens into `mcp.json`** — servers read `SNOWFLAKE_PAT`, `GITHUB_PERSONAL_ACCESS_TOKEN` and `AZURE_DEVOPS_PAT` from the environment.
34
+ - **Azure DevOps DCM pipelines are written to `.azuredevops/`** (was `.azuredevops/workflows/`).
35
+ - Removed the "one security + one platform project per target" assumption from project resolution and the MCP DCM tools; added the `dcm_get_model` MCP tool.
36
+
37
+ - **Migrated the non-interactive command tree from `argparse` to Click** — `setup`, `bootstrap`, `download`, and `dcm` (`init`/`analyze`/`plan`/`deploy`) are now a `click` group/subcommands instead of a hand-rolled `argparse.ArgumentParser`. CLI flags, defaults, and exit codes are unchanged; `--help` output is now Click-formatted. The interactive menu system (`menus/*.py`) is unaffected.
38
+ - **Colored output now uses `click.secho`/`click.style` instead of `colorama`** — fixes ANSI escape codes leaking into non-TTY output (e.g. CI/CD logs for `datasecops download`/`datasecops dcm`), since Click auto-detects when stdout isn't a terminal and strips color codes.
39
+ - **`DcmService` now validates the Snowflake connection name** before using it in any `snow`/`snow sql` subprocess call, closing the one dynamic value that wasn't already covered by `_validate_token` (target/alias/project identifiers already were).
40
+ - **`tests/test_main.py` now exercises the CLI via `click.testing.CliRunner`** instead of calling `_build_parser()` directly, giving more faithful coverage of the actual command-line entry point.
41
+
42
+ ### Dependencies
43
+
44
+ - Added `click>=8.1`, `jinja2>=3.1`.
45
+ - Removed `colorama` (no longer used).
46
+
47
+ ### Fixed
48
+
49
+ - **Role hierarchy diagrams: built-in admin roles** — the built-in Snowflake hierarchy (ACCOUNTADMIN > SYSADMIN / SECURITYADMIN > USERADMIN) now sets the rows inside a box, so the admin roles draw as a tree instead of one row with dashed arrows running through each other; a built-in edge the model already has is not drawn twice.
50
+
51
+ ## [0.7.0] - 2026-09-07
52
+
53
+ ### Added
54
+
55
+ - **DCM (Database Change Management) support** — new `DcmService` wraps `snow dcm` commands (analyze, plan, deploy, create, list-deployments) for the security/platform two-project model.
56
+ - **DCM Operations menu** — new interactive menu (init, analyze, plan, deploy, status, download, list projects) accessible from the main menu when `dcm_enabled: true` is set in `.datasecops.yml`.
57
+ - **`datasecops dcm` subcommand** — non-interactive `init`/`analyze`/`plan`/`deploy` commands with `--target`, `--project`, and `--connection` flags for CI/CD pipelines.
58
+ - **DCM MCP tools** — `dcm_list_projects`, `dcm_get_project_status`, and `dcm_get_deployment_targets` exposed to AI coding assistants.
59
+ - **DCM config fields** — `.datasecops.yml` now supports `dcm_enabled`, `dcm_security_dir`, `dcm_platform_dir`, and `dcm_default_target`.
60
+ - **DCM bootstrap scaffolding** — bootstrap can now optionally scaffold a `security/`/`platform/` DCM project structure from the native app's DCM configuration.
61
+ - **`datasecops download dcm`** — downloads DCM configuration and DCM-tagged pipeline templates from the native app for CI/CD use.
62
+ - **`dcm init` now actually registers a project** — requires `--project security|platform` and `--identifier` and calls `snow dcm create`, rather than only printing instructions.
63
+ - **Input validation on `snow dcm` invocations** — project identifiers, targets, and aliases are validated against a safe character set before being passed to `subprocess.run`.
64
+
65
+ ### Fixed
66
+
67
+ - fixed `docs serve` command to target folder correctly
68
+
69
+ ## [0.6.2] - 2026-09-07
70
+
71
+ ### Changed
72
+
73
+ - **Native `dbt docs generate`/`docs serve`** — `docs_serve()` now delegates directly to the engine's `docs serve` command (native in dbt Fusion and dbt Core 2.0+), which builds the site if missing/stale, serves it, and opens the browser itself. Removed the manual `index.html` download and platform-specific terminal/`http.server` spawning workaround, along with the now-unused `docs_generate()` engine branch.
74
+ - **Column-level lineage in generated docs (Fusion)** — `docs_generate()` now runs `dbt compile --write-index --static-analysis strict` before `dbt docs generate --no-compile` on the Fusion engine, so the exported site includes column-level lineage instead of hiding those features.
75
+
5
76
  ## [0.6.1] - 2026-08-20
6
77
 
7
78
  ### Fixed
@@ -18,8 +89,8 @@ All notable changes to the DataSecOps CLI are documented in this file.
18
89
 
19
90
  ### Changed
20
91
 
21
- - **Skill target renamed** — "Cortex Code" target label renamed to "CoCo" to match the native app UI naming convention.
22
- - **Downloads menu label** — "Cortex Code skills" renamed to "AI coding skills".
92
+ - **Skill target renamed** — "CoCo" target label renamed to "CoCo" to match the native app UI naming convention.
93
+ - **Downloads menu label** — "CoCo skills" renamed to "AI coding skills".
23
94
  - **Shared conversion helpers** — extracted `_strip_frontmatter()` and `_prepare_body()` to eliminate duplication across format converters.
24
95
  - **Robust frontmatter stripping** — uses line-boundary matching (`\n---`) instead of simple `split('---', 2)` to avoid false matches in skill body content.
25
96
  - **Cursor description quoting** — `.mdc` description values are now properly quoted and sanitized (newlines removed, quotes escaped).
@@ -63,7 +134,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
63
134
 
64
135
  - **AzureDevOps pipelines download to correct folder** — `download_pipelines` now writes AzureDevOps pipeline files to `.azuredevops/workflows/` instead of the project root, matching the platform convention (similar to how GitHub pipelines are written to `.github/workflows/`).
65
136
  - **MCP server setup recognises all AzureDevOps platform variants** — the initial setup flow in `main.py` now uses case-insensitive matching for the platform name (`"AzureDevOps"` and `"Azure DevOps"` both work), consistent with the menu paths.
66
- - **Cortex Code MCP server uses absolute venv path** — the `datasecops-framework` MCP server entry in `.snowflake/cortex/mcp.json` now uses the absolute path to the project's `.venv/Scripts/datasecops-mcp` (Windows) or `.venv/bin/datasecops-mcp` (Unix) instead of the bare `datasecops-mcp` command, fixing "Process exited with code 1" errors in Cortex Code Desktop when the venv isn't on the system PATH.
137
+ - **CoCo MCP server uses absolute venv path** — the `datasecops-framework` MCP server entry in `.snowflake/cortex/mcp.json` now uses the absolute path to the project's `.venv/Scripts/datasecops-mcp` (Windows) or `.venv/bin/datasecops-mcp` (Unix) instead of the bare `datasecops-mcp` command, fixing "Process exited with code 1" errors in CoCo Desktop when the venv isn't on the system PATH.
67
138
 
68
139
  ## [0.5.4] - 2026-06-05
69
140
 
@@ -89,9 +160,9 @@ All notable changes to the DataSecOps CLI are documented in this file.
89
160
 
90
161
  ### Changed
91
162
 
92
- - **Cortex Code MCP config is now project-level** — MCP server registration for Cortex Code now writes `.snowflake/cortex/mcp.json` in the project root instead of calling `cortex mcp add`. This enables project-scoped MCP servers in Cortex Code Desktop and removes the dependency on the `cortex` binary being installed.
93
- - **All MCP servers included in Cortex Code config** — the datasecops-framework, GitHub, Azure DevOps, and dbt MCP servers are all written to the project-level config file with `"type": "stdio"` field.
94
- - **Cortex Code always available as an AI tool option** — removed the `shutil.which("cortex")` check since we no longer need the cortex binary for MCP configuration.
163
+ - **CoCo MCP config is now project-level** — MCP server registration for CoCo now writes `.snowflake/cortex/mcp.json` in the project root instead of calling `cortex mcp add`. This enables project-scoped MCP servers in CoCo Desktop and removes the dependency on the `cortex` binary being installed.
164
+ - **All MCP servers included in CoCo config** — the datasecops-framework, GitHub, Azure DevOps, and dbt MCP servers are all written to the project-level config file with `"type": "stdio"` field.
165
+ - **CoCo always available as an AI tool option** — removed the `shutil.which("cortex")` check since we no longer need the cortex binary for MCP configuration.
95
166
  - **Expanded `_ALLOWED_PROCEDURES`** — added `get_sqlfluff_config_file` and `get_documentation` to the MCP connection allowlist.
96
167
 
97
168
  ### Fixed
@@ -105,7 +176,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
105
176
 
106
177
  ### Added
107
178
 
108
- - **MCP server CLI arguments** — `datasecops-mcp` now accepts `--connection-name` and `--app-database` arguments, eliminating the dependency on `.datasecops.yml` being in the working directory. This fixes connection failures when AI tools (Cortex Code, Cursor, etc.) launch the MCP server from a different working directory.
179
+ - **MCP server CLI arguments** — `datasecops-mcp` now accepts `--connection-name` and `--app-database` arguments, eliminating the dependency on `.datasecops.yml` being in the working directory. This fixes connection failures when AI tools (CoCo, Cursor, etc.) launch the MCP server from a different working directory.
109
180
  - **`init_snowflake_service()` function** — new public API in `datasecops_mcp.connection` to pre-initialize the Snowflake service singleton with explicit parameters.
110
181
 
111
182
  ### Changed
@@ -205,22 +276,22 @@ All notable changes to the DataSecOps CLI are documented in this file.
205
276
  - **Configuration menu** — new `[4] configure` top-level menu consolidating tool installation and project setup:
206
277
  - Install dbt-core & dbt-snowflake from framework-pinned versions
207
278
  - Install SQLFluff from framework-pinned versions
208
- - Configure MCP servers for VS Code, Cursor, Claude Code, or Cortex Code
279
+ - Configure MCP servers for VS Code, Cursor, Claude Code, or CoCo
209
280
  - Initialize a new dbt project with framework profiles
210
- - Update Cortex Code to the latest version (`cortex update`)
211
- - **Cortex Code agent connection** — new `cortex_connection` field in `.datasecops.yml` to configure the Cortex Code agent connection separately from the SQL connection. Selected during setup, checked on launch with a prompt to update if mismatched.
281
+ - Update CoCo to the latest version (`cortex update`)
282
+ - **CoCo agent connection** — new `cortex_connection` field in `.datasecops.yml` to configure the CoCo agent connection separately from the SQL connection. Selected during setup, checked on launch with a prompt to update if mismatched.
212
283
  - **profiles.yml generation during setup** — setup now connects to Snowflake, fetches framework PROJECT settings and targets, and creates the profile entry in `profiles.yml` at the framework-defined `profile_dir` location. Creates directory and file if missing, preserves existing profiles.
213
284
  - **Profile name resolution during setup** — setup reads `profile_name` from `dbt_project.yml` if it exists, otherwise fetches profiles from the native app (auto-selects single profile, prompts for multiple).
214
- - **MCP server configuration during setup** — setup now offers to configure MCP servers for AI tools (VS Code, Cursor, Claude Code, Cortex Code) with platform auto-detected from framework SOURCE_CONTROL config.
215
- - **Cortex Code and Node.js prerequisite checks** — setup now checks for `cortex` and `node` on PATH alongside existing `dbtf`, `gh`, and `az` checks.
216
- - **Auto-install prerequisites in setup scripts** — `setup.ps1` and `setup.sh` now offer to install missing tools: uv (auto), dbt Fusion (auto), Cortex Code, GitHub CLI (`winget`/`brew`/`apt`), Azure CLI (`winget`/`brew`/`curl`).
285
+ - **MCP server configuration during setup** — setup now offers to configure MCP servers for AI tools (VS Code, Cursor, Claude Code, CoCo) with platform auto-detected from framework SOURCE_CONTROL config.
286
+ - **CoCo and Node.js prerequisite checks** — setup now checks for `cortex` and `node` on PATH alongside existing `dbtf`, `gh`, and `az` checks.
287
+ - **Auto-install prerequisites in setup scripts** — `setup.ps1` and `setup.sh` now offer to install missing tools: uv (auto), dbt Fusion (auto), CoCo, GitHub CLI (`winget`/`brew`/`apt`), Azure CLI (`winget`/`brew`/`curl`).
217
288
 
218
289
  ### Changed
219
290
 
220
291
  - **Main menu renumbered** — configure `[4]`, downloads `[5]`, bootstrap `[6]`, update pkgs `[7]`
221
292
  - **Install options moved to configuration menu** — removed `[14] install lint` from development menu and `[6] install` from SQLFluff lint submenu; removed `[6] new project` and `[7] mcp servers` from downloads menu
222
293
  - **Setup prompt defaults to yes** — `Run setup now?` now defaults to `y` with a branded header
223
- - **Cortex Code launch sets both connections** — runs `cortex connections set` for SQL and `cortex --connection` for agent, with mismatch detection against `settings.json`
294
+ - **CoCo launch sets both connections** — runs `cortex connections set` for SQL and `cortex --connection` for agent, with mismatch detection against `settings.json`
224
295
 
225
296
  ### Fixed
226
297
 
@@ -234,18 +305,18 @@ All notable changes to the DataSecOps CLI are documented in this file.
234
305
 
235
306
  ### Added
236
307
 
237
- - **Launch Cortex Code from main menu** — new option `[3] cortex code` launches the Cortex Code AI coding agent directly from the CLI. Shows an error with install link if `cortex` is not on PATH.
238
- - **Automatic skill registration with Cortex Code** — after installing skills to `~/.cortex/skills/`, the CLI now runs `cortex skill add` to register the directory so skills are immediately discoverable as `$skill-name` commands. Previously skills were written to disk but not registered.
308
+ - **Launch CoCo from main menu** — new option `[3] cortex code` launches the CoCo AI coding agent directly from the CLI. Shows an error with install link if `cortex` is not on PATH.
309
+ - **Automatic skill registration with CoCo** — after installing skills to `~/.cortex/skills/`, the CLI now runs `cortex skill add` to register the directory so skills are immediately discoverable as `$skill-name` commands. Previously skills were written to disk but not registered.
239
310
 
240
311
  ### Changed
241
312
 
242
- - **Main menu renumbered** — downloads moved to `[4]`, bootstrap to `[5]`, update pkgs to `[6]` to accommodate the new Cortex Code option at `[3]`
313
+ - **Main menu renumbered** — downloads moved to `[4]`, bootstrap to `[5]`, update pkgs to `[6]` to accommodate the new CoCo option at `[3]`
243
314
 
244
315
  ## [0.4.0] - 2026-05-16
245
316
 
246
317
  ### Added
247
318
 
248
- - **Framework-aligned project scaffolding** — `datasecops bootstrap` now generates `dbt_project.yml` directly from the native app configuration instead of running `dbtf init`. The generated project matches the `setup-dbt-project` Cortex Code skill specification, including:
319
+ - **Framework-aligned project scaffolding** — `datasecops bootstrap` now generates `dbt_project.yml` directly from the native app configuration instead of running `dbtf init`. The generated project matches the `setup-dbt-project` CoCo skill specification, including:
249
320
  - Model sections based on profile's `MODEL_TYPES` (sources, dimensional_modelling, domains, cortex_models)
250
321
  - Object sections with doc node colors (stored_procedures, tasks, UDFs)
251
322
  - `dispatch` with framework package search order
@@ -264,7 +335,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
264
335
  - `get_support_contacts` — team contact details
265
336
  - **New native app stored procedures** — `api.get_model_definitions()`, `api.get_object_definitions()`, `api.get_source_definitions()`, `api.get_access_groups()`, `api.get_support_contacts()` for CLI/MCP consumption
266
337
  - **New SnowflakeService methods** — both CLI and MCP Snowflake services expose the new stored procedures
267
- - **Multi-IDE skill installation** — skills now install to Cursor (`.cursor/rules/{id}.mdc` with frontmatter) and Claude Code (`.claude/commands/{id}.md`) in addition to Cortex Code. Bootstrap and downloads menu prompt users to select target IDE(s) via a multi-select prompt (`[1] Cortex Code`, `[2] Cursor`, `[3] Claude Code`, `[a] All`)
338
+ - **Multi-IDE skill installation** — skills now install to Cursor (`.cursor/rules/{id}.mdc` with frontmatter) and Claude Code (`.claude/commands/{id}.md`) in addition to CoCo. Bootstrap and downloads menu prompt users to select target IDE(s) via a multi-select prompt (`[1] CoCo`, `[2] Cursor`, `[3] Claude Code`, `[a] All`)
268
339
  - **`select_multiple_from_list` display helper** — new utility for comma-separated multi-select input with "all" shortcut
269
340
 
270
341
  ### Changed
@@ -410,7 +481,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
410
481
 
411
482
  ### Added
412
483
 
413
- - **MCP Server** — new `datasecops-mcp` server exposes framework governance config to AI coding tools (VS Code, Cursor, Cortex Code, Claude Code)
484
+ - **MCP Server** — new `datasecops-mcp` server exposes framework governance config to AI coding tools (VS Code, Cursor, CoCo, Claude Code)
414
485
  - `get_branching_rules` — branch types, naming conventions, ticket requirements
415
486
  - `get_linting_rules` — SQLFluff rules from the native app
416
487
  - `get_dbt_packages` — approved packages with pinned versions
@@ -419,7 +490,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
419
490
  - `get_project_settings` — project paths, execution mode, targets
420
491
  - `get_project_profiles` — all registered dbt projects
421
492
  - `get_deployment_targets` — environment targets with roles and warehouses
422
- - `get_available_skills` — Cortex Code skills metadata
493
+ - `get_available_skills` — CoCo skills metadata
423
494
  - `get_default_macros` — default macros for a project profile
424
495
  - `validate_branch_name` — validates branch names against framework conventions
425
496
  - `get_deployment_workflow` — environment promotion flow
@@ -435,7 +506,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
435
506
  5. Downloads `packages.yml` with approved versions
436
507
  6. Runs `dbt deps`
437
508
  7. Checks SQLFluff version requirements
438
- 8. Installs Cortex Code skills
509
+ 8. Installs CoCo skills
439
510
  - Also available from main menu as option [4]
440
511
 
441
512
  - **Macro downloads** — new `api.get_macros_for_profile` integration
@@ -447,7 +518,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
447
518
  - Check for Node.js (needed for GitHub/Azure DevOps MCP servers)
448
519
  - Install with MCP support (`datasecops-cli[mcp]`)
449
520
  - Optionally install `dbt-mcp`
450
- - Interactively configure MCP servers for VS Code, Cursor, or Cortex Code
521
+ - Interactively configure MCP servers for VS Code, Cursor, or CoCo
451
522
  - Support GitHub and Azure DevOps PAT configuration
452
523
 
453
524
  - **MCP server integration guide** (`mcp-servers.json`) — example config for running framework, dbt, GitHub, and Azure DevOps MCP servers together
@@ -461,7 +532,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
461
532
 
462
533
  ### Documentation
463
534
 
464
- - `docs/getting-started.md` — full setup guide for CLI + MCP servers with VS Code, Cursor, Cortex Code
535
+ - `docs/getting-started.md` — full setup guide for CLI + MCP servers with VS Code, Cursor, CoCo
465
536
  - `docs/mcp-server.md` — MCP server reference with tool documentation, architecture, and usage examples
466
537
  - `README.md` — updated with MCP server section, recommended server stack, and new documentation links
467
538
 
@@ -473,7 +544,7 @@ All notable changes to the DataSecOps CLI are documented in this file.
473
544
  - Interactive menu-driven interface for dbt development, git operations, and configuration downloads
474
545
  - dbt commands via dbt Fusion subprocess (run, build, test, lint, compile, snapshot, freshness, docs, seed, deps, clean, debug, list, retry)
475
546
  - Git operations via GitPython (branching, commit, push, pull, rebase, squash, deploy, cherry-pick)
476
- - Configuration downloads from native app (SQLFluff rules, CI/CD pipelines, dbt packages, Cortex Code skills)
547
+ - Configuration downloads from native app (SQLFluff rules, CI/CD pipelines, dbt packages, CoCo skills)
477
548
  - Framework-enforced branch naming conventions
478
549
  - Environment branch deployment (dev/test/prod)
479
550
  - SQLFluff linting with framework-managed rules
@@ -13,7 +13,7 @@ Before running setup, ensure you have:
13
13
 
14
14
  Optional but recommended:
15
15
 
16
- - **dbt Fusion** (or dbt-core with dbt-snowflake) — required for dbt commands
16
+ - **dbt 2.x** (`pip install dbt`) or **dbt Core 1.x** (`pip install dbt-core dbt-snowflake`) — required for dbt commands
17
17
  - **Cortex Code** — required for skill downloads
18
18
 
19
19
  ## Quick Start
@@ -75,12 +75,12 @@ This connects to the native app, loads your project configuration, and presents
75
75
 
76
76
  ### Development Menu
77
77
 
78
- Run dbt commands via dbt Fusion:
78
+ Run dbt commands via dbt 2.x or dbt Core 1.x (configured engine):
79
79
 
80
80
  - **run** — full run, modified only (`state:modified+`), or specific models
81
81
  - **build** — run + test in one command
82
82
  - **test** — all tests or specific selectors
83
- - **lint** — SQLFluff lint/fix on modified files or entire project
83
+ - **lint** — SQLFluff lint/fix (dbt Core 1.x) or `dbt lint`/`dbt lint --fix` (dbt 2.x) on modified files or entire project
84
84
  - **deps** — install dbt packages
85
85
  - **seed** — load seed data
86
86
  - **compile** — compile models
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: datasecops-cli
3
- Version: 0.6.1
3
+ Version: 0.7.0b1
4
4
  Summary: DataSecOps Framework CLI for Snowflake Native App
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
7
7
  Requires-Python: >=3.10
8
- Requires-Dist: colorama>=0.4
8
+ Requires-Dist: click>=8.1
9
9
  Requires-Dist: gitpython>=3.1
10
+ Requires-Dist: jinja2>=3.1
10
11
  Requires-Dist: pydantic>=2.0
11
12
  Requires-Dist: pyyaml>=6.0
12
13
  Requires-Dist: snowflake-connector-python>=3.0
@@ -27,10 +28,11 @@ The DataSecOps CLI is the local developer companion to the **Data Engineers Data
27
28
 
28
29
  This CLI connects to the native app and gives developers:
29
30
 
30
- - **dbt development commands** — run, build, test, lint, and manage dbt projects via dbt Fusion
31
+ - **dbt development commands** — run, build, test, lint, and manage dbt projects via dbt 2.x or dbt Core 1.x
31
32
  - **Source control operations** — branching, committing, rebasing, and deploying via GitPython with naming conventions enforced by the framework
32
- - **Configuration downloads** — pull SQLFluff rules, CI/CD pipelines, dbt packages, and Cortex Code skills from the native app to your local project
33
- - **MCP server** — expose framework governance rules to AI coding assistants (VS Code, Cursor, Cortex Code, Claude Code)
33
+ - **DCM projects** — validate, render, plan and deploy any number of Snowflake DCM projects from the shared DCM model (`config/dcm_model.json`), in dependency order with each project's deploy role
34
+ - **Configuration downloads** — pull SQLFluff rules, CI/CD pipelines, dbt packages, and CoCo skills from the native app to your local project
35
+ - **MCP server** — expose framework governance rules to AI coding assistants (VS Code, Cursor, CoCo, Claude Code)
34
36
 
35
37
  ## Installation
36
38
 
@@ -54,8 +56,8 @@ Requires Python 3.10 or later.
54
56
 
55
57
  Optional:
56
58
 
57
- - **dbt Fusion** — required for dbt commands (`dbtf`). Install from https://docs.getdbt.com/docs/core/installation
58
- - **Cortex Code** for skill downloads
59
+ - **dbt** — required for dbt commands (`dbt`). Install via `pip install dbt` (dbt 2.x) or `pip install dbt-core dbt-snowflake` (dbt Core 1.x), matching the engine configured in the native app's Project Settings.
60
+ - **CoCo** for skill downloads
59
61
  - **Node.js 18+** for GitHub/Azure DevOps MCP servers
60
62
 
61
63
  ## Quick Start
@@ -82,7 +84,8 @@ datasecops
82
84
  |------|-------------|
83
85
  | **Development** | dbt run, build, test, lint (SQLFluff), deps, seed, compile, snapshot, freshness, docs |
84
86
  | **Git** | Branch create/checkout/delete, commit & push, rebase, squash, deploy to environment branches, cherry-pick, reset branch from main |
85
- | **Downloads** | SQLFluff config, CI/CD pipelines (GitHub Actions / Azure DevOps), dbt packages, Cortex Code skills |
87
+ | **DCM Operations** | Plan, deploy, status, download and list the DCM projects in the model |
88
+ | **Downloads** | SQLFluff config, CI/CD pipelines (GitHub Actions / Azure DevOps), dbt packages, CoCo skills |
86
89
 
87
90
  ## Non-Interactive Mode (CI/CD)
88
91
 
@@ -143,6 +146,21 @@ Your pipeline needs two things:
143
146
 
144
147
  The exit code is `0` on success, `1` if any download fails.
145
148
 
149
+ ## DCM projects
150
+
151
+ ```bash
152
+ datasecops model pull # native app -> config/dcm_model.json (this repo's projects; --full = all)
153
+ datasecops model validate
154
+ datasecops model render --check # generated definitions are current
155
+ datasecops dcm plan -p security --target PROD --summary dcm-plan.md
156
+ datasecops dcm deploy -p security --target PROD
157
+ datasecops dcm pipelines # the app-defined pipelines assigned to each project
158
+ ```
159
+
160
+ Each DCM project usually lives in its own repository, and its pipelines (*DCM PR validate*, *DCM
161
+ deploy*) plan and deploy that single project. See [docs/dcm.md](docs/dcm.md) for the model, every
162
+ command, the deployment scripts and the pipelines.
163
+
146
164
  ## MCP Server
147
165
 
148
166
  The package includes an MCP (Model Context Protocol) server that exposes your framework's governance configuration to AI coding assistants. Instead of static skill files, the MCP server gives AI tools live access to your native app's current rules.
@@ -158,7 +176,7 @@ The package includes an MCP (Model Context Protocol) server that exposes your fr
158
176
 
159
177
  ### Setup for AI Tools
160
178
 
161
- **Cortex Code** — add to `.snowflake/cortex/mcp.json` in your project root:
179
+ **CoCo** — add to `.snowflake/cortex/mcp.json` in your project root:
162
180
 
163
181
  ```json
164
182
  {
@@ -8,10 +8,11 @@ The DataSecOps CLI is the local developer companion to the **Data Engineers Data
8
8
 
9
9
  This CLI connects to the native app and gives developers:
10
10
 
11
- - **dbt development commands** — run, build, test, lint, and manage dbt projects via dbt Fusion
11
+ - **dbt development commands** — run, build, test, lint, and manage dbt projects via dbt 2.x or dbt Core 1.x
12
12
  - **Source control operations** — branching, committing, rebasing, and deploying via GitPython with naming conventions enforced by the framework
13
- - **Configuration downloads** — pull SQLFluff rules, CI/CD pipelines, dbt packages, and Cortex Code skills from the native app to your local project
14
- - **MCP server** — expose framework governance rules to AI coding assistants (VS Code, Cursor, Cortex Code, Claude Code)
13
+ - **DCM projects** — validate, render, plan and deploy any number of Snowflake DCM projects from the shared DCM model (`config/dcm_model.json`), in dependency order with each project's deploy role
14
+ - **Configuration downloads** — pull SQLFluff rules, CI/CD pipelines, dbt packages, and CoCo skills from the native app to your local project
15
+ - **MCP server** — expose framework governance rules to AI coding assistants (VS Code, Cursor, CoCo, Claude Code)
15
16
 
16
17
  ## Installation
17
18
 
@@ -35,8 +36,8 @@ Requires Python 3.10 or later.
35
36
 
36
37
  Optional:
37
38
 
38
- - **dbt Fusion** — required for dbt commands (`dbtf`). Install from https://docs.getdbt.com/docs/core/installation
39
- - **Cortex Code** for skill downloads
39
+ - **dbt** — required for dbt commands (`dbt`). Install via `pip install dbt` (dbt 2.x) or `pip install dbt-core dbt-snowflake` (dbt Core 1.x), matching the engine configured in the native app's Project Settings.
40
+ - **CoCo** for skill downloads
40
41
  - **Node.js 18+** for GitHub/Azure DevOps MCP servers
41
42
 
42
43
  ## Quick Start
@@ -63,7 +64,8 @@ datasecops
63
64
  |------|-------------|
64
65
  | **Development** | dbt run, build, test, lint (SQLFluff), deps, seed, compile, snapshot, freshness, docs |
65
66
  | **Git** | Branch create/checkout/delete, commit & push, rebase, squash, deploy to environment branches, cherry-pick, reset branch from main |
66
- | **Downloads** | SQLFluff config, CI/CD pipelines (GitHub Actions / Azure DevOps), dbt packages, Cortex Code skills |
67
+ | **DCM Operations** | Plan, deploy, status, download and list the DCM projects in the model |
68
+ | **Downloads** | SQLFluff config, CI/CD pipelines (GitHub Actions / Azure DevOps), dbt packages, CoCo skills |
67
69
 
68
70
  ## Non-Interactive Mode (CI/CD)
69
71
 
@@ -124,6 +126,21 @@ Your pipeline needs two things:
124
126
 
125
127
  The exit code is `0` on success, `1` if any download fails.
126
128
 
129
+ ## DCM projects
130
+
131
+ ```bash
132
+ datasecops model pull # native app -> config/dcm_model.json (this repo's projects; --full = all)
133
+ datasecops model validate
134
+ datasecops model render --check # generated definitions are current
135
+ datasecops dcm plan -p security --target PROD --summary dcm-plan.md
136
+ datasecops dcm deploy -p security --target PROD
137
+ datasecops dcm pipelines # the app-defined pipelines assigned to each project
138
+ ```
139
+
140
+ Each DCM project usually lives in its own repository, and its pipelines (*DCM PR validate*, *DCM
141
+ deploy*) plan and deploy that single project. See [docs/dcm.md](docs/dcm.md) for the model, every
142
+ command, the deployment scripts and the pipelines.
143
+
127
144
  ## MCP Server
128
145
 
129
146
  The package includes an MCP (Model Context Protocol) server that exposes your framework's governance configuration to AI coding assistants. Instead of static skill files, the MCP server gives AI tools live access to your native app's current rules.
@@ -139,7 +156,7 @@ The package includes an MCP (Model Context Protocol) server that exposes your fr
139
156
 
140
157
  ### Setup for AI Tools
141
158
 
142
- **Cortex Code** — add to `.snowflake/cortex/mcp.json` in your project root:
159
+ **CoCo** — add to `.snowflake/cortex/mcp.json` in your project root:
143
160
 
144
161
  ```json
145
162
  {