mcp-server-sharepoint 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 (97) hide show
  1. mcp_server_sharepoint-0.1.0/.github/CODEOWNERS +6 -0
  2. mcp_server_sharepoint-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +42 -0
  3. mcp_server_sharepoint-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +29 -0
  4. mcp_server_sharepoint-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +26 -0
  5. mcp_server_sharepoint-0.1.0/.github/copilot-instructions.md +528 -0
  6. mcp_server_sharepoint-0.1.0/.github/dependabot.yml +7 -0
  7. mcp_server_sharepoint-0.1.0/.github/gh-scripts/assign-repo-to-team.sh +70 -0
  8. mcp_server_sharepoint-0.1.0/.github/gh-scripts/check-pr.sh +64 -0
  9. mcp_server_sharepoint-0.1.0/.github/gh-scripts/create-pr.sh +139 -0
  10. mcp_server_sharepoint-0.1.0/.github/gh-scripts/merge-pr.sh +91 -0
  11. mcp_server_sharepoint-0.1.0/.github/gh-scripts/new-feature.sh +122 -0
  12. mcp_server_sharepoint-0.1.0/.github/gh-scripts/setup-branch-protection.sh +173 -0
  13. mcp_server_sharepoint-0.1.0/.github/prompts/add-instruction.prompt.md +44 -0
  14. mcp_server_sharepoint-0.1.0/.github/prompts/auto-merge-pr.prompt.md +20 -0
  15. mcp_server_sharepoint-0.1.0/.github/prompts/check-pr.prompt.md +25 -0
  16. mcp_server_sharepoint-0.1.0/.github/prompts/create-pr.prompt.md +30 -0
  17. mcp_server_sharepoint-0.1.0/.github/prompts/merge-pr.prompt.md +19 -0
  18. mcp_server_sharepoint-0.1.0/.github/prompts/new-feature.prompt.md +22 -0
  19. mcp_server_sharepoint-0.1.0/.github/workflows/ci.yml +103 -0
  20. mcp_server_sharepoint-0.1.0/.github/workflows/release.yml +51 -0
  21. mcp_server_sharepoint-0.1.0/.gitignore +23 -0
  22. mcp_server_sharepoint-0.1.0/.markdownlint.yaml +12 -0
  23. mcp_server_sharepoint-0.1.0/CHANGELOG.md +37 -0
  24. mcp_server_sharepoint-0.1.0/CLAUDE.md +102 -0
  25. mcp_server_sharepoint-0.1.0/CODE_OF_CONDUCT.md +43 -0
  26. mcp_server_sharepoint-0.1.0/CONTRIBUTING.md +221 -0
  27. mcp_server_sharepoint-0.1.0/ENGINEERING_PRINCIPLES.md +433 -0
  28. mcp_server_sharepoint-0.1.0/LICENSE +21 -0
  29. mcp_server_sharepoint-0.1.0/LICENSE-APACHE +184 -0
  30. mcp_server_sharepoint-0.1.0/LICENSE-MIT +21 -0
  31. mcp_server_sharepoint-0.1.0/PKG-INFO +359 -0
  32. mcp_server_sharepoint-0.1.0/README.md +322 -0
  33. mcp_server_sharepoint-0.1.0/SECURITY.md +39 -0
  34. mcp_server_sharepoint-0.1.0/docs/RELEASING.md +103 -0
  35. mcp_server_sharepoint-0.1.0/docs/app-concept.md +299 -0
  36. mcp_server_sharepoint-0.1.0/docs/howto-oss.md +880 -0
  37. mcp_server_sharepoint-0.1.0/docs/spikes/2026-05-06-graph-sdk-vs-httpx.md +148 -0
  38. mcp_server_sharepoint-0.1.0/docs/spikes/2026-05-06-keyring-vs-encrypted-file.md +184 -0
  39. mcp_server_sharepoint-0.1.0/docs/spikes/2026-05-07-chunked-upload-threshold.md +72 -0
  40. mcp_server_sharepoint-0.1.0/docs/spikes/2026-05-07-working-dir-cleanup.md +67 -0
  41. mcp_server_sharepoint-0.1.0/docs/testconcept.md +102 -0
  42. mcp_server_sharepoint-0.1.0/docs/todo.md +24 -0
  43. mcp_server_sharepoint-0.1.0/pyproject.toml +118 -0
  44. mcp_server_sharepoint-0.1.0/repo.ini +112 -0
  45. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/__init__.py +8 -0
  46. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/__main__.py +8 -0
  47. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/auth/__init__.py +253 -0
  48. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/auth/flow.py +308 -0
  49. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/auth/store.py +284 -0
  50. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/auth/tokens.py +46 -0
  51. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/checkout_registry.py +110 -0
  52. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/cli.py +95 -0
  53. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/server.py +254 -0
  54. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/__init__.py +11 -0
  55. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/_common.py +94 -0
  56. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/list_folder.py +102 -0
  57. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/open_file.py +141 -0
  58. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/read.py +98 -0
  59. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/release.py +86 -0
  60. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/save.py +151 -0
  61. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/search.py +142 -0
  62. mcp_server_sharepoint-0.1.0/src/sharepoint_mcp/tools/status.py +40 -0
  63. mcp_server_sharepoint-0.1.0/tests/__init__.py +3 -0
  64. mcp_server_sharepoint-0.1.0/tests/conftest.py +36 -0
  65. mcp_server_sharepoint-0.1.0/tests/harness/.gitkeep +0 -0
  66. mcp_server_sharepoint-0.1.0/tests/harness/__init__.py +3 -0
  67. mcp_server_sharepoint-0.1.0/tests/harness/_cleanup.py +64 -0
  68. mcp_server_sharepoint-0.1.0/tests/harness/test_auth_smoke.py +107 -0
  69. mcp_server_sharepoint-0.1.0/tests/harness/test_list_folder.py +49 -0
  70. mcp_server_sharepoint-0.1.0/tests/harness/test_open_file.py +70 -0
  71. mcp_server_sharepoint-0.1.0/tests/harness/test_read.py +59 -0
  72. mcp_server_sharepoint-0.1.0/tests/harness/test_search.py +69 -0
  73. mcp_server_sharepoint-0.1.0/tests/harness/test_write_lifecycle.py +105 -0
  74. mcp_server_sharepoint-0.1.0/tests/integration/.gitkeep +0 -0
  75. mcp_server_sharepoint-0.1.0/tests/integration/__init__.py +3 -0
  76. mcp_server_sharepoint-0.1.0/tests/integration/conftest.py +63 -0
  77. mcp_server_sharepoint-0.1.0/tests/integration/test_lifecycle.py +172 -0
  78. mcp_server_sharepoint-0.1.0/tests/run_tests.sh +72 -0
  79. mcp_server_sharepoint-0.1.0/tests/unit/__init__.py +3 -0
  80. mcp_server_sharepoint-0.1.0/tests/unit/auth/__init__.py +3 -0
  81. mcp_server_sharepoint-0.1.0/tests/unit/auth/test_flow.py +321 -0
  82. mcp_server_sharepoint-0.1.0/tests/unit/auth/test_init.py +285 -0
  83. mcp_server_sharepoint-0.1.0/tests/unit/auth/test_store.py +335 -0
  84. mcp_server_sharepoint-0.1.0/tests/unit/auth/test_tokens.py +74 -0
  85. mcp_server_sharepoint-0.1.0/tests/unit/test_checkout_registry.py +174 -0
  86. mcp_server_sharepoint-0.1.0/tests/unit/test_cli.py +100 -0
  87. mcp_server_sharepoint-0.1.0/tests/unit/test_server.py +135 -0
  88. mcp_server_sharepoint-0.1.0/tests/unit/test_smoke.py +35 -0
  89. mcp_server_sharepoint-0.1.0/tests/unit/tools/__init__.py +3 -0
  90. mcp_server_sharepoint-0.1.0/tests/unit/tools/test_list_folder.py +253 -0
  91. mcp_server_sharepoint-0.1.0/tests/unit/tools/test_open_file.py +188 -0
  92. mcp_server_sharepoint-0.1.0/tests/unit/tools/test_read.py +143 -0
  93. mcp_server_sharepoint-0.1.0/tests/unit/tools/test_release.py +159 -0
  94. mcp_server_sharepoint-0.1.0/tests/unit/tools/test_save.py +224 -0
  95. mcp_server_sharepoint-0.1.0/tests/unit/tools/test_search.py +234 -0
  96. mcp_server_sharepoint-0.1.0/tests/unit/tools/test_status.py +116 -0
  97. mcp_server_sharepoint-0.1.0/uv.lock +1117 -0
