gitmap-core 0.1.0__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 (151) hide show
  1. gitmap_core-0.1.0/.claude/settings.local.json +16 -0
  2. gitmap_core-0.1.0/.devcontainer/devcontainer.json +22 -0
  3. gitmap_core-0.1.0/.devcontainer/docker-compose.override.yml +2 -0
  4. gitmap_core-0.1.0/.github/FUNDING.yml +15 -0
  5. gitmap_core-0.1.0/.github/workflows/ci.yml +36 -0
  6. gitmap_core-0.1.0/.gitignore +65 -0
  7. gitmap_core-0.1.0/CHANGELOG.md +87 -0
  8. gitmap_core-0.1.0/CLAUDE.md +327 -0
  9. gitmap_core-0.1.0/LICENSE +21 -0
  10. gitmap_core-0.1.0/PKG-INFO +961 -0
  11. gitmap_core-0.1.0/README.md +943 -0
  12. gitmap_core-0.1.0/apps/__init__.py +10 -0
  13. gitmap_core-0.1.0/apps/cli/__init__.py +10 -0
  14. gitmap_core-0.1.0/apps/cli/gitmap/README.md +102 -0
  15. gitmap_core-0.1.0/apps/cli/gitmap/__init__.py +21 -0
  16. gitmap_core-0.1.0/apps/cli/gitmap/commands/__init__.py +17 -0
  17. gitmap_core-0.1.0/apps/cli/gitmap/commands/auto_pull.py +294 -0
  18. gitmap_core-0.1.0/apps/cli/gitmap/commands/branch.py +149 -0
  19. gitmap_core-0.1.0/apps/cli/gitmap/commands/checkout.py +93 -0
  20. gitmap_core-0.1.0/apps/cli/gitmap/commands/cherry_pick.py +106 -0
  21. gitmap_core-0.1.0/apps/cli/gitmap/commands/clone.py +146 -0
  22. gitmap_core-0.1.0/apps/cli/gitmap/commands/commit.py +108 -0
  23. gitmap_core-0.1.0/apps/cli/gitmap/commands/config.py +116 -0
  24. gitmap_core-0.1.0/apps/cli/gitmap/commands/context.py +368 -0
  25. gitmap_core-0.1.0/apps/cli/gitmap/commands/daemon.py +707 -0
  26. gitmap_core-0.1.0/apps/cli/gitmap/commands/diff.py +127 -0
  27. gitmap_core-0.1.0/apps/cli/gitmap/commands/init.py +134 -0
  28. gitmap_core-0.1.0/apps/cli/gitmap/commands/layer-settings-merge.py +1433 -0
  29. gitmap_core-0.1.0/apps/cli/gitmap/commands/list.py +147 -0
  30. gitmap_core-0.1.0/apps/cli/gitmap/commands/log.py +107 -0
  31. gitmap_core-0.1.0/apps/cli/gitmap/commands/merge-from.py +270 -0
  32. gitmap_core-0.1.0/apps/cli/gitmap/commands/merge.py +254 -0
  33. gitmap_core-0.1.0/apps/cli/gitmap/commands/notify.py +214 -0
  34. gitmap_core-0.1.0/apps/cli/gitmap/commands/pull.py +152 -0
  35. gitmap_core-0.1.0/apps/cli/gitmap/commands/push.py +167 -0
  36. gitmap_core-0.1.0/apps/cli/gitmap/commands/revert.py +104 -0
  37. gitmap_core-0.1.0/apps/cli/gitmap/commands/setup_repos.py +275 -0
  38. gitmap_core-0.1.0/apps/cli/gitmap/commands/stash.py +252 -0
  39. gitmap_core-0.1.0/apps/cli/gitmap/commands/status.py +103 -0
  40. gitmap_core-0.1.0/apps/cli/gitmap/commands/tag.py +127 -0
  41. gitmap_core-0.1.0/apps/cli/gitmap/commands/utils.py +46 -0
  42. gitmap_core-0.1.0/apps/cli/gitmap/configs/gitmap_config.json +12 -0
  43. gitmap_core-0.1.0/apps/cli/gitmap/docs/gitmap_spec.md +189 -0
  44. gitmap_core-0.1.0/apps/cli/gitmap/main.py +132 -0
  45. gitmap_core-0.1.0/apps/cli/gitmap/pyproject.toml +34 -0
  46. gitmap_core-0.1.0/apps/cli/gitmap/scripts/__init__.py +11 -0
  47. gitmap_core-0.1.0/apps/client/gitmap-client/README.md +149 -0
  48. gitmap_core-0.1.0/apps/client/gitmap-client/__init__.py +11 -0
  49. gitmap_core-0.1.0/apps/client/gitmap-client/app.py +491 -0
  50. gitmap_core-0.1.0/apps/client/gitmap-client/pyproject.toml +35 -0
  51. gitmap_core-0.1.0/apps/client/gitmap-client/screens/__init__.py +5 -0
  52. gitmap_core-0.1.0/apps/client/gitmap-client/screens/commit_history.py +261 -0
  53. gitmap_core-0.1.0/apps/client/gitmap-client/screens/repo_picker.py +378 -0
  54. gitmap_core-0.1.0/apps/client/gitmap-client/screens/status_view.py +155 -0
  55. gitmap_core-0.1.0/apps/client/gitmap-client/widgets/__init__.py +5 -0
  56. gitmap_core-0.1.0/apps/client/gitmap-client/widgets/status_panel.py +79 -0
  57. gitmap_core-0.1.0/apps/client/gitmap-gui/README.md +220 -0
  58. gitmap_core-0.1.0/apps/client/gitmap-gui/__init__.py +1 -0
  59. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/__init__.py +1 -0
  60. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/app.py +123 -0
  61. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/config.py +15 -0
  62. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/__init__.py +25 -0
  63. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/branch.py +75 -0
  64. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/commit.py +150 -0
  65. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/config.py +64 -0
  66. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/diff.py +70 -0
  67. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/lsm 2.py +388 -0
  68. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/lsm.py +388 -0
  69. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/main.py +10 -0
  70. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/merge.py +148 -0
  71. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/portal.py +81 -0
  72. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/remote.py +154 -0
  73. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/repository.py +133 -0
  74. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/routes/services.py +44 -0
  75. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/static/css/style.css +1633 -0
  76. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/static/js/app.js +2208 -0
  77. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/templates/base.html +315 -0
  78. gitmap_core-0.1.0/apps/client/gitmap-gui/gitmap_gui/utils.py +85 -0
  79. gitmap_core-0.1.0/apps/client/gitmap-gui/pyproject.toml +24 -0
  80. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/CURSOR_MCP_CONFIG.md +62 -0
  81. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/configs/gitmap_mcp_config.json.example +9 -0
  82. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/docs/gitmap_mcp_spec.md +502 -0
  83. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/main.py +164 -0
  84. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/pyproject.toml +33 -0
  85. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/__init__.py +12 -0
  86. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/__init__.py +12 -0
  87. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/branch_tools.py +213 -0
  88. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/commit_tools.py +223 -0
  89. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/context_tools.py +416 -0
  90. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/layer_tools.py +244 -0
  91. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/portal_tools.py +265 -0
  92. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/remote_tools.py +174 -0
  93. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/repository_tools.py +229 -0
  94. gitmap_core-0.1.0/apps/mcp/gitmap-mcp/scripts/tools/utils.py +162 -0
  95. gitmap_core-0.1.0/configs/env.example +19 -0
  96. gitmap_core-0.1.0/docker/Dockerfile +26 -0
  97. gitmap_core-0.1.0/docker-compose.yml.example +43 -0
  98. gitmap_core-0.1.0/documentation/nav_spec.md +47 -0
  99. gitmap_core-0.1.0/documentation/project_specs/00-governance/audit_spec.md +263 -0
  100. gitmap_core-0.1.0/documentation/project_specs/00-governance/docs_spec.md +188 -0
  101. gitmap_core-0.1.0/documentation/project_specs/00-governance/formatting_spec.md +145 -0
  102. gitmap_core-0.1.0/documentation/project_specs/00-governance/ide_agent.md +108 -0
  103. gitmap_core-0.1.0/documentation/project_specs/00-governance/protocols_spec.md +238 -0
  104. gitmap_core-0.1.0/documentation/project_specs/10-architecture/architecture_spec.md +83 -0
  105. gitmap_core-0.1.0/documentation/project_specs/10-architecture/repo_spec.md +175 -0
  106. gitmap_core-0.1.0/documentation/project_specs/20-operations/cut_release_spec.md +67 -0
  107. gitmap_core-0.1.0/documentation/project_specs/20-operations/monorepo_ops_spec.md +119 -0
  108. gitmap_core-0.1.0/documentation/project_specs/20-operations/release_notes.md +289 -0
  109. gitmap_core-0.1.0/documentation/project_specs/20-operations/template_conversion_spec.md +152 -0
  110. gitmap_core-0.1.0/documentation/project_specs/30-apps/apps_add_feature_spec.md +112 -0
  111. gitmap_core-0.1.0/documentation/project_specs/30-apps/apps_folder_spec.md +115 -0
  112. gitmap_core-0.1.0/documentation/project_specs/30-apps/arcgis_api_mapping.md +427 -0
  113. gitmap_core-0.1.0/documentation/project_specs/90-templates/spec_template.md +57 -0
  114. gitmap_core-0.1.0/integrations/openclaw/README.md +90 -0
  115. gitmap_core-0.1.0/integrations/openclaw/index.ts +168 -0
  116. gitmap_core-0.1.0/integrations/openclaw/install.sh +14 -0
  117. gitmap_core-0.1.0/integrations/openclaw/openclaw.plugin.json +16 -0
  118. gitmap_core-0.1.0/integrations/openclaw/server.py +242 -0
  119. gitmap_core-0.1.0/integrations/openclaw/tools.py +477 -0
  120. gitmap_core-0.1.0/packages/__init__.py +10 -0
  121. gitmap_core-0.1.0/packages/gitmap_core/README.md +46 -0
  122. gitmap_core-0.1.0/packages/gitmap_core/__init__.py +100 -0
  123. gitmap_core-0.1.0/packages/gitmap_core/communication.py +346 -0
  124. gitmap_core-0.1.0/packages/gitmap_core/compat.py +408 -0
  125. gitmap_core-0.1.0/packages/gitmap_core/connection.py +232 -0
  126. gitmap_core-0.1.0/packages/gitmap_core/context.py +709 -0
  127. gitmap_core-0.1.0/packages/gitmap_core/diff.py +283 -0
  128. gitmap_core-0.1.0/packages/gitmap_core/maps.py +385 -0
  129. gitmap_core-0.1.0/packages/gitmap_core/merge.py +449 -0
  130. gitmap_core-0.1.0/packages/gitmap_core/models.py +332 -0
  131. gitmap_core-0.1.0/packages/gitmap_core/py.typed +0 -0
  132. gitmap_core-0.1.0/packages/gitmap_core/pyproject.toml +48 -0
  133. gitmap_core-0.1.0/packages/gitmap_core/remote.py +728 -0
  134. gitmap_core-0.1.0/packages/gitmap_core/repository.py +1632 -0
  135. gitmap_core-0.1.0/packages/gitmap_core/tests/__init__.py +1 -0
  136. gitmap_core-0.1.0/packages/gitmap_core/tests/test_communication.py +695 -0
  137. gitmap_core-0.1.0/packages/gitmap_core/tests/test_compat.py +310 -0
  138. gitmap_core-0.1.0/packages/gitmap_core/tests/test_connection.py +314 -0
  139. gitmap_core-0.1.0/packages/gitmap_core/tests/test_context.py +814 -0
  140. gitmap_core-0.1.0/packages/gitmap_core/tests/test_diff.py +567 -0
  141. gitmap_core-0.1.0/packages/gitmap_core/tests/test_init.py +153 -0
  142. gitmap_core-0.1.0/packages/gitmap_core/tests/test_maps.py +642 -0
  143. gitmap_core-0.1.0/packages/gitmap_core/tests/test_merge.py +694 -0
  144. gitmap_core-0.1.0/packages/gitmap_core/tests/test_models.py +410 -0
  145. gitmap_core-0.1.0/packages/gitmap_core/tests/test_remote.py +3014 -0
  146. gitmap_core-0.1.0/packages/gitmap_core/tests/test_repository.py +1639 -0
  147. gitmap_core-0.1.0/packages/gitmap_core/tests/test_visualize.py +902 -0
  148. gitmap_core-0.1.0/packages/gitmap_core/visualize.py +1217 -0
  149. gitmap_core-0.1.0/pyproject.toml +32 -0
  150. gitmap_core-0.1.0/pytest.ini +3 -0
  151. gitmap_core-0.1.0/requirements.txt +5 -0
