CanuckDUCK Developer Framework v0.1 — Module SDK and Civic Manifest
CanuckDUCK Developer Framework v0.1
Marker: CDK-DEVELOPER-FRAMEWORK-V0-1
Status: Foundation document. This is the starting point for turning the existing CanuckDUCK Drupal module ecosystem into a documented modular development framework for internal and future third-party contributors.
Purpose
CanuckDUCK is built on Drupal, but the platform is becoming more than a collection of Drupal modules. The goal is to define a CanuckDUCK civic application framework: a documented module contract, shared civic data model, graph/RIPPLE integration layer, privacy rules, AI boundaries, and review process for safe development.
Strategic framing
CanuckDUCK should not replace Drupal or invent a new programming language prematurely. Drupal remains the foundation for modules, plugins, routes, entities, permissions, forms, configuration, and themes. CanuckDUCK adds a civic operating layer on top:
- Canadian civic geography and jurisdictional scope.
- Pond, Consensus, Ducklings, Nest, and Continuum surface contracts.
- RIPPLE and Neo4j graph semantics.
- Privacy-by-minimization rules, especially around minors and private/internal data.
- AI/persona routing and review boundaries.
- Public deliberation artifacts: summaries, Flock Debate outputs, Migration documents, Consensus questions, proposals, and civic stream materials.
Initial framework components
- Module naming and structure: define conventions such as
cdk_<domain>_<feature>, required files, README expectations, permissions, routes, services, configuration schema, and uninstall behavior. - CanuckDUCK module manifest: introduce a machine-readable file such as
canuckduck.module.ymlto declare civic domain, jurisdiction, data access, privacy class, AI use, Pond/Consensus/Ducklings/Nest/Continuum integration, and RIPPLE graph access. - Approved integration APIs: document safe APIs for geography lookup, forum/topic lookup, metadata/taxonomy, Consensus draft poll creation, RIPPLE read-only context, logging, audit, and moderation queues.
- Security and privacy contract: prohibit direct secrets, unsafe DB access, unreviewed graph mutation, private data leakage, account authority, and student/minor data collection without explicit platform-level approval.
- Starter SDK: provide template modules, schemas, validators, examples, and tests for contributors.
- Review process: define linting, Drupal coding standards, permission review, privacy review, AI-provider review, graph review, and deployment gates.
Proposed module manifest shape
canuckduck:
module_type: civic_feature
civic_domains:
- transportation
- accessibility
jurisdictions:
supports:
- municipal
- provincial
pond:
reads_public_threads: true
creates_content: false
consensus:
can_create_draft_questions: true
can_publish_questions: false
ripple:
reads_variables:
- transit_access
- mobility_barriers
writes_edges: false
privacy:
stores_personal_data: false
minors_data: prohibited
ai:
allowed_surfaces:
- public_summary_assistance
prohibited:
- account_actions
- private_messages
- ducklings_student_data
Recommended first development lane
The first live development work should be low-risk and public-data-oriented:
- Create a
canuckduck-module-sdkrepository or module directory. - Add a starter Drupal module template.
- Add
canuckduck.module.schema.jsonfor the manifest. - Add one example read-only public civic module.
- Add a validator that rejects undeclared data access, AI use, graph writes, or privacy-sensitive behavior.
- Publish developer documentation here in Pond while keeping machine-readable schemas and templates in Forgejo.
Third-party scope boundaries
| Area | Initial third-party status | Reason |
|---|---|---|
| Public civic data widgets | Allowed first | Low-risk and useful for early pilots. |
| Pond display enhancements | Allowed after review | Must preserve forum access and moderation boundaries. |
| Consensus draft helpers | Draft-only at first | Publishing civic questions requires review. |
| RIPPLE graph viewers | Read-only at first | Direct graph mutation should stay gated. |
| Ducklings/student data | Prohibited initially | Minor-data minimization is a hard boundary. |
| Account/auth/payment modules | Not third-party initially | High authority and security exposure. |
| AI-agent authority | Internal only initially | Requires routing, safety, provider, and governance review. |
Working definition
CanuckDUCK Developer Framework: a Drupal-based civic application framework that lets approved modules declare, validate, and safely integrate civic features across CanuckDUCK surfaces using shared jurisdiction, metadata, privacy, AI, and RIPPLE graph contracts.
Immediate next steps
- Inventory existing
cdk_*andpond_*module patterns. - Draft the first
canuckduck.module.ymlschema. - Create a starter module template.
- Build a simple validator.
- Select one low-risk pilot module to prove the framework.
- Iterate the documentation in this forum as the SDK becomes real.