Skip to content

Commit e9e247c

Browse files
Merge pull request #1 from fajarnugraha37/agent/token-efficient-semantic-index
Replace legacy pipeline with token-efficient semantic index
2 parents f03f8bc + a5a7edd commit e9e247c

105 files changed

Lines changed: 3115 additions & 8741 deletions

File tree

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ['main', 'agent/**']
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
include:
17+
- os: ubuntu-latest
18+
node-version: 22
19+
upload-source: false
20+
- os: ubuntu-latest
21+
node-version: 24
22+
upload-source: true
23+
- os: windows-latest
24+
node-version: 24
25+
upload-source: false
26+
runs-on: ${{ matrix.os }}
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
cache: npm
33+
cache-dependency-path: global-template/docgen/package.json
34+
- name: Syntax check
35+
working-directory: global-template/docgen
36+
run: npm run check
37+
- name: Unit and integration tests
38+
working-directory: global-template/docgen
39+
run: npm test
40+
- name: Installer dry run
41+
run: node install.mjs --dry-run --no-link-cli
42+
- name: Upload exact CI source
43+
if: always() && matrix.upload-source
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: docgen-ci-source
47+
if-no-files-found: error
48+
retention-days: 3
49+
path: |
50+
global-template/docgen
51+
global-template/docgen/project-template
52+
install.mjs
53+
VERSION

CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Changelog
2+
3+
## 2.0.0 — Token-efficient semantic index
4+
5+
### Breaking
6+
7+
- Removed the v1 monolithic `docgen.mjs` engine.
8+
- Removed discovery, analyze, semantics, enterprise-pass, enrichment, fix, update-impact, and full re-audit commands/prompts.
9+
- Removed all custom pipeline agents and parent-to-subagent delegation.
10+
- Removed legacy auto-enrich, auto-fix, and re-audit configuration.
11+
- Requires Node.js 22.5+ for built-in `node:sqlite`.
12+
- Existing v1 repositories must run `docgen migrate`.
13+
14+
### Added
15+
16+
- SQLite/FTS5 semantic index with incremental file hashing.
17+
- Overlapping source chunks plus deterministic symbol/interface/config/SQL extraction.
18+
- Bounded content-addressed context compiler.
19+
- Hard provider call/input/output/per-call budgets.
20+
- Provider telemetry and stage usage reports.
21+
- Two-call model synthesis: core and enterprise.
22+
- Deterministic catalog/reference rendering.
23+
- Item-level page invalidation.
24+
- Claim-level traceability generated in the same page invocation.
25+
- Deterministic FACT/evidence validation.
26+
- Selective, risk-scored, hash-cached LLM audit.
27+
- Breaking v1-to-v2 migration with backup and docs/ignore preservation.
28+
- Node.js 22/24 CI and semantic-index regression suite.
29+
30+
### Changed
31+
32+
- Planning defaults to at most 30 pages unless explicitly configured otherwise.
33+
- Provider prompts are direct and context-only.
34+
- Skills remain available for manual Command Code work but are not automatically loaded by the pipeline.
35+
- Source inventory moved from `.docgen/state` to `.docgen/index`.
36+
- Publishing and P3 workspace aggregation remain deterministic.
37+
38+
### Removed dead managed files during installation
39+
40+
The installer backs up and removes v1 executable, prompts, agents, and obsolete slash commands from global and project-local installations.
41+
42+
## 1.0.0
43+
44+
P3 system-of-systems workspace release built on the original provider-heavy repository pipeline.

PACKAGE-MANIFEST.json

