mirror of
https://github.com/personamanagmentlayer/pcl.git
synced 2026-09-14 15:40:22 +08:00
a34989f81c
Implements a production-ready, enterprise-grade registry system for managing AI personas, teams, workflows, and skills across multiple storage backends. ## Phase 1.2A: Core Interfaces & Memory Backend (Days 1-5) ### Core Architecture - Add registry interfaces (IBackend, ICache, ISearchEngine, IRegistry) - Implement comprehensive error hierarchy (11 specialized error classes) - Create type system with Artifact, Query, Version, Transaction types - Add Result<T> error handling pattern for type safety ### Memory Backend - Implement in-memory HashMap backend for testing/development - Add full CRUD operations with soft delete support - Implement version history tracking and management - Add transaction simulation with rollback support - Include 70+ test cases with 100% coverage ### Registry Manager - Create high-level RegistryManager API wrapping backends - Implement automatic slug generation (URL-friendly identifiers) - Add comprehensive validation (semver, email, slug, tags) - Integrate optional caching layer with TTL support - Include 70+ test cases for validation and operations ## Phase 1.2B: Database Backends (Days 6-10) ### PostgreSQL Backend - Implement production-grade relational database backend - Create complete schema with 9 tables and 20+ optimized indexes - Add database triggers for updated_at and version snapshots - Implement stored procedures for atomic counter updates - Add connection pooling (max 20 connections, configurable) - Include prepared statements and ACID transaction support - Implement trigram-based full-text search (pg_trgm extension) - Provide migration scripts (450+ lines SQL) ### SQLite Backend - Implement lightweight file-based backend for local/embedded apps - Create schema with FTS5 virtual table for full-text search - Enable WAL mode for better concurrency - Add automatic triggers for FTS synchronization - Implement prepared statement caching for performance - Support both file-based and in-memory (:memory:) modes - Include transaction support (BEGIN IMMEDIATE) - Provide migration scripts (350+ lines SQL) ## Documentation ### API Documentation - Add REGISTRY-SYSTEM.md (500+ lines) covering architecture - Document all backends with comparison and use cases - Include type system reference and API examples - Provide migration scripts and deployment guides ### Usage Guide - Add REGISTRY-USAGE.md (600+ lines) with 8 complete examples - Cover backend selection, CRUD operations, versioning - Include error handling patterns and best practices - Provide troubleshooting guide and performance tips ### Examples - Create registry-demo.ts (200+ lines) working demonstration - Show all major features: CRUD, search, versioning, stats - Demonstrate slug generation and validation errors - Include setup and teardown patterns ## Governance & Standards (Parallel Work) - Add comprehensive governance documentation (GOVERNANCE/) - Create Apache 2.0 compliance documents - Add security model and trademark policy - Implement PCL specification v1 (SPEC/) ## Statistics - Files created: 35 (implementation, tests, docs, migrations) - Code written: ~3,500 lines (implementation) - Tests created: 140+ test cases across 2 test suites - Documentation: 1,600+ lines across 3 comprehensive guides - Migration scripts: 800+ lines SQL for PostgreSQL and SQLite - Total output: 6,450+ lines of production-ready code ## Technical Highlights - Multi-backend architecture with pluggable storage - Result<T> error handling pattern from Rust - ACID transactions across all backends - Full-text search (FTS5, trigram matching) - Semantic versioning with history tracking - Soft delete pattern with recovery capability - Connection pooling and prepared statements - Automatic slug generation and validation - Type-safe operations with TypeScript strict mode ## Testing - Memory backend: 70+ test cases (100% coverage) - Registry Manager: 70+ test cases (validation, CRUD, queries) - All tests passing with zero errors - Integration tests deferred to future release ## Next Steps Phase 1.2C-D features deferred to future releases: - MongoDB backend implementation - Redis caching layer - Elasticsearch integration - RBAC security features - PCLPack import/export format Ready for Phase 1.3 (CLI) or Phase 2 (Ecosystem tooling). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
287 lines
12 KiB
Plaintext
287 lines
12 KiB
Plaintext
Creative Commons Attribution 4.0 International (CC BY 4.0)
|
||
|
||
This is a human-readable summary of (and not a substitute for) the license.
|
||
https://creativecommons.org/licenses/by/4.0/legalcode
|
||
|
||
You are free to:
|
||
|
||
Share — copy and redistribute the material in any medium or format
|
||
Adapt — remix, transform, and build upon the material for any purpose,
|
||
even commercially.
|
||
|
||
Under the following terms:
|
||
|
||
Attribution — You must give appropriate credit, provide a link to the
|
||
license, and indicate if changes were made. You may do so
|
||
in any reasonable manner, but not in any way that suggests
|
||
the licensor endorses you or your use.
|
||
|
||
No additional restrictions — You may not apply legal terms or technological
|
||
measures that legally restrict others from
|
||
doing anything the license permits.
|
||
|
||
Notices:
|
||
|
||
You do not have to comply with the license for elements of the material
|
||
in the public domain or where your use is permitted by an applicable
|
||
exception or limitation.
|
||
|
||
No warranties are given. The license may not give you all of the
|
||
permissions necessary for your intended use. For example, other rights
|
||
such as publicity, privacy, or moral rights may limit how you use the
|
||
material.
|
||
|
||
---
|
||
|
||
# FULL LICENSE TEXT
|
||
|
||
Creative Commons Attribution 4.0 International
|
||
|
||
Creative Commons Corporation ("Creative Commons") is not a law firm and does
|
||
not provide legal services or legal advice. Distribution of Creative Commons
|
||
public licenses does not create a lawyer-client or other relationship.
|
||
Creative Commons makes its licenses and related information available on an
|
||
"as-is" basis. Creative Commons gives no warranties regarding its licenses,
|
||
any material licensed under their terms and conditions, or any related
|
||
information. Creative Commons disclaims all liability for damages resulting
|
||
from their use to the fullest extent possible.
|
||
|
||
Using Creative Commons Public Licenses
|
||
|
||
Creative Commons public licenses provide a standard set of terms and
|
||
conditions that creators and other rights holders may use to share original
|
||
works of authorship and other material subject to copyright and certain other
|
||
rights specified in the public license below. The following considerations
|
||
are for informational purposes only, are not exhaustive, and do not form part
|
||
of our licenses.
|
||
|
||
Section 1 – Definitions.
|
||
|
||
a. Adapted Material means material subject to Copyright and Similar Rights
|
||
that is derived from or based upon the Licensed Material and in which the
|
||
Licensed Material is translated, altered, arranged, transformed, or
|
||
otherwise modified in a manner requiring permission under the Copyright
|
||
and Similar Rights held by the Licensor.
|
||
|
||
b. Adapter's License means the license You apply to Your Copyright and
|
||
Similar Rights in Your contributions to Adapted Material in accordance
|
||
with the terms and conditions of this Public License.
|
||
|
||
c. Copyright and Similar Rights means copyright and/or similar rights closely
|
||
related to copyright including, without limitation, performance, broadcast,
|
||
sound recording, and Sui Generis Database Rights, without regard to how
|
||
the rights are labeled or categorized.
|
||
|
||
d. Licensed Material means the artistic or literary work, database, or other
|
||
material to which the Licensor applied this Public License.
|
||
|
||
e. Licensed Rights means the rights granted to You subject to the terms and
|
||
conditions of this Public License, which are limited to all Copyright and
|
||
Similar Rights that apply to Your use of the Licensed Material.
|
||
|
||
f. Licensor means the individual(s) or entity(ies) granting rights under this
|
||
Public License.
|
||
|
||
g. Share means to provide material to the public by any means or process that
|
||
requires permission under the Licensed Rights, such as reproduction, public
|
||
display, public performance, distribution, dissemination, communication, or
|
||
importation, and to make material available to the public including in ways
|
||
that members of the public may access the material from a place and at a
|
||
time individually chosen by them.
|
||
|
||
h. You means the individual or entity exercising the Licensed Rights under
|
||
this Public License. Your has a corresponding meaning.
|
||
|
||
Section 2 – Scope.
|
||
|
||
a. License grant.
|
||
|
||
1. Subject to the terms and conditions of this Public License, the
|
||
Licensor hereby grants You a worldwide, royalty-free, non-sublicensable,
|
||
non-exclusive, irrevocable license to exercise the Licensed Rights in
|
||
the Licensed Material to:
|
||
|
||
A. reproduce and Share the Licensed Material, in whole or in part; and
|
||
B. produce, reproduce, and Share Adapted Material.
|
||
|
||
2. Exceptions and Limitations. For the avoidance of doubt, where
|
||
Exceptions and Limitations apply to Your use, this Public License does
|
||
not apply, and You do not need to comply with its terms and conditions.
|
||
|
||
3. Term. The term of this Public License is specified in Section 6(a).
|
||
|
||
4. Media and formats; technical modifications allowed. The Licensor
|
||
authorizes You to exercise the Licensed Rights in all media and formats
|
||
whether now known or hereafter created, and to make technical
|
||
modifications necessary to do so.
|
||
|
||
5. Downstream recipients.
|
||
|
||
A. Offer from the Licensor – Licensed Material. Every recipient of the
|
||
Licensed Material automatically receives an offer from the Licensor
|
||
to exercise the Licensed Rights under the terms and conditions of
|
||
this Public License.
|
||
|
||
B. No downstream restrictions. You may not offer or impose any
|
||
additional or different terms or conditions on, or apply any
|
||
Effective Technological Measures to, the Licensed Material if doing
|
||
so restricts exercise of the Licensed Rights by any recipient of the
|
||
Licensed Material.
|
||
|
||
6. No endorsement. Nothing in this Public License constitutes or may be
|
||
construed as permission to assert or imply that You are, or that Your
|
||
use of the Licensed Material is, connected with, or sponsored, endorsed,
|
||
or granted official status by, the Licensor or others designated to
|
||
receive attribution as provided in Section 3(a)(1)(A)(i).
|
||
|
||
b. Other rights.
|
||
|
||
1. Moral rights, such as the right of integrity, are not licensed under
|
||
this Public License, nor are publicity, privacy, and/or other similar
|
||
personality rights; however, to the extent possible, the Licensor
|
||
waives and/or agrees not to assert any such rights held by the Licensor
|
||
to the limited extent necessary to allow You to exercise the Licensed
|
||
Rights, but not otherwise.
|
||
|
||
2. Patent and trademark rights are not licensed under this Public License.
|
||
|
||
3. To the extent possible, the Licensor waives any right to collect
|
||
royalties from You for the exercise of the Licensed Rights, whether
|
||
directly or through a collecting society under any voluntary or waivable
|
||
statutory or compulsory licensing scheme.
|
||
|
||
Section 3 – License Conditions.
|
||
|
||
Your exercise of the Licensed Rights is expressly made subject to the
|
||
following conditions.
|
||
|
||
a. Attribution.
|
||
|
||
1. If You Share the Licensed Material (including in modified form), You
|
||
must:
|
||
|
||
A. retain the following if it is supplied by the Licensor with the
|
||
Licensed Material:
|
||
|
||
i. identification of the creator(s) of the Licensed Material and any
|
||
others designated to receive attribution, in any reasonable manner
|
||
requested by the Licensor (including by pseudonym if designated);
|
||
|
||
ii. a copyright notice;
|
||
|
||
iii. a notice that refers to this Public License;
|
||
|
||
iv. a notice that refers to the disclaimer of warranties;
|
||
|
||
v. a URI or hyperlink to the Licensed Material to the extent
|
||
reasonably practicable;
|
||
|
||
B. indicate if You modified the Licensed Material and retain an
|
||
indication of any previous modifications; and
|
||
|
||
C. indicate the Licensed Material is licensed under this Public License,
|
||
and include the text of, or the URI or hyperlink to, this Public
|
||
License.
|
||
|
||
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable
|
||
manner based on the medium, means, and context in which You Share the
|
||
Licensed Material.
|
||
|
||
3. If requested by the Licensor, You must remove any of the information
|
||
required by Section 3(a)(1)(A) to the extent reasonably practicable.
|
||
|
||
4. If You Share Adapted Material You produce, the Adapter's License You
|
||
apply must not prevent recipients of the Adapted Material from complying
|
||
with this Public License.
|
||
|
||
Section 4 – Sui Generis Database Rights.
|
||
|
||
Where the Licensed Rights include Sui Generis Database Rights that apply to
|
||
Your use of the Licensed Material:
|
||
|
||
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to
|
||
extract, reuse, reproduce, and Share all or a substantial portion of the
|
||
contents of the database;
|
||
|
||
b. if You include all or a substantial portion of the database contents in a
|
||
database in which You have Sui Generis Database Rights, then the database
|
||
in which You have Sui Generis Database Rights (but not its individual
|
||
contents) is Adapted Material; and
|
||
|
||
c. You must comply with the conditions in Section 3(a) if You Share all or a
|
||
substantial portion of the contents of the database.
|
||
|
||
Section 5 – Disclaimer of Warranties and Limitation of Liability.
|
||
|
||
a. Unless otherwise separately undertaken by the Licensor, to the extent
|
||
possible, the Licensor offers the Licensed Material as-is and as-available,
|
||
and makes no representations or warranties of any kind concerning the
|
||
Licensed Material, whether express, implied, statutory, or other.
|
||
|
||
b. To the extent possible, in no event will the Licensor be liable to You on
|
||
any legal theory (including, without limitation, negligence) or otherwise
|
||
for any direct, special, indirect, incidental, consequential, punitive,
|
||
exemplary, or other losses, costs, expenses, or damages arising out of
|
||
this Public License or use of the Licensed Material.
|
||
|
||
c. The disclaimer of warranties and limitation of liability provided above
|
||
shall be interpreted in a manner that, to the extent possible, most closely
|
||
approximates an absolute disclaimer and waiver of all liability.
|
||
|
||
Section 6 – Term and Termination.
|
||
|
||
a. This Public License applies for the term of the Copyright and Similar
|
||
Rights licensed here. However, if You fail to comply with this Public
|
||
License, then Your rights under this Public License terminate automatically.
|
||
|
||
b. Where Your right to use the Licensed Material has terminated under Section
|
||
6(a), it reinstates:
|
||
|
||
1. automatically as of the date the violation is cured, provided it is
|
||
cured within 30 days of Your discovery of the violation; or
|
||
|
||
2. upon express reinstatement by the Licensor.
|
||
|
||
Section 7 – Other Terms and Conditions.
|
||
|
||
a. The Licensor shall not be bound by any additional or different terms or
|
||
conditions communicated by You unless expressly agreed.
|
||
|
||
b. Any arrangements, understandings, or agreements regarding the Licensed
|
||
Material not stated herein are separate from and independent of the terms
|
||
and conditions of this Public License.
|
||
|
||
Section 8 – Interpretation.
|
||
|
||
a. For the avoidance of doubt, this Public License does not, and shall not be
|
||
interpreted to, reduce, limit, restrict, or impose conditions on any use
|
||
of the Licensed Material that could lawfully be made without permission
|
||
under this Public License.
|
||
|
||
b. To the extent possible, if any provision of this Public License is deemed
|
||
unenforceable, it shall be automatically reformed to the minimum extent
|
||
necessary to make it enforceable. If the provision cannot be reformed, it
|
||
shall be severed from this Public License without affecting the
|
||
enforceability of the remaining terms and conditions.
|
||
|
||
c. No term or condition of this Public License will be waived and no failure
|
||
to comply consented to unless expressly agreed to by the Licensor.
|
||
|
||
d. Nothing in this Public License constitutes or may be interpreted as a
|
||
limitation upon, or waiver of, any privileges and immunities that apply to
|
||
the Licensor or You, including from the legal processes of any jurisdiction
|
||
or authority.
|
||
|
||
---
|
||
|
||
PCL Documentation and Specifications are licensed under CC BY 4.0
|
||
Copyright 2024-2026 PCL Contributors and IbIFACE
|
||
|
||
Applies to:
|
||
|
||
- All files in /SPEC (formal specifications)
|
||
- All files in /CORE (core concepts documentation)
|
||
- All files in /GOVERNANCE (governance documentation)
|
||
- All files in /docs (user guides, tutorials, API documentation)
|
||
- README.md and other root-level documentation files
|