Rename repo-memory runtime artifacts
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"ai-workflow-skill/packages/repo-memory-runtime/internal/brief"
|
||||
"ai-workflow-skill/packages/repo-memory-runtime/internal/documents"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
@@ -421,7 +421,7 @@ func (s *Store) UpsertEntry(ctx context.Context, in EntryInput) (int64, error) {
|
||||
return entryID, tx.Commit()
|
||||
}
|
||||
|
||||
func (s *Store) ImportDocument(ctx context.Context, doc brief.Document, repoState RepoState) error {
|
||||
func (s *Store) ImportDocument(ctx context.Context, doc documents.Document, repoState RepoState) error {
|
||||
repoState.RootPath = doc.RepoPath
|
||||
if _, err := s.UpsertRepo(ctx, repoState); err != nil {
|
||||
return err
|
||||
@@ -759,7 +759,7 @@ func classifyImportedKind(docKind, heading string) string {
|
||||
return "term"
|
||||
case "playbooks":
|
||||
return "entry"
|
||||
case "repo-brief":
|
||||
case "repo-memory", "repo-brief":
|
||||
switch {
|
||||
case strings.Contains(lowerHeading, "module"):
|
||||
return "module"
|
||||
|
||||
@@ -5,13 +5,13 @@ import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
|
||||
"ai-workflow-skill/packages/repo-memory-runtime/internal/brief"
|
||||
"ai-workflow-skill/packages/repo-memory-runtime/internal/documents"
|
||||
)
|
||||
|
||||
func TestImportDocumentAndSearch(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
dbPath := filepath.Join(t.TempDir(), "briefs.db")
|
||||
dbPath := filepath.Join(t.TempDir(), "repo-memory.db")
|
||||
st, err := Open(dbPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -23,14 +23,14 @@ func TestImportDocumentAndSearch(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
doc := brief.Document{
|
||||
doc := documents.Document{
|
||||
RepoPath: "/tmp/zeus",
|
||||
DocPath: "docs/ai/repo-brief.md",
|
||||
Kind: "repo-brief",
|
||||
Title: "Zeus Repo Brief",
|
||||
DocPath: "docs/ai/repo-memory.md",
|
||||
Kind: "repo-memory",
|
||||
Title: "Zeus Repo Memory",
|
||||
Hash: "abc",
|
||||
Metadata: map[string]string{"repo": "zeus"},
|
||||
Sections: []brief.Section{
|
||||
Sections: []documents.Section{
|
||||
{Heading: "Module Map", Level: 2, Ordinal: 1, Body: "AI insight lives in app/app and gateway."},
|
||||
{Heading: "Danger Zones", Level: 2, Ordinal: 2, Body: "Avoid shared libs first."},
|
||||
},
|
||||
@@ -67,7 +67,7 @@ func TestImportDocumentAndSearch(t *testing.T) {
|
||||
func TestUpsertEntryWithAliasesAndDependencies(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
dbPath := filepath.Join(t.TempDir(), "briefs.db")
|
||||
dbPath := filepath.Join(t.TempDir(), "repo-memory.db")
|
||||
st, err := Open(dbPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -178,7 +178,7 @@ func TestUpsertEntryWithAliasesAndDependencies(t *testing.T) {
|
||||
func TestApplyVerificationResult(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
dbPath := filepath.Join(t.TempDir(), "briefs.db")
|
||||
dbPath := filepath.Join(t.TempDir(), "repo-memory.db")
|
||||
st, err := Open(dbPath)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user