@@ -0,0 +1,16 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(xargs ls:*)",
5
+ "Bash(tree:*)",
6
+ "Bash(python:*)",
7
+ "Bash(python3:*)",
8
+ "Bash(grep -r \"export\\\\|json\\\\|csv\" /Users/tr/Desktop/Git-Map/apps/cli/gitmap/commands/*.py)",
9
+ "Bash(xargs:*)",
10
+ "Bash(uv run pytest:*)",
11
+ "Bash(docker compose run:*)",
12
+ "Bash(docker compose:*)",
13
+ "Bash(docker compose logs:*)"
14
+ ]
15
+ }
16
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "GitMap ArcGIS",
3
+ "dockerComposeFile": ["../docker-compose.yml", "docker-compose.override.yml"],
4
+ "service": "dev",
5
+ "workspaceFolder": "/app",
6
+ "customizations": {
7
+ "vscode": {
8
+ "extensions": [
9
+ "ms-python.python",
10
+ "ms-python.vscode-pylance",
11
+ "ms-python.black-formatter"
12
+ ],
13
+ "settings": {
14
+ "python.defaultInterpreterPath": "/usr/local/bin/python",
15
+ "python.formatting.provider": "black"
16
+ }
17
+ }
18
+ },
19
+ "postCreateCommand": "pip install -r requirements.txt"
20
+ }
21
+
22
+
@@ -0,0 +1,2 @@
1
+ services:
2
+ dev: {}
@@ -0,0 +1,15 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12
+ polar: # Replace with a single Polar username
13
+ buy_me_a_coffee: tr.14
14
+ thanks_dev: # Replace with a single thanks.dev username
15
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,36 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.11", "3.12", "3.13"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -e "packages/gitmap_core[dev]"
28
+
29
+ - name: Run tests
30
+ run: |
31
+ python -m pytest packages/gitmap_core/tests -v --tb=short
32
+
33
+ - name: Run tests with coverage
34
+ if: matrix.python-version == '3.11'
35
+ run: |
36
+ python -m pytest packages/gitmap_core/tests --cov=packages/gitmap_core --cov-report=term-missing --cov-fail-under=90
@@ -0,0 +1,65 @@
1
+ # macOS
2
+ .DS_Store
3
+ .DS_Store?
4
+ ._*
5
+
6
+ # Python
7
+ *.pyc
8
+ __pycache__/
9
+ *.egg
10
+ *.egg-info/
11
+ dist/
12
+ build/
13
+ *.whl
14
+ *.tar.gz
15
+
16
+ # IDE
17
+ .idea/
18
+ .vscode/
19
+ *.swp
20
+ *.swo
21
+ .cursor/
22
+
23
+ # Environment
24
+ .env
25
+ .env.*
26
+ !.env.example
27
+ configs/.env
28
+ *.env
29
+ .venv/
30
+ venv/
31
+
32
+ # Secrets and credentials
33
+ *.key
34
+ *.pem
35
+ *.p12
36
+ *.pfx
37
+ *.secret
38
+ *_secret
39
+ *_password
40
+ *_token
41
+ *_credential
42
+ secrets/
43
+ credentials/
44
+
45
+ # Logs
46
+ *.log
47
+ logs/
48
+
49
+ # Database
50
+ *.db
51
+ *.sqlite
52
+ *.sqlite3
53
+
54
+ # Temporary files
55
+ *.tmp
56
+ *.temp
57
+ .cache/
58
+
59
+ #data directories
60
+ data/
61
+
62
+ # repositories
63
+ repositories/
64
+ docker-compose.yml
65
+ .coverage
@@ -0,0 +1,87 @@
1
+ # Changelog
2
+
3
+ All notable changes to GitMap will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.5.0] - 2025-02-14
9
+
10
+ ### Added
11
+ - Communication module for Portal user/group notifications
12
+ - Push notifications to group members on production branch updates
13
+ - `notify` command for sending messages to Portal groups
14
+
15
+ ### Changed
16
+ - Improved `__init__.py` efficiency with lazy imports
17
+ - Enhanced test coverage across all core modules (608+ tests)
18
+
19
+ ### Fixed
20
+ - Pytest config path for test collection on fresh clones
21
+ - Type errors in repository and diff modules (mypy compliance)
22
+
23
+ ## [0.4.0] - 2025-02-10
24
+
25
+ ### Added
26
+ - `stash` command to save work-in-progress without committing
27
+ - `cherry-pick` command to apply specific commits to current branch
28
+ - `tag` command for marking specific commits with version labels
29
+ - `revert` command to undo specific commits with inverse changes
30
+ - ArcGIS API version compatibility layer for broader Portal support
31
+
32
+ ### Fixed
33
+ - Folder creation handling for different Portal versions
34
+ - Feature branch pushing to root content (skip folder creation)
35
+ - Empty folder creation result handling
36
+
37
+ ## [0.3.0] - 2025-01-20
38
+
39
+ ### Added
40
+ - Context visualization in multiple formats (Mermaid flowchart, timeline, git-graph, ASCII, HTML)
41
+ - GitHub Actions workflow for automated testing
42
+ - Auto-regenerate context graph on branch, merge, pull, push, and init operations
43
+
44
+ ### Changed
45
+ - Improved flowchart branch/merge linking visualization
46
+ - Enhanced git-graph with merge, LSM, and branch event display
47
+
48
+ ## [0.2.0] - 2025-01-10
49
+
50
+ ### Added
51
+ - Auto-pull daemon with interval-based scheduling
52
+ - Auto-commit functionality with customizable commit messages
53
+ - GitMap TUI client with Textual framework
54
+ - GitMap GUI with modular architecture
55
+ - Services browser with one-click item ID copy
56
+ - LSM (Layer Settings Merge) health check and redesigned page
57
+
58
+ ### Changed
59
+ - Reorganized GUI navigation structure
60
+
61
+ ## [0.1.0] - 2024-12-30
62
+
63
+ ### Added
64
+ - Initial release with core version control features
65
+ - `init` - Initialize a new GitMap repository
66
+ - `clone` - Clone a web map from Portal/AGOL
67
+ - `commit` - Save changes with a message
68
+ - `branch` - Create and manage branches
69
+ - `checkout` - Switch between branches
70
+ - `diff` - Compare map versions
71
+ - `merge` - Merge branches with conflict resolution
72
+ - `push` - Upload changes to Portal/AGOL
73
+ - `pull` - Download changes from Portal/AGOL
74
+ - `log` - View commit history
75
+ - `status` - Show repository status
76
+ - `config` - Manage repository configuration
77
+ - `list` - Discover web maps from Portal
78
+ - `setup-repos` - Bulk repository setup with owner filtering
79
+ - `lsm` - Layer Settings Merge for transferring popup/form settings
80
+
81
+ ---
82
+
83
+ [0.5.0]: https://github.com/14-TR/Git-Map/compare/v0.4.0...v0.5.0
84
+ [0.4.0]: https://github.com/14-TR/Git-Map/compare/v0.3.0...v0.4.0
85
+ [0.3.0]: https://github.com/14-TR/Git-Map/compare/v0.2.0...v0.3.0
86
+ [0.2.0]: https://github.com/14-TR/Git-Map/compare/v0.1.0...v0.2.0
87
+ [0.1.0]: https://github.com/14-TR/Git-Map/releases/tag/v0.1.0
@@ -0,0 +1,327 @@
1
+ # CLAUDE.md - GitMap Project Guide
2
+
3
+ This document is the primary reference for AI assistants (Claude Code, Cursor, etc.) working on the GitMap project.
4
+
5
+ ## Project Overview
6
+
7
+ **GitMap** provides Git-like version control for ArcGIS Online and Enterprise Portal web maps. Branch, commit, diff, merge, push, and pull maps using familiar workflows.
8
+
9
+ ### Monorepo Structure
10
+
11
+ ```
12
+ GitMap/
13
+ ├── apps/ # Runnable applications
14
+ │ ├── cli/gitmap/ # CLI application
15
+ │ ├── client/ # Client applications
16
+ │ │ ├── gitmap-client/ # TUI client (Textual)
17
+ │ │ └── gitmap-gui/ # Web GUI (Flask)
18
+ │ └── mcp/gitmap-mcp/ # MCP server
19
+ ├── packages/ # First-party libraries
20
+ │ └── gitmap_core/ # Core library
21
+ ├── configs/ # Configuration templates
22
+ ├── docker/ # Docker configuration
23
+ └── documentation/ # Specifications and docs
24
+ └── project_specs/ # Detailed specifications
25
+ ```
26
+
27
+ ### Key Applications
28
+
29
+ - **gitmap CLI**: Git-like commands for web map version control
30
+ - **gitmap-gui**: Flask-based web interface for visual management
31
+ - **gitmap-client**: Terminal UI client using Textual framework
32
+ - **gitmap-mcp**: MCP server for IDE integration
33
+
34
+ ---
35
+
36
+ ## Quick Start Commands
37
+
38
+ ```bash
39
+ # Install core library (required for running tests)
40
+ pip install -e packages/gitmap_core
41
+
42
+ # Run tests (no editable install required - pythonpath configured in pyproject.toml)
43
+ pytest
44
+
45
+ # Install CLI
46
+ pip install -e apps/cli/gitmap
47
+
48
+ # Run GUI
49
+ cd apps/client/gitmap-gui && python -m gitmap_gui
50
+
51
+ # Run TUI client
52
+ cd apps/client/gitmap-client && python -m gitmap_client
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Protocol System
58
+
59
+ Before responding to requests, consult `documentation/nav_spec.md` to identify the correct specification. Available protocols:
60
+
61
+ | Protocol | Command Phrases | Governing Spec |
62
+ |----------|-----------------|----------------|
63
+ | `protocols.list` | "list protocols", "what can you do" | protocols_spec.md |
64
+ | `apps.generate_template` | "generate app template", "create app" | apps_folder_spec.md |
65
+ | `apps.add_feature` | "add feature to app", "implement feature" | apps_add_feature_spec.md |
66
+ | `audit.perform` | "audit code", "perform audit" | audit_spec.md |
67
+ | `spec.generate` | "generate spec", "create spec" | spec_template.md |
68
+ | `release.guide` | "release guide", "create release" | cut_release_spec.md |
69
+
70
+ ### Checklist Gate (Mandatory)
71
+
72
+ When a governing spec defines a Prompt Checklist:
73
+ 1. Collect checklist answers one-by-one
74
+ 2. Echo back a summary for confirmation
75
+ 3. **Block ALL edits** until engineer confirms
76
+ 4. Store captured answers in session task list
77
+
78
+ ---
79
+
80
+ ## Python Standards
81
+
82
+ ### Version & Style
83
+
84
+ - **Python**: 3.11+
85
+ - **Formatting**: PEP 8
86
+ - **Docstrings**: PEP 257 (Google-style)
87
+ - **Path Handling**: Always use `pathlib.Path`
88
+ - **Type Hints**: Required for all functions
89
+
90
+ ### Required Import
91
+
92
+ ```python
93
+ from __future__ import annotations
94
+ ```
95
+
96
+ ### Import Order
97
+
98
+ 1. Standard library imports
99
+ 2. Third-party library imports
100
+ 3. Local module imports
101
+
102
+ ### Function Formatting
103
+
104
+ ```python
105
+ # ---- Helper Functions -----------------------------------------------------------------------
106
+
107
+ def example_function(
108
+ param_1: str,
109
+ param_2: int,
110
+ param_3: Optional[str] = None,
111
+ ) -> bool:
112
+ """
113
+ One-line purpose sentence.
114
+
115
+ Args:
116
+ param_1: Description of param_1.
117
+ param_2: Description of param_2.
118
+ param_3: Description of param_3.
119
+
120
+ Returns:
121
+ bool: Description of return value.
122
+
123
+ Raises:
124
+ ValueError: When validation fails.
125
+ """
126
+ return True
127
+ ```
128
+
129
+ ### Exception Handling
130
+
131
+ ```python
132
+ try:
133
+ result = some_operation()
134
+ except SpecificError as specific_error:
135
+ msg = f"Failed to perform operation: {specific_error}"
136
+ raise RuntimeError(msg) from specific_error
137
+ except Exception as general_error:
138
+ msg = f"Unexpected error during operation: {general_error}"
139
+ raise RuntimeError(msg) from general_error
140
+ ```
141
+
142
+ **Rules**:
143
+ - Error alias: `snake_case` of exception + `_error`
144
+ - Message variable: `msg`
145
+ - Always use f-strings (no `.format()` or `%` formatting)
146
+ - Always chain exceptions with `from`
147
+
148
+ ---
149
+
150
+ ## App Structure
151
+
152
+ ### Directory Layout (Required)
153
+
154
+ ```
155
+ apps/[app_group]/[app]/
156
+ ├── docs/
157
+ │ └── [app_name]_spec.md
158
+ ├── configs/
159
+ │ └── [app_name]_config.json
160
+ ├── scripts/ # Core implementation
161
+ ├── main.py # Orchestrator entrypoint
162
+ └── runner.py # Optional; overrides orchestrator
163
+ ```
164
+
165
+ ### Module Docstring Template
166
+
167
+ ```python
168
+ """
169
+ One-line summary.
170
+
171
+ Extended description paragraph(s).
172
+
173
+ Key Features:
174
+ - Feature 1
175
+ - Feature 2
176
+
177
+ Dependencies:
178
+ - dependency 1
179
+ - dependency 2
180
+
181
+ Metadata:
182
+ Author: Name
183
+ Version: 1.0
184
+ """
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Code Quality Checks
190
+
191
+ ### Must-Have
192
+
193
+ - [ ] PEP 8 compliance
194
+ - [ ] Type hints on all functions
195
+ - [ ] Docstrings on all public functions/classes/modules
196
+ - [ ] No hardcoded credentials
197
+ - [ ] pathlib.Path for file operations
198
+ - [ ] Proper exception handling with chaining
199
+ - [ ] Main guard: `if __name__ == '__main__'`
200
+
201
+ ### Avoid
202
+
203
+ - [ ] Bare `except:` clauses
204
+ - [ ] String concatenation for error messages
205
+ - [ ] Relative imports in apps
206
+ - [ ] Deep imports from packages (use public API)
207
+ - [ ] Unnecessary external dependencies
208
+
209
+ ---
210
+
211
+ ## Branching Model
212
+
213
+ ### Branch Types
214
+
215
+ | Prefix | Purpose |
216
+ |--------|---------|
217
+ | `feature/` | New functionality |
218
+ | `bugfix/` | Non-urgent fixes |
219
+ | `hotfix/` | Urgent production fixes |
220
+ | `release/` | Release preparation |
221
+ | `chore/` | Maintenance, dependencies |
222
+ | `refactor/` | Code restructuring |
223
+ | `docs/` | Documentation updates |
224
+
225
+ ### Naming Convention
226
+
227
+ - Child: `[developer]/[type]/[description]`
228
+ - Example: `jdoe/feature/add-layer-merge`
229
+
230
+ ---
231
+
232
+ ## Task Management
233
+
234
+ Maintain lightweight progress visibility:
235
+ - Provide 1-3 sentence status updates before major actions
236
+ - Maintain a concise task list for active goals
237
+ - Update task statuses as work progresses
238
+ - Confirm completion and summarize changes
239
+
240
+ ---
241
+
242
+ ## Tool Output Formatting
243
+
244
+ When a tool returns formatted output (e.g., `table`, `formatted_output`):
245
+ - Use the tool's format directly
246
+ - Do not reformat or restructure the output
247
+ - Preserve the tool's intent
248
+
249
+ ---
250
+
251
+ ## Key Specifications Reference
252
+
253
+ | Topic | Specification File |
254
+ |-------|-------------------|
255
+ | Agent Behavior | `00-governance/ide_agent.md` |
256
+ | Documentation | `00-governance/docs_spec.md` |
257
+ | Formatting | `00-governance/formatting_spec.md` |
258
+ | Protocols | `00-governance/protocols_spec.md` |
259
+ | Code Audit | `00-governance/audit_spec.md` |
260
+ | Architecture | `10-architecture/architecture_spec.md` |
261
+ | Python Standards | `10-architecture/repo_spec.md` |
262
+ | App Structure | `30-apps/apps_folder_spec.md` |
263
+ | Add Features | `30-apps/apps_add_feature_spec.md` |
264
+ | ArcGIS API | `30-apps/arcgis_api_mapping.md` |
265
+
266
+ All specifications are in `documentation/project_specs/`.
267
+
268
+ ---
269
+
270
+ ## ArcGIS Integration
271
+
272
+ GitMap works with ArcGIS Portal and ArcGIS Online. Authentication:
273
+
274
+ ```bash
275
+ # Environment variables
276
+ PORTAL_URL=https://your-org.maps.arcgis.com
277
+ PORTAL_USER=your_username
278
+ PORTAL_PASSWORD=your_password
279
+ ```
280
+
281
+ Key CLI commands:
282
+ - `gitmap clone <item_id>` - Clone web map from Portal
283
+ - `gitmap push` - Push changes to Portal
284
+ - `gitmap pull` - Pull changes from Portal
285
+ - `gitmap lsm` - Layer settings merge (popup/form transfer)
286
+ - `gitmap list` - List available web maps
287
+ - `gitmap context` - Visualize event history
288
+
289
+ ---
290
+
291
+ ## Error Response Protocol
292
+
293
+ 1. Handle errors gracefully without losing context
294
+ 2. Explain issues clearly with actionable solutions
295
+ 3. Guide users through resolution steps
296
+ 4. Never expose sensitive information in error messages
297
+
298
+ ---
299
+
300
+ ## Performance Guidelines
301
+
302
+ - Profile before optimizing
303
+ - Focus on algorithmic complexity first
304
+ - Use generators for large datasets
305
+ - Minimize I/O operations
306
+ - Use context managers for resource cleanup
307
+ - Cache expensive computations
308
+
309
+ ---
310
+
311
+ ## Git Commit Standards
312
+
313
+ When creating commits:
314
+ 1. Run `git status` and `git diff` first
315
+ 2. Summarize the nature of changes
316
+ 3. Draft concise 1-2 sentence message focusing on "why"
317
+ 4. Never commit secrets or credentials
318
+ 5. End commit message with session link when applicable
319
+
320
+ ---
321
+
322
+ ## Links
323
+
324
+ - [Main README](README.md)
325
+ - [Release Notes](documentation/project_specs/20-operations/release_notes.md)
326
+ - [CLI Docs](apps/cli/gitmap/docs/gitmap_spec.md)
327
+ - [MCP Docs](apps/mcp/gitmap-mcp/docs/gitmap_mcp_spec.md)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2026 GitMap Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.