mindforge-cc 1.0.0
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.
- package/.agent/CLAUDE.md +462 -0
- package/.agent/forge/help.md +7 -0
- package/.agent/forge/init-project.md +32 -0
- package/.agent/forge/plan-phase.md +30 -0
- package/.agent/mindforge/approve.md +18 -0
- package/.agent/mindforge/audit.md +30 -0
- package/.agent/mindforge/benchmark.md +33 -0
- package/.agent/mindforge/complete-milestone.md +18 -0
- package/.agent/mindforge/debug.md +126 -0
- package/.agent/mindforge/discuss-phase.md +138 -0
- package/.agent/mindforge/execute-phase.md +165 -0
- package/.agent/mindforge/health.md +21 -0
- package/.agent/mindforge/help.md +23 -0
- package/.agent/mindforge/init-org.md +131 -0
- package/.agent/mindforge/init-project.md +155 -0
- package/.agent/mindforge/install-skill.md +15 -0
- package/.agent/mindforge/map-codebase.md +298 -0
- package/.agent/mindforge/metrics.md +22 -0
- package/.agent/mindforge/migrate.md +40 -0
- package/.agent/mindforge/milestone.md +12 -0
- package/.agent/mindforge/next.md +105 -0
- package/.agent/mindforge/plan-phase.md +125 -0
- package/.agent/mindforge/plugins.md +40 -0
- package/.agent/mindforge/pr-review.md +41 -0
- package/.agent/mindforge/profile-team.md +23 -0
- package/.agent/mindforge/publish-skill.md +19 -0
- package/.agent/mindforge/quick.md +135 -0
- package/.agent/mindforge/release.md +10 -0
- package/.agent/mindforge/retrospective.md +26 -0
- package/.agent/mindforge/review.md +157 -0
- package/.agent/mindforge/security-scan.md +233 -0
- package/.agent/mindforge/ship.md +100 -0
- package/.agent/mindforge/skills.md +141 -0
- package/.agent/mindforge/status.md +104 -0
- package/.agent/mindforge/sync-confluence.md +11 -0
- package/.agent/mindforge/sync-jira.md +12 -0
- package/.agent/mindforge/tokens.md +8 -0
- package/.agent/mindforge/update.md +42 -0
- package/.agent/mindforge/verify-phase.md +62 -0
- package/.agent/mindforge/workspace.md +29 -0
- package/.claude/CLAUDE.md +462 -0
- package/.claude/commands/forge/help.md +7 -0
- package/.claude/commands/forge/init-project.md +32 -0
- package/.claude/commands/forge/plan-phase.md +30 -0
- package/.claude/commands/mindforge/approve.md +18 -0
- package/.claude/commands/mindforge/audit.md +30 -0
- package/.claude/commands/mindforge/benchmark.md +33 -0
- package/.claude/commands/mindforge/complete-milestone.md +18 -0
- package/.claude/commands/mindforge/debug.md +126 -0
- package/.claude/commands/mindforge/discuss-phase.md +138 -0
- package/.claude/commands/mindforge/execute-phase.md +165 -0
- package/.claude/commands/mindforge/health.md +21 -0
- package/.claude/commands/mindforge/help.md +23 -0
- package/.claude/commands/mindforge/init-org.md +131 -0
- package/.claude/commands/mindforge/init-project.md +155 -0
- package/.claude/commands/mindforge/install-skill.md +15 -0
- package/.claude/commands/mindforge/map-codebase.md +298 -0
- package/.claude/commands/mindforge/metrics.md +22 -0
- package/.claude/commands/mindforge/migrate.md +40 -0
- package/.claude/commands/mindforge/milestone.md +12 -0
- package/.claude/commands/mindforge/next.md +105 -0
- package/.claude/commands/mindforge/plan-phase.md +125 -0
- package/.claude/commands/mindforge/plugins.md +40 -0
- package/.claude/commands/mindforge/pr-review.md +41 -0
- package/.claude/commands/mindforge/profile-team.md +23 -0
- package/.claude/commands/mindforge/publish-skill.md +19 -0
- package/.claude/commands/mindforge/quick.md +135 -0
- package/.claude/commands/mindforge/release.md +10 -0
- package/.claude/commands/mindforge/retrospective.md +26 -0
- package/.claude/commands/mindforge/review.md +157 -0
- package/.claude/commands/mindforge/security-scan.md +233 -0
- package/.claude/commands/mindforge/ship.md +100 -0
- package/.claude/commands/mindforge/skills.md +141 -0
- package/.claude/commands/mindforge/status.md +104 -0
- package/.claude/commands/mindforge/sync-confluence.md +11 -0
- package/.claude/commands/mindforge/sync-jira.md +12 -0
- package/.claude/commands/mindforge/tokens.md +8 -0
- package/.claude/commands/mindforge/update.md +42 -0
- package/.claude/commands/mindforge/verify-phase.md +62 -0
- package/.claude/commands/mindforge/workspace.md +29 -0
- package/.forge/org/CONVENTIONS.md +0 -0
- package/.forge/org/ORG.md +0 -0
- package/.forge/org/SECURITY.md +0 -0
- package/.forge/org/TOOLS.md +0 -0
- package/.forge/personas/analyst.md +0 -0
- package/.forge/personas/architect.md +0 -0
- package/.forge/personas/debug-specialist.md +0 -0
- package/.forge/personas/developer.md +26 -0
- package/.forge/personas/qa-engineer.md +0 -0
- package/.forge/personas/release-manager.md +0 -0
- package/.forge/personas/security-reviewer.md +33 -0
- package/.forge/personas/tech-writer.md +0 -0
- package/.forge/skills/api-design/SKILL.md +0 -0
- package/.forge/skills/code-quality/SKILL.md +0 -0
- package/.forge/skills/documentation/SKILL.md +0 -0
- package/.forge/skills/security-review/SKILL.md +23 -0
- package/.forge/skills/testing-standards/SKILL.md +27 -0
- package/.github/workflows/mindforge-ci.yml +224 -0
- package/.gitlab-ci-mindforge.yml +18 -0
- package/.mindforge/MINDFORGE-SCHEMA.json +165 -0
- package/.mindforge/audit/AUDIT-SCHEMA.md +451 -0
- package/.mindforge/ci/ci-config-schema.md +21 -0
- package/.mindforge/ci/ci-mode.md +179 -0
- package/.mindforge/ci/github-actions-adapter.md +224 -0
- package/.mindforge/ci/gitlab-ci-adapter.md +31 -0
- package/.mindforge/ci/jenkins-adapter.md +44 -0
- package/.mindforge/distribution/registry-client.md +166 -0
- package/.mindforge/distribution/registry-schema.md +96 -0
- package/.mindforge/distribution/skill-publisher.md +44 -0
- package/.mindforge/distribution/skill-validator.md +74 -0
- package/.mindforge/engine/compaction-protocol.md +182 -0
- package/.mindforge/engine/context-injector.md +128 -0
- package/.mindforge/engine/dependency-parser.md +113 -0
- package/.mindforge/engine/skills/conflict-resolver.md +69 -0
- package/.mindforge/engine/skills/loader.md +184 -0
- package/.mindforge/engine/skills/registry.md +98 -0
- package/.mindforge/engine/skills/versioning.md +75 -0
- package/.mindforge/engine/verification-pipeline.md +111 -0
- package/.mindforge/engine/wave-executor.md +235 -0
- package/.mindforge/governance/GOVERNANCE-CONFIG.md +17 -0
- package/.mindforge/governance/approval-workflow.md +37 -0
- package/.mindforge/governance/change-classifier.md +63 -0
- package/.mindforge/governance/compliance-gates.md +31 -0
- package/.mindforge/integrations/confluence.md +27 -0
- package/.mindforge/integrations/connection-manager.md +163 -0
- package/.mindforge/integrations/github.md +25 -0
- package/.mindforge/integrations/gitlab.md +13 -0
- package/.mindforge/integrations/jira.md +102 -0
- package/.mindforge/integrations/slack.md +41 -0
- package/.mindforge/intelligence/antipattern-detector.md +75 -0
- package/.mindforge/intelligence/difficulty-scorer.md +55 -0
- package/.mindforge/intelligence/health-engine.md +208 -0
- package/.mindforge/intelligence/skill-gap-analyser.md +40 -0
- package/.mindforge/intelligence/smart-compaction.md +71 -0
- package/.mindforge/metrics/METRICS-SCHEMA.md +42 -0
- package/.mindforge/metrics/quality-tracker.md +32 -0
- package/.mindforge/monorepo/cross-package-planner.md +114 -0
- package/.mindforge/monorepo/dependency-graph-builder.md +32 -0
- package/.mindforge/monorepo/workspace-detector.md +129 -0
- package/.mindforge/org/CONVENTIONS.md +62 -0
- package/.mindforge/org/ORG.md +51 -0
- package/.mindforge/org/SECURITY.md +50 -0
- package/.mindforge/org/TOOLS.md +53 -0
- package/.mindforge/org/integrations/INTEGRATIONS-CONFIG.md +58 -0
- package/.mindforge/org/skills/MANIFEST.md +38 -0
- package/.mindforge/personas/analyst.md +52 -0
- package/.mindforge/personas/architect.md +75 -0
- package/.mindforge/personas/debug-specialist.md +52 -0
- package/.mindforge/personas/developer.md +85 -0
- package/.mindforge/personas/overrides/README.md +85 -0
- package/.mindforge/personas/qa-engineer.md +61 -0
- package/.mindforge/personas/release-manager.md +76 -0
- package/.mindforge/personas/security-reviewer.md +91 -0
- package/.mindforge/personas/tech-writer.md +51 -0
- package/.mindforge/plugins/PLUGINS-MANIFEST.md +23 -0
- package/.mindforge/plugins/plugin-loader.md +93 -0
- package/.mindforge/plugins/plugin-registry.md +44 -0
- package/.mindforge/plugins/plugin-schema.md +68 -0
- package/.mindforge/pr-review/ai-reviewer.md +266 -0
- package/.mindforge/pr-review/finding-formatter.md +46 -0
- package/.mindforge/pr-review/review-prompt-templates.md +44 -0
- package/.mindforge/production/compatibility-layer.md +39 -0
- package/.mindforge/production/migration-engine.md +52 -0
- package/.mindforge/production/production-checklist.md +165 -0
- package/.mindforge/production/token-optimiser.md +68 -0
- package/.mindforge/skills/accessibility/SKILL.md +106 -0
- package/.mindforge/skills/api-design/SKILL.md +98 -0
- package/.mindforge/skills/code-quality/SKILL.md +88 -0
- package/.mindforge/skills/data-privacy/SKILL.md +126 -0
- package/.mindforge/skills/database-patterns/SKILL.md +192 -0
- package/.mindforge/skills/documentation/SKILL.md +91 -0
- package/.mindforge/skills/incident-response/SKILL.md +180 -0
- package/.mindforge/skills/performance/SKILL.md +120 -0
- package/.mindforge/skills/security-review/SKILL.md +83 -0
- package/.mindforge/skills/testing-standards/SKILL.md +97 -0
- package/.mindforge/team/TEAM-PROFILE.md +42 -0
- package/.mindforge/team/multi-handoff.md +23 -0
- package/.mindforge/team/profiles/README.md +13 -0
- package/.mindforge/team/session-merger.md +18 -0
- package/.planning/ARCHITECTURE.md +0 -0
- package/.planning/AUDIT.jsonl +0 -0
- package/.planning/HANDOFF.json +28 -0
- package/.planning/PROJECT.md +33 -0
- package/.planning/RELEASE-CHECKLIST.md +68 -0
- package/.planning/REQUIREMENTS.md +0 -0
- package/.planning/ROADMAP.md +0 -0
- package/.planning/STATE.md +31 -0
- package/.planning/approvals/.gitkeep +1 -0
- package/.planning/archive/.gitkeep +1 -0
- package/.planning/audit-archive/.gitkeep +1 -0
- package/.planning/decisions/.gitkeep +0 -0
- package/.planning/decisions/ADR-001-handoff-tracking.md +41 -0
- package/.planning/decisions/ADR-002-markdown-commands.md +46 -0
- package/.planning/decisions/ADR-003-skills-trigger-model.md +37 -0
- package/.planning/decisions/ADR-004-wave-parallelism-model.md +45 -0
- package/.planning/decisions/ADR-005-append-only-audit-log.md +51 -0
- package/.planning/decisions/ADR-006-tiered-skills-system.md +22 -0
- package/.planning/decisions/ADR-007-trigger-keyword-model.md +22 -0
- package/.planning/decisions/ADR-008-just-in-time-skill-loading.md +29 -0
- package/.planning/decisions/ADR-009-enterprise-integration-retry-policy.md +8 -0
- package/.planning/decisions/ADR-010-governance-tier-escalation.md +8 -0
- package/.planning/decisions/ADR-011-multi-developer-handoff-contract.md +8 -0
- package/.planning/decisions/ADR-012-intelligence-feedback-loops.md +19 -0
- package/.planning/decisions/ADR-013-mindforge-md-constitution.md +16 -0
- package/.planning/decisions/ADR-014-metrics-as-signals-not-evaluation.md +15 -0
- package/.planning/decisions/ADR-015-npm-based-skill-registry.md +26 -0
- package/.planning/decisions/ADR-016-ci-exit-code-0-on-timeout.md +27 -0
- package/.planning/decisions/ADR-017-sdk-localhost-only.md +28 -0
- package/.planning/decisions/ADR-018-installer-self-install-detection.md +15 -0
- package/.planning/decisions/ADR-019-self-update-scope-preservation.md +14 -0
- package/.planning/decisions/ADR-020-v1.0.0-stable-interface-contract.md +23 -0
- package/.planning/jira-sync.json +9 -0
- package/.planning/milestones/.gitkeep +1 -0
- package/.planning/phases/day1/REVIEW-DAY1.md +50 -0
- package/.planning/phases/day1/SECURITY-REVIEW-DAY1.md +15 -0
- package/.planning/phases/day2/REVIEW-DAY2.md +521 -0
- package/.planning/phases/day3/REVIEW-DAY3.md +234 -0
- package/.planning/slack-threads.json +6 -0
- package/CHANGELOG.md +175 -0
- package/LICENSE +21 -0
- package/MINDFORGE.md +76 -0
- package/README.md +182 -0
- package/RELEASENOTES.md +41 -0
- package/SECURITY.md +4 -0
- package/bin/install.js +120 -0
- package/bin/installer-core.js +292 -0
- package/bin/migrations/0.1.0-to-0.5.0.js +37 -0
- package/bin/migrations/0.5.0-to-0.6.0.js +17 -0
- package/bin/migrations/0.6.0-to-1.0.0.js +100 -0
- package/bin/migrations/migrate.js +151 -0
- package/bin/migrations/schema-versions.js +64 -0
- package/bin/updater/changelog-fetcher.js +62 -0
- package/bin/updater/self-update.js +169 -0
- package/bin/updater/version-comparator.js +68 -0
- package/bin/validate-config.js +92 -0
- package/bin/wizard/config-generator.js +112 -0
- package/bin/wizard/environment-detector.js +76 -0
- package/bin/wizard/setup-wizard.js +237 -0
- package/docs/Context/Master-Context.md +701 -0
- package/docs/architecture/README.md +35 -0
- package/docs/architecture/decision-records-index.md +26 -0
- package/docs/ci-cd-integration.md +30 -0
- package/docs/ci-quickstart.md +78 -0
- package/docs/commands-reference.md +11 -0
- package/docs/contributing/CONTRIBUTING.md +38 -0
- package/docs/contributing/plugin-authoring.md +50 -0
- package/docs/contributing/skill-authoring.md +41 -0
- package/docs/enterprise-setup.md +25 -0
- package/docs/faq.md +38 -0
- package/docs/getting-started.md +36 -0
- package/docs/governance-guide.md +23 -0
- package/docs/mindforge-md-reference.md +53 -0
- package/docs/monorepo-guide.md +26 -0
- package/docs/persona-customisation.md +56 -0
- package/docs/quick-verify.md +33 -0
- package/docs/reference/audit-events.md +53 -0
- package/docs/reference/commands.md +82 -0
- package/docs/reference/config-reference.md +64 -0
- package/docs/reference/sdk-api.md +48 -0
- package/docs/reference/skills-api.md +57 -0
- package/docs/release-checklist-guide.md +37 -0
- package/docs/requirements.md +29 -0
- package/docs/sdk-reference.md +27 -0
- package/docs/security/SECURITY.md +42 -0
- package/docs/security/penetration-test-results.md +31 -0
- package/docs/security/threat-model.md +142 -0
- package/docs/skills-authoring-guide.md +119 -0
- package/docs/skills-publishing-guide.md +21 -0
- package/docs/team-setup-guide.md +21 -0
- package/docs/troubleshooting.md +119 -0
- package/docs/tutorial.md +195 -0
- package/docs/upgrade.md +44 -0
- package/docs/user-guide.md +131 -0
- package/docs/usp-features.md +214 -0
- package/eslint.config.mjs +31 -0
- package/examples/starter-project/.planning/AUDIT.jsonl +1 -0
- package/examples/starter-project/.planning/HANDOFF.json +23 -0
- package/examples/starter-project/.planning/PROJECT.md +27 -0
- package/examples/starter-project/.planning/STATE.md +10 -0
- package/examples/starter-project/MINDFORGE.md +40 -0
- package/examples/starter-project/README.md +14 -0
- package/implementation-roadmap/day-1-imp/DAY1-HARDEN.md +823 -0
- package/implementation-roadmap/day-1-imp/DAY1-IMPLEMENT.md +2459 -0
- package/implementation-roadmap/day-1-imp/DAY1-REVIEW.md +288 -0
- package/implementation-roadmap/day-2-imp/DAY2-HARDEN.md +954 -0
- package/implementation-roadmap/day-2-imp/DAY2-IMPLEMENT.md +2347 -0
- package/implementation-roadmap/day-2-imp/DAY2-REVIEW.md +422 -0
- package/implementation-roadmap/day-3-imp/DAY3-HARDEN.md +870 -0
- package/implementation-roadmap/day-3-imp/DAY3-IMPLEMENT.md +2798 -0
- package/implementation-roadmap/day-3-imp/DAY3-REVIEW.md +484 -0
- package/implementation-roadmap/day-4-imp/DAY4-HARDEN.md +1087 -0
- package/implementation-roadmap/day-4-imp/DAY4-IMPLEMENT.md +2874 -0
- package/implementation-roadmap/day-4-imp/DAY4-REVIEW.md +386 -0
- package/implementation-roadmap/day-5-imp/DAY5-HARDEN.md +1078 -0
- package/implementation-roadmap/day-5-imp/DAY5-IMPLEMENT.md +3151 -0
- package/implementation-roadmap/day-5-imp/DAY5-REVIEW.md +345 -0
- package/implementation-roadmap/day-6-imp/DAY6-COMPLETE.md +3919 -0
- package/implementation-roadmap/day-7-imp-prod/DAY7-PRODUCTION-FINAL.md +4513 -0
- package/package.json +31 -0
- package/sdk/README.md +69 -0
- package/sdk/eslint.config.mjs +34 -0
- package/sdk/package-lock.json +1507 -0
- package/sdk/package.json +30 -0
- package/sdk/src/client.ts +133 -0
- package/sdk/src/commands.ts +63 -0
- package/sdk/src/events.ts +166 -0
- package/sdk/src/index.ts +22 -0
- package/sdk/src/types.ts +87 -0
- package/sdk/tsconfig.json +13 -0
- package/tests/audit.test.js +206 -0
- package/tests/ci-mode.test.js +162 -0
- package/tests/compaction.test.js +161 -0
- package/tests/distribution.test.js +205 -0
- package/tests/e2e.test.js +618 -0
- package/tests/governance.test.js +130 -0
- package/tests/install.test.js +209 -0
- package/tests/integrations.test.js +128 -0
- package/tests/intelligence.test.js +117 -0
- package/tests/metrics.test.js +96 -0
- package/tests/migration.test.js +309 -0
- package/tests/production.test.js +416 -0
- package/tests/sdk.test.js +200 -0
- package/tests/skills-platform.test.js +403 -0
- package/tests/wave-engine.test.js +338 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# MindForge — Confluence Integration
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Publish architecture snapshots, ADRs, and milestone/phase documentation to a
|
|
5
|
+
shared wiki without making Confluence the execution source of truth.
|
|
6
|
+
|
|
7
|
+
## Published artifacts
|
|
8
|
+
|
|
9
|
+
| MindForge artifact | Confluence target |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `.planning/ARCHITECTURE.md` | Architecture overview page |
|
|
12
|
+
| `.planning/decisions/ADR-*.md` | ADR child pages |
|
|
13
|
+
| Phase verification summaries | Sprint or phase pages |
|
|
14
|
+
| Milestone reports | Release or program pages |
|
|
15
|
+
|
|
16
|
+
## Publishing rules
|
|
17
|
+
Use update-by-title or update-by-page-ID so repeated publishes are idempotent.
|
|
18
|
+
Do not create duplicate pages on re-run. If the target exists, update in place
|
|
19
|
+
and preserve the page history.
|
|
20
|
+
|
|
21
|
+
## Data safety
|
|
22
|
+
Confluence publishing must exclude secrets, tokens, raw audit log content, and
|
|
23
|
+
internal-only approver notes. Publish curated summaries, not raw machine state.
|
|
24
|
+
|
|
25
|
+
## Failure handling
|
|
26
|
+
Publishing failures are non-fatal. Log them, append a pending manual action to
|
|
27
|
+
`.planning/STATE.md`, and provide a retry command via `/mindforge:sync-confluence`.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
# MindForge Integrations — Connection Manager
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Centralise credential handling, integration detection, health checks, retry policy,
|
|
5
|
+
and non-fatal failure handling for all external systems. Integrations consume
|
|
6
|
+
connection state from this layer; they do not manage secrets directly.
|
|
7
|
+
|
|
8
|
+
## Credential storage principles
|
|
9
|
+
|
|
10
|
+
### Rule 1 — Never store credentials in MindForge files
|
|
11
|
+
MindForge configuration files may store base URLs, project IDs, channel IDs,
|
|
12
|
+
reviewer lists, and feature flags. They must never contain API tokens,
|
|
13
|
+
passwords, private keys, cookies, or session secrets.
|
|
14
|
+
|
|
15
|
+
### Rule 2 — Use environment variables or an external secrets manager
|
|
16
|
+
Supported variables:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Jira
|
|
20
|
+
JIRA_BASE_URL=https://your-org.atlassian.net
|
|
21
|
+
JIRA_USER_EMAIL=engineer@your-org.com
|
|
22
|
+
JIRA_API_TOKEN=stored-in-environment-only
|
|
23
|
+
|
|
24
|
+
# Confluence
|
|
25
|
+
CONFLUENCE_BASE_URL=https://your-org.atlassian.net/wiki
|
|
26
|
+
CONFLUENCE_API_TOKEN=stored-in-environment-only
|
|
27
|
+
|
|
28
|
+
# Slack
|
|
29
|
+
SLACK_BOT_TOKEN=stored-in-environment-only
|
|
30
|
+
SLACK_WEBHOOK_URL=stored-in-environment-only
|
|
31
|
+
SLACK_CHANNEL_ID=C01234ABCDE
|
|
32
|
+
|
|
33
|
+
# GitHub / GitLab
|
|
34
|
+
GITHUB_TOKEN=stored-in-environment-only
|
|
35
|
+
GITLAB_TOKEN=stored-in-environment-only
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Rule 3 — Audit only non-sensitive metadata
|
|
39
|
+
AUDIT entries may contain integration name, action, status, external IDs,
|
|
40
|
+
attempt counts, and error classes. Never log raw headers, raw response bodies
|
|
41
|
+
containing secrets, or token values.
|
|
42
|
+
|
|
43
|
+
## Availability detection protocol
|
|
44
|
+
|
|
45
|
+
1. Check required environment variables exist.
|
|
46
|
+
2. Read `.mindforge/org/integrations/INTEGRATIONS-CONFIG.md` for required
|
|
47
|
+
non-sensitive settings.
|
|
48
|
+
3. Run one lightweight health check per integration.
|
|
49
|
+
4. Return one of these states:
|
|
50
|
+
|
|
51
|
+
| State | Meaning | Behaviour |
|
|
52
|
+
|---|---|---|
|
|
53
|
+
| `available` | Credentials present and health check passed | Proceed |
|
|
54
|
+
| `unconfigured` | Credentials missing | Skip, log AUDIT |
|
|
55
|
+
| `invalid_credentials` | Auth failed with 401/403 | Warn, log AUDIT, stop retries |
|
|
56
|
+
| `unreachable` | DNS, timeout, or 5xx | Retry up to policy, then warn |
|
|
57
|
+
| `rate_limited` | 429 | Respect `Retry-After`, retry once, then stop |
|
|
58
|
+
|
|
59
|
+
Missing credentials are usually a graceful skip. Exception: if a CRITICAL
|
|
60
|
+
security finding notification cannot be delivered because Slack is unconfigured,
|
|
61
|
+
write an `Undelivered alerts` section to `.planning/STATE.md` and surface it in
|
|
62
|
+
`/mindforge:status`.
|
|
63
|
+
|
|
64
|
+
## Credential hygiene in shell operations
|
|
65
|
+
|
|
66
|
+
### Preventing token exposure in shell history
|
|
67
|
+
Avoid inline command substitution with secrets. Prefer a function or a temporary
|
|
68
|
+
client-supported credential source:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
build_auth_header() {
|
|
72
|
+
printf '%s' "${1}:${2}" | base64
|
|
73
|
+
}
|
|
74
|
+
AUTH_HEADER=$(build_auth_header "${JIRA_USER_EMAIL}" "${JIRA_API_TOKEN}")
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Unset secrets after the command sequence completes:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
unset JIRA_API_TOKEN
|
|
81
|
+
unset GITHUB_TOKEN
|
|
82
|
+
unset SLACK_BOT_TOKEN
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Debug mode prohibition
|
|
86
|
+
Never run credential-bearing commands with shell tracing enabled:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
set +x
|
|
90
|
+
# credential operations
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
If debugging is needed elsewhere, disable tracing before any command that
|
|
94
|
+
includes an Authorization header or secret-bearing environment variable.
|
|
95
|
+
|
|
96
|
+
### curl verbose mode prohibition
|
|
97
|
+
Never use `curl -v` or `curl --verbose` with authenticated requests. Capture the
|
|
98
|
+
HTTP status code with `-s -o response.json -w "%{http_code}"` and log only
|
|
99
|
+
sanitised error summaries.
|
|
100
|
+
|
|
101
|
+
## Health check examples
|
|
102
|
+
|
|
103
|
+
### Jira
|
|
104
|
+
```bash
|
|
105
|
+
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
|
|
106
|
+
-H "Authorization: Basic ${AUTH_HEADER}" \
|
|
107
|
+
"${JIRA_BASE_URL}/rest/api/3/myself")
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Slack
|
|
111
|
+
Use `auth.test`. If the configured `SLACK_CHANNEL_ID` returns `channel_not_found`
|
|
112
|
+
or a 404-equivalent API error, mark the channel configuration invalid and tell
|
|
113
|
+
the user to update `INTEGRATIONS-CONFIG.md`.
|
|
114
|
+
|
|
115
|
+
### GitHub
|
|
116
|
+
Use `GET /user` with the token. A 404 from branch protection lookup later is not
|
|
117
|
+
a connection error; it means no branch protection is configured.
|
|
118
|
+
|
|
119
|
+
## Credential rotation detection
|
|
120
|
+
If a previously available integration now returns 401/403:
|
|
121
|
+
|
|
122
|
+
1. Write AUDIT entry: `integration_credential_expired`
|
|
123
|
+
2. Warn the user to rotate the relevant credential
|
|
124
|
+
3. Do not retry with the expired credential
|
|
125
|
+
|
|
126
|
+
## Integration resilience: shared patterns for all integrations
|
|
127
|
+
|
|
128
|
+
### Non-fatal integration failures
|
|
129
|
+
Integration failures must never fail the underlying source-code task. They are
|
|
130
|
+
non-fatal unless a compliance gate or required approval is blocked.
|
|
131
|
+
|
|
132
|
+
### Retry policy
|
|
133
|
+
|
|
134
|
+
| Attempt | Delay |
|
|
135
|
+
|---|---|
|
|
136
|
+
| 1 | immediate |
|
|
137
|
+
| 2 | 5 seconds |
|
|
138
|
+
| 3 | 20 seconds |
|
|
139
|
+
|
|
140
|
+
After the third failure:
|
|
141
|
+
1. Log an `integration_action` AUDIT entry with `"status": "failed"` and
|
|
142
|
+
`"attempts": 3`
|
|
143
|
+
2. Add an item to `.planning/STATE.md` under `Pending integration actions`
|
|
144
|
+
3. Provide the manual retry command, for example `/mindforge:sync-jira --phase 3`
|
|
145
|
+
|
|
146
|
+
For 429 responses, obey `Retry-After` when present. If a second 429 occurs,
|
|
147
|
+
stop, log it, and do not retry again.
|
|
148
|
+
|
|
149
|
+
## Integration action logging
|
|
150
|
+
Every sync, publish, notify, approval, or PR operation writes an AUDIT entry:
|
|
151
|
+
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"id": "uuid-v4",
|
|
155
|
+
"timestamp": "ISO-8601",
|
|
156
|
+
"event": "integration_action",
|
|
157
|
+
"integration": "jira|confluence|slack|github|gitlab",
|
|
158
|
+
"action": "create_ticket|publish_page|send_notification|create_pr",
|
|
159
|
+
"status": "success|failed|skipped",
|
|
160
|
+
"detail": "brief description",
|
|
161
|
+
"external_id": "service-specific ID"
|
|
162
|
+
}
|
|
163
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# MindForge — GitHub Integration
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Strengthen shipping with PR templates, reviewer assignment guidance, branch
|
|
5
|
+
protection awareness, and release metadata checks.
|
|
6
|
+
|
|
7
|
+
## API policy
|
|
8
|
+
Use GitHub REST API v3 for all required operations. GraphQL is optional for
|
|
9
|
+
advanced queries only and is not required for Day 4.
|
|
10
|
+
|
|
11
|
+
## Pre-flight checks
|
|
12
|
+
|
|
13
|
+
1. Verify the branch has at least one commit ahead of base:
|
|
14
|
+
`git log origin/${GITHUB_DEFAULT_BRANCH}..HEAD --oneline | wc -l`
|
|
15
|
+
2. Query branch protection:
|
|
16
|
+
`GET /repos/{owner}/{repo}/branches/{branch}/protection`
|
|
17
|
+
3. Treat HTTP 404 from the protection endpoint as `no branch protection
|
|
18
|
+
configured`, not as a connection failure.
|
|
19
|
+
|
|
20
|
+
If there are zero commits ahead of base, do not attempt PR creation.
|
|
21
|
+
|
|
22
|
+
## PR creation guidance
|
|
23
|
+
Use `.github/pull_request_template.md` when present, assign default reviewers
|
|
24
|
+
from config, and ensure the PR body links verification artifacts and the
|
|
25
|
+
relevant phase or milestone documents.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# MindForge — GitLab Integration
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Provide GitLab parity for merge request creation, reviewer defaults, and branch
|
|
5
|
+
policy awareness when GitHub is not the source control platform.
|
|
6
|
+
|
|
7
|
+
## Scope
|
|
8
|
+
Day 4 covers configuration and process guidance only:
|
|
9
|
+
- read project and reviewer metadata from `INTEGRATIONS-CONFIG.md`
|
|
10
|
+
- create merge requests with milestone or phase summaries
|
|
11
|
+
- treat integration failures as non-fatal
|
|
12
|
+
|
|
13
|
+
Full API parity with GitHub can be extended in later milestones.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# MindForge — Jira Integration
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Synchronise MindForge planning state into Jira for organisational visibility
|
|
5
|
+
while keeping MindForge as the source of truth for technical execution.
|
|
6
|
+
|
|
7
|
+
## Mapping model
|
|
8
|
+
|
|
9
|
+
| MindForge artifact/event | Jira representation |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Phase N | Epic |
|
|
12
|
+
| `PLAN-N-M.md` | Story |
|
|
13
|
+
| `task_started` | Story transition to In Progress |
|
|
14
|
+
| `task_completed` | Story transition to Done |
|
|
15
|
+
| `task_failed` | Story comment + blocked transition when available |
|
|
16
|
+
| `security_finding` HIGH/CRITICAL | Bug with security labels |
|
|
17
|
+
| Phase verified | Epic transitioned to Ready for Review |
|
|
18
|
+
| UAT signed off | Epic transitioned to Done |
|
|
19
|
+
|
|
20
|
+
Jira-to-MindForge state ingestion is out of scope for Day 4. MindForge is the
|
|
21
|
+
source of truth; Jira reflects it.
|
|
22
|
+
|
|
23
|
+
## API and authentication
|
|
24
|
+
Use Jira REST API v3. Read credentials through `connection-manager.md`.
|
|
25
|
+
Do not log tokens, auth headers, or raw credential-bearing commands.
|
|
26
|
+
|
|
27
|
+
## Epic creation
|
|
28
|
+
Create one Epic per phase. Verify the Epic Name field ID in your Jira instance
|
|
29
|
+
with `GET /rest/api/3/field` and locate `Epic Name`; do not assume
|
|
30
|
+
`customfield_10014` is universal.
|
|
31
|
+
|
|
32
|
+
## Story creation
|
|
33
|
+
Project type matters:
|
|
34
|
+
|
|
35
|
+
- Team-managed / next-gen projects: link with `parent.key`
|
|
36
|
+
- Company-managed / classic projects: use the Epic-link custom field discovered
|
|
37
|
+
from `GET /rest/api/3/field`
|
|
38
|
+
|
|
39
|
+
## Dynamic transition ID lookup
|
|
40
|
+
Never hardcode transition IDs. Before transitioning an issue, fetch available
|
|
41
|
+
transitions from `GET /rest/api/3/issue/{issueKey}/transitions` and match by
|
|
42
|
+
transition name.
|
|
43
|
+
|
|
44
|
+
MindForge event to transition-name mapping:
|
|
45
|
+
|
|
46
|
+
| Event | Preferred Jira transition name | Notes |
|
|
47
|
+
|---|---|---|
|
|
48
|
+
| `task_started` | `In Progress` | common default |
|
|
49
|
+
| `task_completed` | `Done` | sometimes `Resolve Issue` or `Close Issue` |
|
|
50
|
+
| `task_failed` | `On Hold` | fallback to `Blocked` if present |
|
|
51
|
+
| `UAT_signed_off` | `Done` | used for epics |
|
|
52
|
+
|
|
53
|
+
If the transition name is unavailable:
|
|
54
|
+
1. Log a `sync_warning` AUDIT entry
|
|
55
|
+
2. Skip the transition
|
|
56
|
+
3. Never fail the source task because Jira workflow names differ
|
|
57
|
+
|
|
58
|
+
Cache resolved transition IDs in `.planning/jira-sync.json` by project key.
|
|
59
|
+
Refresh the cache if a transition returns 400.
|
|
60
|
+
|
|
61
|
+
## Security bug creation
|
|
62
|
+
When a `security_finding` has `HIGH` or `CRITICAL` severity, create a Bug with
|
|
63
|
+
the OWASP category, file, line, and remediation summary.
|
|
64
|
+
|
|
65
|
+
## Conflict handling
|
|
66
|
+
Preserve manual Jira edits. Sync may add comments, labels, or new issues, but
|
|
67
|
+
it must not destructively overwrite manual Jira changes.
|
|
68
|
+
|
|
69
|
+
## Rate limiting and backoff
|
|
70
|
+
Maintain at least 200 ms between normal calls. For batches larger than 10
|
|
71
|
+
tickets, start exponential backoff at 500 ms. On 429, respect `Retry-After`
|
|
72
|
+
and retry once; on a second 429, stop and log the failure.
|
|
73
|
+
|
|
74
|
+
## Sync state file
|
|
75
|
+
Track mappings in `.planning/jira-sync.json`:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"schema_version": "1.0.0",
|
|
80
|
+
"last_sync": "ISO-8601",
|
|
81
|
+
"project_key": "ENG",
|
|
82
|
+
"phase_mappings": {
|
|
83
|
+
"1": {
|
|
84
|
+
"epic_key": "ENG-42",
|
|
85
|
+
"story_keys": { "01": "ENG-43" }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"transition_cache": {
|
|
89
|
+
"ENG": {
|
|
90
|
+
"in_progress_id": "21",
|
|
91
|
+
"done_id": "31",
|
|
92
|
+
"blocked_id": "41",
|
|
93
|
+
"cached_at": "ISO-8601"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"_warning": "Do not store credentials in this file."
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
`jira-sync.json` contains project metadata, not credentials, but it may expose
|
|
101
|
+
internal project structure. Consider gitignoring it in public/open-source
|
|
102
|
+
distributions.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# MindForge — Slack Integration
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Send operational notifications for phase completion, blockers, security events,
|
|
5
|
+
milestone completion, and approvals.
|
|
6
|
+
|
|
7
|
+
## Supported notifications
|
|
8
|
+
|
|
9
|
+
| Event | Behaviour |
|
|
10
|
+
|---|---|
|
|
11
|
+
| phase complete | Send summary notification |
|
|
12
|
+
| security finding HIGH/CRITICAL | Send urgent alert and optional mention |
|
|
13
|
+
| approval needed | Post request summary with approval file reference |
|
|
14
|
+
| blocker added | Post concise blocker notice |
|
|
15
|
+
| milestone complete | Post release summary |
|
|
16
|
+
|
|
17
|
+
## Message safety
|
|
18
|
+
Sanitise all dynamic values inserted into JSON payloads. Escape double quotes,
|
|
19
|
+
backslashes, and newlines before building Block Kit payloads. Never use
|
|
20
|
+
`curl -v` with Slack tokens.
|
|
21
|
+
|
|
22
|
+
## Thread management
|
|
23
|
+
Store thread references in `.planning/slack-threads.json`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"schema_version": "1.0.0",
|
|
28
|
+
"channel_id": "C01234ABCDE",
|
|
29
|
+
"threads": {
|
|
30
|
+
"phase-1": "1710931200.123456"
|
|
31
|
+
},
|
|
32
|
+
"_warning": "Do not store tokens in this file."
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If Slack rejects an existing `thread_ts`, clear that entry and create a new
|
|
37
|
+
thread instead of retrying the invalid timestamp.
|
|
38
|
+
|
|
39
|
+
## Undelivered critical alerts
|
|
40
|
+
If Slack is unconfigured or the channel is invalid during a CRITICAL security
|
|
41
|
+
event, write the alert into `.planning/STATE.md` under `Undelivered alerts`.
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# MindForge Intelligence — Anti-Pattern Detection Engine
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Detect architecture, database, security, code-quality, and testing anti-patterns
|
|
5
|
+
at plan, execute, and review checkpoints.
|
|
6
|
+
|
|
7
|
+
## Key patterns
|
|
8
|
+
- A01 God object / service
|
|
9
|
+
- A02 Circular dependencies
|
|
10
|
+
- A03 Distributed monolith
|
|
11
|
+
- A04 Hardcoded configuration
|
|
12
|
+
- B01 `SELECT *`
|
|
13
|
+
- B02 Missing FK indexes
|
|
14
|
+
- B03 Unbounded queries
|
|
15
|
+
- C01 Auth bypass via type coercion
|
|
16
|
+
- C02 Missing authorization
|
|
17
|
+
- C03 Sensitive data in URL
|
|
18
|
+
- D01 Callback/pyramid complexity
|
|
19
|
+
- D02 Magic strings
|
|
20
|
+
- D03 Swallowed errors
|
|
21
|
+
- E01 Tests tied to internals
|
|
22
|
+
- E02 Flaky test indicators
|
|
23
|
+
|
|
24
|
+
## C01 false positive prevention
|
|
25
|
+
Exclude from C01 scanning:
|
|
26
|
+
```bash
|
|
27
|
+
grep -rn "==\s*null\|==\s*undefined\|==\s*false\|==\s*0" src/ \
|
|
28
|
+
--include="*.ts" --include="*.js" \
|
|
29
|
+
--exclude="*.test.ts" --exclude="*.spec.ts" --exclude="*.test.js" --exclude="*.spec.js"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Do not flag:
|
|
33
|
+
- assertions in test files (`tests/**`, `*.test.*`, `*.spec.*`)
|
|
34
|
+
- intentional type-guard nullish checks (`x == null`) in type-guard functions
|
|
35
|
+
|
|
36
|
+
Only treat C01 as critical in auth/middleware/security-sensitive paths.
|
|
37
|
+
|
|
38
|
+
## B03 cursor pagination exception
|
|
39
|
+
Cursor-based pagination is exempt from unbounded query check.
|
|
40
|
+
Recognize exemptions:
|
|
41
|
+
- Prisma `cursor:` parameter
|
|
42
|
+
- query with both `orderBy:` and `cursor:`
|
|
43
|
+
- SQL tuple cursor predicates (`WHERE (..., ...) < (..., ...)`)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
grep -rn "findMany\\b" src/ --include="*.ts" | python3 - <<'PY'
|
|
47
|
+
import sys
|
|
48
|
+
for line in sys.stdin:
|
|
49
|
+
l = line.lower()
|
|
50
|
+
if 'cursor:' in l or '< :cursor' in l or '<(' in l:
|
|
51
|
+
continue
|
|
52
|
+
if 'take:' not in l and 'limit:' not in l:
|
|
53
|
+
print('B03 candidate:', line.strip())
|
|
54
|
+
PY
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## D01 executable line counting
|
|
58
|
+
Use executable-line heuristic for God-object thresholding, not raw `wc -l`.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
count_executable_lines() {
|
|
62
|
+
local f="$1"
|
|
63
|
+
grep -v '^\s*$' "$f" | grep -v '^\s*//' | grep -v '^\s*\*' | grep -v '^\s*@' | wc -l
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Apply threshold to executable count (e.g., `>500`) plus dependency fan-in signal.
|
|
68
|
+
|
|
69
|
+
## Trigger points
|
|
70
|
+
- Plan phase: architecture patterns (A*)
|
|
71
|
+
- Execute phase: implementation/security patterns (B*, C*, D03)
|
|
72
|
+
- Review phase: full library
|
|
73
|
+
|
|
74
|
+
## Report format
|
|
75
|
+
Include id, severity, location, and exact remediation advice.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# MindForge Intelligence — Phase Difficulty Scorer
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Score phase complexity before planning so decomposition and verification rigor
|
|
5
|
+
match risk.
|
|
6
|
+
|
|
7
|
+
## Dimensions
|
|
8
|
+
- Technical complexity (35%)
|
|
9
|
+
- Risk level (30%)
|
|
10
|
+
- Ambiguity (20%)
|
|
11
|
+
- Dependencies (15%)
|
|
12
|
+
|
|
13
|
+
Composite:
|
|
14
|
+
`(Technical*0.35) + (Risk*0.30) + (Ambiguity*0.20) + (Dependencies*0.15)`
|
|
15
|
+
|
|
16
|
+
## Signal detection
|
|
17
|
+
### Technical complexity context handling
|
|
18
|
+
Keyword matching must include local context windows.
|
|
19
|
+
|
|
20
|
+
- `migration` near `database` or `schema` => technical `4`
|
|
21
|
+
- `migration` near `code` or `framework` => technical `3`
|
|
22
|
+
|
|
23
|
+
### Risk amplifiers
|
|
24
|
+
Add +1 for each relevant amplifier (cap 5):
|
|
25
|
+
- missing test baseline in touched area
|
|
26
|
+
- external integration without sandbox
|
|
27
|
+
- shared module blast radius (`>3` consumers)
|
|
28
|
+
- unclear rollback path
|
|
29
|
+
- prior related incidents
|
|
30
|
+
|
|
31
|
+
For prior incidents, inspect `AUDIT.jsonl`:
|
|
32
|
+
- `task_failed` events with file-path overlap with expected touched files
|
|
33
|
+
- `security_finding` events in overlapping domains (auth/payments/database)
|
|
34
|
+
|
|
35
|
+
## Score bands
|
|
36
|
+
- `1.0-2.0` Easy => `2-3` tasks
|
|
37
|
+
- `2.1-3.0` Moderate => `4-6` tasks
|
|
38
|
+
- `3.1-4.0` Challenging => `6-10` tasks
|
|
39
|
+
- `4.1-5.0` Hard => `10-15` tasks
|
|
40
|
+
|
|
41
|
+
If composite `> 4.5`: recommend split into `Phase N-A` (lowest-risk)
|
|
42
|
+
and `Phase N-B` (highest-risk), and offer:
|
|
43
|
+
`/mindforge:discuss-phase [N] --split`
|
|
44
|
+
|
|
45
|
+
## Feedback loop: score -> granularity
|
|
46
|
+
The planner must read `DIFFICULTY-SCORE-[N].md` before creating plans.
|
|
47
|
+
|
|
48
|
+
| Composite | Granularity instruction |
|
|
49
|
+
|---|---|
|
|
50
|
+
| 1.0-2.0 | 1 task = complete feature component |
|
|
51
|
+
| 2.1-3.0 | 1 task = significant module/function |
|
|
52
|
+
| 3.1-4.0 | 1 task = specific function/endpoint |
|
|
53
|
+
| 4.1-5.0 | 1 task = narrow change in 3-4 files max |
|
|
54
|
+
|
|
55
|
+
This creates explicit feedback: difficulty -> decomposition -> execution quality.
|