Lines changed: 66 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,105 @@
11
{
22
"name": "commandcode-docgen-kit",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
4+
"releaseType": "breaking-token-efficiency-redesign",
5+
"runtime": {
6+
"node": ">=22.5.0",
7+
"database": "node:sqlite with FTS5",
8+
"provider": "Command Code CLI"
9+
},
410
"defaultInstallationScope": "global",
511
"globalComponents": [
6-
"agents",
712
"skills",
813
"commands",
914
"hooks",
10-
"orchestrator",
11-
"prompts",
15+
"modular-engine",
16+
"bounded-prompts",
1217
"schemas",
1318
"project-template"
1419
],
1520
"projectComponents": [
1621
".docgen/config",
17-
".docgen/evidence",
22+
".docgen/index",
23+
".docgen/context",
1824
".docgen/model",
1925
".docgen/plan",
26+
".docgen/traceability",
2027
".docgen/audit",
21-
".docgen/state",
28+
".docgen/telemetry",
29+
".docgen/budget",
2230
".docgen/runs",
23-
".docgen/traceability",
31+
".docgen/publish",
32+
".docgen/state",
2433
"docs",
25-
".docgen/quarantine",
26-
".docgenignore",
27-
".docgen/publish"
34+
".docgenignore"
2835
],
2936
"counts": {
30-
"agents": 8,
37+
"agents": 0,
3138
"skills": 50,
32-
"commands": 21,
39+
"commands": 15,
3340
"schemas": 35,
34-
"prompts": 14
41+
"providerPrompts": 5
3542
},
36-
"contractFirewall": {
37-
"boundaries": 19,
38-
"deterministicTests": 21,
39-
"transactionalStages": 6,
40-
"zeroTokenCommand": "docgen contract-test"
43+
"tokenEfficiency": {
44+
"singlePassSourceIndex": true,
45+
"incrementalFileHashing": true,
46+
"sourceChunkIndex": true,
47+
"sqliteFts5": true,
48+
"boundedContextCompiler": true,
49+
"contentAddressedContext": true,
50+
"hardProviderBudgets": true,
51+
"providerTelemetry": true,
52+
"twoModelSynthesisCalls": true,
53+
"deterministicReferenceRendering": true,
54+
"itemLevelPageInvalidation": true,
55+
"selectiveRiskAudit": true,
56+
"auditInputCaching": true,
57+
"parentAgentDelegation": false,
58+
"autoEnrichLoop": false,
59+
"autoFixLoop": false,
60+
"fullReauditLoop": false,
61+
"legacyPipeline": false
4162
},
42-
"p0Trustworthiness": {
63+
"trustworthiness": {
4364
"typedSemanticModels": true,
4465
"claimLevelTraceability": true,
45-
"evidenceCentricQuality": true,
46-
"crossPageContradictions": true,
47-
"duplicateDetection": true,
48-
"sourceFreshness": true,
49-
"wordCountGate": "advisory",
50-
"zeroTokenCommand": "docgen traceability"
66+
"factEvidenceValidation": true,
67+
"ignoredEvidenceRejected": true,
68+
"contextOnlyReadHook": true,
69+
"mermaidOnly": true
5170
},
52-
"p1EnterpriseDepth": {
53-
"security": true,
54-
"operations": true,
55-
"testing": true,
56-
"dataGovernance": true,
57-
"architectureDecisions": true,
58-
"configuration": true,
59-
"changeImpact": true,
60-
"ownership": true
61-
},
62-
"ignoreBoundary": {
71+
"sourceBoundary": {
6372
"gitignore": true,
73+
"nestedGitignoreFallback": true,
6474
"docgenignore": true,
65-
"readHook": true,
66-
"sourceInventory": true,
67-
"fingerprintsRespectIgnore": true,
68-
"traceabilityRejectsIgnoredEvidence": true,
6975
"binaryAndNonText": true,
70-
"magicAndUtf8Probe": true
76+
"magicAndUtf8Probe": true,
77+
"oversizedTextGuard": true
7178
},
72-
"p2DocumentationExperience": {
73-
"documentModes": true,
79+
"publishing": {
7480
"frontmatter": true,
7581
"llmsTxt": true,
82+
"llmsFullTxt": true,
7683
"searchIndex": true,
77-
"backlinks": true,
78-
"aliasesRedirects": true,
79-
"versionDeprecationMigration": true,
80-
"evidenceDerivedExamples": true
84+
"navigationIndex": true
8185
},
82-
"p3SystemOfSystems": {
86+
"systemOfSystems": {
8387
"workspaceRegistry": true,
8488
"multiRepositoryAggregation": true,
85-
"globalDependencyGraph": true,
86-
"sharedContractRegistry": true,
87-
"domainCapabilityMap": true,
89+
"dependencyGraph": true,
90+
"contractRegistry": true,
91+
"capabilityMap": true,
8892
"businessJourneys": true,
89-
"crossServiceRequestFlows": true,
90-
"crossServiceEventFlows": true,
91-
"crossRepositoryDataLineage": true,
92-
"sharedInfrastructure": true,
93-
"ownershipAggregation": true,
94-
"crossRepositoryChangeImpact": true,
95-
"incrementalWorkspaceRebuild": true,
96-
"mermaidOnly": true,
97-
"zeroProviderBasePipeline": true
93+
"crossServiceFlows": true,
94+
"dataLineage": true,
95+
"ownership": true,
96+
"changeImpact": true,
97+
"incrementalWorkspaceRebuild": true
98+
},
99+
"migration": {
100+
"from": "1.x",
101+
"command": "docgen migrate",
102+
"preserves": ["docs/**", ".docgenignore", "selected runtime/ignore configuration"],
103+
"archivesLegacyArtifacts": true
98104
}
99105
}

0 commit comments

Comments
 (0)