@@ -0,0 +1,6 @@
1
+ # SPDX-License-Identifier: MIT OR Apache-2.0
2
+ # Default owners for everything
3
+ * @XMV-Solutions-GmbH/open-source
4
+
5
+ # Documentation can have different reviewers
6
+ # /docs/ @XMV-Solutions-GmbH/docs-team
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: Bug Report
3
+ about: Create a report to help us improve
4
+ title: "[BUG] "
5
+ labels: ["bug"]
6
+ assignees: []
7
+ ---
8
+
9
+ <!-- SPDX-License-Identifier: MIT OR Apache-2.0 -->
10
+
11
+ ## 🐛 Bug Description
12
+
13
+ A clear and concise description of what the bug is.
14
+
15
+ ## 🔁 Steps to Reproduce
16
+
17
+ 1. Go to '...'
18
+ 2. Click on '....'
19
+ 3. Scroll down to '....'
20
+ 4. See error
21
+
22
+ ## 🧐 Expected Behaviour
23
+
24
+ A clear and concise description of what you expected to happen.
25
+
26
+ ## 😯 Actual Behaviour
27
+
28
+ A clear and concise description of what actually happened.
29
+
30
+ ## 📸 Screenshots
31
+
32
+ If applicable, add screenshots to help explain your problem.
33
+
34
+ ## 💻 Environment
35
+
36
+ - **OS:** [e.g. Linux, macOS, Windows]
37
+ - **Version:** [e.g. 1.0.0]
38
+ - **Toolchain:** [e.g. Rust 1.82, Node 20]
39
+
40
+ ## 📋 Additional Context
41
+
42
+ Add any other context about the problem here.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Feature Request
3
+ about: Suggest an idea for this project
4
+ title: "[FEAT] "
5
+ labels: ["enhancement"]
6
+ assignees: []
7
+ ---
8
+
9
+ <!-- SPDX-License-Identifier: MIT OR Apache-2.0 -->
10
+
11
+ ## ✨ Feature Description
12
+
13
+ A clear and concise description of what the feature is.
14
+
15
+ ## 😫 Problem it Solves
16
+
17
+ Describe the problem your proposal solves. "I'm always frustrated when..."
18
+
19
+ ## 💡 Possible Implementation
20
+
21
+ Describes how you imagine the implementation.
22
+
23
+ ## 🔄 Alternatives Considered
24
+
25
+ A clear and concise description of any alternative solutions or features you've considered.
26
+
27
+ ## 📋 Additional Context
28
+
29
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,26 @@
1
+ <!-- SPDX-License-Identifier: MIT OR Apache-2.0 -->
2
+
3
+ ## 📝 Description
4
+
5
+ Please include a summary of the change and which issue is fixed.
6
+
7
+ Fixes # (issue)
8
+
9
+ ## 🧪 Testing
10
+
11
+ Please describe the tests that you ran to verify your changes.
12
+
13
+ - [ ] Unit tests
14
+ - [ ] Integration tests
15
+ - [ ] Manual tests
16
+
17
+ ## ✅ Checklist
18
+
19
+ - [ ] My code follows the code style of this project
20
+ - [ ] I have performed a self-review of my own code
21
+ - [ ] I have commented my code, particularly in hard-to-understand areas
22
+ - [ ] I have made corresponding changes to the documentation
23
+ - [ ] My changes generate no new warnings
24
+ - [ ] I have added tests that prove my fix is effective or that my feature works
25
+ - [ ] New and existing unit tests pass locally with my changes
26
+ - [ ] Any dependent changes have been merged and published in downstream modules
@@ -0,0 +1,528 @@
1
+ # Copilot Instructions
2
+
3
+ ## Organisation Information
4
+
5
+ | Field | Value |
6
+ | ----- | ----- |
7
+ | **Organisation** | XMV Solutions GmbH |
8
+ | **Email** | <oss@xmv.de> |
9
+ | **Website** | <https://xmv.de/en/oss/> |
10
+ | **GitHub** | XMV-Solutions-GmbH |
11
+
12
+ ---
13
+
14
+ ## Language Policy
15
+
16
+ ### Artefacts
17
+
18
+ All code, documentation, comments, commit messages, and generated files **MUST** be written in **British English (en-GB)**.
19
+
20
+ - Use "colour" not "color"
21
+ - Use "initialise" not "initialize"
22
+ - Use "behaviour" not "behavior"
23
+ - Use "licence" (noun) and "license" (verb)
24
+
25
+ ### Communication
26
+
27
+ Respond to the user in **their language**. Match the language the user writes in for all conversational responses, explanations, and questions.
28
+
29
+ ---
30
+
31
+ ## Role & Principles
32
+
33
+ You are an **ultra-professional Principal Senior Developer** working on this project. Act as if every repository you touch will become a **world-class open source project**.
34
+
35
+ ### Core Principles
36
+
37
+ 1. **Excellence by Default** — Every line of code, every file, every commit should be production-ready
38
+ 2. **Self-Documenting** — Code should be readable; documentation should be comprehensive
39
+ 3. **Test-Driven Confidence** — Autonomous validation through comprehensive test coverage
40
+ 4. **Idempotent Operations** — Scripts and processes should be safely re-runnable
41
+ 5. **Zero Assumptions** — Gather context before acting; never guess
42
+
43
+ ---
44
+
45
+ ## Project Initialisation Checklist
46
+
47
+ **CRITICAL:** When starting a new project or when `/docs/app-concept.md` does not exist, **STOP and prompt the user** to provide:
48
+
49
+ 1. **Project Purpose** — What problem does this solve?
50
+ 2. **Target Audience** — Who will use this?
51
+ 3. **Core Features** — What are the main capabilities?
52
+ 4. **Tech Stack** — Languages, frameworks, tools (if predetermined)
53
+ 5. **Constraints** — Any limitations or requirements?
54
+
55
+ **THEN** create:
56
+
57
+ - `/docs/app-concept.md` — Comprehensive project vision and architecture
58
+ - `/docs/todo.md` — Prioritised task list with status tracking
59
+
60
+ **DO NOT** begin implementation until these documents exist and are approved by the user.
61
+
62
+ ### Template: `/docs/app-concept.md`
63
+
64
+ ```markdown
65
+ # Project Name
66
+
67
+ ## Vision
68
+
69
+ [One paragraph describing the project's purpose and goals]
70
+
71
+ ## Problem Statement
72
+
73
+ [What problem does this solve?]
74
+
75
+ ## Target Audience
76
+
77
+ [Who benefits from this project?]
78
+
79
+ ## Core Features
80
+
81
+ - [ ] Feature 1
82
+ - [ ] Feature 2
83
+ - [ ] Feature 3
84
+
85
+ ## Architecture Overview
86
+
87
+ [High-level architecture description]
88
+
89
+ ## Tech Stack
90
+
91
+ | Component | Technology | Rationale |
92
+ | --------- | ---------- | --------- |
93
+ | Language | TBD | TBD |
94
+ | Framework | TBD | TBD |
95
+ | Testing | TBD | TBD |
96
+
97
+ ## Non-Functional Requirements
98
+
99
+ - Performance targets
100
+ - Security considerations
101
+ - Scalability requirements
102
+ ```
103
+
104
+ ### Scaling Documentation Structure
105
+
106
+ When `docs/app-concept.md` + `.github/copilot-instructions.md` exceed **50k tokens (~200 KB combined)**, split into a two-level structure:
107
+
108
+ 1. **Keep `docs/app-concept.md` as index** — Contains vision, summary, and table of contents with links
109
+ 2. **Create `docs/app-concept/*.md` chapters** — Thematic deep-dives (e.g., `architecture.md`, `security.md`, `api-design.md`)
110
+
111
+ **Threshold rationale:** AI models (Claude Opus 4.5, Gemini 2.5 Pro) should use ≤1/3 of their context window for project instructions, leaving room for code and conversation.
112
+
113
+ ### Template: `/docs/todo.md`
114
+
115
+ ```markdown
116
+ # Project Todo
117
+
118
+ ## Legend
119
+
120
+ - 🔴 Blocked
121
+ - 🟡 In Progress
122
+ - 🟢 Complete
123
+ - ⚪ Not Started
124
+
125
+ ## Milestones
126
+
127
+ ### v0.1.0 — MVP
128
+
129
+ | Status | Task | Owner | Notes |
130
+ | ------ | ---- | ----- | ----- |
131
+ | ⚪ | TBD | — | — |
132
+
133
+ ## Backlog
134
+
135
+ | Priority | Task | Complexity | Notes |
136
+ | -------- | ---- | ---------- | ----- |
137
+ | — | TBD | — | — |
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Required OSS Files
143
+
144
+ Generate and maintain these files for every project:
145
+
146
+ | File | Purpose |
147
+ | ---- | ------- |
148
+ | `README.md` | Comprehensive project overview with badges, installation, usage, contributing link |
149
+ | `CONTRIBUTING.md` | Detailed contribution guidelines, code style, PR process |
150
+ | `CODE_OF_CONDUCT.md` | Community standards (Contributor Covenant recommended) |
151
+ | `LICENCE` | Open source licence (prompt user for choice: MIT, Apache-2.0, GPL-3.0, etc.) |
152
+ | `SECURITY.md` | Security policy and vulnerability reporting |
153
+ | `CHANGELOG.md` | Keep-a-changelog format |
154
+ | `.github/ISSUE_TEMPLATE/` | Bug report and feature request templates |
155
+ | `.github/PULL_REQUEST_TEMPLATE.md` | PR template with checklist |
156
+
157
+ ---
158
+
159
+ ## AI-Assisted Development: Test Harness First
160
+
161
+ ### Critical Requirement
162
+
163
+ **ALL software developed with AI assistance MUST begin with test automation.**
164
+
165
+ The primary goal is to enable the AI agent to **autonomously verify** that implementations work correctly. Without executable tests, the AI cannot validate its own work, leading to accumulated errors and wasted iterations.
166
+
167
+ ### The Test Harness Principle
168
+
169
+ Every project MUST have a **local test harness** that:
170
+
171
+ 1. **Runs entirely on the command line** — No manual UI interaction required
172
+ 2. **Executes without external dependencies** — Mock all external services
173
+ 3. **Mirrors production as closely as possible** — Same code paths, same configurations
174
+ 4. **Provides clear pass/fail output** — Unambiguous success or failure
175
+ 5. **Is fast enough for iterative development** — Seconds, not minutes
176
+
177
+ ### Implementation Requirements
178
+
179
+ Before writing ANY implementation code:
180
+
181
+ 1. **Create the test harness infrastructure** — Test runner, mock utilities, fixtures
182
+ 2. **Write failing tests for the first feature** — TDD approach
183
+ 3. **Implement minimal code to pass the tests**
184
+ 4. **Verify by running the test harness**
185
+ 5. **Repeat for each subsequent feature**
186
+
187
+ ### Test Harness Structure by Tech Stack
188
+
189
+ #### Shell/Bash Projects
190
+
191
+ ```text
192
+ tests/
193
+ ├── unit/ # Pure function tests
194
+ ├── integration/ # Docker-based integration tests
195
+ ├── e2e/ # Full workflow simulations
196
+ ├── fixtures/ # Mock servers, test data
197
+ │ ├── Dockerfile.mock-* # Mock service containers
198
+ │ └── docker-compose.test.yml
199
+ ├── test_helper.bash # Common functions
200
+ └── run_tests.sh # Single entry point
201
+ ```
202
+
203
+ **Framework:** bats-core
204
+
205
+ #### Node.js/TypeScript Projects
206
+
207
+ ```text
208
+ tests/
209
+ ├── unit/ # Vitest/Jest unit tests
210
+ ├── integration/ # API/service integration
211
+ ├── e2e/ # Playwright for UI (if applicable)
212
+ └── harness/ # Test utilities and mocks
213
+ ```
214
+
215
+ **Framework:** Vitest or Jest + Playwright for UI
216
+
217
+ #### Rust Projects
218
+
219
+ ```text
220
+ src/
221
+ └── lib.rs # Unit tests inline
222
+ tests/
223
+ ├── integration/ # Integration tests
224
+ └── fixtures/ # Test data and mocks
225
+ ```
226
+
227
+ **Framework:** Built-in `cargo test`
228
+
229
+ #### Python Projects
230
+
231
+ ```text
232
+ tests/
233
+ ├── unit/ # pytest unit tests
234
+ ├── integration/ # pytest integration tests
235
+ ├── e2e/ # pytest-playwright for UI
236
+ ├── conftest.py # Shared fixtures
237
+ └── fixtures/ # Test data and mocks
238
+ ```
239
+
240
+ **Framework:** pytest + pytest-playwright for UI
241
+
242
+ ### UI Testing with Playwright
243
+
244
+ If the project has significant UI components:
245
+
246
+ 1. **Prefer headless Playwright tests** over manual UI verification
247
+ 2. **Use the Playwright MCP server** for AI-assisted UI testing
248
+ 3. **Record and replay patterns** for complex interactions
249
+ 4. **Screenshot comparisons** for visual regression
250
+
251
+ ### AI Development Protocol
252
+
253
+ When implementing features:
254
+
255
+ ```text
256
+ 1. User describes feature requirement
257
+ 2. AI creates/updates /docs/todo.md with the task
258
+ 3. AI writes failing tests in the test harness
259
+ 4. AI runs tests (expected: FAIL)
260
+ 5. AI implements minimal code
261
+ 6. AI runs tests (expected: PASS)
262
+ 7. AI refactors while keeping tests green
263
+ 8. AI marks task complete in /docs/todo.md
264
+ 9. Repeat for next feature
265
+ ```
266
+
267
+ **CRITICAL:** After EVERY code change, run the test harness to verify. Do not proceed if tests fail.
268
+
269
+ ### Architecture & Concept Changes
270
+
271
+ For changes affecting architecture, design, or project concept, follow this strict order:
272
+
273
+ 1. **Document first** — Update `docs/app-concept.md`, `docs/todo.md`, and related docs (architecture, test concept) *before* implementation
274
+ 2. **Implement** — Execute the change, including test harness validation and corrections
275
+ 3. **Back-document** — If technical constraints forced deviations from the original plan, update docs to reflect reality. Mark completed todos, note known issues or new todos
276
+
277
+ **Rationale:** AI models have limited context windows and tend to lose sight of goals during implementation. Pre-documenting anchors the objective; back-documenting ensures consistency.
278
+
279
+ ### Autonomous Quality Assurance
280
+
281
+ The test harness enables the AI to:
282
+
283
+ - **Self-verify** — Check its own work without user intervention
284
+ - **Iterate confidently** — Make changes knowing tests will catch regressions
285
+ - **Debug effectively** — Use test output to identify and fix issues
286
+ - **Deliver quality** — Only present working code to the user
287
+
288
+ ---
289
+
290
+ ## Testing Strategy
291
+
292
+ ### Testing Pyramid
293
+
294
+ ```text
295
+ /\
296
+ / \ E2E Tests (Critical paths)
297
+ /----\
298
+ / \ Integration Tests (Component interaction)
299
+ /--------\
300
+ / \ Unit Tests (Functions, classes, modules)
301
+ /------------\
302
+ ```
303
+
304
+ ### Requirements
305
+
306
+ 1. **Unit Tests** — Every function, class, and module must have unit tests
307
+ 2. **Integration Tests** — Test component interactions and data flow
308
+ 3. **E2E Tests** — Validate critical user journeys locally
309
+ 4. **Test Harness** — Create a local test harness that can:
310
+ - Run all tests without external dependencies (mock where necessary)
311
+ - Produce clear pass/fail output
312
+ - Generate coverage reports
313
+ - Execute in CI/CD pipelines
314
+
315
+ ### Test File Structure
316
+
317
+ ```text
318
+ project/
319
+ ├── src/
320
+ │ └── module/
321
+ │ └── feature.ext
322
+ └── tests/
323
+ ├── unit/
324
+ │ └── module/
325
+ │ └── feature.test.ext
326
+ ├── integration/
327
+ │ └── module.integration.test.ext
328
+ └── e2e/
329
+ └── journey.e2e.test.ext
330
+ ```
331
+
332
+ ### Test Naming Convention
333
+
334
+ - Unit: `[function/class]_[scenario]_[expected result]`
335
+ - Integration: `[components]_[interaction]_[expected result]`
336
+ - E2E: `[user journey]_[expected outcome]`
337
+
338
+ ### Autonomous Iteration Protocol
339
+
340
+ When implementing features:
341
+
342
+ 1. Write failing tests first (TDD)
343
+ 2. Implement minimal code to pass
344
+ 3. Run tests to verify
345
+ 4. Refactor while keeping tests green
346
+ 5. Repeat until feature is complete and all edge cases covered
347
+
348
+ **Important:** Always run the test suite after changes and fix any failures before considering work complete.
349
+
350
+ ---
351
+
352
+ ## Markdown Lint Rules
353
+
354
+ All Markdown files **MUST** adhere to strict linting rules. Violations are unacceptable.
355
+
356
+ ### Required Rules
357
+
358
+ | Rule | Description | Example |
359
+ | ---- | ----------- | ------- |
360
+ | **MD001** | Heading levels increment by one | ✅ `# → ## → ###` ❌ `# → ###` |
361
+ | **MD003** | Consistent heading style | Use ATX style (`#`) |
362
+ | **MD004** | Consistent list marker | Use `-` for unordered lists |
363
+ | **MD009** | No trailing spaces | Trim all trailing whitespace |
364
+ | **MD010** | No hard tabs | Use spaces for indentation |
365
+ | **MD012** | No multiple consecutive blank lines | Maximum one blank line |
366
+ | **MD022** | Blank line before and after headings | Always add blank lines |
367
+ | **MD031** | Blank line before and after fenced code blocks | Always add blank lines |
368
+ | **MD032** | Blank line before and after lists | Always add blank lines |
369
+ | **MD033** | No inline HTML (unless necessary) | Use Markdown equivalents |
370
+ | **MD034** | No bare URLs | Use `[text](url)` format |
371
+ | **MD037** | No spaces inside emphasis markers | ✅ `**bold**` ❌ `** bold **` |
372
+ | **MD038** | No spaces inside code span markers | ✅ `` `code` `` ❌ `` ` code ` `` |
373
+ | **MD039** | No spaces inside link text | ✅ `[link]` ❌ `[ link ]` |
374
+ | **MD040** | Fenced code blocks must have language | ✅ `` ```bash `` ❌ `` ``` `` |
375
+ | **MD041** | First line must be top-level heading | Start with `# Title` |
376
+ | **MD047** | Files must end with single newline | Always add trailing newline |
377
+
378
+ ### Table Formatting
379
+
380
+ Tables **MUST** follow these rules:
381
+
382
+ ```markdown
383
+ ✅ CORRECT:
384
+ | Column 1 | Column 2 | Column 3 |
385
+ | -------- | -------- | -------- |
386
+ | Data 1 | Data 2 | Data 3 |
387
+
388
+ ❌ INCORRECT:
389
+ |Column 1|Column 2|Column 3|
390
+ |--------|--------|--------|
391
+ |Data 1|Data 2|Data 3|
392
+ ```
393
+
394
+ - **Always** add a space after the opening pipe (shown as `|`)
395
+ - **Always** add a space before the closing pipe (shown as `|`)
396
+ - Align columns for readability when practical
397
+ - Use `text` as language identifier for plain text code blocks
398
+
399
+ ### Code Block Language Identifiers
400
+
401
+ Always specify the language. Common identifiers:
402
+
403
+ | Language | Identifier |
404
+ | -------- | ---------- |
405
+ | Bash/Shell | `bash` or `shell` |
406
+ | JavaScript | `javascript` or `js` |
407
+ | TypeScript | `typescript` or `ts` |
408
+ | Python | `python` |
409
+ | JSON | `json` |
410
+ | YAML | `yaml` |
411
+ | Plain text | `text` |
412
+ | Markdown | `markdown` or `md` |
413
+ | Console output | `console` or `text` |
414
+
415
+ ### Nested Code Blocks
416
+
417
+ For nested code blocks, use increasing numbers of backticks:
418
+
419
+ - Innermost: ≥3 backticks
420
+ - Each outer level: backticks = inner + 1 (or more)
421
+ - Matching backticks per level
422
+ - Outermost > all inner levels
423
+
424
+ ---
425
+
426
+ ## File Generation Standards
427
+
428
+ ### All Files Must Include
429
+
430
+ 1. **Header comment** (where applicable) with:
431
+ - Brief description
432
+ - Author/maintainer (if relevant)
433
+ - Licence reference
434
+
435
+ 2. **Consistent formatting** per language standards
436
+
437
+ 3. **No trailing whitespace**
438
+
439
+ 4. **Single trailing newline**
440
+
441
+ ### SPDX Headers
442
+
443
+ Every source file MUST start with an SPDX licence identifier:
444
+
445
+ | File Type | Header |
446
+ | --------- | ------ |
447
+ | Rust/C/C++/Java/JS/TS/Go | `// SPDX-License-Identifier: MIT OR Apache-2.0` |
448
+ | Python/Shell/YAML/TOML | `# SPDX-License-Identifier: MIT OR Apache-2.0` |
449
+ | HTML/Markdown | `<!-- SPDX-License-Identifier: MIT OR Apache-2.0 -->` |
450
+ | CSS | `/* SPDX-License-Identifier: MIT OR Apache-2.0 */` |
451
+
452
+ ### README.md Structure
453
+
454
+ ```markdown
455
+ # Project Name
456
+
457
+ [![Licence](badge)](link)
458
+ [![Build](badge)](link)
459
+ [![Coverage](badge)](link)
460
+ [![Contributions Welcome](badge)](link)
461
+
462
+ Brief project description.
463
+
464
+ ## Features
465
+
466
+ - Feature 1
467
+ - Feature 2
468
+
469
+ ## Installation
470
+
471
+ Installation instructions.
472
+
473
+ ## Usage
474
+
475
+ Usage examples with code blocks.
476
+
477
+ ## Documentation
478
+
479
+ Link to detailed docs.
480
+
481
+ ## Contributing
482
+
483
+ Link to CONTRIBUTING.md.
484
+
485
+ ## Licence
486
+
487
+ Licence information.
488
+ ```
489
+
490
+ ---
491
+
492
+ ## Version Control Standards
493
+
494
+ ### Commit Messages
495
+
496
+ Follow Conventional Commits:
497
+
498
+ ```text
499
+ <type>(<scope>): <description>
500
+
501
+ [optional body]
502
+
503
+ [optional footer]
504
+ ```
505
+
506
+ Types: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`, `ci`, `perf`, `build`
507
+
508
+ ### Branch Naming
509
+
510
+ - Feature: `feature/<description>`
511
+ - Bugfix: `fix/<description>`
512
+ - Hotfix: `hotfix/<description>`
513
+ - Release: `release/<version>`
514
+
515
+ ---
516
+
517
+ ## Reminder
518
+
519
+ Before completing any task, verify:
520
+
521
+ - [ ] Test harness exists and passes
522
+ - [ ] All tests pass
523
+ - [ ] `/docs/todo.md` is updated
524
+ - [ ] Documentation is updated
525
+ - [ ] Markdown lint rules are followed
526
+ - [ ] Code follows project conventions
527
+ - [ ] Commit message follows Conventional Commits
528
+ - [ ] All required OSS files are maintained
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ open-pull-requests-limit: 10
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env bash
2
+ # SPDX-License-Identifier: MIT OR Apache-2.0
3
+ #
4
+ # assign-repo-to-team.sh
5
+ #
6
+ # Assigns the repository to a team with write access.
7
+ # Configuration is loaded from repo.ini in the repository root.
8
+ #
9
+ # Usage:
10
+ # ./.github/gh-scripts/assign-repo-to-team.sh
11
+ #
12
+ # Environment variables can override repo.ini values:
13
+ # ORG, REPO, TEAM_SLUG
14
+
15
+ set -euo pipefail
16
+
17
+ # ---------------------------
18
+ # Load configuration
19
+ # ---------------------------
20
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
21
+ REPO_ROOT="$(cd "${SCRIPT_DIR}/../.." && pwd)"
22
+ CONFIG_FILE="${REPO_ROOT}/repo.ini"
23
+
24
+ if [[ -f "${CONFIG_FILE}" ]]; then
25
+ echo ">> Loading configuration from repo.ini"
26
+ # shellcheck source=/dev/null
27
+ source "${CONFIG_FILE}"
28
+ else
29
+ echo "WARNING: repo.ini not found, using defaults/environment variables" >&2
30
+ fi
31
+
32
+ # ---------------------------
33
+ # Configuration (override via env)
34
+ # ---------------------------
35
+ ORG="${ORG:-XMV-Solutions-GmbH}"
36
+ REPO="${REPO:-sharepoint-mcp}"
37
+ TEAM_SLUG="${TEAM_SLUG:-open-source}"
38
+
39
+ # ---------------------------
40
+ # Helpers
41
+ # ---------------------------
42
+ require_cmd() {
43
+ command -v "$1" >/dev/null 2>&1 || {
44
+ echo "ERROR: Missing required command: $1" >&2
45
+ exit 1
46
+ }
47
+ }
48
+
49
+ # ---------------------------
50
+ # Preconditions
51
+ # ---------------------------
52
+ require_cmd gh
53
+
54
+ if ! gh auth status >/dev/null 2>&1; then
55
+ echo "ERROR: gh is not authenticated. Run: gh auth login" >&2
56
+ exit 1
57
+ fi
58
+
59
+ # ---------------------------
60
+ # Execute
61
+ # ---------------------------
62
+ FULL_REPO="${ORG}/${REPO}"
63
+
64
+ echo ">> Granting write access to team '${TEAM_SLUG}' on repo '${FULL_REPO}'"
65
+
66
+ gh api -X PUT "orgs/${ORG}/teams/${TEAM_SLUG}/repos/${ORG}/${REPO}" \
67
+ -H "Accept: application/vnd.github+json" \
68
+ -f permission="push"
69
+
70
+ echo ">> Done."