Skip to content

Commit 0c65d00

Browse files
committed
merge: 合并项目记忆 CLI
2 parents 0267adb + 0773018 commit 0c65d00

44 files changed

Lines changed: 1943 additions & 162 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/plugins/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "aisee-plugin",
3-
"version": "0.8.0",
3+
"version": "0.9.0",
44
"interface": {
55
"displayName": "Aisee Plugin",
6-
"description": "Aisee plugin marketplace for OpenSpec and Compound Engineering workflows."
6+
"description": "Aisee plugin marketplace for OpenSpec, project memory, team knowledge, and Compound Engineering workflows."
77
},
88
"plugins": [
99
{

README.en.md

Lines changed: 61 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,15 @@
3131

3232
**Aisee** stands for **AI-Enhanced Software Engineering**.
3333

34-
Aisee Plugin is an AI software engineering plugin for OpenSpec workflows. It helps teams turn ambiguous ideas into reviewable requirements, UI content specifications, architecture context, schema-aware OpenSpec changes, implementation briefs, verification checks, and archive guardrails.
34+
Aisee Plugin is an AI software engineering plugin for OpenSpec workflows. It helps teams turn ambiguous ideas into reviewable requirements, UI content specifications, architecture context, OpenSpec changes, project memory, team knowledge guardrails, implementation briefs, verification checks, and archive guardrails.
3535

36-
Aisee **does not replace OpenSpec**. OpenSpec remains the specification state machine and baseline source of truth. Aisee adds structured skills, schema packs, JSON context tooling, and engineering handoff rules around OpenSpec.
36+
Aisee **does not replace OpenSpec**. OpenSpec remains the specification state machine and baseline source of truth. Aisee adds structured skills, project memory, team knowledge, JSON context tooling, and engineering handoff rules around OpenSpec.
37+
38+
## OpenSpec Boundary
39+
40+
Aisee does not replace OpenSpec and does not maintain a second schema state machine. Aisee reads the current schema declaration only when handling OpenSpec changes, context packs, or schema pack checks; project memory and team knowledge remain guidance / guardrails.
41+
42+
When Aisee handles OpenSpec artifacts, it acts only as a parser / checker / projector. `openspec validate` and `openspec archive` remain OpenSpec responsibilities.
3743

3844
## Why Aisee?
3945

@@ -43,10 +49,10 @@ Aisee makes that context explicit:
4349

4450
- clarify business requirements before implementation;
4551
- separate requirements, UI content, architecture context, and change planning;
46-
- create and complete OpenSpec changes with schema-aware guidance;
52+
- create and complete OpenSpec changes while reading required artifacts from the current schema;
4753
- keep OpenSpec as the only persistent specification source of truth;
4854
- generate machine-readable context packs for implementation, verification, and review;
49-
- constrain document-local numbering through schemas and skills to reduce invented or duplicated labels;
55+
- constrain document-local numbering through skills/templates to reduce invented or duplicated labels;
5056
- check whether artifacts, tasks, source maps, tests, and review evidence are closed before archive.
5157

5258
## Agile Delivery Model
@@ -113,7 +119,7 @@ Core workflow:
113119
On-demand extensions:
114120

115121
- Optional extensions: `aisee:design-spec`, `aisee:design-assets`, `aisee:svg-assets`, `aisee:image-object`, `aisee:spec-migrate`
116-
- Knowledge loop: `aisee:reflect`, `aisee:knowledge-curate`
122+
- Knowledge loop: `aisee:reflect`, `aisee:memory`, `aisee:knowledge`, `aisee:knowledge-curate`
117123
- Hardware / experimental: `hw:srs`, `hw:architecture`, `hw:init`, `hw:change-plan`
118124

119125
## Features
@@ -124,6 +130,7 @@ On-demand extensions:
124130
- **Schema-aware change planning**: `aisee:change-plan` maps confirmed inputs into independently deliverable OpenSpec changes.
125131
- **OpenSpec schema pack**: includes app, device, docsite, infra, security, quick-fix, quick-research, and collaboration schemas.
126132
- **Context packs**: `aisee context pack` generates JSON context for implementation, verification, and review.
133+
- **Project memory**: `aisee memory` retrieves and writes current-repository long-lived guidance without replacing OpenSpec facts.
127134
- **Team knowledge guardrails**: `aisee knowledge` retrieves a small number of reviewed engineering lessons through pack/card protocols without turning the knowledge repository into a second specification source.
128135
- **Lightweight context routing**: `aisee context pack` parses sources, local numbers, candidate paths, and evidence entries when `source-map.md` exists.
129136
- **Verification and archive guardrails**: `aisee:verify` and `aisee:archive-guard` diagnose gaps and risks before archive.
@@ -197,7 +204,7 @@ codex plugin marketplace add AISEE-LAB/aisee-plugin --ref main
197204
codex plugin add aisee-plugin@aisee-plugin
198205
```
199206

200-
Check CLI-only state and marketplace setup hints:
207+
Check CLI and plugin content status:
201208

202209
```bash
203210
aisee plugin inspect --json
@@ -247,7 +254,7 @@ openspec init . --tools none --profile core
247254
openspec config profile core
248255
```
249256

250-
Schema packs come from the marketplace-installed plugin. `aisee schemas list/check` only reports project-installed schema state or source-checkout development schema state; it does not install schemas from the PyPI wheel.
257+
Schema packs come from the marketplace-installed plugin. `aisee schemas list/check` only reports project-installed schema state or source-checkout development schema state; it does not install schemas automatically.
251258

252259
Check the project state again:
253260

@@ -315,6 +322,8 @@ For existing projects, use `aisee:spec-migrate` to derive OpenSpec baseline spec
315322
| `aisee:svg-assets` | Generate, vectorize, optimize, and validate SVG assets. |
316323
| `aisee:image-object` | Handle object-level image segmentation, masks, background removal, and exports. |
317324
| `aisee:reflect` | Capture reusable project lessons and workflow improvements. |
325+
| `aisee:memory` | Guide project memory CLI inspect/search/add/update-index usage. |
326+
| `aisee:knowledge` | Guide team knowledge CLI initialization, configuration, sync, retrieval, and promote workflows. |
318327
| `aisee:knowledge-curate` | Batch-review project-local reusable knowledge candidates and produce card drafts for human submission to team knowledge. |
319328
320329
Hardware-related skills are retained but still being integrated into the main Aisee workflow:
@@ -364,8 +373,14 @@ aisee plugin inspect --json
364373
aisee schemas list --json
365374
aisee schemas check --json
366375
aisee context pack --change <change> --for ce-work --json
376+
aisee context pack --change <change> --for ce-work --project-memory --json
367377
aisee context pack --change <change> --for ce-work --knowledge --json
368378
aisee context pack --change <change> --for aisee-verify --json
379+
aisee memory inspect --json
380+
aisee memory list --json
381+
aisee memory search --query "<task>" --json
382+
aisee memory add --type pref --title "<title>" --summary "<summary>" --body "<body>" --json
383+
aisee memory update-index --json
369384
aisee knowledge inspect --json
370385
aisee knowledge doctor --json
371386
aisee knowledge check --json
@@ -382,13 +397,37 @@ aisee knowledge promote-batch --curation <path> --team-path .aisee/team-knowledg
382397
Key CLI rules:
383398

384399
- JSON output is a context view, not a source of truth.
400+
- `aisee memory` manages current-repository project memory; `aisee/cache/memory-index.json` is a deletable rebuildable cache.
385401
- `aisee/cache/knowledge-index.json` is also a deletable and rebuildable cache; team knowledge persists in pinned pack/card files.
386402
- `aisee knowledge promote-batch` only writes the local team knowledge worktree; it does not commit, push, or create PRs.
387403
- OpenSpec artifacts and `source-map.md` are formal inputs for context packs.
388404
- `bootstrap --plan` is a read-only plan and does not perform broad initialization writes.
389405
- `aisee openspec ensure` only bridges OpenSpec initialization and profile setup. It does not replace `aisee:init`.
390406
- `aisee knowledge query` returns only a small number of guardrails. By default it reads pack manifests and card frontmatter; `--debug` is required for matched card body excerpts.
391407

408+
### Project Memory
409+
410+
Project memory stores current-repository guidance that is long-lived but does not belong in the OpenSpec baseline, such as stable preferences, architecture decision summaries, time-bound context snapshots, and stack constraints.
411+
412+
Common commands:
413+
414+
```bash
415+
aisee memory inspect --json
416+
aisee memory search --query "commit style" --json
417+
aisee memory search --query "test command" --type stack --include-body --json
418+
aisee memory add --type pref --title "Commit message language" --summary "Use Chinese commit messages by default." --body "Project commit messages should be Chinese and follow AGENTS.md." --source-ref AGENTS.md --priority high --json
419+
aisee memory update-index --json
420+
aisee context pack --change <change> --for ce-work --project-memory --json
421+
```
422+
423+
Rules:
424+
425+
- `aisee:memory` guides day-to-day CLI usage; `aisee:reflect` still owns retrospective candidates.
426+
- Default retrieval returns a small number of active metadata entries; use `--include-body` explicitly for bounded body excerpts.
427+
- New writes go only to canonical `aisee/memory/`; legacy `.memory/` is read-only fallback.
428+
- Hooks are read-only and can only hint `inspect/search` plus a few high-priority summaries.
429+
- Project memory is guidance. If it conflicts with OpenSpec artifacts, `source-map.md`, or `tasks.md`, OpenSpec artifacts win.
430+
392431
### Team Knowledge Guardrails
393432

394433
Team knowledge is experimental. It reuses engineering lessons across projects, but it does not replace OpenSpec, `source-map.md`, contracts, tasks, or baseline specs.
@@ -409,15 +448,23 @@ retrieval:
409448
Common commands:
410449
411450
```bash
451+
aisee knowledge init-repo --dest ../aisee-team-knowledge --initial-pack web-app --json
452+
aisee knowledge configure --path ../aisee-team-knowledge --enable-pack web-app --json
412453
aisee knowledge inspect --json
454+
aisee knowledge doctor --json
455+
aisee knowledge check --json
456+
aisee knowledge install --json
457+
aisee knowledge update --json
413458
aisee knowledge query --phase implementation --surface cli --query "public CLI JSON" --json
414459
aisee knowledge query --from-change <change> --for ce-work --json
415460
aisee context pack --change <change> --for ce-work --knowledge --json
461+
aisee knowledge promote-batch --curation <path> --team-path ../aisee-team-knowledge --pack web-app --json
416462
```
417463

418464
Rules:
419465

420-
- `install`, `update`, and `promote-batch` are experimental. The PyPI CLI no longer provides local default scaffolding. PR automation and MCP service support are still unsettled.
466+
- `aisee:knowledge` guides day-to-day CLI usage for onboarding, sync, retrieval, and promote.
467+
- `install`, `update`, and `promote-batch` are experimental. Team knowledge examples come from the marketplace plugin or external repositories; PR automation and MCP service support are still unsettled.
421468
- Query through the CLI instead of letting AI scan `knowledge/cards/**/*.md` directly.
422469
- Return a small number of bounded matches as implementation, review, or verification reminders.
423470
- Project-local `aisee/docs/reflect/knowledge-candidates/` remains a candidate area and is not promoted automatically.
@@ -436,10 +483,8 @@ plugins/aisee-plugin/
436483
references/ Cross-skill contracts and references
437484
bin/ Local CLI entrypoint
438485
src/aisee_cli/ Aisee Python CLI
439-
src/aisee_plugin_assets/
440-
Minimal compatibility package; no bundled skills, schemas, references, or plugin metadata
441-
docs/ User workflow, best practices, architecture, plans, and review docs
442-
docs/architecture/ Architecture and historical decision docs
486+
docs/ User workflow, best practices, architecture, and release docs
487+
docs/architecture/ Architecture docs
443488
docs/plans/ Development plans
444489
docs/reviews/ Audit and review records
445490
scripts/ Development and release helper scripts
@@ -496,7 +541,7 @@ python scripts/smoke_release.py --with-pipx
496541
- OpenSpec is the canonical specification source.
497542
- Do not create parallel sources of truth in Aisee docs, CLI cache, or chat summaries.
498543
- Keep skills single-purpose: requirements, UI content, architecture, change planning, implementation bridge, verify, and archive guard.
499-
- Prefer schema-aware checks over hardcoded artifact assumptions.
544+
- When processing OpenSpec changes, read the current schema declaration instead of hardcoding app artifact assumptions.
500545
- Keep `SKILL.md` concise and put long rules in references or architecture docs.
501546
- Treat hardware and embedded workflows as dedicated extensions instead of forcing them into the app schema.
502547

@@ -510,12 +555,12 @@ python scripts/smoke_release.py --with-pipx
510555

511556
### Ongoing Compatibility Governance
512557

513-
- Keep CLI JSON, schema packs, context packs, marketplace plugin content, and skill contracts aligned with the Compatibility Policy; when a public contract changes, update tests, migration notes, and release notes together.
514-
- Add more real-world lifecycle fixtures beyond the app scenario, starting with quick-fix, quick-research, docsite, and infra-change.
558+
- Keep CLI JSON, project memory, team knowledge, context packs, marketplace plugin content, and skill contracts aligned with the Compatibility Policy; when a public contract changes, update tests, migration notes, and release notes together.
559+
- Use real-project dogfood to verify memory retrieval, context pack handoffs, and knowledge guardrails instead of expanding abstract flows just to cover schema types.
515560

516561
### Later
517562

518-
- Expand cross-repository contract collaboration examples.
563+
- Improve project memory conflict hints, stale-entry policy, and low-context injection rules.
519564
- Tighten team knowledge remote sync, promote workflows, lifecycle management, and optional MCP wrapping.
520565

521566
## License

0 commit comments

Comments
 (0)