create-academic-research 0.1.15 → 0.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -606,17 +606,18 @@ async function stageManagedFiles(root, specs, manifest, options) {
606
606
  nextManifest.files[relativePath] = stableManagedRecord(existing, managedRecordCandidateForWrittenFile(spec));
607
607
  continue;
608
608
  }
609
- options.changes.push({
610
- path: relativePath,
611
- action: "skip",
612
- reason: manifest ? "local edits detected" : "unknown legacy content"
613
- });
609
+ if (isUnchangedSkippedManagedRecord(existing, currentChecksum, generatedChecksum)) {
610
+ nextManifest.files[relativePath] = existing;
611
+ continue;
612
+ }
613
+ const reason = skippedManagedRecordReason(existing, manifest !== undefined, currentChecksum);
614
+ options.changes.push({ path: relativePath, action: "skip", reason });
614
615
  nextManifest.files[relativePath] = stableManagedRecord(existing, {
615
616
  path: relativePath,
616
617
  policy: spec.policy,
617
618
  generated_checksum: generatedChecksum,
618
619
  current_checksum: currentChecksum,
619
- reason: manifest ? "local edits detected" : "unknown legacy content"
620
+ reason
620
621
  });
621
622
  }
622
623
  return nextManifest;
@@ -696,6 +697,16 @@ function stableManagedRecord(existing, candidate) {
696
697
  return existing;
697
698
  return { ...candidate, updated_at: nowIso() };
698
699
  }
700
+ function isUnchangedSkippedManagedRecord(record, currentChecksum, generatedChecksum) {
701
+ return Boolean(record?.reason &&
702
+ record.current_checksum === currentChecksum &&
703
+ record.generated_checksum === generatedChecksum);
704
+ }
705
+ function skippedManagedRecordReason(existing, hasManifest, currentChecksum) {
706
+ if (existing?.reason && existing.current_checksum === currentChecksum)
707
+ return existing.reason;
708
+ return hasManifest ? "local edits detected" : "unknown legacy content";
709
+ }
699
710
  function managedManifestSemanticallyEqual(left, right) {
700
711
  if (left.version !== right.version)
701
712
  return false;
@@ -835,6 +846,8 @@ async function validateManagedManifestDrift(root, warnings) {
835
846
  continue;
836
847
  const checksum = checksumText(current);
837
848
  const record = manifest?.files[relativePath];
849
+ if (isUnchangedSkippedManagedRecord(record, checksum, checksumText(spec.content)))
850
+ continue;
838
851
  if (canSafelyUpdateManagedFile(record, checksum)) {
839
852
  warnings.push(`${relativePath} is not current; run npm run update -- --apply`);
840
853
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-academic-research",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Scaffold agent-ready academic research repositories with SOTA, source ledgers, wiki memory, MCP setup, and project-local skills.",
5
5
  "type": "module",
6
6
  "license": "MIT",